04 Oct, 2016
12 commits
-
We have the drm_display_info for storing information about the sink, so
let's move dvi_dual and max_tmds_clock in there.v2: Deal with superfluous code shuffling
Document dvi_dual and max_tmds_clock tooCc: Alex Deucher
Cc: "Christian König"
Signed-off-by: Ville Syrjälä
Reviewed-by: Christian König (v1)
Reviewed-by: Alex Deucher
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-5-git-send-email-ville.syrjala@linux.intel.com -
We generally store clocks in kHz, so let's do that for the
HDMI max TMDS clock value as well. Less surpising.v2: Deal with superfluous code shuffling
Cc: Alex Deucher
Cc: "Christian König"
Signed-off-by: Ville Syrjälä
Reviewed-by: Christian König (v1)
Reviewed-by: Alex Deucher
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-4-git-send-email-ville.syrjala@linux.intel.com -
Clear out old max_tmds_clock and dvi_dual information (possibly from a
previous EDID) before parsing the current EDID. Tne current EDID might
not even have these in its HDMI VSDB, which would mean that we'd leave
the old stale values in place.Signed-off-by: Ville Syrjälä
Acked-by: Christian König
Reviewed-by: Alex Deucher
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-3-git-send-email-ville.syrjala@linux.intel.com -
Clear out stale audio latency information (potentially from a previous
EDID) before constructing the ELD from the EDID.Signed-off-by: Ville Syrjälä
Acked-by: Christian König
Reviewed-by: Alex Deucher
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-2-git-send-email-ville.syrjala@linux.intel.com -
Currently we use a linear walk to lookup a handle and return a dma-buf,
and vice versa. A long overdue TODO task is to convert that to a
hashtable. Since the initial implementation of dma-buf/prime, we now
have resizeable hashtables we can use (and now a future task is to RCU
enable the lookup!). However, this patch opts to use an rbtree instead
to provide O(lgN) lookups (and insertion, deletion). rbtrees were chosen
over using the RCU backed resizable hashtable to firstly avoid the
reallocations (rbtrees can be embedded entirely within the parent
struct) and to favour simpler code with predictable worst case
behaviour. In simple testing, the difference between using the constant
lookup and insertion of the rhashtable and the rbtree was less than 10%
of the wall time (igt/benchmarks/prime_lookup) - both are dramatic
improvements over the existing linear lists.v2: Favour rbtree over rhashtable
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94631
Signed-off-by: Chris Wilson
Cc: Sean Paul
Cc: David Herrmann
Reviewed-by: David Herrmann
Reviewed-by: Sean Paul
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160926204414.23222-1-chris@chris-wilson.co.uk -
We get 4 warnings when building kernel with W=1:
drivers/gpu/drm/mediatek/mtk_hdmi.c:1089:6: warning: no previous prototype for 'mtk_hdmi_audio_enable' [-Wmissing-prototypes]
drivers/gpu/drm/mediatek/mtk_hdmi.c:1095:6: warning: no previous prototype for 'mtk_hdmi_audio_disable' [-Wmissing-prototypes]
drivers/gpu/drm/mediatek/mtk_hdmi.c:1101:5: warning: no previous prototype for 'mtk_hdmi_audio_set_param' [-Wmissing-prototypes]
drivers/gpu/drm/mediatek/mtk_hdmi.c:1627:5: warning: no previous prototype for 'mtk_hdmi_audio_digital_mute' [-Wmissing-prototypes]In fact, both functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks both functions with 'static'.Signed-off-by: Baoyou Xie
[seanpaul fixed checkpatch warning for argument alignment]
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474789109-22010-2-git-send-email-baoyou.xie@linaro.org -
We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/rockchip/rockchip_drm_drv.c:309:6: warning: no previous prototype for 'rockchip_drm_fb_suspend' [-Wmissing-prototypes]
drivers/gpu/drm/rockchip/rockchip_drm_drv.c:318:6: warning: no previous prototype for 'rockchip_drm_fb_resume' [-Wmissing-prototypes]In fact, these functions are only used in the file in which they are
declared and don't need a declaration, but can be made static.
So this patch marks these functions with 'static'.Signed-off-by: Baoyou Xie
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474789388-3284-1-git-send-email-baoyou.xie@linaro.org -
We get 2 warnings when building kernel with W=1:
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:130:5: warning: no previous prototype for 'rockchip_drm_fbdev_init' [-Wmissing-prototypes]
drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c:173:6: warning: no previous prototype for 'rockchip_drm_fbdev_fini' [-Wmissing-prototypes]In fact, these functions are declared
in drivers/gpu/drm/rockchip/rockchip_drm_fbdev.h,
so this patch adds missing header dependencies.Signed-off-by: Baoyou Xie
Signed-off-by: Sean Paul
Link: http://patchwork.freedesktop.org/patch/msgid/1474789109-22010-1-git-send-email-baoyou.xie@linaro.org -
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
Cc: Emil Velikov
Cc: Gerd Hoffmann
Cc: Gustavo Padovan
Cc: Hans de Goede
Cc: Joachim Frieben
Cc: stable@vger.kernel.org # v4.8
Reported-by: Joachim Frieben
Fixes: a325725633c26aa66ab940f762a6b0778edf76c0
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1366842
Signed-off-by: Laszlo Ersek
Reviewed-by: Emil Velikov
Signed-off-by: Dave Airlie -
I screwed up rebasing of my patch in
commit 43968d7b806d7a7e021261294c583a216fddf0e5
Author: Daniel Vetter
Date: Wed Sep 21 10:59:24 2016 +0200drm: 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
Cc: Sean Paul
Cc: Michel Dänzer
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20161003082827.11586-1-daniel.vetter@ffwll.ch
Signed-off-by: Dave Airlie -
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
Cc: Daniel Vetter
Cc: Sean Paul
Signed-off-by: Daniel Vetter
Link: http://patchwork.freedesktop.org/patch/msgid/20160928222500.11827-1-chris@chris-wilson.co.uk
Signed-off-by: Dave Airlie -
…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
30 Sep, 2016
20 commits
-
The function is never called with zero 'runqueue_node'.
Signed-off-by: Tobias Jakobi
Acked-by: Marek Szyprowski
Signed-off-by: Inki Dae -
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
Acked-by: Marek Szyprowski
Signed-off-by: Inki Dae -
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
Acked-by: Marek Szyprowski
Signed-off-by: Inki Dae -
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
Acked-by: Marek Szyprowski
Signed-off-by: Inki Dae -
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
Acked-by: Marek Szyprowski
Signed-off-by: Inki Dae -
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
Acked-by: Marek Szyprowski
Signed-off-by: Inki Dae -
Exynos DRM framework handled page-flip event with custom code.
The patch replaces it with drm-core vblank queue.Signed-off-by: Andrzej Hajda
Signed-off-by: Inki Dae -
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
Signed-off-by: Inki Dae -
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
Signed-off-by: Andrzej Hajda
Signed-off-by: Inki Dae -
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
Reviewed-by: Gustavo Padovan
Signed-off-by: Inki Dae -
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
Reviewed-by: Gustavo Padovan
Signed-off-by: Inki Dae -
Apply some 'make-up' in g2d_probe().
Signed-off-by: Tobias Jakobi
Signed-off-by: Inki Dae -
A simple while loop should do the same here.
Signed-off-by: Tobias Jakobi
Signed-off-by: Inki Dae -
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
Reviewed-by: Andrzej Hajda
Signed-off-by: Inki Dae -
The helper, devm_regulator_bulk_get() initializes the consumer as NULL,
so this code can be ignored.Signed-off-by: Milo Kim
Reviewed-by: Andrzej Hajda
Signed-off-by: Inki Dae -
Paring DT properties and getting PHY IO (memory mapped or I2C) in one
function.Signed-off-by: Milo Kim
Reviewed-by: Andrzej Hajda
Signed-off-by: Inki Dae -
Paring DT properties and getting the I2C adapter in one function.
Signed-off-by: Milo Kim
Reviewed-by: Andrzej Hajda
Signed-off-by: Inki Dae -
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
... -
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 -
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
29 Sep, 2016
8 commits
-
We can't properly detect all hypervisors and we
need this to properly tear down the hardware.Signed-off-by: Alex Deucher
-
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
-
Use a separate one for the copy operation and
log all the interesting parameters.Signed-off-by: Christian König
Reviewed-by: Alex Deucher
Signed-off-by: Alex Deucher -
Obviously missed during the rename.
Signed-off-by: Christian König
Reviewed-by: Alex Deucher
Signed-off-by: Alex Deucher -
This fixes a memory leak since binding GTT only on demand.
Signed-off-by: Christian König
Reviewed-by: Alex Deucher
Signed-off-by: Alex Deucher -
Signed-off-by: Tom St Denis
Reviewed-by: Alex Deucher
Signed-off-by: Alex Deucher -
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
Reviewed-by: Michel Dänzer
Signed-off-by: Alex Deucher -
This bug seems to be present for a very long time.
Signed-off-by: Christian König
Reviewed-by: Alex Deucher
Signed-off-by: Alex Deucher
Cc: stable@vger.kernel.org