public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Update plane parameters for cursor plane
@ 2014-09-15  7:35 sonika.jindal
  2014-09-15  7:35 ` [PATCH 2/2] drm/i915: Add rotation support " sonika.jindal
  2014-09-15  7:55 ` [PATCH 1/2] drm/i915: Update plane parameters for cursor plane Jani Nikula
  0 siblings, 2 replies; 12+ messages in thread
From: sonika.jindal @ 2014-09-15  7:35 UTC (permalink / raw)
  To: intel-gfx

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

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

end of thread, other threads:[~2014-10-23 15:48 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-15  7:35 [PATCH 1/2] drm/i915: Update plane parameters for cursor plane sonika.jindal
2014-09-15  7:35 ` [PATCH 2/2] drm/i915: Add rotation support " 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

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