From: Daniel Vetter <daniel@ffwll.ch>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [RFC 0/4] Cursor support with universal planes
Date: Fri, 16 May 2014 11:19:53 +0200 [thread overview]
Message-ID: <20140516091953.GG8790@phenom.ffwll.local> (raw)
In-Reply-To: <1400203049-21385-1-git-send-email-matthew.d.roper@intel.com>
On Thu, May 15, 2014 at 06:17:25PM -0700, Matt Roper wrote:
> 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
^cursor plane I guess?
-Daniel
> 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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2014-05-16 9:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Daniel Vetter [this message]
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=20140516091953.GG8790@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
/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