Alex Deucher
b9b487e494
Revert "drm/radeon: always apply pci shutdown callbacks"
...
This seems to break reboot on some evergreen systems.
bugs:
https://bugs.freedesktop.org/show_bug.cgi?id=99524
https://bugzilla.kernel.org/show_bug.cgi?id=192271
This reverts commit a481daa88f
.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2017-01-25 16:54:50 -05:00
Dave Airlie
54a07c7bb0
Revert "drm/probe-helpers: Drop locking from poll_enable"
...
This reverts commit 3846fd9b86
.
There were some precursor commits missing for this around connector
locking, we should probably merge Lyude's nouveau avoid the problem patch.
2017-01-26 06:44:03 +10:00
Daniel Vetter
d5d487eb07
drm: Update kerneldoc for drm_crtc.[hc]
...
After going through all the trouble of splitting out parts from
drm_crtc.[hc] and then properly documenting each I've entirely
forgotten to show the same TLC for CRTCs themselves!
Let's make amends asap.
v2: Review from Eric.
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
2017-01-25 16:36:23 +01:00
Daniel Vetter
1031548c61
drm/gma500: Nuke device_is_agp callback
...
Returning 0 for an on-chip gpu doesn't change anything at all.
Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com >
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-8-daniel.vetter@ffwll.ch
2017-01-25 16:33:26 +01:00
Daniel Vetter
d574528a64
drm/kms-core: Use recommened kerneldoc for struct member refs
...
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).
Also some minor drive-by polish where it makes sense, I read a lot
of docs ...
v2: Review from Eric.
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-4-daniel.vetter@ffwll.ch
2017-01-25 16:30:34 +01:00
Daniel Vetter
ef40cbf999
drm/core: Use recommened kerneldoc for struct member refs
...
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).
Also some minor drive-by polish where it makes sense, I read a lot
of docs ...
v2: Review from Gustavo.
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-6-daniel.vetter@ffwll.ch
2017-01-25 16:22:42 +01:00
Daniel Vetter
940eba2d58
drm/gem|prime|mm: Use recommened kerneldoc for struct member refs
...
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).
Also some minor drive-by polish where it makes sense, I read a lot
of docs ...
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-5-daniel.vetter@ffwll.ch
2017-01-25 16:20:21 +01:00
Daniel Vetter
6806cdf9aa
drm/kms-helpers: Use recommened kerneldoc for struct member refs
...
I just learned that &struct_name.member_name works and looks pretty
even. It doesn't (yet) link to the member directly though, which would
be really good for big structures or vfunc tables (where the
per-member kerneldoc tends to be long).
Also some minor drive-by polish where it makes sense, I read a lot
of docs ...
v2: Comments from Gustavo.
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Rewiewed-by: Gustavo Padovan <gustavo.padovan@collabora.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170125062657.19270-2-daniel.vetter@ffwll.ch
2017-01-25 16:18:57 +01:00
Jerome Anand
46d196ec46
drm/i915: Add support for audio driver notifications
...
Notifiations like mode change, hot plug and edid to
the audio driver are added. This is inturn used by the
audio driver for its functionality.
A new interface file capturing the notifications needed by the
audio driver is added
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Jerome Anand <jerome.anand@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2017-01-25 14:23:12 +01:00
Jerome Anand
eef57324d9
drm/i915: setup bridge for HDMI LPE audio driver
...
Enable support for HDMI LPE audio mode on Baytrail and
Cherrytrail when HDaudio controller is not detected
Setup minimum required resources during i915_driver_load:
1. Create a platform device to share MMIO/IRQ resources
2. Make the platform device child of i915 device for runtime PM.
3. Create IRQ chip to forward HDMI LPE audio irqs.
HDMI LPE audio driver (a standalone sound driver) probes the
LPE audio device and creates a new sound card.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com >
Signed-off-by: Jerome Anand <jerome.anand@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Takashi Iwai <tiwai@suse.de >
2017-01-25 14:21:47 +01:00
Jani Nikula
45d9f43911
Merge tag 'gvt-fixes-2017-01-25' of https://github.com/01org/gvt-linux into drm-intel-fixes
...
gvt-fixes-2017-01-25
- re-enable shadow batch buffer for security that was falsely turned off.
- kvmgt/mdev typo fix for correct ABI
- gvt mail list change
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 13:05:39 +02:00
Daniele Ceraolo Spurio
2f5db26c2e
drm/i915: reinstate call to trace_i915_vma_bind
...
The call went away in:
commit 3b16525cc4
Author: Chris Wilson <chris@chris-wilson.co.uk >
Date: Thu Aug 4 16:32:25 2016 +0100
drm/i915: Split insertion/binding of an object into the VM
It is useful to have this trace as it pairs nicely with the vma_unbind
one to track vma activity.
Added inside the i915_vma_bind function (was outside before) to keep a
similar placement as trace_i915_vma_unbind.
v2: print bind_flags instead of flags (Chris)
Fixes: 3b16525cc4
("drm/i915: Split insertion/binding of an object into the VM")
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484949083-11430-1-git-send-email-daniele.ceraolospurio@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
(cherry picked from commit 6146e6da5c
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:57:22 +02:00
Chris Wilson
6f0f02dc56
drm/i915: Move atomic state free from out of fence release
...
Fences are required to support being released from under an atomic context.
The drm_atomic_state struct may take a mutex when being released and so
we cannot drop a reference to the drm_atomic_state from the fence release
path directly, and so we need to defer that unreference to a worker.
[ 326.576697] WARNING: CPU: 2 PID: 366 at kernel/sched/core.c:7737 __might_sleep+0x5d/0x80
[ 326.576816] do not call blocking ops when !TASK_RUNNING; state=1 set at [<ffffffffc0359549>] intel_breadcrumbs_signaler+0x59/0x270 [i915]
[ 326.576818] Modules linked in: rfcomm fuse snd_hda_codec_hdmi bnep snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device snd_timer input_leds led_class snd punit_atom_debug btusb btrtl btbcm btintel intel_rapl bluetooth i915 drm_kms_helper syscopyarea sysfillrect iwlwifi sysimgblt soundcore fb_sys_fops mei_txe cfg80211 drm pwm_lpss_platform pwm_lpss pinctrl_cherryview fjes acpi_pad parport_pc ppdev parport autofs4
[ 326.576899] CPU: 2 PID: 366 Comm: i915/signal:0 Tainted: G U 4.10.0-rc3-patser+ #5030
[ 326.576902] Hardware name: /NUC5PPYB, BIOS PYBSWCEL.86A.0031.2015.0601.1712 06/01/2015
[ 326.576905] Call Trace:
[ 326.576920] dump_stack+0x4d/0x6d
[ 326.576926] __warn+0xc0/0xe0
[ 326.576931] warn_slowpath_fmt+0x5a/0x80
[ 326.577004] ? intel_breadcrumbs_signaler+0x59/0x270 [i915]
[ 326.577075] ? intel_breadcrumbs_signaler+0x59/0x270 [i915]
[ 326.577079] __might_sleep+0x5d/0x80
[ 326.577087] mutex_lock+0x1b/0x40
[ 326.577133] drm_property_free_blob+0x1e/0x80 [drm]
[ 326.577167] ? drm_property_destroy+0xe0/0xe0 [drm]
[ 326.577200] drm_mode_object_unreference+0x5c/0x70 [drm]
[ 326.577233] drm_property_unreference_blob+0xe/0x10 [drm]
[ 326.577260] __drm_atomic_helper_crtc_destroy_state+0x14/0x40 [drm_kms_helper]
[ 326.577278] drm_atomic_helper_crtc_destroy_state+0x10/0x20 [drm_kms_helper]
[ 326.577352] intel_crtc_destroy_state+0x9/0x10 [i915]
[ 326.577388] drm_atomic_state_default_clear+0xea/0x1d0 [drm]
[ 326.577462] intel_atomic_state_clear+0xd/0x20 [i915]
[ 326.577497] drm_atomic_state_clear+0x1a/0x30 [drm]
[ 326.577532] __drm_atomic_state_free+0x13/0x60 [drm]
[ 326.577607] intel_atomic_commit_ready+0x6f/0x78 [i915]
[ 326.577670] i915_sw_fence_release+0x3a/0x50 [i915]
[ 326.577733] dma_i915_sw_fence_wake+0x39/0x80 [i915]
[ 326.577741] dma_fence_signal+0xda/0x120
[ 326.577812] ? intel_breadcrumbs_signaler+0x59/0x270 [i915]
[ 326.577884] intel_breadcrumbs_signaler+0xb1/0x270 [i915]
[ 326.577889] kthread+0x127/0x130
[ 326.577961] ? intel_engine_remove_wait+0x1a0/0x1a0 [i915]
[ 326.577964] ? kthread_stop+0x120/0x120
[ 326.577970] ret_from_fork+0x22/0x30
Fixes: c004a90b72
("drm/i915: Restore nonblocking awaits for modesetting")
Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123212939.30345-1-chris@chris-wilson.co.uk
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
(cherry picked from commit eb955eee27
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:42:58 +02:00
Ander Conselvan de Oliveira
6d1d427a4e
drm/i915: Check for NULL atomic state in intel_crtc_disable_noatomic()
...
In intel_crtc_disable_noatomic(), bail on a failure to allocate an
atomic state to avoid a NULL pointer dereference.
Fixes: 4a80655827
("drm/i915: Pass atomic state to crtc enable/disable functions")
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: intel-gfx@lists.freedesktop.org
Cc: <stable@vger.kernel.org > # v4.9+
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-4-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit 31bb2ef97e
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:42:50 +02:00
Ander Conselvan de Oliveira
3781bd6e7d
drm/i915: Fix calculation of rotated x and y offsets for planar formats
...
Parameters tile_size, tile_width and tile_height were passed in the
wrong order to _intel_adjust_tile_offset() when calculating the rotated
offsets.
This doesn't fix any user visible bug, since for packed formats new
and old offset are the same and the rotated offsets are within a tile
before they are fed to _intel_adjust_tile_offset(). In that case, the
offsets are unchanged. That is not true for planar formats, but those
are currently not supported.
Fixes: 66a2d927cb
("drm/i915: Make intel_adjust_tile_offset() work for linear buffers")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: intel-gfx@lists.freedesktop.org
Cc: <stable@vger.kernel.org > # v4.9+
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-3-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit 46a1bd2895
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:42:41 +02:00
Ander Conselvan de Oliveira
21d6e0bde5
drm/i915: Don't init hpd polling for vlv and chv from runtime_suspend()
...
An error in the condition for avoiding the call to intel_hpd_poll_init()
for valleyview and cherryview from intel_runtime_suspend() caused it to
be called unconditionally. Fix it.
Fixes: 19625e85c6
("drm/i915: Enable polling when we don't have hpd")
Cc: stable@vger.kernel.org
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Lyude <cpaul@redhat.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: intel-gfx@lists.freedesktop.org
Cc: <stable@vger.kernel.org > # v4.9+
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-2-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit 04313b00b7
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:42:36 +02:00
Ander Conselvan de Oliveira
c34f078675
drm/i915: Don't leak edid in intel_crt_detect_ddc()
...
In the path where intel_crt_detect_ddc() detects a CRT, if would return
true without freeing the edid.
Fixes: a2bd1f541f
("drm/i915: check whether we actually received an edid in detect_ddc")
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: intel-gfx@lists.freedesktop.org
Cc: <stable@vger.kernel.org > # v3.6+
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484922525-6131-1-git-send-email-ander.conselvan.de.oliveira@intel.com
(cherry picked from commit c96b63a6a7
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:42:30 +02:00
Chris Wilson
a38a7bd176
drm/i915: Release temporary load-detect state upon switching
...
After we call drm_atomic_commit() on the load-detect state, we can free
our local reference. Upon restore, we only apply and free the previous state.
Fixes: 0853695c3b
("drm: Add reference counting to drm_atomic_state")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Link: http://patchwork.freedesktop.org/patch/msgid/20170119113749.2517-1-chris@chris-wilson.co.uk
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
(cherry picked from commit 7abbd11f34
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:42:21 +02:00
Clint Taylor
27892bbdc9
drm/i915: prevent crash with .disable_display parameter
...
The .disable_display parameter was causing a fatal crash when fbdev
was dereferenced during driver init.
V1: protection in i915_drv.c
V2: Moved protection to intel_fbdev.c
Fixes: 43cee31434
("drm/i915/fbdev: Limit the global async-domain synchronization")
Testcase: igt/drv_module_reload/basic-no-display
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484775523-29428-1-git-send-email-clinton.a.taylor@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Lukas Wunner <lukas@wunner.de >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: <stable@vger.kernel.org > # v4.8+
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
(cherry picked from commit 5b8cd0755f
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:42:16 +02:00
Chris Wilson
b78671591a
drm/i915: Avoid drm_atomic_state_put(NULL) in intel_display_resume
...
intel_display_resume() may be called without an atomic state to restore,
i.e. dev_priv->modeset_reset_restore state is NULL. One such case is
following a lid open/close event and the forced modeset in
intel_lid_notify().
Reported-by: Stefan Seyfried <stefan.seyfried@googlemail.com >
Tested-by: Stefan Seyfried <stefan.seyfried@googlemail.com >
Fixes: 0853695c3b
("drm: Add reference counting to drm_atomic_state")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Link: http://patchwork.freedesktop.org/patch/msgid/20170115125825.18597-1-chris@chris-wilson.co.uk
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com >
(cherry picked from commit 3c5e37f169
)
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
2017-01-25 12:41:00 +02:00
Dhinakaran Pandiyan
7b0a89a6db
drm/dp: Store drm_device in MST topology manager
...
struct drm_dp_mst_topology_mgr currently stores a pointer to struct dev.
Changing this to instead hold a pointer to drm_device is more useful as it
gives access to DRM structures. This also makes it consistent with other
DRM structures like drm_crtc, drm_connector etc.
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1485301777-3465-2-git-send-email-dhinakaran.pandiyan@intel.com
2017-01-25 06:01:48 +01:00
Alex Williamson
7283accfae
drm/i915/gvt: Fix kmem_cache_create() name
...
According to kmem_cache_sanity_check(), spaces are not allowed in the
name of a cache and results in a kernel oops with CONFIG_DEBUG_VM.
Convert to underscores.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
2017-01-25 10:28:34 +08:00
Alex Williamson
bdbfd5196d
drm/i915/gvt/kvmgt: mdev ABI is available_instances, not available_instance
...
Per the ABI specification[1], each mdev_supported_types entry should
have an available_instances, with an "s", not available_instance.
[1] Documentation/ABI/testing/sysfs-bus-vfio-mdev
Signed-off-by: Alex Williamson <alex.williamson@redhat.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
2017-01-25 10:28:34 +08:00
Rodrigo Vivi
b976dc53ec
drm/i915: Introduce IS_GEN9_BC for Skylake and Kabylake.
...
Along with GLK it was introduced the .is_lp and IS_GEN9_LP.
So, following the same simplification standard we can
put Skylake and Kabylake under the same bucket for most
of the things.
So let's add the IS_GEN9_BC for "Big Core" (non Atom based
platforms).
The i915_drv.c was let out of this patch on purpose
because that is really a decision per platform, just like
other cases where IS_KABYLAKE is different from IS_SKYLAKE.
v2: fix conflict with IS_LP and 3 new cases for this
big core bucket:
- intel_ddi.c: intel_ddi_get_link_dpll
- intel_fbc.c: find_compression_threshold
- i915_gem_gtt.c: gtt_write_workarounds
Cc: Anusha Srivatsa <anusha.srivatsa@intel.com >
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Cc: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1485196357-30599-2-git-send-email-rodrigo.vivi@intel.com
2017-01-24 10:29:00 -08:00
Rodrigo Vivi
8da53efaa2
drm/i915/kbl: Apply WaIncreaseDefaultTLBEntries on KBL.
...
According to wa_database this Wa persist on KBL as it was on SKL.
Cc: Tim Gore <tim.gore@intel.com >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1485196357-30599-1-git-send-email-rodrigo.vivi@intel.com
2017-01-24 10:21:32 -08:00
Chris Wilson
eb955eee27
drm/i915: Move atomic state free from out of fence release
...
Fences are required to support being released from under an atomic context.
The drm_atomic_state struct may take a mutex when being released and so
we cannot drop a reference to the drm_atomic_state from the fence release
path directly, and so we need to defer that unreference to a worker.
[ 326.576697] WARNING: CPU: 2 PID: 366 at kernel/sched/core.c:7737 __might_sleep+0x5d/0x80
[ 326.576816] do not call blocking ops when !TASK_RUNNING; state=1 set at [<ffffffffc0359549>] intel_breadcrumbs_signaler+0x59/0x270 [i915]
[ 326.576818] Modules linked in: rfcomm fuse snd_hda_codec_hdmi bnep snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq snd_seq_device snd_timer input_leds led_class snd punit_atom_debug btusb btrtl btbcm btintel intel_rapl bluetooth i915 drm_kms_helper syscopyarea sysfillrect iwlwifi sysimgblt soundcore fb_sys_fops mei_txe cfg80211 drm pwm_lpss_platform pwm_lpss pinctrl_cherryview fjes acpi_pad parport_pc ppdev parport autofs4
[ 326.576899] CPU: 2 PID: 366 Comm: i915/signal:0 Tainted: G U 4.10.0-rc3-patser+ #5030
[ 326.576902] Hardware name: /NUC5PPYB, BIOS PYBSWCEL.86A.0031.2015.0601.1712 06/01/2015
[ 326.576905] Call Trace:
[ 326.576920] dump_stack+0x4d/0x6d
[ 326.576926] __warn+0xc0/0xe0
[ 326.576931] warn_slowpath_fmt+0x5a/0x80
[ 326.577004] ? intel_breadcrumbs_signaler+0x59/0x270 [i915]
[ 326.577075] ? intel_breadcrumbs_signaler+0x59/0x270 [i915]
[ 326.577079] __might_sleep+0x5d/0x80
[ 326.577087] mutex_lock+0x1b/0x40
[ 326.577133] drm_property_free_blob+0x1e/0x80 [drm]
[ 326.577167] ? drm_property_destroy+0xe0/0xe0 [drm]
[ 326.577200] drm_mode_object_unreference+0x5c/0x70 [drm]
[ 326.577233] drm_property_unreference_blob+0xe/0x10 [drm]
[ 326.577260] __drm_atomic_helper_crtc_destroy_state+0x14/0x40 [drm_kms_helper]
[ 326.577278] drm_atomic_helper_crtc_destroy_state+0x10/0x20 [drm_kms_helper]
[ 326.577352] intel_crtc_destroy_state+0x9/0x10 [i915]
[ 326.577388] drm_atomic_state_default_clear+0xea/0x1d0 [drm]
[ 326.577462] intel_atomic_state_clear+0xd/0x20 [i915]
[ 326.577497] drm_atomic_state_clear+0x1a/0x30 [drm]
[ 326.577532] __drm_atomic_state_free+0x13/0x60 [drm]
[ 326.577607] intel_atomic_commit_ready+0x6f/0x78 [i915]
[ 326.577670] i915_sw_fence_release+0x3a/0x50 [i915]
[ 326.577733] dma_i915_sw_fence_wake+0x39/0x80 [i915]
[ 326.577741] dma_fence_signal+0xda/0x120
[ 326.577812] ? intel_breadcrumbs_signaler+0x59/0x270 [i915]
[ 326.577884] intel_breadcrumbs_signaler+0xb1/0x270 [i915]
[ 326.577889] kthread+0x127/0x130
[ 326.577961] ? intel_engine_remove_wait+0x1a0/0x1a0 [i915]
[ 326.577964] ? kthread_stop+0x120/0x120
[ 326.577970] ret_from_fork+0x22/0x30
Fixes: c004a90b72
("drm/i915: Restore nonblocking awaits for modesetting")
Reported-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123212939.30345-1-chris@chris-wilson.co.uk
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
2017-01-24 17:27:35 +00:00
Chris Wilson
7c9e934ef8
drm/i915: Emit dma-fence (and execlists submit) first from signaler
...
When introduced, I thought that reducing client latency from the
signaler was the priority. Since its inception the signaler has become
responsible for keeping the execlists full, via the dma-fence. As this
is very important to minimise overall execution time, signal the
dma-fence first and then signal any waiting clients.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-8-chris@chris-wilson.co.uk
2017-01-24 16:00:26 +00:00
Chris Wilson
48ea2554f4
drm/i915: Dequeue execlists on a new request if any port is available
...
If the second ELSP port is available, schedule the execlists tasklet to
see if the new request can occupy it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-7-chris@chris-wilson.co.uk
2017-01-24 16:00:25 +00:00
Chris Wilson
3833281adb
drm/i915: Only attempt to pass the first request to execlists
...
Only the first request added to the execlist queue can be submitted. If
this request is not the first request on the queue, it means that there
are already higher priority requests waiting upon the tasklet and
kicking it will make no difference.
This is more relevant for a later patch, where we more eagerly try and
kick the tasklet to handle the submission of new requests.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-6-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-01-24 16:00:13 +00:00
Chris Wilson
a37951ac9f
drm/i915: Skip the execlists CSB scan and rewrite if the ring is untouched
...
If the CSB head/tail pointers are unchanged, we can skip the update of
the CSB register afterwards.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-5-chris@chris-wilson.co.uk
2017-01-24 15:56:18 +00:00
Chris Wilson
f747026c2b
drm/i915: Only run execlist context-switch handler after an interrupt
...
Mark when we run the execlist tasklet following the interrupt, so we
don't probe a potentially uninitialised register when submitting the
contexts multiple times before the hardware responds.
v2: Use a shared engine->irq_posted
v3: Always use locked bitops to be sure of atomicity wrt to other bits
in the mask.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124152021.26587-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-01-24 15:56:01 +00:00
Chris Wilson
538b257dae
drm/i915: Move breadcrumbs irq_posted up a level to engine
...
In the next patch, we will use the irq_posted technique for another
engine interrupt, rather than use two members for the atomic updates, we
can use two bits of one instead. First, we need to update the
breadcrumbs to use the new common engine->irq_posted.
v2: Use set_bit() rather than __set_bit() to ensure atomicity with
respect to other bits in the mask
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124151805.26146-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-01-24 15:55:36 +00:00
Chris Wilson
816ee798ec
drm/i915: Only disable execlist preemption for the duration of the request
...
We need to prevent resubmission of the context immediately following an
initial resubmit (which does a lite-restore preemption). Currently we do
this by disabling all submission whilst the context is still active, but
we can improve this by limiting the restriction to only until we
receive notification from the context-switch interrupt that the
lite-restore preemption is complete.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-2-chris@chris-wilson.co.uk
2017-01-24 15:55:16 +00:00
Chris Wilson
c816e605ff
drm/i915: Assert that we don't submit to execlists whilst a preempt is pending
...
To complement the check in execlists_elsp_ready(), also assert that we
don't submit the same context while it has a lite restore still pending.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110009.28947-1-chris@chris-wilson.co.uk
2017-01-24 15:55:05 +00:00
Jani Nikula
5ec63bbdf5
drm/i915/dp: do not proceed with autotests if we don't ACK them
...
There is no point in setting intel_dp->compliance.test_type, and
proceeding with the autotests, if we're about to NAK the request. Some
drive-by cleanups while at it.
v2: look at the ACK bit, as the result may also contain
TEST_EDID_CHECKSUM_WRITE
Cc: Manasi Navare <manasi.d.navare@intel.com >
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com >
Tested-by: Manasi Navare <manasi.d.navare@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484931846-25390-1-git-send-email-jani.nikula@intel.com
2017-01-24 15:27:34 +02:00
Chris Wilson
241455172b
drm/i915: Reset the gpu on takeover
...
The GPU may be in an unknown state following resume and module load. The
previous occupant may have left contexts loaded, or other dangerous
state, which can cause an immediate GPU hang for us. The only save
course of action is to reset the GPU prior to using it - similarly to
how we reset the GPU prior to unload (before a second user may be
affected by our leftover state).
We need to reset the GPU very early in our load/resume sequence so that
any stale HW pointers are revoked prior to any resource allocations we
make (that may conflict).
A reset should only be a couple of milliseconds on a slow device, a cost
we should easily be able to absorb into our initialisation times.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110135.6418-2-chris@chris-wilson.co.uk
2017-01-24 12:29:48 +00:00
Chris Wilson
bb8f0f5abd
drm/i915: Split intel_engine allocation and initialisation
...
In order to reset the GPU early on in the module load sequence, we need
to allocate the basic engine structs (to populate the mmio offsets etc).
Currently, the engine initialisation allocates both the base struct and
also allocate auxiliary objects, which depend upon state setup quite
late in the load sequence. We split off the allocation callback for
later and allow ourselves to allocate the engine structs themselves
early.
v2: Different paint for the unwind following error.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170124110135.6418-1-chris@chris-wilson.co.uk
2017-01-24 12:29:47 +00:00
Chris Wilson
442ffefc0c
drm/vgem: Switch to reservation_object_lock() helpers
...
For the convenience of encapsulation the reservation object's ww_mutex
was wrapped in pair of lock/unlock helpers.
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/20170123095357.29514-1-chris@chris-wilson.co.uk
2017-01-24 11:00:23 +01:00
Noralf Trønnes
a4405b567e
drm/fb-cma-helper: Add drm_fbdev_cma_set_suspend_unlocked()
...
Add a CMA version of drm_fb_helper_set_suspend_unlocked().
Cc: laurent.pinchart@ideasonboard.com
Signed-off-by: Noralf Trønnes <noralf@tronnes.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170122181117.8210-2-noralf@tronnes.org
2017-01-24 11:00:22 +01:00
Chris Wilson
b46b54a558
drm: Update drm_cache.c to pull in the new drm_cache.h
...
The prototypes were moved to a new header, but the function definitions
were not updated to pull in the declarations.
drivers/gpu/drm/drm_cache.c:79:1: warning: no previous prototype for ‘drm_clflush_pages’ [-Wmissing-prototypes]
drivers/gpu/drm/drm_cache.c:120:1: warning: no previous prototype for ‘drm_clflush_sg’ [-Wmissing-prototypes]
drivers/gpu/drm/drm_cache.c:152:1: warning: no previous prototype for ‘drm_clflush_virt_range’ [-Wmissing-prototypes]
Fixes: f9a87bd7d5
("drm: Move drm_clflush prototypes to drm_cache header file")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Gabriel Krisman Bertazi <krisman@collabora.co.uk >
Cc: Alex Deucher <alexander.deucher@amd.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/20170121181944.24672-1-chris@chris-wilson.co.uk
2017-01-24 11:00:22 +01:00
Arnd Bergmann
d5ad78436a
drm: bridge: dw-hdmi: fix building without CONFIG_OF
...
The of_node member in struct drm_bridge is hidden when CONFIG_OF
is disabled, causing a build error:
drivers/gpu/drm/bridge/dw-hdmi.c: In function '__dw_hdmi_probe':
drivers/gpu/drm/bridge/dw-hdmi.c:2063:14: error: 'struct drm_bridge' has no member named 'of_node'
We could fix this either using a Kconfig dependency on CONFIG_OF
or making the one line conditional. The latter gives us better
compile test coverage, so this is what I'm doing here.
Fixes: 69497eb923
("drm: bridge: dw-hdmi: Implement DRM bridge registration")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123122312.3290934-1-arnd@arndb.de
2017-01-24 11:23:24 +05:30
Xiangliang Yu
3a1d19a296
drm/amdgpu: fix unload driver issue for virtual display
...
Virtual display doesn't allocate amdgpu_encoder when initializing,
so will get invaild pointer if try to free amdgpu_encoder when
unloading driver.
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-01-23 16:47:18 -05:00
Ding Pixel
c5f21c9f87
drm/amdgpu: check ring being ready before using
...
Return success when the ring is properly initialized, otherwise return
failure.
Tonga SRIOV VF doesn't have UVD and VCE engines, the initialization of
these IPs is bypassed. The system crashes if application submit IB to
their rings which are not ready to use. It could be a common issue if
IP having ring buffer is disabled for some reason on specific ASIC, so
it should check the ring being ready to use.
Bug: amdgpu_test crashes system on Tonga VF.
Signed-off-by: Ding Pixel <Pixel.Ding@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-01-23 16:47:01 -05:00
Chris Wilson
b403c8feaf
drm/i915: Remove BXT TDL state w/a
...
This w/a (WaClearTdlStateAckDirtyBits) was only used for preproduction hw,
which is no longer in use. Remove the workaround to simplify the code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-5-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
2017-01-23 15:53:02 +00:00
Chris Wilson
68bee61573
drm/i915: Remove BXT disable pixel mask clamping w/a
...
This w/a (WaSetDisablePixMaskCammingAndRhwoInCommonSliceChicken) was only
used for preproduction hw, which is no longer in use. Remove the
workaround to simplify the code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-4-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
2017-01-23 15:53:01 +00:00
Chris Wilson
32ebc29211
drm/i915: Remove BXT restore arbitration around ctx switch
...
This w/a (WaDisableCtxRestoreArbitration) was only used for preproduction
hw, which is no longer in use. Remove the workaround to simplify the code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-3-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
2017-01-23 15:53:01 +00:00
Chris Wilson
f8dd2934c4
drm/i915: Remove BXT incoherent seqno write workaround
...
This w/a was only used for preproduction hw, which is no longer in use.
Remove the workaround to simplify the code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-2-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
2017-01-23 15:53:00 +00:00
Chris Wilson
70962fbe5c
drm/i915: Remove disable_lite_restore_wa
...
This w/a (WaEnableForceRestoreInCtxtDescForVCS) was only used for
preproduction hw, which is no longer in use. Remove the workaround to
simplify the code.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123130601.2281-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
2017-01-23 15:52:42 +00:00
Chris Wilson
7c51846030
drm/i915: Pevent copying uninitialised garbage into vma->ggtt_view
...
Since tweaking i915_vma_compare() we allowed constructors to skip
clearing the ggtt_view believing that we didn't access the unused
members. That, as it turns out, was not entirely true. In particular,
i915_gem_fault() uses
ret = remap_io_mapping(area,
area->vm_start + (vma->ggtt_view.partial.offset << PAGE_SHIFT),
(ggtt->mappable_base + vma->node.start) >> PAGE_SHIFT,
min_t(u64, vma->size, area->vm_end - area->vm_start),
&ggtt->mappable);
i.e. the ggtt_view.partial for both normal and partial views. If we
allowed garbage into the normal vma->ggtt_view and then try userspace
tried to mmap it, we could explode in an unobvious fashion.
Fixes: 7b92c047ba
("drm/i915: Eliminate superfluous i915_ggtt_view_rotated")
Fixes: 3bf4d57519
("drm/i915: Stop clearing i915_ggtt_view")
Reported-by: Matthew Auld <matthew.william.auld@gmail.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Matthew Auld <matthew.william.auld@gmail.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170123145245.3972-1-chris@chris-wilson.co.uk
Tested-by: Matthew Auld <matthew.auld@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
2017-01-23 15:52:23 +00:00
Maarten Lankhorst
4c01ded573
drm/i915: Use atomic page flip for intel again.
...
This reverts commit 527b6abe5f
(Revert "drm/i915: Use atomic commits for legacy page_flips")
and reapplies commit ee042aa40b
.
("drm/i915: Use atomic commits for legacy page_flips")
The reason for the revert was because legacy cursor updates were
forced to wait for pending page flips and rendering after they
were converted to atomic.
Commit f79f26921e
(drm/i915: Add a cursor hack to allow converting legacy page flip to atomic, v3)
adds a fastpath to cursor updates, which fixes the stuttering issues.
With these changes I feel confident enough to re-enable cursor updates.
Legacy cursor update won't block in the following cases:
- Moving cursor
- Changing cursor fb
The legacy cursor update will still block in the following cases:
- Showing/hiding cursor.
- Cursor size or scaling changes.
- cursor update while cursor is invisible (could be fixed, if it turns out to be important).
- Cursor tiling changes (Not sure we support tiled cursors.)
- Last update was a modeset.
Cc: Steven Newbury <steve@snewbury.org.uk >
Cc: Rafael Ristovski <rafael.ristovski@gmail.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Tested-by: Rafael Ristovski <rafael.ristovski@gmail.com >
Testcase: igt/kms_cursor_legacy
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2017-01-23 15:59:21 +01:00