Maarten Lankhorst
c3b326587b
drm/i915: Update atomic modeset state synchronously, v2.
...
All of this state should be updated as soon as possible. It shouldn't be
done later because then future updates may not depend on it.
Changes since v1:
- Move the modeset update to before drm_atomic_state_get. (Ville)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478609742-13603-10-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
2016-11-09 13:55:14 +01:00
Maarten Lankhorst
1f4faefe74
drm/edid: Remove drm_select_eld
...
The only user was i915, which is now gone.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Acked-by: Dave Airlie <airlied@redhat.com > #irc
Cc: dri-devel@lists.freedesktop.org
Link: http://patchwork.freedesktop.org/patch/msgid/1478609742-13603-9-git-send-email-maarten.lankhorst@linux.intel.com
2016-11-09 13:55:13 +01:00
Maarten Lankhorst
bbf35e9def
drm/i915: Pass atomic state to intel_audio_codec_enable, v2.
...
drm_select_eld requires mode_config.mutex and connection_mutex
because it looks at the connector list and at the legacy encoders.
This is not required, because when we call audio_codec_enable we know
which connector it was called for, so pass the state.
This also removes having to look at crtc->config.
Changes since v1:
- Use intel_crtc->pipe instead of drm_crtc_index. (Ville)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478609742-13603-8-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
2016-11-09 13:55:05 +01:00
Maarten Lankhorst
df18e721a6
drm/i915: Convert intel_hdmi to use atomic state
...
This is the last connector still looking at crtc->config. Fix this.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478609742-13603-7-git-send-email-maarten.lankhorst@linux.intel.com
2016-11-09 13:54:08 +01:00
Lucas Stach
b5b457b33d
gpu: ipu-di: silence videomode logspam
...
Adapting the videomode to the hardware constraints is something that
can and must happen during normal operation and isn't something that
the user can avoid. So printing a warning each time it happens isn't
helpful.
Demote this message to the debug level.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
2016-11-09 10:41:14 +01:00
Lucas Stach
5ced937b7d
drm/imx: disable planes before DC
...
If the DC clock is disabled before the attached IDMACs are properly
stopped the IDMACs may hang the IPU or even the whole system.
Make sure the IDMACs are in safe state by disabling the planes before
removal of the DC clock.
Also set the atomic parameter to false to stop calling the atomic_begin
hook, which does nothing useful as we immediately afterwards turn off
vblank interrupts and possibly send the pending vblank event.
Fixes: 33f1423530
(drm/imx: atomic phase 1: Use transitional atomic
CRTC and plane helpers)
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de >
2016-11-09 10:35:50 +01:00
Stefan Agner
3d6f37102b
drm/fsl-dcu: disable planes before disabling CRTC
...
After disabling and reenabling the CRTC the DCU sometimes got stuck
displaying the whole screen with a solid color. Disabling and
reenabling the CRTC did not recover from the situation. This was
often reproducable by just restarting the X-Server.
The disabling sequence is not explicitly documented. But it turns
out that disabling the planes before disabling the CRTC seems to
prevent the above situation from happening.
Use the callback ->atomic_disable instead of ->disable which allows
to use the drm_atomic_helper_disable_planes_on_crtc() helper to
disable planes before disabling the controller.
Signed-off-by: Stefan Agner <stefan@agner.ch >
2016-11-08 17:14:08 -08:00
Stefan Agner
93daeeca2c
drm/fsl-dcu: update all registers on flush
...
Use the UPDATE_MODE READREG bit to initiate a register transfer
on flush. This makes sure that we flush all registers only once
for all planes.
Signed-off-by: Stefan Agner <stefan@agner.ch >
2016-11-08 17:14:08 -08:00
Stefan Agner
34a515d27c
drm/fsl-dcu: do not update when modifying irq registers
...
The IRQ status and mask registers are not "double buffered" according
to the reference manual. Hence, there is no extra transfer/update
write needed when modifying these registers.
Signed-off-by: Stefan Agner <stefan@agner.ch >
2016-11-08 17:14:08 -08:00
Chris Wilson
77d150b90d
drm/i915: Restrict DRM_DEBUG_MM automatic selection
...
DRM_DEBUG_MM is only valid if the DRM.ko is builtin as currently
depot_save_stack is not exported.
Fixes: 5c7fcf2db0
("drm/i915: Enable drm_mm debug when enabling DRM_I915_DEBUG")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161108131917.6253-1-chris@chris-wilson.co.uk
2016-11-09 02:13:48 +01:00
Chris Wilson
cd456f8d06
drm: Restrict stackdepot usage to builtin drm.ko
...
I misread the kbuild result thinking that we had missed the include
(which we had for completeness anyway), what kbuild was actually warning
me about was that depot_save_stack was not exported.
Temporarily fix this by only selecting STACKDEPOT iff drm.ko is builtin
Reported-by: kbuild test robot <fengguang.wu@intel.com >
Fixes: 5705670d04
("drm: Track drm_mm allocators and show leaks on shutdown")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161108131917.6253-2-chris@chris-wilson.co.uk
2016-11-09 02:13:43 +01:00
Rob Clark
06d9f56f1d
drm/msm: module param to dump state on error irq
...
Signed-off-by: Rob Clark <robdclark@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1478358492-30738-8-git-send-email-robdclark@gmail.com
2016-11-08 16:38:03 -05:00
Rob Clark
dd701ae9ce
drm/msm/mdp5: add atomic_print_state support
...
We subclass drm_plane_state, so add mdp5_plane_atomic_print_state() to
dump out our own driver specific plane state.
Signed-off-by: Rob Clark <robdclark@gmail.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1478358492-30738-7-git-send-email-robdclark@gmail.com
2016-11-08 16:38:03 -05:00
Rob Clark
6559c901cb
drm/atomic: add debugfs file to dump out atomic state
...
Useful to dump current state from debugfs, if turning on the drm.debug
bit is too much overhead.
The drm_state_dump() can also be used by drivers, for example to
implement a module param that dumps state on error irqs.
Signed-off-by: Rob Clark <robdclark@gmail.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1478358492-30738-6-git-send-email-robdclark@gmail.com
2016-11-08 16:38:03 -05:00
Rob Clark
fceffb325b
drm/atomic: add new drm_debug bit to dump atomic state
...
The contents of drm_{plane,crtc,connector}_state is dumped before
commit. If a driver extends any of the state structs, it can implement
the corresponding funcs->atomic_print_state() to add it's own driver
specific state.
Signed-off-by: Rob Clark <robdclark@gmail.com >
[seanpaul resolved conflict in drm_plane.h]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
2016-11-08 16:38:03 -05:00
Rob Clark
1638d30c15
drm: add helpers to go from plane state to drm_rect
...
Signed-off-by: Rob Clark <robdclark@gmail.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
[seanpaul resolved conflict in drm_plane.h]
Signed-off-by: Sean Paul <seanpaul@chromium.org >
2016-11-08 16:38:03 -05:00
Rob Clark
d8187177b0
drm: add helper for printing to log or seq_file
...
Sometimes it is nice not to duplicate equivalent printk() and
seq_printf() code.
v2: simplify things w/ va_format, and use dev_printk, docs
Signed-off-by: Rob Clark <robdclark@gmail.com >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1478358492-30738-3-git-send-email-robdclark@gmail.com
2016-11-08 16:38:03 -05:00
Rob Clark
65c7dc18b2
drm: helper macros to print composite types
...
I'll want to print things in a similar way in a later patch. This will
make it easier.
Signed-off-by: Rob Clark <robdclark@gmail.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1478358492-30738-2-git-send-email-robdclark@gmail.com
2016-11-08 16:38:03 -05:00
Christian König
98a6dd909b
drm/ttm: fix ttm_bo_wait
...
reservation_object_wait_timeout_rcu() should enable signaling even with a
zero timeout, but ttm_bo_wait() can also be called from atomic context and
then it is not a good idea to do this.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org >
[sumits: fix checkpatch warnings]
Link: http://patchwork.freedesktop.org/patch/msgid/1478553376-18575-3-git-send-email-alexander.deucher@amd.com
2016-11-09 00:46:04 +05:30
Junwei Zhang
eef18a827a
drm/amdgpu: add the interface of waiting multiple fences (v4)
...
v2: agd: rebase and squash in all the previous optimizations and
changes so everything compiles.
v3: squash in Slava's 32bit build fix
v4: rebase on drm-next (fence -> dma_fence),
squash in Monk's ioctl update patch
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Monk Liu <monk.liu@amd.com >
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org >
[sumits: fix checkpatch warnings]
Link: http://patchwork.freedesktop.org/patch/msgid/1478290570-30982-2-git-send-email-alexander.deucher@amd.com
2016-11-09 00:28:42 +05:30
Andrew Shadura
f20024d8ba
drm/amd/powerplay: return false instead of -EINVAL
...
Returning -EINVAL from a bool-returning function
phm_check_smc_update_required_for_display_configuration has an unexpected
effect of returning true, which is probably not what was intended.
Replace -EINVAL by false.
The only place this function is called from is
psm_adjust_power_state_dynamic in
drivers/gpu/drm/amd/powerplay/eventmgr/psm.c:106:
if (!equal || phm_check_smc_update_required_for_display_configuration(hwmgr)) {
phm_apply_state_adjust_rules(hwmgr, requested, pcurrent);
phm_set_power_state(hwmgr, &pcurrent->hardware, &requested->hardware);
hwmgr->current_ps = requested;
}
It seems to expect a boolean value here.
This issue has been found using the following Coccinelle semantic patch
written by Peter Senna Tschudin:
<smpl>
@@
identifier f;
constant C;
typedef bool;
@@
bool f (...){
<+...
* return -C;
...+>
}
</smpl>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Andrew Shadura <andrew.shadura@collabora.co.uk >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-11-08 11:43:05 -05:00
Arnd Bergmann
71d5895aac
drm/i915: avoid harmless empty-body warning
...
The newly added assert_kernel_context_is_current introduces a warning
when built with W=1:
drivers/gpu/drm/i915/i915_gem.c: In function ‘assert_kernel_context_is_current’:
drivers/gpu/drm/i915/i915_gem.c:4417:63: error: suggest braces around empty body in an ‘else’ statement [-Werror=empty-body]
Changing the GEM_BUG_ON() macro from an empty definition to "do { } while (0)"
makes the macro more robust to use and avoids the warning.
Fixes: 3033acab07
("drm/i915: Queue the idling context switch after all other timelines")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161108135834.2166677-1-arnd@arndb.de
2016-11-08 17:33:47 +01:00
Daniel Vetter
d7931c1879
Merge tag 'gvt-next-2016-11-07' of https://github.com/01org/gvt-linux into drm-intel-next-queued
...
gvt-next-2016-11-07
- Fix regression from e95433c73a
- Some MMIO handler fixes
- Add better handling for guest reset control
- stratch page table tree for shadow ppgtt
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
2016-11-08 17:24:05 +01:00
Arnd Bergmann
a29d126027
drm/amdgpu/powerplay/smu7: fix unintialized data usage
...
A recent bugfix replaced an out-of-bounds access with direct
use of unintialized data:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 'smu7_patch_limits_vddc':
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddc' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:11: note: 'vddc' was declared here
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2033:6: error: 'vddci' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:2146:17: note: 'vddci' was declared here
uint32_t vddc, vddci;
This initializes the data as before using the correct type.
Fixes: 77f7f71f5b
("drm/amdgpu/powerplay/smu7: fix static checker warning")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-11-08 10:34:29 -05:00
Ville Syrjälä
bfb81049fe
drm/i915: Use intel_fb_gtt_offset() also for gen2/3 primary plane
...
The code to determine the primary plane offset for gen2/3 looks
different than the code for gen4+, but in fact it's doing the same
thing. Let's make it uniform. Allows us to eliminate the 'obj' from
the list of local variables as well.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-6-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
2016-11-08 15:39:25 +02:00
Ville Syrjälä
d2b2cbce99
drm/i915: Fix error handling for cursor/sprite plane create failure
...
intel_cursor_plane_create() and intel_sprite_plane_create() return
an error pointer, so let's not mistakenly look for a NULL pointer.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reported-by: Chris Wilson <chris@chris-wilson.co.uk >
References: https://lists.freedesktop.org/archives/intel-gfx/2016-November/110690.html
Fixes: b079bd17e3
("drm/i915: Bail if plane/crtc init fails")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-5-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
2016-11-08 15:39:03 +02:00
Ville Syrjälä
11df4d95b3
drm/i915: Grab the rotation from the passed plane state for VLV sprites
...
Use the passed in plane_state instead of plane->state in
vlv_update_plane(). Currently the two are one and the same, but if we
start queuing up multiple plane updates they might not be.
Looks like this was rebase fail on my part.
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Fixes: 8d0deca8c6
("drm/i915: Pass 90/270 vs. 0/180 rotation info for intel_gen4_compute_page_offset()")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478550057-24864-4-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
2016-11-08 15:38:25 +02:00
Chris Wilson
93ce75fa3d
drm: Add stackdepot include for DRM_DEBUG_MM
...
0day found that stackdepot.h doesn't get automatically included on all
architectures, so remember to add our #include.
Reported-by: kbuild test robot <fengguang.wu@intel.com >
Fixes: 5705670d04
("drm: Track drm_mm allocators and show leaks on shutdown")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Christian König <christian.koenig@amd.com >.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161108115601.22873-1-chris@chris-wilson.co.uk
2016-11-08 13:46:49 +01:00
Brian Starkey
e64053f05e
drm: mali-dp: Clear CVAL when leaving config mode
...
It's possible for CVAL to get set whilst we are in config mode. If this
happens, afer we leave config mode the HW will latch whatever
configuration is in the registers at the next vsync. Most likely this
will be a partial configuration, as we'll be racing against the ongoing
atomic_commit.
To avoid this, clear CVAL before leaving config mode.
Signed-off-by: Brian Starkey <brian.starkey@arm.com >
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com >
2016-11-08 11:40:02 +00:00
Chris Wilson
d0da48cf92
drm/i915: Remove chipset flush after cache flush
...
We always flush the chipset prior to executing with the GPU, so we can
skip the flush during ordinary domain management.
This should help mitigate some of the potential performance regressions,
but likely trivial, from doing the flush unconditionally before execbuf
introduced in commit dcd79934b0
("drm/i915: Unconditionally flush any
chipset buffers before execbuf")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/20161106130001.9509-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
2016-11-08 11:04:04 +00:00
Joonas Lahtinen
24327f837f
drm/i915: Remove two sloppy inline functions from .h
...
Get rid of sloppy inline functions now that we don't have more users:
i915_gem_request_get_seqno
i915_gem_request_get_engine
v2:
- request->engine is always non-NULL (Chris)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/1478589108-3702-1-git-send-email-joonas.lahtinen@linux.intel.com
2016-11-08 12:36:35 +02:00
Gustavo Padovan
5d586983d6
drm/msm: use drm_atomic_set_fence_for_plane() to set the fence
...
drm_atomic_set_fence_for_plane() is smart and won't overwrite
plane_state->fence if the user already set an explicit fence there.
Cc: Rob Clark <robdclark@gmail.com >
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Rob Clark <robdclark@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1478513013-3221-3-git-send-email-gustavo@padovan.org
2016-11-08 11:27:33 +01:00
Gustavo Padovan
aee2586490
drm/imx: use drm_atomic_set_fence_for_plane() to set the fence
...
drm_atomic_set_fence_for_plane() is smart and won't overwrite
plane_state->fence if the user already set an explicit fence there.
Cc: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1478513013-3221-2-git-send-email-gustavo@padovan.org
2016-11-08 11:27:14 +01:00
Gustavo Padovan
13b55664ee
drm/atomic: add drm_atomic_set_fence_for_plane()
...
This new function should be used by drivers when setting a implicit
fence for the plane. It abstracts the fact that the user might have
chosen explicit fencing instead.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1478513013-3221-1-git-send-email-gustavo@padovan.org
2016-11-08 11:22:54 +01:00
Rob Clark
7abc7d4751
drm: don't override possible_crtcs for primary/cursor planes
...
It is kind of a pointless restriction. If userspace does silly things
like using crtcA's cursor plane on crtcB, and then setcursor on crtcA,
it will end up with the overlay disabled on crtcB. But userspace is
allowed to shoot itself like this.
v2: don't WARN_ON() if caller did not set ->possible_crtcs. This keeps
the existing behavior by default, if caller does not set the
->possible_crtcs.
Signed-off-by: Rob Clark <robdclark@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1478357521-26542-1-git-send-email-robdclark@gmail.com
2016-11-08 11:18:39 +01:00
Ville Syrjälä
e587803c0a
drm/edid: Add the missing "Hz" to VIC 58,59 comment
...
All the VICs apart from 58 and 59 have the word "Hz" included in the
comment. Include it for 59 and 59 as well.
Cc: Shashank Sharma <shashank.sharma@intel.com >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1478177609-16762-1-git-send-email-ville.syrjala@linux.intel.com
2016-11-08 11:09:06 +01:00
Jiang Biao
c36ed713fb
drm/gma500: remove unused ioctl declarations
...
psb_gem_create_ioctl and psb_gem_mmap_ioctl are not used currently,
their declarations are useless.
Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1477990879-13139-1-git-send-email-jiang.biao2@zte.com.cn
2016-11-08 10:45:10 +01:00
Jiang Biao
4470dc9cca
drm/gma500: make function static to eliminate compiling warning
...
psb_gtt_remove is only used in this file, and make it static to
eliminate missing-prototypes compiling warning.
Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1477972185-24826-1-git-send-email-jiang.biao2@zte.com.cn
2016-11-08 10:44:35 +01:00
Rongrong Zou
03e93ac756
drm: update the documentation of drm_framebuffer_unregister_private
...
Add obvious description to drm_framebuffer_unregister_private()
to explain it is deprecated.
Signed-off-by: Rongrong Zou <zourongrong@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1477915196-100299-1-git-send-email-zourongrong@gmail.com
2016-11-08 10:39:02 +01:00
Chris Wilson
5c7fcf2db0
drm/i915: Enable drm_mm debug when enabling DRM_I915_DEBUG
...
A frequent issue that arises on shutdown is the drm_mm range manager
complaining of a leak. To aide debugging those, drm can now track the
allocation callsite and print those for the leaks.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161029184214.17329-2-chris@chris-wilson.co.uk
2016-11-08 10:35:52 +01:00
Chris Wilson
5705670d04
drm: Track drm_mm allocators and show leaks on shutdown
...
We can use the kernel's stack tracer and depot to record the allocation
site of every drm_mm user. Then on shutdown, as well as warning that
allocated nodes still reside with the drm_mm range manager, we can
display who allocated them to aide tracking down the leak.
v2: Move Kconfig around so it lies underneath the DRM options submenu.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20161031090806.20073-1-chris@chris-wilson.co.uk
2016-11-08 10:35:29 +01:00
Daniel Vetter
58e197d631
drm/i915: Update DRIVER_DATE to 20161108
...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2016-11-08 07:51:35 +01:00
Chris Wilson
7aa6ca61ee
drm/i915: Mark CPU cache as dirty when used for rendering
...
On LLC, or even snooped, machines rendering via the GPU ends up in the CPU
cache. This cacheline dirt also needs to be flushed to main memory when
moving to an incoherent domain, such as the display's scanout engine.
Mostly, this happens because either the object is marked as dirty from
its first use or is avoided by setting the object into the display
domain from the start.
v2: Treat WT as not requiring a clflush prior to use on the display
engine as well.
Fixes: 0f71979ab7
("drm/i915: Performed deferred clflush inside set-cache-level")
References: https://bugs.freedesktop.org/show_bug.cgi?id=95414
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: <stable@vger.kernel.org > # v4.0+
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20161107165204.7008-1-chris@chris-wilson.co.uk
2016-11-07 20:54:39 +00:00
Alex Deucher
757124d95c
drm/amdgpu: fix crash in acp_hw_fini
...
On CZ/ST systems with AZ rather than ACP audio, we need to bail
early in hw_fini since there is nothing to do.
bug: https://bugs.freedesktop.org/show_bug.cgi?id=98276
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2016-11-07 12:40:52 -05:00
Chris Wilson
54905ab5fe
drm/i915: Limit Valleyview and earlier to only using mappable scanout
...
Valleyview appears to be limited to only scanning out from the first 512MiB
of the Global GTT. Lets presume that this behaviour was inherited from the
display block copied from g4x (not Ironlake) and all earlier generations
are similarly affected, though testing suggests different symptoms. For
simplicity, impose that these platforms must scanout from the mappable
region. (For extra simplicity, use HAS_GMCH_DISPLAY even though this
catches Cherryview which does not appear to be limited to the low
aperture for its scanout.)
v2: Use HAS_GMCH_DISPLAY() to more clearly convey my intent about
limiting this workaround to the old style of display engine.
v3: Update changelog to reflect testing by Ville Syrjälä
v4: Include the changes to the comments as well
Reported-by: Luis Botello <luis.botello.ortega@intel.com >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98036
Fixes: 2efb813d53
("drm/i915: Fallback to using unmappable memory for scanout")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Akash Goel <akash.goel@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.9-rc1+
Link: http://patchwork.freedesktop.org/patch/msgid/20161107110128.28762-1-chris@chris-wilson.co.uk
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
(cherry picked from commit 767a222e47
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-11-07 19:02:35 +02:00
Chris Wilson
c4b8c57044
drm/i915: Round tile chunks up for constructing partial VMAs
...
When we split a large object up into chunks for GTT faulting (because we
can't fit the whole object into the aperture) we have to align our cuts
with the fence registers. Each partial VMA must cover a complete set of
tile rows or the offset into each partial VMA is not aligned with the
whole image. Currently we enforce a minimum size on each partial VMA,
but this minimum size itself was not aligned to the tile row causing
distortion.
Reported-by: Andreas Reis <andreas.reis@gmail.com >
Reported-by: Chris Clayton <chris2553@googlemail.com >
Reported-by: Norbert Preining <preining@logic.at >
Tested-by: Norbert Preining <preining@logic.at >
Tested-by: Chris Clayton <chris2553@googlemail.com >
Fixes: 03af84fe7f
("drm/i915: Choose partial chunksize based on tile row size")
Fixes: a61007a83a
("drm/i915: Fix partial GGTT faulting") # enabling patch
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98402
Testcase: igt/gem_mmap_gtt/medium-copy-odd
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.9-rc1+
Link: http://patchwork.freedesktop.org/patch/msgid/20161107105443.27855-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
(cherry picked from commit 0ef723cbce
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-11-07 18:24:10 +02:00
Dhinakaran Pandiyan
61e0c54388
drm/i915/dp: Extend BDW DP audio workaround to GEN9 platforms
...
According to BSpec, cdclk for BDW has to be not less than 432 MHz with DP
audio enabled, port width x4, and link rate HBR2 (5.4 GHz). With cdclk less
than 432 MHz, enabling audio leads to pipe FIFO underruns and displays
cycling on/off.
Let's apply this work around to GEN9 platforms too, as it fixes the same
issue.
v2: Move drm_device to drm_i915_private conversion
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97907
Cc: stable@vger.kernel.org
Cc: Libin Yang <libin.yang@linux.intel.com >
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478117601-19122-1-git-send-email-dhinakaran.pandiyan@intel.com
(cherry picked from commit 9c75402418
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-11-07 18:23:54 +02:00
Dhinakaran Pandiyan
fbb21c5202
drm/i915/dp: BDW cdclk fix for DP audio
...
According to BSpec, cdclk for BDW has to be not less than 432 MHz with DP
audio enabled, port width x4, and link rate HBR2 (5.4 GHz). With cdclk less
than 432 MHz, enabling audio leads to pipe FIFO underruns and displays
cycling on/off.
From BSpec:
"Display» BDW-SKL» dpr» [Register] DP_TP_CTL [BDW+,EXCLUDE(CHV)]
Workaround : Do not use DisplayPort with CDCLK less than 432 MHz, audio
enabled, port width x4, and link rate HBR2 (5.4 GHz), or else there may
be audio corruption or screen corruption."
Since, some DP configurations (e.g., MST) use port width x4 and HBR2
link rate, let's increase the cdclk to >= 432 MHz to enable audio for those
cases.
v4: Changed commit message
v3: Combine BDW pixel rate adjustments into a function (Jani)
v2: Restrict fix to BDW
Retain the set cdclk across modesets (Ville)
Cc: stable@vger.kernel.org
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1478026080-2925-1-git-send-email-dhinakaran.pandiyan@intel.com
(cherry picked from commit b30ce9e055
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-11-07 18:23:41 +02:00
Lyude
cdffe3e252
drm/i915/vlv: Prevent enabling hpd polling in late suspend
...
One of the CI machines began to run into issues with the hpd poller
suddenly waking up in the midst of the late suspend phase. It looks like
this is getting caused by the fact we now deinitialize power wells in
late suspend, which means that intel_hpd_poll_init() gets called in late
suspend causing polling to get re-enabled. So, when deinitializing power
wells on valleyview we now refrain from enabling polling in the midst of
suspend.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98040
Fixes: 19625e85c6
("drm/i915: Enable polling when we don't have hpd")
Signed-off-by: Lyude <lyude@redhat.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Jani Saarinen <jani.saarinen@intel.com >
Cc: Petry Latvala <petri.latvala@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1477499769-1966-1-git-send-email-lyude@redhat.com
(cherry picked from commit b64b540931
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-11-07 18:22:46 +02:00
Ville Syrjälä
8d83bc22b2
drm/i915: Respect alternate_ddc_pin for all DDI ports
...
The VBT provides the platform a way to mix and match the DDI ports vs.
GMBUS pins. Currently we only trust the VBT for DDI E, which I suppose
has no standard GMBUS pin assignment. However, there are machines out
there that use a non-standard mapping for the other ports as well.
Let's start trusting the VBT on this one for all ports on DDI platforms.
I've structured the code such that other platforms could easily start
using this as well, by simply filling in the ddi_port_info. IIRC there
may be CHV system that might actually need this.
v2: Include a commit message, include a debug message during init
Cc: stable@vger.kernel.org
Cc: Maarten Maathuis <madman2003@gmail.com >
Tested-by: Maarten Maathuis <madman2003@gmail.com >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97877
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1476208368-5710-3-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Jim Bride <jim.bride@linux.intel.com >
(cherry picked from commit e4ab73a132
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2016-11-07 18:22:06 +02:00