diff mbox

[7/7] drm/i915: Drop unused position fields

Message ID 1418154823-10819-8-git-send-email-matthew.d.roper@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Matt Roper Dec. 9, 2014, 7:53 p.m. UTC
The userspace-requested plane coordinates are now stored in
plane->state.base (and the i915-adjusted values are stored in
plane->state), so we no longer use the coordinate fields in intel_plane
or the orig_{src,dst} fields in intel_plane_state.  Drop them.

Reviewed-by: Bob Paauwe <bob.j.paauwe@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 33 ++++++++-------------------------
 drivers/gpu/drm/i915/intel_drv.h     |  4 ----
 drivers/gpu/drm/i915/intel_sprite.c  | 19 ++++---------------
 3 files changed, 12 insertions(+), 44 deletions(-)

Comments

Shuang He Dec. 10, 2014, 7:12 a.m. UTC | #1
Tested-By: PRC QA PRTS (Patch Regression Test System Contact: shuang.he@intel.com)
-------------------------------------Summary-------------------------------------
Platform          Delta          drm-intel-nightly          Series Applied
PNV                                  364/364              364/364
ILK              +1-6              364/366              359/366
SNB                 -5              448/450              443/450
IVB                 -7              497/498              490/498
BYT                                  289/289              289/289
HSW                 -7              563/564              556/564
BDW                                  417/417              417/417
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 ILK  igt_kms_flip_nonexisting-fb      DMESG_WARN(1, M26)PASS(3, M26)      DMESG_WARN(1, M26)
*ILK  igt_kms_pipe_crc_basic_bad-source      PASS(2, M26)      DMESG_WARN(1, M26)
*ILK  igt_kms_flip_rcs-flip-vs-panning-interruptible      PASS(3, M26)      DMESG_WARN(1, M26)
*ILK  igt_kms_flip_rcs-wf_vblank-vs-dpms-interruptible      PASS(5, M26)      DMESG_WARN(1, M26)
*ILK  igt_kms_render_direct-render      PASS(4, M26)      DMESG_WARN(1, M26)
*ILK  igt_kms_flip_bcs-flip-vs-modeset-interruptible      PASS(3, M26)      DMESG_WARN(1, M26)
 ILK  igt_kms_flip_wf_vblank-ts-check      DMESG_WARN(2, M26)PASS(12, M26M37)      PASS(1, M26)
