Home
last modified time | relevance | path

Searched hist:f2b50c11 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/gpu/drm/
H A Ddrm_crtc.cf2b50c11 Fri Sep 12 10:07:32 CDT 2014 Daniel Vetter <daniel.vetter@ffwll.ch> drm: Fixup locking for universal cursor planes

Bunch of things amiss:
- Updating crtc->cursor_x/y was done without any locking. Spotted by
David Herrmann.
- Dereferencing crtc->cursor->fb was using the wrong lock, should take
the crtc lock.
- Grabbing _all_ modeset locks torpedoes the reason why we added
fine-grained locks originally: Cursor updates shouldn't stall on
background stuff like probing outputs.

Best is to just grab the crtc lock around everything and drop all the
other locking. The only issue is that we can't switch planes between
crtcs with that, so make sure that never happens when someone uses
universal plane helpers. This shouldn't be a possible regression ever
since legacy ioctls also only grabbed the crtc lock, so switching
crtcs was never possible for the underlying plane object. And i915
(the only user of universal cursors thus far) has fixed cursor->crtc
links.

Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Pallavi G<pallavi.g@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Tested-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
f2b50c11 Fri Sep 12 10:07:32 CDT 2014 Daniel Vetter <daniel.vetter@ffwll.ch> drm: Fixup locking for universal cursor planes

Bunch of things amiss:
- Updating crtc->cursor_x/y was done without any locking. Spotted by
David Herrmann.
- Dereferencing crtc->cursor->fb was using the wrong lock, should take
the crtc lock.
- Grabbing _all_ modeset locks torpedoes the reason why we added
fine-grained locks originally: Cursor updates shouldn't stall on
background stuff like probing outputs.

Best is to just grab the crtc lock around everything and drop all the
other locking. The only issue is that we can't switch planes between
crtcs with that, so make sure that never happens when someone uses
universal plane helpers. This shouldn't be a possible regression ever
since legacy ioctls also only grabbed the crtc lock, so switching
crtcs was never possible for the underlying plane object. And i915
(the only user of universal cursors thus far) has fixed cursor->crtc
links.

Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Pallavi G<pallavi.g@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Tested-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>