From: Matt Roper <matthew.d.roper@intel.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 4/6] drm: Allow drivers to register cursor planes with crtc
Date: Mon, 19 May 2014 16:58:40 -0700 [thread overview]
Message-ID: <1400543922-11078-5-git-send-email-matthew.d.roper@intel.com> (raw)
In-Reply-To: <1400543922-11078-1-git-send-email-matthew.d.roper@intel.com>
Universal plane support had placeholders for cursor planes, but didn't
actually do anything with them. Save the cursor plane reference inside
the crtc and update the cursor plane parameter from void* to drm_plane.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
drivers/gpu/drm/drm_crtc.c | 5 ++++-
include/drm/drm_crtc.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index a3ebc45..e32d03f 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -691,7 +691,7 @@ EXPORT_SYMBOL(drm_framebuffer_remove);
*/
int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
struct drm_plane *primary,
- void *cursor,
+ struct drm_plane *cursor,
const struct drm_crtc_funcs *funcs)
{
int ret;
@@ -714,8 +714,11 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc,
dev->mode_config.num_crtc++;
crtc->primary = primary;
+ crtc->cursor = cursor;
if (primary)
primary->possible_crtcs = 1 << drm_crtc_index(crtc);
+ if (cursor)
+ cursor->possible_crtcs = 1 << drm_crtc_index(crtc);
out:
drm_modeset_unlock_all(dev);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 9ed4d1f..d55eb0d 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -838,7 +838,7 @@ extern void drm_warn_on_modeset_not_all_locked(struct drm_device *dev);
extern int drm_crtc_init_with_planes(struct drm_device *dev,
struct drm_crtc *crtc,
struct drm_plane *primary,
- void *cursor,
+ struct drm_plane *cursor,
const struct drm_crtc_funcs *funcs);
extern int drm_crtc_init(struct drm_device *dev,
struct drm_crtc *crtc,
--
1.8.5.1
next prev parent 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 [PATCH 0/6] Cursor support with universal planes (v3) Matt Roper
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 ` Matt Roper [this message]
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-5-git-send-email-matthew.d.roper@intel.com \
--to=matthew.d.roper@intel.com \
--cc=dri-devel@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