*SNB  igt_kms_mmio_vs_cs_flip_setplane_vs_cs_flip      PASS(3, M35)      DMESG_WARN(1, M35)
*SNB  igt_kms_plane_plane-position-covered-pipe-B-plane-1      PASS(3, M35)      DMESG_WARN(1, M35)
*SNB  igt_kms_plane_plane-position-hole-pipe-A-plane-1      PASS(3, M35)      DMESG_WARN(1, M35)
*SNB  igt_kms_plane_plane-position-hole-pipe-B-plane-1      PASS(3, M35)      DMESG_WARN(1, M35)
*SNB  igt_kms_rotation_crc_sprite-rotation      PASS(3, M35)      DMESG_WARN(1, M35)
*IVB  igt_kms_mmio_vs_cs_flip_setplane_vs_cs_flip      PASS(3, M4M21)      DMESG_WARN(1, M21)
*IVB  igt_kms_plane_plane-position-covered-pipe-A-plane-1      PASS(3, M4M21)      DMESG_WARN(1, M21)
*IVB  igt_kms_plane_plane-position-covered-pipe-B-plane-1      PASS(3, M4M21)      DMESG_WARN(1, M21)
*IVB  igt_kms_plane_plane-position-hole-pipe-A-plane-1      PASS(3, M4M21)      DMESG_WARN(1, M21)
*IVB  igt_kms_plane_plane-position-hole-pipe-B-plane-1      PASS(3, M4M21)      DMESG_WARN(1, M21)
*IVB  igt_kms_plane_plane-position-hole-pipe-C-plane-1      PASS(3, M4M21)      DMESG_WARN(1, M21)
*IVB  igt_kms_rotation_crc_sprite-rotation      PASS(3, M4M21)      DMESG_WARN(1, M21)
*HSW  igt_kms_mmio_vs_cs_flip_setplane_vs_cs_flip      PASS(2, M40)      DMESG_WARN(1, M40)
*HSW  igt_kms_plane_plane-position-covered-pipe-A-plane-1      PASS(3, M40)      DMESG_WARN(1, M40)
*HSW  igt_kms_plane_plane-position-covered-pipe-B-plane-1      PASS(3, M40)      DMESG_WARN(1, M40)
*HSW  igt_kms_plane_plane-position-covered-pipe-C-plane-1      PASS(3, M40)      DMESG_WARN(1, M40)
*HSW  igt_kms_plane_plane-position-hole-pipe-A-plane-1      PASS(3, M40)      DMESG_WARN(1, M40)
*HSW  igt_kms_plane_plane-position-hole-pipe-B-plane-1      PASS(3, M40)      DMESG_WARN(1, M40)
*HSW  igt_kms_plane_plane-position-hole-pipe-C-plane-1      PASS(3, M40)      DMESG_WARN(1, M40)
Note: You need to pay more attention to line start with '*'
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 2f80236..85b015a 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9616,7 +9616,6 @@  static int intel_crtc_page_flip(struct drm_crtc *crtc,
 	struct drm_i915_gem_object *obj = intel_fb_obj(fb);
 	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
 	struct drm_plane *primary = crtc->primary;
-	struct intel_plane *intel_plane = to_intel_plane(primary);
 	enum pipe pipe = intel_crtc->pipe;
 	struct intel_unpin_work *work;
 	struct intel_engine_cs *ring;
@@ -9776,14 +9775,14 @@  free_work:
 	if (ret == -EIO) {
 out_hang:
 		ret = primary->funcs->update_plane(primary, crtc, fb,
-						   intel_plane->crtc_x,
-						   intel_plane->crtc_y,
-						   intel_plane->crtc_h,
-						   intel_plane->crtc_w,
-						   intel_plane->src_x,
-						   intel_plane->src_y,
-						   intel_plane->src_h,
-						   intel_plane->src_w);
+						   primary->state->crtc_x,
+						   primary->state->crtc_y,
+						   primary->state->crtc_h,
+						   primary->state->crtc_w,
+						   primary->state->src_x,
+						   primary->state->src_y,
+						   primary->state->src_h,
+						   primary->state->src_w);
 		if (ret == 0 && event) {
 			spin_lock_irq(&dev->event_lock);
 			drm_send_vblank_event(dev, pipe, event);
@@ -11827,14 +11826,6 @@  intel_commit_primary_plane(struct drm_plane *plane,
 	crtc->x = src->x1 >> 16;
 	crtc->y = src->y1 >> 16;
 
-	intel_plane->crtc_x = state->base.crtc_x;
-	intel_plane->crtc_y = state->base.crtc_y;
-	intel_plane->crtc_w = state->base.crtc_w;
-	intel_plane->crtc_h = state->base.crtc_h;
-	intel_plane->src_x = state->base.src_x;
-	intel_plane->src_y = state->base.src_y;
-	intel_plane->src_w = state->base.src_w;
-	intel_plane->src_h = state->base.src_h;
 	intel_plane->obj = obj;
 
 	if (intel_crtc->active) {
@@ -12090,14 +12081,6 @@  intel_commit_cursor_plane(struct drm_plane *plane,
 	crtc->cursor_x = state->base.crtc_x;
 	crtc->cursor_y = state->base.crtc_y;
 
-	intel_plane->crtc_x = state->base.crtc_x;
-	intel_plane->crtc_y = state->base.crtc_y;
-	intel_plane->crtc_w = state->base.crtc_w;
-	intel_plane->crtc_h = state->base.crtc_h;
-	intel_plane->src_x = state->base.src_x;
-	intel_plane->src_y = state->base.src_y;
-	intel_plane->src_w = state->base.src_w;
-	intel_plane->src_h = state->base.src_h;
 	intel_plane->obj = obj;
 
 	if (intel_crtc->cursor_bo == obj)
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index d8a6d6c..8de78c9 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -516,10 +516,6 @@  struct intel_plane {
 	struct drm_i915_gem_object *obj;
 	bool can_scale;
 	int max_downscale;
-	int crtc_x, crtc_y;
-	unsigned int crtc_w, crtc_h;
-	uint32_t src_x, src_y;
-	uint32_t src_w, src_h;
 	unsigned int rotation;
 
 	/* Since we need to change the watermarks before/after
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 7b7acb0..b3c3bfd 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1259,15 +1259,6 @@  intel_commit_sprite_plane(struct drm_plane *plane,
 	unsigned int crtc_w, crtc_h;
 	uint32_t src_x, src_y, src_w, src_h;
 
-	intel_plane->crtc_x = state->base.crtc_x;
-	intel_plane->crtc_y = state->base.crtc_y;
-	intel_plane->crtc_w = state->base.crtc_w;
-	intel_plane->crtc_h = state->base.crtc_h;
-	intel_plane->src_x = state->base.src_x;
-	intel_plane->src_y = state->base.src_y;
-	intel_plane->src_w = state->base.src_w;
-	intel_plane->src_h = state->base.src_h;
-
 	crtc = crtc ? crtc : plane->crtc;
 	intel_crtc = to_intel_crtc(crtc);
 
@@ -1382,16 +1373,14 @@  int intel_plane_set_property(struct drm_plane *plane,
 
 int intel_plane_restore(struct drm_plane *plane)
 {
-	struct intel_plane *intel_plane = to_intel_plane(plane);
-
 	if (!plane->crtc || !plane->fb)
 		return 0;
 
 	return plane->funcs->update_plane(plane, plane->crtc, plane->fb,
-				  intel_plane->crtc_x, intel_plane->crtc_y,
-				  intel_plane->crtc_w, intel_plane->crtc_h,
-				  intel_plane->src_x, intel_plane->src_y,
-				  intel_plane->src_w, intel_plane->src_h);
+				  plane->state->crtc_x, plane->state->crtc_y,
+				  plane->state->crtc_w, plane->state->crtc_h,
+				  plane->state->src_x, plane->state->src_y,
+				  plane->state->src_w, plane->state->src_h);
 }
 
 static const struct drm_plane_funcs intel_plane_funcs = {