Commit graph

619438 commits

Author SHA1 Message Date
Ville Syrjälä 75d7e542bd drm/edid: Clear old dvi_dual/max_tmds_clock before parsing the new EDID
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ä <ville.syrjala@linux.intel.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-3-git-send-email-ville.syrjala@linux.intel.com
2016-10-04 08:23:09 +02:00
Ville Syrjälä 85c9158055 drm/edid: Clear old audio latency values before parsing the new EDID
Clear out stale audio latency information (potentially from a previous
EDID) before constructing the ELD from the EDID.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-2-git-send-email-ville.syrjala@linux.intel.com
2016-10-04 08:23:08 +02:00
Chris Wilson 077675c1e8 drm: Convert prime dma-buf <-> handle to rbtree
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 <chris@chris-wilson.co.uk>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160926204414.23222-1-chris@chris-wilson.co.uk
2016-10-04 08:23:07 +02:00
Baoyou Xie 188af070d4 drm/mediatek: mark symbols static where possible
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 <baoyou.xie@linaro.org>
[seanpaul fixed checkpatch warning for argument alignment]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1474789109-22010-2-git-send-email-baoyou.xie@linaro.org
2016-10-04 08:23:01 +02:00
Baoyou Xie 6239817702 drm/rockchip: mark symbols static where possible
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 <baoyou.xie@linaro.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1474789388-3284-1-git-send-email-baoyou.xie@linaro.org
2016-10-04 08:23:01 +02:00
Baoyou Xie 813cfc89f8 drm/rockchip: add missing header dependencies
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 <baoyou.xie@linaro.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1474789109-22010-1-git-send-email-baoyou.xie@linaro.org
2016-10-04 08:23:00 +02:00
Laszlo Ersek c2cbc38b97 drm: virtio: reinstate drm_virtio_set_busid()
Before commit a325725633 ("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 a325725633 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 a325725633 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 <daniel.vetter@intel.com>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Joachim Frieben <jfrieben@hotmail.com>
Cc: stable@vger.kernel.org # v4.8
Reported-by: Joachim Frieben <jfrieben@hotmail.com>
Fixes: a325725633
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1366842
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-04 13:10:30 +10:00
Daniel Vetter 2adb29b18e drm: Undo damage to page_flip_ioctl
I screwed up rebasing of my patch in

commit 43968d7b80
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
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 <adf.lists@gmail.com>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20161003082827.11586-1-daniel.vetter@ffwll.ch
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-04 12:53:12 +10:00
Chris Wilson e86fa21b77 drm: Restore lost drm_framebuffer_unreference in drm_mode_page_flip_ioctl
Commit 43968d7b80 ("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: 43968d7b80 ("drm: Extract drm_plane.[hc]")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20160928222500.11827-1-chris@chris-wilson.co.uk
Signed-off-by: Dave Airlie <airlied@redhat.com>
2016-10-04 12:52:58 +10:00
Dave Airlie f5dce66593 Merge branch 'exynos-drm-next' of 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-04 12:43:31 +10:00
Tobias Jakobi c046279646 drm/exynos: g2d: simplify g2d_free_runqueue_node()
The function is never called with zero 'runqueue_node'.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:42 +09:00
Tobias Jakobi 7c3fc2b5cc drm/exynos: g2d: use autosuspend mode for PM runtime
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 <tjakobi@math.uni-bielefeld.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:41 +09:00
Tobias Jakobi 134a0fe984 drm/exynos: g2d: wait for engine to finish
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 <tjakobi@math.uni-bielefeld.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:40 +09:00
Tobias Jakobi 5332737432 drm/exynos: g2d: remove runqueue nodes in g2d_{close,remove}()
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 <tjakobi@math.uni-bielefeld.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:39 +09:00
Tobias Jakobi 22d6704dd4 drm/exynos: g2d: move PM management to runqueue worker
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 <tjakobi@math.uni-bielefeld.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:39 +09:00
Tobias Jakobi 05e2e4666c Revert "drm/exynos: g2d: fix system and runtime pm integration"
This reverts commit b05984e21a.

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 <tjakobi@math.uni-bielefeld.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:38 +09:00
Andrzej Hajda 9276dff7a8 drm/exynos: use drm core to handle page-flip event
Exynos DRM framework handled page-flip event with custom code.
The patch replaces it with drm-core vblank queue.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:37 +09:00
Baoyou Xie d42c09628a drm/exynos: mark exynos_dp_crtc_clock_enable() static
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 <baoyou.xie@linaro.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:37 +09:00
Andrzej Hajda c96fdfdeca drm/exynos/fimd: add clock rate checking
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 <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:36 +09:00
Andrzej Hajda 14e022f304 drm/exynos: fix pending update handling
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 <a.hajda@samsung.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:35 +09:00
Andrzej Hajda 8574e927b4 drm/exynos/vidi: use timer for vblanks instead of sleeping worker
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 <a.hajda@samsung.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:35 +09:00
Tobias Jakobi 61865b5d4d drm/exynos: g2d: beautify probing message
Apply some 'make-up' in g2d_probe().

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:34 +09:00
Tobias Jakobi a696394c52 drm/exynos: mixer: simplify loop in vp_win_reset()
A simple while loop should do the same here.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:33 +09:00
Tobias Jakobi adeb6f4485 drm/exynos: mixer: convert booleans to flags in mixer context
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 <tjakobi@math.uni-bielefeld.de>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:33 +09:00
Milo Kim c0d656dd2d gpu: drm: exynos_hdmi: Remove duplicate initialization of regulator bulk consumer
The helper, devm_regulator_bulk_get() initializes the consumer as NULL,
so this code can be ignored.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:32 +09:00
Milo Kim b5413022fd gpu: drm: exynos_hdmi: Move PHY logic into single function
Paring DT properties and getting PHY IO (memory mapped or I2C) in one
function.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:31 +09:00
Milo Kim 1caa360ed9 gpu: drm: exynos_hdmi: Move DDC logic into single function
Paring DT properties and getting the I2C adapter in one function.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2016-10-01 00:39:31 +09:00
Dave Airlie 28a396545a Merge branch 'drm-next-4.9' of git://people.freedesktop.org/~agd5f/linux 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-30 13:21:02 +10:00
Dave Airlie b2d7e08903 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.
 -----BEGIN PGP SIGNATURE-----
 
 iQIwBAABCAAaBQJX7T5nExx0cmVkaW5nQG52aWRpYS5jb20ACgkQ3SOs138+s6Hi
 Mg//R8TGYK3G5r7iNdF6DkugJFbJI5pzvp3mQ1Xy9FIzkFk0v0BdDT4izGF5MXB+
 cb02vKva71bF71tUxkCeH1GZmACNxgFSCwjN6npYXDtbdQRhjt5J2vKCNYHZJ7BY
 wcrtZAFBPaJEvN7DlP5iO7tT2jCo9vsivIRnzOiiEV16S6nAfn2YR2Z0Pub21VKz
 BIhL9D8N3GqfAxbgPqVGxRFMwyFuxmIj4NviOX+KbwomhZUv/Q+ToY4SB5Kp5kEm
 IWm7fyaRpbKB8lPhZu/bwf5am60G9ZAykr/g0AjCfUSosxax8OJJHV1FWOgewewf
 SUs0/87+nvKuIyWHQLJ/iZWVS8J+HVdVJP+CVOcgkMa6vDbgiMwaTLfbHv4exAlT
 iqVLskZ5Ce76MPLg63PxsZU07IBMbXsv7AtG1q48dtUzPXKPywzymXBTNHDsvaG1
 F0M3Bmejpd++i5Yis8DRuDRyKgkIrBjVdEGcYKhfV+Jsn3RrKoJ/G0AVfJKvkDrH
 gQ0CgdHzSCtdaCLYE8PEZRJ18ZAdGhHkheNbbDRVoYD0DfhxhMZjDPZMYWed5vAF
 wYir6S64G2EF+tg7p3Njmrbb+5LDeBPAd0dBS4GoC4rjaMO9hPGdpEiWGB+7GlhP
 M8rpgtPGo65lS1fIydLJnMP1b5H0lYPMiviyoKZl8h40PJ4=
 =sjge
 -----END PGP SIGNATURE-----

Merge tag 'drm/tegra/for-4.9-rc1' of 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-30 13:00:36 +10:00
Dave Airlie 011a9b9d50 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.
 -----BEGIN PGP SIGNATURE-----
 
 iQIwBAABCAAaBQJX7TIgExx0cmVkaW5nQG52aWRpYS5jb20ACgkQ3SOs138+s6Eh
 MQ/+N5NE2/fFnS32/v+Qp+FQdf9aJVOMgkVmroVd2q1psK11omd0Pgqg3HdyQupe
 GVkL8BV3WtmcD3aKjGNdlNBl/lsbFOVYfakzap7ig4Qly2ADqrQeKCZn3esTH25G
 9CMlkaOw/xfja47ajVAEeinoAktY5yt8nP0oay73A0Vl+0WQ5sZDr7XeZfWA72bY
 uKTFoue7tBoh12iWgMFX8N4LLR5U5qzV0CEhEXBJ4xrkYKFTVrgTotY3bdlef5AJ
 tPjfMWBLrdbDt1YnuSQuNGwbx/Mzc/hrvddQiQC2UBk3g2Tq0BCHpZma4eNiDHhv
 So1fefjC/0mkde27/ZfR9qE2Zee9wY8PN8bchP3uCRhyzFTcjZhdcRAR/NNp9+yX
 4Wl/lOWX2UiPWHLOm9RO5W6y+kEvCa0E/0IsM9LRnfDw7VTn8ZY0052BGayfz6Z4
 alM94TP4WLFulRbKgisJe+Wlbvjn7MEwTfpLm74Ras5LHWvVf+FSuDEO3c5sKrTQ
 LqJh8aj+fjUUSIV3DfFUbrlVBjQSbveNAd7di9Q2LCZeUU+Iv3HXJcn9x2B3c/7H
 q49v4Kf62NEy89P8g/oKKL1AdZ+MTFPrVbEJyAb++m/7IWlLlQbGBP6vMo/OwYD6
 G6CFKqM3vdw0diiRjVs6FpRAsqfpPB7Pn9OduEG+MOACtJ4=
 =k9a0
 -----END PGP SIGNATURE-----

Merge tag 'drm/panel/for-4.9-rc1' of 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-30 12:56:31 +10:00
Alex Deucher a481daa88f drm/radeon: always apply pci shutdown callbacks
We can't properly detect all hypervisors and we
need this to properly tear down the hardware.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:27 -04:00
Alex Deucher 00ea8cba5e drm/amdgpu: always apply pci shutdown callbacks (v2)
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 <alexander.deucher@amd.com>
2016-09-28 16:16:27 -04:00
Christian König ec2f05f034 drm/amdgpu: improve VM PTE trace points
Use a separate one for the copy operation and
log all the interesting parameters.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:26 -04:00
Christian König 186294f9c5 drm/amdgpu: fix GART_DEBUGFS define
Obviously missed during the rename.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:26 -04:00
Christian König 85a4b5798f drm/amdgpu: free userptrs even if GTT isn't bound
This fixes a memory leak since binding GTT only on demand.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:25 -04:00
Tom St Denis 3d5f4d4770 drm/amd/amdgpu: Various cleanups for DCEv6
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:25 -04:00
Christian König ad78069c33 drm/amdgpu: fix BO move offsets
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 <christian.koenig@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:24 -04:00
Christian König 98b480dba9 drm/amdgpu: fix amdgpu_move_blit on 32bit systems
This bug seems to be present for a very long time.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2016-09-28 16:16:23 -04:00
Flora Cui 8159730394 drm/amdgpu: fix gtt_mgr bo's offset
Signed-off-by: Flora Cui <Flora.Cui@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:23 -04:00
Christian König 2befa60e4c drm/amdgpu: fix initializing the VM BO shadow
We need to clear the shadows as well.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:22 -04:00
Christian König 2a82ec21b9 drm/amdgpu: fix initializing the VM last eviction counter
Close a very small window where something can go wrong.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:22 -04:00
Christian König 2698f6206f drm/amdgpu: cleanup VM shadow BO unreferencing
Unreference the shadow BOs in the error path as well and drop the NULL checks.

Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:21 -04:00
Christian König 0fc8683e56 drm/amdgpu: allocate GTT space for shadow VM page tables
We need to access those with the system domain.

Fixes fallout from only allocating GTT space on demand.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:21 -04:00
Christian König 765e7fbf08 drm/amdgpu: rename all rbo variable to abo v2
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 <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:20 -04:00
Christian König 1927ffc0c1 drm/amdgpu: remove unused member from struct amdgpu_bo
Not used in a while.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:20 -04:00
Christian König bb990bb092 drm/amdgpu: add a custom GTT memory manager v2
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 <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2016-09-28 16:16:19 -04:00
Alex Deucher 2744b647f4 drm/amdgpu/dce6: disable hpd on local panels
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 <alexander.deucher@amd.com>
2016-09-28 16:13:19 -04:00
Alex Deucher 324082586c drm/amdgpu/dce8: disable hpd on local panels
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 <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2016-09-28 16:13:18 -04:00
Alex Deucher 3a9d993ee9 drm/amdgpu/dce11: disable hpd on local panels
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 <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2016-09-28 16:13:18 -04:00
Alex Deucher e96ec90f49 drm/amdgpu/dce10: disable hpd on local panels
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 <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
2016-09-28 16:13:17 -04:00