public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [RFC 0/4] Cursor support with universal planes
@ 2014-05-16  1:17 Matt Roper
  2014-05-16  1:17 ` [RFC 1/4] drm: Support legacy cursor ioctls via universal planes when possible Matt Roper
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Matt Roper @ 2014-05-16  1:17 UTC (permalink / raw)
  To: intel-gfx, dri-devel

Cursor planes are a bit trickier to support via the universal plane interface
than primary planes were.  Legacy cursor ioctls take handles to driver buffers
directly whereas the universal plane API takes drm_framebuffer's that represent
a buffer; due to this mismatch it isn't possible to implement a set of cursor
helpers than provide "free" generic universal cursor support without driver
changes as we did with primary planes.  Drivers will need to be updated to
receive cursor support via the universal plane API.

If a driver tries to implement two interfaces for cursor support (legacy ioctl
and universal planes), the reference counting can get very tricky/messy since
we need to take into account userspace that may mix and match calls to both
interfaces.  To address that, patch #1 in this set causes legacy cursor ioctls
to be implemented using a driver's universal plane support if the driver
registers a primary plane.  Calls to the legacy set_cursor ioctl will wrap the
provided driver buffer in a drm_framebuffer and then pass that along to the
universal plane interface.  From a driver's point of view, this causes all
cursor operations to arrive on the universal plane interface, regardless of
which userspace API was used, which simplifies things greatly for the driver.

Patch #2 makes some minor changes to ensure drivers can successfully register a
cursor plane with the DRM core.

Patch #3 does some minor i915 refactoring in preparation for the move to
universal planes.

Patch #4 transitions the i915 driver to universal planes.  The changes here are
intentionally minimal for ease of review.  It's likely that we could perform
further cleanup in the future to eliminate some of the cursor state tracked in
intel_crtc (e.g., cursor_width/cursor_height) since that information can be
also be derived from crtc->cursor->fb.


Matt Roper (4):
  drm: Support legacy cursor ioctls via universal planes when possible
  drm: Allow drivers to register cursor planes with crtc
  drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer
  drm/i915: Switch to unified plane cursor handling

 drivers/gpu/drm/drm_crtc.c           | 113 ++++++++++++++++++++-
 drivers/gpu/drm/i915/intel_display.c | 188 ++++++++++++++++++++++++++++-------
 drivers/gpu/drm/i915/intel_drv.h     |   1 -
 include/drm/drm_crtc.h               |   6 +-
 4 files changed, 267 insertions(+), 41 deletions(-)

-- 
1.8.5.1

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2014-05-20  7:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16  1:17 [RFC 0/4] Cursor support with universal planes Matt Roper
2014-05-16  1:17 ` [RFC 1/4] drm: Support legacy cursor ioctls via universal planes when possible Matt Roper
2014-05-16 16:00   ` [Intel-gfx] " Daniel Vetter
2014-05-16 22:38   ` [PATCH 1/4] drm: Support legacy cursor ioctls via universal planes when possible (v2) Matt Roper
2014-05-16 22:43     ` Daniel Vetter
2014-05-19  7:28       ` Daniel Vetter
2014-05-19 22:25       ` [Intel-gfx] " Matt Roper
2014-05-20  7:24         ` Daniel Vetter
2014-05-16  1:17 ` [RFC 2/4] drm: Allow drivers to register cursor planes with crtc Matt Roper
2014-05-16 16:01   ` [Intel-gfx] " Daniel Vetter
2014-05-16  1:17 ` [RFC 3/4] drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer Matt Roper
2014-05-16 16:08   ` Daniel Vetter
2014-05-16 22:57     ` [PATCH 3/4] drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer (v2) Matt Roper
2014-05-16  1:17 ` [RFC 4/4] drm/i915: Switch to unified plane cursor handling Matt Roper
2014-05-16 10:39   ` Chris Wilson
2014-05-16 16:24   ` Daniel Vetter
2014-05-16  9:19 ` [RFC 0/4] Cursor support with universal planes Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox