summaryrefslogtreecommitdiff
path: root/drivers/gpu
AgeCommit message (Collapse)Author
2015-06-29gpu/drm/amdgpu: Fix build when CONFIG_DEBUG_FS is not setAlexander Kuleshov
If the CONFIG_DEBUG_FS is not selected, compilation of the drivers/gpu/drm/amd/amdgpu/amdgpu_device.c provides two warnings that amdgpu_debugfs_regs_init and amdgpu_debugfs_regs_cleanup are used but never defined. And as result: ERROR: "amdgpu_debugfs_regs_cleanup" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ERROR: "amdgpu_debugfs_regs_init" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! ^ Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29Revert "drm/radeon: dont switch vt on suspend"Alex Deucher
This reverts commit b9729b17a414f99c61f4db9ac9f9ed987fa0cbfe. This seems to break the cursor on resume for lots of systems. Cc: stable@vger.kernel.org
2015-06-29drm/amdgpu: disable enable_nb_ps_policy temporarilySonny Jiang
Fixes a hang on resume. Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: correct define SMU_EnabledFeatureScoreboard_SclkDpmOnSonny Jiang
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: allocate ip_block_enabled memory in common codeAlex Deucher
Remove duplication across asic families and make it symmetric with the freeing of the code in amdgpu_device.c Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: remove unnecessary check before kfreeManinder Singh
kfree(NULL) is safe and this check is probably not required Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian Konig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: use kzalloc for allocating one thingManinder Singh
Use kzalloc rather than kcalloc(1.. for allocating one thing. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian Konig <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/radeon: fix adding all VAs to the freed list on remove v2Christian König
We only should do so when the BO_VA was actually mapped. Otherwise we get a nice error message on the next CS. v2: It actually doesn't matter if it was invalidated or not, if it was mapped we need to clear the area where it was mapped. Signed-off-by: Christian König <christian.koenig@amd.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com> (v1) Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: add chunk id validity checkChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: fix crash on invalid CS IOCTLChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: reset wptr at cp compute resume (v2)Sonny Jiang
This patch is to resolve compute hang at resume time. v2: (agd5f) squash in second fix Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-29drm/amdgpu: check VCE feedback and bitstream indexChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2015-06-29drm/amdgpu: make VCE handle check more strictChristian König
Port of radeon commit 29c63fe22a17c64e54016040cd882481bd45ee5a. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2015-06-29drm/amdgpu: check VCE relocation buffer rangeChristian König
port of radeon commit 2fc5703abda201f138faf63bdca743d04dbf4b1a. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2015-06-29drm/amdgpu: silence invalid error messageChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com>
2015-06-29drm/amdgpu: fix wrong typemonk.liu
Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
2015-06-29drm/amdgpu: print the bo_list in the CS trace point as wellChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>
2015-06-29drm/amdgpu: add amdgpu_bo_list_set trace pointChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>
2015-06-29drm/amdgpu: add BO map/unmap trace pointChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <aleander.deucher@amd.com>
2015-06-29drm/amdgpu: simplify fence debugfs output a bitChristian König
Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <aleander.deucher@amd.com>
2015-06-29drm/radeon: SDMA fix hibernation (CI GPU family).Jérôme Glisse
In order for hibernation to reliably work we need to properly turn off the SDMA block, sadly after numerous attemps i haven't not found proper sequence for clean and full shutdown. So simply reset both SDMA block, this makes hibernation works reliably on sea island GPU family (CI) Hibernation and suspend to ram were tested (several times) on : Bonaire Hawaii Mullins Kaveri Kabini Cc: stable@vger.kernel.org Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/radeon: compute ring fix hibernation (CI GPU family) v2.Jérôme Glisse
In order for hibernation to reliably work we need to cleanup more thoroughly the compute ring. Hibernation is different from suspend resume as when we resume from hibernation the hardware is first fully initialize by regular kernel then freeze callback happens (which correspond to a suspend inside the radeon kernel driver) and turn off each of the block. It turns out we were not cleanly shutting down the compute ring. This patch fix that. Hibernation and suspend to ram were tested (several times) on : Bonaire Hawaii Mullins Kaveri Kabini Changed since v1: - Factor the ring stop logic into a function taking ring as arg. Cc: stable@vger.kernel.org Signed-off-by: Jérôme Glisse <jglisse@redhat.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: Configure doorbell to maximum slotsBen Goz
Signed-off-by: Ben Goz <ben.goz@amd.com> Acked-by: Oded Gabbay <oded.gabbay@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: Initialize compute sdma and memory from kgdBen Goz
v2: add missing MTYPE_NONCACHED enum Signed-off-by: Ben Goz <ben.goz@amd.com> Acked-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/radeon: use kzalloc for allocating one thingManinder Singh
Use kzalloc for allocating one thing rather than kcalloc(1... The semantic patch that makes this change is as follows: // <smpl> @@ @@ - kcalloc(1, + kzalloc( ...) // </smpl> Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Reviewed-by: Vaneet Narang <v.narang@samsung.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-29drm/amdgpu: fix hpd range check in dce_v8_0_hpd_irq()Alex Deucher
Spotted by Dan Carpenter. This is a slight variant of his fix. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-26drm/nouveau: Pause between setting gpu to D3hot and cutting the powerLukas Wunner
On the MacBook Pro, power of the gpu is cut by a gmux chip. Sometimes the gpu gets stuck in powersaving mode and refuses to wake up ("Refused to change power state, currently in D3"). Inserting a delay between setting the gpu to D3hot and cutting the power seems to help (most of the time). This issue and its (partial) remediation by the patch was observed with an Nvidia GT650M (NVE7 / GK107). Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-25drm/dp/mst: close deadlock in connector destruction.Dave Airlie
I've only seen this once, and I failed to capture the lockdep backtrace, but I did some investigations. If we are calling into the MST layer from EDID probing, we have the mode_config mutex held, if during that EDID probing, the MST hub goes away, then we can get a deadlock where the connector destruction function in the driver tries to retake the mode config mutex. This offloads connector destruction to a workqueue, and avoid the subsequenct lock ordering issue. Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-24drm: Always enable atomic APIDaniel Stone
Now that the interface has been proven by a port of Weston (using all atomic features including TEST_ONLY), remove the module parameter guarding the atomic API from being exposed, and let it run free in the wild. Signed-off-by: Daniel Stone <daniels@collabora.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-24drm/vgem: Set unique to "vgem"Daniel Vetter
Since there's only one global instance ever we don't need to have anything fancy. Stops a WARNING in the get_unique ioctl that the unique name isn't set. Cc: <stable@vger.kernel.org> # 4.1+ only Reportedy-and-tested-by: Fabio Coatti <fabio.coatti@gmail.com> Cc: Fabio Coatti <fabio.coatti@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-23drm/dp/mst: take lock around looking up the branch device on hpd irqDave Airlie
If we are doing an MST transaction and we've gotten HPD and we lookup the device from the incoming msg, we should take the mgr lock around it, so that mst_primary and mstb->ports are valid. Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-23drm/dp/mst: make sure mst_primary mstb is valid in work functionDaniel Vetter
This validates the mst_primary under the lock, and then calls into the check and send function. This makes the code a lot easier to understand the locking rules in. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-06-23Merge tag 'drm-intel-next-fixes-2015-06-22' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next fix warning introduced in last -fixes * tag 'drm-intel-next-fixes-2015-06-22' of git://anongit.freedesktop.org/drm-intel: drm/i915: Silence compiler warning
2015-06-23Merge branch 'exynos-drm-next' of ↵Dave Airlie
git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next Summary: . Add atomic feature support - Exynos also now supports atomic feature. However, it doesn't guarantee atomic operation yet, and is required for more cleanups. This time we just modified for Exynos drm driver to use atomic interfaces instead of legacy ones. Next time, we will enhance Exynos drm driver to support the atomic operation. . Add iommu support - This is a patch series according to below Exynos iommu integration work with DT and dma-mapping subsystem, http://lwn.net/Articles/607626/ . Consolidate Exynos drm driver initialization. - This patch sereis resolves the issue that only the first compoments was bound when happened deferred probing for other pipelines and also makes the driver to be more cleanned up by moving the dispered codes for registering kms drivers to one place. . Add new MIC, DECON drivers, and MIPI-DSI support for Exynos5433. - Add MIC(Mobile image compressor) driver. MIC is a new IP for Exynos5433 and later, which is used to transfer frame data to MIPI-DSI controller compressing the data to reduce memory bandwidth. - Add DECON driver for Exynos5433 SoC. This IP is a dislay controller similar to Exynos7's one but this controller has much different registers from Exynos7's ones so this driver has been implemented separately. We will implement a helper modules for FIMD and two DECON controllers to remove duplicated codes later. - Add Exynos5433 SoC support to MIPI-DSI driver, and device tree relevant patches. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (50 commits) ARM: dts: rename the clock of MIPI DSI 'pll_clk' to 'sclk_mipi' drm/exynos: dsi: do not set TE GPIO direction by input drm/exynos: dsi: add support for MIC driver as a bridge drm/exynos: dsi: add support for Exynos5433 drm/exynos: dsi: make use of array for clock access drm/exynos: dsi: make use of driver data for static values drm/exynos: dsi: add macros for register access drm/exynos: dsi: rename pll_clk to sclk_clk drm/exynos: mic: add MIC driver of: add helper for getting endpoint node of specific identifiers drm/exynos: add Exynos5433 decon driver drm/exynos: fix the input prompt of Exynos7 DECON drm/exynos: add drm_iommu_attach_device_if_possible() drm/exynos: Add the dependency for DRM_EXYNOS to DPI/DSI/DP drm/exynos: remove the dependency of DP driver for ARCH_EXYNOS drm/exynos: do not wait for vblank at atomic operation drm/exynos: Remove unused vma field of exynos_drm_gem_obj drm/exynos: fimd: fix page fault issue with iommu drm/exynos: iommu: improve a check for non-iommu dma_ops drm/exynos: iommu: detach from default dma-mapping domain on init ...
2015-06-23Merge tag 'topic/drm-misc-2015-06-22' of ↵Dave Airlie
git://anongit.freedesktop.org/drm-intel into drm-next One more drm-misc pull for 4.2. The important one is the fix from Laurent for Daniel Stone's mode_blob work. * tag 'topic/drm-misc-2015-06-22' of git://anongit.freedesktop.org/drm-intel: drm/atomic: Don't set crtc_state->enable manually drm: prime: Document gem_prime_mmap drm: Avoid the double clflush on the last cache line in drm_clflush_virt_range() drm/atomic: Extract needs_modeset function drm/cma: Fix 64-bit size_t build warnings Documentation/drm: Update rotation property
2015-06-22drm/atomic: Don't set crtc_state->enable manuallyLaurent Pinchart
The enable field needs to be kept in sync with the mode_blob field. Call drm_atomic_set_mode_prop_for_crtc() instead of setting enable to false in order to dereference the mode blob correctly. v2: - Check the return value of drm_atomic_set_mode_prop_for_crtc() - Drop the num_connectors local variable Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-06-22drm/exynos: dsi: do not set TE GPIO direction by inputHyungwon Hwang
On some board, TE GPIO should be configured properly thoughout pinctrl driver as an wakeup interrupt. So this gpio should be configurable in the board's DT, not being requested as a input pin. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: dsi: add support for MIC driver as a bridgeHyungwon Hwang
MIC must be initilized by MIPI DSI when it is being bound. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: dsi: add support for Exynos5433Hyungwon Hwang
This patch adds support for Exynos5433 mipi dsi. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: dsi: make use of array for clock accessHyungwon Hwang
This patch make the driver to use an array for clock access. The number of clocks are different from the existing MIPI DSI driver and Exynos5433 MIPI DSI driver. So this patch is needed before adding support for Exynos5433 MIPI DSI driver. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: dsi: make use of driver data for static valuesHyungwon Hwang
Exynos MIPI DSI driver uses some static values such as address offsets, register setting values, and etc. This patch makes the driver get those values from the driver data. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: dsi: add macros for register accessHyungwon Hwang
This patch adds macros for register writing/reading. This is needed for adding support Exynos5433 MIPI DSI driver, not by using if statement, but by using driver data. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: dsi: rename pll_clk to sclk_clkHyungwon Hwang
This patch renames pll_clk to sclk_clk. The clock referenced by pll_clk is actually not the pll input clock for dsi. The pll input clock comes from the board's oscillator directly. But for the backward compatibility, the old clock name "pll_clk" is also OK. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: mic: add MIC driverHyungwon Hwang
MIC(Mobile image compressor) is newly added IP in Exynos5433. MIC resides between decon and mipi dsim, and compresses frame data by 50%. With dsi, not display port, to send frame data to the panel, the bandwidth is not enough. That is why this compressor is introduced. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: add Exynos5433 decon driverJoonyoung Shim
DECON(Display and Enhancement Controller) is new IP replacing FIMD in Exynos5433. This patch adds Exynos5433 decon driver. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: fix the input prompt of Exynos7 DECONHyungwon Hwang
This patch is a preparation patch for adding support for Exynos5433 DECON. Exynos7 DECON have to be distinguished from Exynos5433 DECON. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: add drm_iommu_attach_device_if_possible()Hyungwon Hwang
Every CRTC drivers in Exynos DRM implements the code which checks whether IOMMU is supported or not, and if supported enable it. Making new helper for it generalize each CRTC drivers. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: Add the dependency for DRM_EXYNOS to DPI/DSI/DPHyungwon Hwang
Without this dependency, Kbuild is confused and the configs below them are not placed under Exynos DRM. This patch fixes it, so the configs below them become to be placed under Exynos DRM. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/exynos: remove the dependency of DP driver for ARCH_EXYNOSHyungwon Hwang
This dependency is a historical thing. It is added when this DP driver is under media subsystem. Now because it is under Exynos DRM, this dependency is not needed anymore. Signed-off-by: Hyungwon Hwang <human.hwang@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2015-06-22drm/i915: Silence compiler warningAnder Conselvan de Oliveira
Silence the following -Wmaybe-uninitialized warnings and make the code more clear. drivers/gpu/drm/i915/intel_display.c: In function ‘__intel_set_mode’: drivers/gpu/drm/i915/intel_display.c:11844:14: warning: ‘crtc_state’ may be used uninitialized in this function [-Wmaybe-uninitialized] return state->mode_changed || state->active_changed; ^ drivers/gpu/drm/i915/intel_display.c:11854:25: note: ‘crtc_state’ was declared here struct drm_crtc_state *crtc_state; ^ drivers/gpu/drm/i915/intel_display.c:11868:6: warning: ‘crtc’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (crtc != intel_encoder->base.crtc) ^ drivers/gpu/drm/i915/intel_display.c:11853:19: note: ‘crtc’ was declared here struct drm_crtc *crtc; Reported-by: Chris Wilson <chris@chris-wilson.co.uk> Suggested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Jani Nikula <jani.nikula@intel.com>