From: Matt Roper <matthew.d.roper@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH 0/6] Cursor support with universal planes (v3)
Date: Mon, 19 May 2014 16:58:36 -0700 [thread overview]
Message-ID: <1400543922-11078-1-git-send-email-matthew.d.roper@intel.com> (raw)
(respinning the whole patch series to pull the entire set back together now
that a couple patches have been added at the beginning)
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, this patch 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.
Patches #1 and #2 refactor the main logic of the add_fb2 and setplane ioctls
out into new functions that are intended for use by internal callers. The
legacy -> universal cursor code will make use of these internal functions.
Patch #3 causes calls to the legacy cursor ioctls to be redirected to the
universal plane interface if a driver has registered a cursor plane with the
DRM core. Cursor buffers are wrapped in a new DRM framebuffer and then
passed to the internal setplane interface for processing.
Patch #4 makes some minor changes to ensure drivers can successfully register a
cursor plane with the DRM core.
Patches #5 and #6 migrate the i915 driver to use universal planes for cursor
support. 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 (6):
drm: Refactor framebuffer creation to allow internal use (v2)
drm: Refactor setplane to allow internal use (v2)
drm: Support legacy cursor ioctls via universal planes when possible
(v3)
drm: Allow drivers to register cursor planes with crtc
drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer (v2)
drm/i915: Switch to unified plane cursor handling (v2)
drivers/gpu/drm/drm_crtc.c | 342 ++++++++++++++++++++++++-----------
drivers/gpu/drm/i915/intel_display.c | 169 +++++++++++++----
drivers/gpu/drm/i915/intel_drv.h | 1 -
include/drm/drm_crtc.h | 6 +-
4 files changed, 376 insertions(+), 142 deletions(-)
Cc: intel-gfx@lists.freedesktop.org
--
1.8.5.1
next reply other threads:[~2014-05-19 23:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 23:58 Matt Roper [this message]
2014-05-19 23:58 ` [PATCH 1/6] drm: Refactor framebuffer creation to allow internal use (v2) Matt Roper
2014-05-19 23:58 ` [PATCH 2/6] drm: Refactor setplane " Matt Roper
2014-05-22 16:33 ` [PATCH 2/6] drm: Refactor setplane to allow internal use (v3) Matt Roper
2014-05-22 22:37 ` Daniel Vetter
2014-05-22 22:48 ` Matt Roper
2014-05-22 22:51 ` Daniel Vetter
2014-05-22 22:57 ` Matt Roper
2014-05-23 5:40 ` Daniel Vetter
2014-05-19 23:58 ` [PATCH 3/6] drm: Support legacy cursor ioctls via universal planes when possible (v3) Matt Roper
2014-05-20 7:41 ` Daniel Vetter
2014-05-20 15:02 ` [PATCH 3/6] drm: Support legacy cursor ioctls via universal planes when possible (v4) Matt Roper
2014-05-19 23:58 ` [PATCH 4/6] drm: Allow drivers to register cursor planes with crtc Matt Roper
2014-05-19 23:58 ` [PATCH 5/6] drm/i915: Add intel_crtc_cursor_set_obj() to set cursor buffer (v2) Matt Roper
2014-05-19 23:58 ` [PATCH 6/6] drm/i915: Switch to unified plane cursor handling (v2) Matt Roper
2014-05-22 16:34 ` [PATCH 6/6] drm/i915: Switch to unified plane cursor handling (v3) Matt Roper
2014-05-22 21:00 ` [PATCH 6/6] drm/i915: Switch to unified plane cursor handling (v4) Matt Roper
2014-06-04 10:37 ` G, Pallavi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1400543922-11078-1-git-send-email-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox