aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-07-14drm/nouveau/secboot: fix kerneldoc for secure boot structuresAlexandre Courbot1-4/+9
Some members were documented in the wrong structure. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/hwmon: add in_min and in_maxKarol Herbst1-0/+36
it is a little help for hardware monitoring tools Signed-off-by: Karol Herbst <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/volt: save the voltage range we are able to setKarol Herbst2-1/+16
We shouldn't set voltages below the min or above the max voltage the gpu is able to set, so save the range for future lookups. Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Martin Peres <[email protected]> Tested-by: Pierre Moreau <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gm20b: add glitchless and DFS supportAlexandre Courbot4-98/+1002
This patch adds support for advanced features supported by the Noise-Aware PLL of Maxwell. Glitchless switch allows the PL field to be updated without disabling the PLL first if the SYNC_MODE bit of the CFG register is set. More significantly, DFS allows the PLL to monitor the actual input voltage and to dynamically lower the output frequency accordingly. This allows the clock to be more tolerant of lower voltages. These improvements are only supported for Tegra speedos >= 1. Also add the voltage table that is suitable for GM20B's NAPLL. This change needs to be done atomically for the right voltages to be used by the clock driver. v2. Fix build on non-Tegra platforms Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: rename constructorAlexandre Courbot3-5/+5
Strip the _ prefix off the gk20a clock constructor. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: improve MNP programmingAlexandre Courbot1-89/+96
Split the MNP programming function into two functions for the cases where we allow sliding or not, instead of making it take a parameter for this. This results in less conditionals in the code and makes it easier to read. Also make the MNP programming functions take the PLL parameters as arguments, and move bits of code to more relevant places (previous programming tended to be just-in-time, which added more conditionnals in the code). Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: factorize n_lo computation codeAlexandre Courbot1-9/+10
Use a dedicated function instead of always calculating n_lo on the fly. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: parameterize PLL settingsAlexandre Courbot1-24/+27
Make functions manipulating PLL settings take them as an argument, instead of assuming we want to work on the copy in the gk20a_clk structure. This makes these functions more flexible, which we will need in GM20B. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: add and use MNP programming functionsAlexandre Courbot1-13/+22
Add relevant functions to work with the gk20a_pll structure and use them where they ought to be instead of directly manipulating registers. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: use nvkm_ functions in slide()Alexandre Courbot1-16/+10
Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: reorganize MNP calculation a bitAlexandre Courbot1-8/+5
Move variables declarations to their actual scope of use, and simplify code a bit. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: setup slide once during initAlexandre Courbot3-6/+46
Slide setup needs to be performed only once, during init. Also use the proper parameters for different clock speeds. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/clk/gk20a: properly protect macro argumentAlexandre Courbot2-2/+2
Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/volt/gm20b: add support for vmin parameterAlexandre Courbot3-7/+22
Chips may be characterized for a minimum voltage. Support this extra parameter and select the appropriate minimum voltage for the detected GPU speedo. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/volt/gk20a: rename constructorAlexandre Courbot3-10/+10
Strip the _ prefix off the gk20a volt constructor. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/volt/gk20a: constify and name v_scaleAlexandre Courbot1-1/+2
Give a name to this constant so we at least get an idea of what it is for. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/volt/gk20a: make unused public functions staticAlexandre Courbot2-9/+4
Nobody else is using these, so make them private. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/tegra: fetch gpu_speedo_idAlexandre Courbot2-0/+2
The GPU speedo ID is required to select the right clk/volt parameters on GM20B. Signed-off-by: Alexandre Courbot <[email protected]> Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/secboot: use nvkm_mc_enable/disable()Ben Skeggs2-6/+3
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/secboot: use nvkm_mc_intr_mask/unmask()Ben Skeggs2-7/+6
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/mc/gk104-: add pmu reset maskBen Skeggs1-0/+1
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/mc/gf100-: support for masking interruptsBen Skeggs4-0/+12
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/mc/gt215: support for masking interruptsBen Skeggs1-0/+7
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/mc: support for temporarily masking interrupts from a specific ↵Ben Skeggs3-0/+18
device Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/mc: s/intr_mask/intr_stat/Ben Skeggs13-19/+19
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/mc: expose device enable/disable separately, as well as resetBen Skeggs3-15/+38
There are cases where subdevs need to perform additonal actions around the master reset, so we want to expost the operations separately. This commit also adds a flag to the NV_PMC_ENABLE bitfield definitions which allow skipping the automatic reset() called from core/subdev.c. Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/mc: take nvkm_device as argument to public functionsBen Skeggs9-46/+50
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/mc: allow construction of subclassed deviceBen Skeggs2-4/+11
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/top: add function to lookup interrupt mask for a given deviceBen Skeggs2-0/+17
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-14drm/nouveau/top: take nvkm_device as argument to public functionsBen Skeggs4-13/+16
Signed-off-by: Ben Skeggs <[email protected]>
2016-07-13dma-buf/sync_file: improve Kconfig description for Sync FilesGustavo Padovan1-3/+12
We've got a complaint saying that the description was quite obtuse and indeed it was. This patch tries to improve it. Cc: Dave Jones <[email protected]> Signed-off-by: Gustavo Padovan <[email protected]> Signed-off-by: Sumit Semwal <[email protected]>
2016-07-13MAINTAINERS: add entry for the Sync File FrameworkGustavo Padovan1-0/+11
Add Gustavo as maintainer for the Sync File Framework. Sumit is co-maintainer as he maintains drivers/dma-buf/. It also uses Sumit's tree as base. Signed-off-by: Gustavo Padovan <[email protected]> Acked-by: Sumit Semwal <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Signed-off-by: Sumit Semwal <[email protected]>
2016-07-13drm/exynos: iommu: add support for ARM64 specific code for IOMMU glueMarek Szyprowski3-7/+57
This patch adds support for ARM 64bit architecture with IOMMU-DMA glue code, so Exynos DRM can be now used on Exynos 5433 with IOMMU enabled. Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-07-13drm/exynos: iommu: move ARM specific code to exynos_drm_iommu.hMarek Szyprowski2-33/+42
This patch moves all ARM 32bit DMA-mapping/IOMMU dependant code from exynos_drm_iommu.c to .h, to let it compile conditionally and prepare for adding support for other architectures/IOMMU glue code (like ARM 64bit with IOMMU-DMA glue). Later, when ARM 32bit and 64bit will be unified, this code can be removed. Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-07-13drm/exynos: iommu: remove unused entries from exynos_drm_private strcutureMarek Szyprowski2-9/+2
This patch removes unused entries from exynos_drm_private strcuture. da_start/da_space_size were only used in drm_create_iommu_mapping() function and never set to other value than the defaults. Instead use default values directly in arm_iommu_create_mapping() call. Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-07-13drm/exynos: iommu: add a check if all sub-devices have iommu controllerMarek Szyprowski1-0/+5
This patch adds a check if all devices belonging to Exynos DRM have the same dma_map_ops set. This is required to enable operation with IOMMU enabled. Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-07-13drm/exynos: iommu: move dma_params configuration code to separate functionsMarek Szyprowski1-6/+22
Move code for managing DMA max segment size parameter to separate functions. This patch also replaces devm_kzalloc() with kzalloc() and adds proper kfree call. devm_kzalloc() cannot be used for dma_params structure, because it will be freed on driver remove not on device release. This means in case of Exynos DRM being compiled as module and loaded 2 times, a user-after-free issue will happen. Signed-off-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-07-13drm: Resurrect atomic rmfb codeDaniel Vetter3-0/+73
This was somehow lost between v3 and the merged version in Maarten's patch merged as: commit f2d580b9a8149735cbc4b59c4a8df60173658140 Author: Maarten Lankhorst <[email protected]> Date: Wed May 4 14:38:26 2016 +0200 drm/core: Do not preserve framebuffer on rmfb, v4. Actual code copied from Maarten's patch, but with the slight change to just use dev->mode_config.funcs->atomic_commit to decide whether to use the atomic path or not. Cc: Maarten Lankhorst <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2016-07-12drm/imx: parallel-display: check return code from of_get_drm_display_mode()Lothar Waßmann1-1/+7
of_get_drm_display_mode() may fail. Check its return code and bail out on error. Signed-off-by: Lothar Waßmann <[email protected]> Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12gpu: ipu-v3: ipu-dc: don't bug out on invalid bus_formatPhilipp Zabel1-3/+3
If imx-drm is combined with a bridge or panel that requests an unsupported format, warn and use a default mapping instead of hanging the machine. The worst that can happen here are wrong colors. Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: imx-tve: fix the error messageFabio Estevam1-2/+2
The error message should say "hsync" instead of "vsync" as we have just checked the "fsl,hsync-pin" property. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: imx-tve: remove unneeded 'or' operationFabio Estevam1-1/+1
There is no need for doing an extra 'or' operation when reading the return value from of_property_read_u32(). Just do a simple read instead. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: imx-tve: check the value returned by regulator_set_voltage()Fabio Estevam1-1/+3
regulator_set_voltage() may fail, so we better check its return value and propagate it in the case of error. Signed-off-by: Fabio Estevam <[email protected]> Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: imx-ldb: check return code on panel attachLucas Stach1-2/+6
Check the return code on panel attach. Avoids a kernel crash later on if the attach failed. Signed-off-by: Lucas Stach <[email protected]> Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: turn remaining container_of macros into inline functionsPhilipp Zabel5-8/+23
This allows the compiler to do type checking. Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: store internal bus configuration in crtc statePhilipp Zabel6-107/+229
The internal bus configuration is imx-drm specific crtc state. Store it in imx_crtc_state and let the encoder atomic_check callbacks determine bus_flags, bus_format and the sync pins, possibly taking into account the mode and the connector display info. The custom imx_drm_encoder structure can be replaced again with drm_encoder. Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: remove empty mode_set encoder callbacksPhilipp Zabel2-14/+0
With atomic modeset support, these callbacks are optional. Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: atomic phase 3 step 3: Advertise DRIVER_ATOMICLiu Ying1-1/+2
With all the beforehand phases and steps done, we can adverstise DRIVER_ATOMIC. Signed-off-by: Liu Ying <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/imx: atomic phase 3 step 2: Legacy callback fixupsLiu Ying5-82/+27
Now that we can use atomic configurations, all the legacy callbacks of CRTCs, encoders and connectors can be switched to the atomic version. For the imx-ldb driver, there is a clock parent setting mismatch bewteen ->enable and ->disable after the switch, so a fixup is added. For the imx-tve driver, since the encoder's callback ->dpms is replaced by ->disable, we need to move the setting for the IPU_CLK_EN bit(in register TVE_COM_CONF_REG) from ->enable/->disable to ->mode_set, otherwise, the relevant CRTC cannot be disabled correctly with a warning on DC stop timeout. Signed-off-by: Liu Ying <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Philipp Zabel <[email protected]>
2016-07-12drm/bridge: dw-hdmi: Remove the legacy drm_connector_funcs structureLiu Ying1-19/+3
There is no one using the legacy drm_connector_funcs structure since the imx-drm has been converted to atomic, so we may remove it. Signed-off-by: Liu Ying <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Philipp Zabel <[email protected]>