From: sonika.jindal@intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] drm/i915: Update plane parameters for cursor plane
Date: Mon, 15 Sep 2014 13:05:10 +0530 [thread overview]
Message-ID: <1410766511-18879-1-git-send-email-sonika.jindal@intel.com> (raw)
From: Sonika Jindal <sonika.jindal@intel.com>
This allows the cursor plane to be updated the same way as primary and sprites,
and same set_property handler is used for all of these planes.
Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 842a5e1..122ac6e 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12019,6 +12019,22 @@ intel_cursor_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
.x2 = intel_crtc->active ? intel_crtc->config.pipe_src_w : 0,
.y2 = intel_crtc->active ? intel_crtc->config.pipe_src_h : 0,
};
+ const struct {
+ int crtc_x, crtc_y;
+ unsigned int crtc_w, crtc_h;
+ uint32_t src_x, src_y, src_w, src_h;
+ } orig = {
+ .crtc_x = crtc_x,
+ .crtc_y = crtc_y,
+ .crtc_w = crtc_w,
+ .crtc_h = crtc_h,
+ .src_x = src_x,
+ .src_y = src_y,
+ .src_w = src_w,
+ .src_h = src_h,
+ };
+ struct intel_plane *intel_plane = to_intel_plane(plane);
+
bool visible;
int ret;
@@ -12032,6 +12048,17 @@ intel_cursor_plane_update(struct drm_plane *plane, struct drm_crtc *crtc,
crtc->cursor_x = crtc_x;
crtc->cursor_y = crtc_y;
+
+ intel_plane->crtc_x = orig.crtc_x;
+ intel_plane->crtc_y = orig.crtc_y;
+ intel_plane->crtc_w = orig.crtc_w;
+ intel_plane->crtc_h = orig.crtc_h;
+ intel_plane->src_x = orig.src_x;
+ intel_plane->src_y = orig.src_y;
+ intel_plane->src_w = orig.src_w;
+ intel_plane->src_h = orig.src_h;
+ intel_plane->obj = obj;
+
if (fb != crtc->cursor->fb) {
return intel_crtc_cursor_set_obj(crtc, obj, crtc_w, crtc_h);
} else {
--
1.7.10.4
next reply other threads:[~2014-09-15 7:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-15 7:35 sonika.jindal [this message]
2014-09-15 7:35 ` [PATCH 2/2] drm/i915: Add rotation support for cursor plane sonika.jindal
2014-09-15 7:43 ` [PATCH] " sonika.jindal
2014-10-07 8:43 ` Jindal, Sonika
2014-10-23 0:29 ` Matt Roper
2014-10-23 8:49 ` Daniel Vetter
2014-10-23 14:41 ` [PATCH 1/2] drm/i915: Update plane parameters for cursor plane (v2) Matt Roper
2014-10-23 14:41 ` [PATCH 2/2] drm/i915: Add rotation support for cursor plane (v5) Matt Roper
2014-10-23 15:36 ` Daniel Vetter
2014-10-23 15:48 ` [PATCH i-g-t] kms_rotation_crc: Add test for cursor rotation (v2) Matt Roper
2014-09-15 7:55 ` [PATCH 1/2] drm/i915: Update plane parameters for cursor plane Jani Nikula
2014-09-15 10:43 ` Jindal, Sonika
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=1410766511-18879-1-git-send-email-sonika.jindal@intel.com \
--to=sonika.jindal@intel.com \
--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