aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-10-06drm/vc4: Enable limited range RGB output on HDMI with CEA modes.Eric Anholt2-3/+37
Fixes broken grayscale ramps on many HDMI monitors, where large areas at the ends of the ramp would all appear as black or white. Signed-off-by: Eric Anholt <[email protected]>
2016-10-06drm/vc4: Fix races when the CS reads from render targets.Eric Anholt4-8/+62
With the introduction of bin/render pipelining, the previous job may not be completed when we start binning the next one. If the previous job wrote our VBO, IB, or CS textures, then the binning stage might get stale or uninitialized results. Fixes the major rendering failure in glmark2 -b terrain. Signed-off-by: Eric Anholt <[email protected]> Fixes: ca26d28bbaa3 ("drm/vc4: improve throughput by pipelining binning and rendering jobs") Cc: [email protected]
2016-10-06drm/vc4: cleanup with list_first_entry_or_null()Masahiro Yamada1-7/+4
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada <[email protected]> Signed-off-by: Eric Anholt <[email protected]>
2016-10-04drm: virtio: reinstate drm_virtio_set_busid()Laszlo Ersek3-0/+12
Before commit a325725633c2 ("drm: Lobotomize set_busid nonsense for !pci drivers"), several DRM drivers for platform devices used to expose an explicit "drm_driver.set_busid" callback, invariably backed by drm_platform_set_busid(). Commit a325725633c2 removed drm_platform_set_busid(), along with the referring .set_busid field initializations. This was justified because interchangeable functionality had been implemented in drm_dev_alloc() / drm_dev_init(), which DRM_IOCTL_SET_VERSION would rely on going forward. However, commit a325725633c2 also removed drm_virtio_set_busid(), for which the same consolidation was not appropriate: this .set_busid callback had been implemented with drm_pci_set_busid(), and not drm_platform_set_busid(). The error regressed Xorg/xserver on QEMU's "virtio-vga" card; the drmGetBusid() function from libdrm would no longer return stable PCI identifiers like "pci:0000:00:02.0", but rather unstable platform ones like "virtio0". Reinstate drm_virtio_set_busid() with judicious use of git checkout -p a325725633c2^ -- drivers/gpu/drm/virtio Cc: Daniel Vetter <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Gustavo Padovan <[email protected]> Cc: Hans de Goede <[email protected]> Cc: Joachim Frieben <[email protected]> Cc: [email protected] # v4.8 Reported-by: Joachim Frieben <[email protected]> Fixes: a325725633c26aa66ab940f762a6b0778edf76c0 Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1366842 Signed-off-by: Laszlo Ersek <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2016-10-04drm: Undo damage to page_flip_ioctlDaniel Vetter1-42/+39
I screwed up rebasing of my patch in commit 43968d7b806d7a7e021261294c583a216fddf0e5 Author: Daniel Vetter <[email protected]> Date: Wed Sep 21 10:59:24 2016 +0200 drm: Extract drm_plane.[hc] which meant on error paths drm_crtc_vblank_put could be called without a get, leading to an underrun of the refcount. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98020 Reported-and-tested-by: Andy Furniss <[email protected]> Cc: Sean Paul <[email protected]> Cc: Michel Dänzer <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dave Airlie <[email protected]>
2016-10-04drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctlChris Wilson1-0/+2
Commit 43968d7b806d ("drm: Extract drm_plane.[hc]") was not the simple cut'n'paste we presumed, somehow it introduced a leak of the page flip target's framebuffer. Fixes: 43968d7b806d ("drm: Extract drm_plane.[hc]") Signed-off-by: Chris Wilson <[email protected]> Cc: Daniel Vetter <[email protected]> Cc: Sean Paul <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Dave Airlie <[email protected]>
2016-10-04Merge branch 'exynos-drm-next' of ↵Dave Airlie12-326/+352
git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next This pull request includes, - Code refactoring on HDMI DDC and PHY. - Regression fixup on deadlock issue with G2D pm integration. - Fixup on page fault issue with wait_for_vblank mechianism specific to Exynos drm. - And some cleanups. * 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: drm/exynos: g2d: simplify g2d_free_runqueue_node() drm/exynos: g2d: use autosuspend mode for PM runtime drm/exynos: g2d: wait for engine to finish drm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}() drm/exynos: g2d: move PM management to runqueue worker Revert "drm/exynos: g2d: fix system and runtime pm integration" drm/exynos: use drm core to handle page-flip event drm/exynos: mark exynos_dp_crtc_clock_enable() static drm/exynos/fimd: add clock rate checking drm/exynos: fix pending update handling drm/exynos/vidi: use timer for vblanks instead of sleeping worker drm/exynos: g2d: beautify probing message drm/exynos: mixer: simplify loop in vp_win_reset() drm/exynos: mixer: convert booleans to flags in mixer context gpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk consumer gpu: drm: exynos_hdmi: Move PHY logic into single function gpu: drm: exynos_hdmi: Move DDC logic into single function
2016-10-01drm/exynos: g2d: simplify g2d_free_runqueue_node()Tobias Jakobi1-3/+0
The function is never called with zero 'runqueue_node'. Signed-off-by: Tobias Jakobi <[email protected]> Acked-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: g2d: use autosuspend mode for PM runtimeTobias Jakobi1-2/+7
The runqueue worker currently issues a get() when a new node is processed, and a put() once a node is completed. The corresponding suspend and resume calls currently only do clock gating, but with the upcoming introduction of IOMMU runpm also the corresponding IOMMU domain gets enabled (for get()) and disabled (for put()). This introduces performance regressions with we mitigate here. Switch PM runtime to autosuspend, such that clock gating and IOMMU control only happens when the engine is idle for a 'long' time. Signed-off-by: Tobias Jakobi <[email protected]> Acked-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: g2d: wait for engine to finishTobias Jakobi1-7/+77
While the engine works on a runqueue node it does memory access to the buffers associated with that node. Make sure that the engine is idle when g2d_close() and/or g2d_remove() are called, i.e. buffer associated with the process (for g2d_close()), or all buffers (for g2d_remove()) can be safely be unmapped. We have to take into account that the engine might be in an undefined state, i.e. it hangs and doesn't become idle. In this case, we issue a hardware reset to return the hardware and the driver context into a proper state. Signed-off-by: Tobias Jakobi <[email protected]> Acked-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}()Tobias Jakobi1-15/+33
The driver might be closed (and/or removed) while there are still nodes queued for processing. Make sure to remove these nodes, which means all of them in the case of g2d_remove() and only those belonging to the corresponding process in g2d_close(). Signed-off-by: Tobias Jakobi <[email protected]> Acked-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: g2d: move PM management to runqueue workerTobias Jakobi1-22/+56
Do all pm_runtime_{get,put}() calls in the runqueue worker. Also keep track of the engine's idle/busy state. Signed-off-by: Tobias Jakobi <[email protected]> Acked-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01Revert "drm/exynos: g2d: fix system and runtime pm integration"Tobias Jakobi1-7/+22
This reverts commit b05984e21a7e000bf5074ace00d7a574944b2c16. The change, i.e. merging the sleep and runpm operations, produces a deadlock situation: (1) exynos_g2d_exec_ioctl() prepares a runqueue node and calls g2d_exec_runqueue() (2) g2d_exec_runqueue() calls g2d_dma_start() which gets runtime PM sync (3) runtime PM core calls g2d_runtime_resume() (4) g2d_runtime_resume() calls g2d_exec_runqueue(), which loops back to (2) Due to mutexes that are in place, a deadlock situation is created. Signed-off-by: Tobias Jakobi <[email protected]> Acked-by: Marek Szyprowski <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: use drm core to handle page-flip eventAndrzej Hajda8-78/+21
Exynos DRM framework handled page-flip event with custom code. The patch replaces it with drm-core vblank queue. Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: mark exynos_dp_crtc_clock_enable() staticBaoyou Xie1-1/+1
We get 1 warning when building kernel with W=1: drivers/gpu/drm/exynos/exynos_dp.c:46:5: warning: no previous prototype for 'exynos_dp_crtc_clock_enable' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. So this patch marks it 'static'. Signed-off-by: Baoyou Xie <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos/fimd: add clock rate checkingAndrzej Hajda1-11/+28
In case of some platforms fimd clocks can be configured to very low values, as a result refresh rate can be very low and driver/drm-core will timeout waiting for vblanks, it will result in premature removal of framebuffers and will cause oopses. The patch adds atomic_check callback to fimd to prevent setting such modes. Reported-by: Tobias Jakobi <[email protected]> Signed-off-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: fix pending update handlingAndrzej Hajda3-60/+2
Exynos DRM devices update their registers at vblank time. Exynos-DRM uses custom mechanism to wait for vblank. This mechanism is error prone - variables are not updated atomically. As a result in certain circumstances user space can try to free buffers which are still in use by hardware, in such cases IOMMU can throw OOPS. The patch instead of fixing the mechanism replaces it with drm core helper. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos/vidi: use timer for vblanks instead of sleeping workerAndrzej Hajda1-46/+20
VIDI driver uses fake vblank handler to generate vblank events. It was implemented using worker which slept for vblank time, additionally it did not work if there were no page flips. The patch replaces it with timer, uses drm_crtc_vblank_(on|off) helpers to manage it and fixes behavior for non-page-flip cases. This change allows further improvements of vblank in exynos-drm framework. Signed-off-by: Andrzej Hajda <[email protected]> Reviewed-by: Gustavo Padovan <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: g2d: beautify probing messageTobias Jakobi1-1/+1
Apply some 'make-up' in g2d_probe(). Signed-off-by: Tobias Jakobi <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: mixer: simplify loop in vp_win_reset()Tobias Jakobi1-2/+2
A simple while loop should do the same here. Signed-off-by: Tobias Jakobi <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01drm/exynos: mixer: convert booleans to flags in mixer contextTobias Jakobi1-25/+30
The mixer context struct already has a 'flags' field, so we can use it to store the 'interlace', 'vp_enabled' and 'has_sclk' booleans. We use the non-atomic helper functions to access these bits. Signed-off-by: Tobias Jakobi <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01gpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk ↵Milo Kim1-3/+2
consumer The helper, devm_regulator_bulk_get() initializes the consumer as NULL, so this code can be ignored. Signed-off-by: Milo Kim <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01gpu: drm: exynos_hdmi: Move PHY logic into single functionMilo Kim1-30/+33
Paring DT properties and getting PHY IO (memory mapped or I2C) in one function. Signed-off-by: Milo Kim <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-10-01gpu: drm: exynos_hdmi: Move DDC logic into single functionMilo Kim1-21/+25
Paring DT properties and getting the I2C adapter in one function. Signed-off-by: Milo Kim <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Signed-off-by: Inki Dae <[email protected]>
2016-09-30Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux ↵Dave Airlie38-322/+700
into drm-next Some additional fixes for 4.9: - The rest of Christian's GTT rework which fixes a long standing bug in the GPUVM code among other things - Changes to the pci shutdown callbacks for certain hypervisors - Fix hpd interrupt storms on eDP panels which have the hpd interrupt enabled by the bios - misc cleanups and bug fixes * 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux: (33 commits) drm/radeon: always apply pci shutdown callbacks drm/amdgpu: always apply pci shutdown callbacks (v2) drm/amdgpu: improve VM PTE trace points drm/amdgpu: fix GART_DEBUGFS define drm/amdgpu: free userptrs even if GTT isn't bound drm/amd/amdgpu: Various cleanups for DCEv6 drm/amdgpu: fix BO move offsets drm/amdgpu: fix amdgpu_move_blit on 32bit systems drm/amdgpu: fix gtt_mgr bo's offset drm/amdgpu: fix initializing the VM BO shadow drm/amdgpu: fix initializing the VM last eviction counter drm/amdgpu: cleanup VM shadow BO unreferencing drm/amdgpu: allocate GTT space for shadow VM page tables drm/amdgpu: rename all rbo variable to abo v2 drm/amdgpu: remove unused member from struct amdgpu_bo drm/amdgpu: add a custom GTT memory manager v2 drm/amdgpu/dce6: disable hpd on local panels drm/amdgpu/dce8: disable hpd on local panels drm/amdgpu/dce11: disable hpd on local panels drm/amdgpu/dce10: disable hpd on local panels ...
2016-09-30Merge tag 'drm/tegra/for-4.9-rc1' of ↵Dave Airlie1-1/+8
git://anongit.freedesktop.org/tegra/linux into drm-next drm/tegra: Changes for v4.9-rc1 One bugfix that avoids overwriting the Y plane base address when displaying buffers with one of the YUV/YVU formats. * tag 'drm/tegra/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/tegra: Fix window[0] base address corruption
2016-09-30Merge tag 'drm/panel/for-4.9-rc1' of ↵Dave Airlie8-9/+686
git://anongit.freedesktop.org/tegra/linux into drm-next drm/panel: Changes for v4.9-rc1 Adds support for one more panel to the simple-panel driver, fixes up a couple of delays and flags for existing panels and finally adds a new driver for the DSI panel found on Nexus 7 devices. * tag 'drm/panel/for-4.9-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: Add JDI LT070ME05000 WUXGA DSI Panel dt-bindings: Add JDI LT070ME05000 panel bindings drm/panel: simple: Fix bus_format for the Olimex LCD-OLinuXino-4.3TS drm/panel: simple-panel: Add delay timings for Starry KR122EA0SRA drm/panel: simple: Fix bus flags for Ortustech com43h4m85ulc drm/panel: simple: Add Innolux G101ICE-L01 panel drm/panel: simple: Add delay timing for Sharp LQ123P1JX31 drm/dsi: Implement DCS set/get display brightness drm/dsi: Order DCS helpers by command code
2016-09-28drm/radeon: always apply pci shutdown callbacksAlex Deucher1-3/+4
We can't properly detect all hypervisors and we need this to properly tear down the hardware. Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: always apply pci shutdown callbacks (v2)Alex Deucher1-6/+4
We can't properly detect all hypervisors and we need this to properly tear down the hardware. v2: trivial warning fix Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: improve VM PTE trace pointsChristian König2-5/+25
Use a separate one for the copy operation and log all the interesting parameters. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix GART_DEBUGFS defineChristian König1-4/+4
Obviously missed during the rename. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: free userptrs even if GTT isn't boundChristian König1-3/+3
This fixes a memory leak since binding GTT only on demand. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amd/amdgpu: Various cleanups for DCEv6Tom St Denis1-36/+10
Signed-off-by: Tom St Denis <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix BO move offsetsChristian König1-2/+2
It's pretty pointless to get the offset first and then initialize it. Should fix issues with the new GTT manager. Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix amdgpu_move_blit on 32bit systemsChristian König1-2/+2
This bug seems to be present for a very long time. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu: fix gtt_mgr bo's offsetFlora Cui1-2/+3
Signed-off-by: Flora Cui <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix initializing the VM BO shadowChristian König1-0/+15
We need to clear the shadows as well. Signed-off-by: Christian König <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: fix initializing the VM last eviction counterChristian König1-2/+6
Close a very small window where something can go wrong. Signed-off-by: Christian König <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: cleanup VM shadow BO unreferencingChristian König1-6/+10
Unreference the shadow BOs in the error path as well and drop the NULL checks. Signed-off-by: Christian König <[email protected]> Acked-by: Edward O'Callaghan <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: allocate GTT space for shadow VM page tablesChristian König1-0/+17
We need to access those with the system domain. Fixes fallout from only allocating GTT space on demand. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: rename all rbo variable to abo v2Christian König12-159/+159
Just to cleanup some radeon leftovers. sed -i "s/rbo/abo/g" drivers/gpu/drm/amd/amdgpu/*.c sed -i "s/rbo/abo/g" drivers/gpu/drm/amd/amdgpu/*.h v2: rebased Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: remove unused member from struct amdgpu_boChristian König2-3/+0
Not used in a while. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu: add a custom GTT memory manager v2Christian König6-11/+265
Only allocate address space when we really need it. v2: fix a typo, add correct function description, stop leaking the node in the error case. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu/dce6: disable hpd on local panelsAlex Deucher1-9/+39
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/amdgpu/dce8: disable hpd on local panelsAlex Deucher1-9/+39
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu/dce11: disable hpd on local panelsAlex Deucher1-10/+13
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu/dce10: disable hpd on local panelsAlex Deucher1-10/+13
Otherwise we can get a hotplug interrupt storm when we turn the panel off if hpd interrupts were enabled by the bios. bug: https://bugs.freedesktop.org/show_bug.cgi?id=97471 Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu/si/dpm: fix phase shedding setupAlex Deucher2-1/+2
Used the wrong index to setup the phase shedding mask. Signed-off-by: Alex Deucher <[email protected]>
2016-09-28drm/radeon/si/dpm: fix phase shedding setupAlex Deucher2-1/+2
Used the wrong index to setup the phase shedding mask. Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
2016-09-28drm/amdgpu/si/dpm: sync up quirks from radeonAlex Deucher1-0/+13
Signed-off-by: Alex Deucher <[email protected]>