[Intel-gfx] [PATCH 1/2] drm/i915: Update plane parameters for cursor plane

sonika.jindal at intel.com sonika.jindal at intel.com
Mon Sep 15 09:35:10 CEST 2014


From: Sonika Jindal <sonika.jindal at 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 at 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




More information about the Intel-gfx mailing list