0903551
From ebe515b1696401259781bc183e211a81287242f6 Mon Sep 17 00:00:00 2001
0903551
From: Fedora Kernel Team <kernel-team@fedoraproject.org>
0903551
Date: Mon, 20 Jun 2016 12:42:13 +0200
0903551
Subject: [PATCH 17/17] drm/i915: Remove wm_config from
0903551
 dev_priv/intel_atomic_state
0903551
0903551
Upstream: since drm-intel-next-2016-05-22
0903551
commit 5b483747a92570176259bb896dcf2468291f3e42
0903551
0903551
Author:     Matt Roper <matthew.d.roper@intel.com>
0903551
AuthorDate: Thu May 12 07:06:11 2016 -0700
0903551
Commit:     Matt Roper <matthew.d.roper@intel.com>
0903551
CommitDate: Fri May 13 07:36:05 2016 -0700
0903551
0903551
    drm/i915: Remove wm_config from dev_priv/intel_atomic_state
0903551
0903551
    We calculate the watermark config into intel_atomic_state and then save
0903551
    it into dev_priv, but never actually use it from there.  This is
0903551
    left-over from some early ILK-style watermark programming designs that
0903551
    got changed over time.
0903551
0903551
    Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
0903551
    Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
0903551
    Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-18-git-send-email-matthew.d.roper@intel.com
0903551
---
0903551
 drivers/gpu/drm/i915/i915_drv.h      |  3 ---
0903551
 drivers/gpu/drm/i915/intel_display.c | 31 -------------------------------
0903551
 drivers/gpu/drm/i915/intel_drv.h     |  1 -
0903551
 3 files changed, 35 deletions(-)
0903551
0903551
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
0903551
index 67c76b6..59092cb 100644
0903551
--- a/drivers/gpu/drm/i915/i915_drv.h
0903551
+++ b/drivers/gpu/drm/i915/i915_drv.h
0903551
@@ -1973,9 +1973,6 @@ struct drm_i915_private {
0903551
 		 */
0903551
 		uint16_t skl_latency[8];
0903551
 
0903551
-		/* Committed wm config */
0903551
-		struct intel_wm_config config;
0903551
-
0903551
 		/*
0903551
 		 * The skl_wm_values structure is a bit too big for stack
0903551
 		 * allocation, so we keep the staging struct where we store
0903551
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
0903551
index 1726ea4..f5eefb1 100644
0903551
--- a/drivers/gpu/drm/i915/intel_display.c
0903551
+++ b/drivers/gpu/drm/i915/intel_display.c
0903551
@@ -13226,35 +13226,6 @@ static int calc_watermark_data(struct drm_atomic_state *state)
0903551
 {
0903551
 	struct drm_device *dev = state->dev;
0903551
 	struct drm_i915_private *dev_priv = to_i915(dev);
0903551
-	struct intel_atomic_state *intel_state = to_intel_atomic_state(state);
0903551
-	struct drm_crtc *crtc;
0903551
-	struct drm_crtc_state *cstate;
0903551
-	struct drm_plane *plane;
0903551
-	struct drm_plane_state *pstate;
0903551
-
0903551
-	/*
0903551
-	 * Calculate watermark configuration details now that derived
0903551
-	 * plane/crtc state is all properly updated.
0903551
-	 */
0903551
-	drm_for_each_crtc(crtc, dev) {
0903551
-		cstate = drm_atomic_get_existing_crtc_state(state, crtc) ?:
0903551
-			crtc->state;
0903551
-
0903551
-		if (cstate->active)
0903551
-			intel_state->wm_config.num_pipes_active++;
0903551
-	}
0903551
-	drm_for_each_legacy_plane(plane, dev) {
0903551
-		pstate = drm_atomic_get_existing_plane_state(state, plane) ?:
0903551
-			plane->state;
0903551
-
0903551
-		if (!to_intel_plane_state(pstate)->visible)
0903551
-			continue;
0903551
-
0903551
-		intel_state->wm_config.sprites_enabled = true;
0903551
-		if (pstate->crtc_w != pstate->src_w >> 16 ||
0903551
-		    pstate->crtc_h != pstate->src_h >> 16)
0903551
-			intel_state->wm_config.sprites_scaled = true;
0903551
-	}
0903551
 
0903551
 	/* Is there platform-specific watermark information to calculate? */
0903551
 	if (dev_priv->display.compute_global_watermarks)
0903551
@@ -13520,7 +13491,6 @@ static int intel_atomic_commit(struct drm_device *dev,
0903551
 	}
0903551
 
0903551
 	drm_atomic_helper_swap_state(dev, state);
0903551
-	dev_priv->wm.config = to_intel_atomic_state(state)->wm_config;
0903551
 	dev_priv->wm.distrust_bios_wm = false;
0903551
 	dev_priv->wm.skl_results = intel_state->wm_results;
0903551
 
0903551
@@ -15334,7 +15304,6 @@ retry:
0903551
 	}
0903551
 
0903551
 	/* Write calculated watermark values back */
0903551
-	to_i915(dev)->wm.config = to_intel_atomic_state(state)->wm_config;
0903551
 	for_each_crtc_in_state(state, crtc, cstate, i) {
0903551
 		struct intel_crtc_state *cs = to_intel_crtc_state(cstate);
0903551
 
0903551
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
0903551
index e5543b8..148f79d 100644
0903551
--- a/drivers/gpu/drm/i915/intel_drv.h
0903551
+++ b/drivers/gpu/drm/i915/intel_drv.h
0903551
@@ -270,7 +270,6 @@ struct intel_atomic_state {
0903551
 	unsigned int min_pixclk[I915_MAX_PIPES];
0903551
 
0903551
 	struct intel_shared_dpll_config shared_dpll[I915_NUM_PLLS];
0903551
-	struct intel_wm_config wm_config;
0903551
 
0903551
 	/* Gen9+ only */
0903551
 	struct skl_wm_values wm_results;
0903551
-- 
0903551
2.7.4
0903551