diff mbox

[v2,04/12] drm/i915: Remove some unneeded checks from check_crtc_state.

Message ID 1438000541-3219-5-git-send-email-maarten.lankhorst@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maarten Lankhorst July 27, 2015, 12:35 p.m. UTC
This is handled by the atomic core now, no need to check this for ourself.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

Comments

Ander Conselvan de Oliveira July 28, 2015, 1:29 p.m. UTC | #1
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>

On Mon, 2015-07-27 at 14:35 +0200, Maarten Lankhorst wrote:
> This is handled by the atomic core now, no need to check this for 
> ourself.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 19 +------------------
>  1 file changed, 1 insertion(+), 18 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c 
> b/drivers/gpu/drm/i915/intel_display.c
> index ba0b68a4209d..59eb6db10740 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12781,8 +12781,7 @@ check_crtc_state(struct drm_device *dev)
>  	struct intel_crtc_state pipe_config;
>  
>  	for_each_intel_crtc(dev, crtc) {
> -		bool enabled = false;
> -		bool active = false;
> +		bool active;
>  
>  		memset(&pipe_config, 0, sizeof(pipe_config));
>  
> @@ -12792,22 +12791,6 @@ check_crtc_state(struct drm_device *dev)
>  		I915_STATE_WARN(crtc->active && !crtc->base.state
> ->enable,
>  		     "active crtc, but not enabled in sw 
> tracking\n");
>  
> -		for_each_intel_encoder(dev, encoder) {
> -			if (encoder->base.crtc != &crtc->base)
> -				continue;
> -			enabled = true;
> -			if (encoder->connectors_active)
> -				active = true;
> -		}
> -
> -		I915_STATE_WARN(active != crtc->active,
> -		     "crtc's computed active state doesn't match 
> tracked active state "
> -		     "(expected %i, found %i)\n", active, crtc
> ->active);
> -		I915_STATE_WARN(enabled != crtc->base.state->enable,
> -		     "crtc's computed enabled state doesn't match 
> tracked enabled state "
> -		     "(expected %i, found %i)\n", enabled,
> -				crtc->base.state->enable);
> -
>  		active = dev_priv->display.get_pipe_config(crtc,
>  							  
>  &pipe_config);
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index ba0b68a4209d..59eb6db10740 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -12781,8 +12781,7 @@  check_crtc_state(struct drm_device *dev)
 	struct intel_crtc_state pipe_config;
 
 	for_each_intel_crtc(dev, crtc) {
-		bool enabled = false;
-		bool active = false;
+		bool active;
 
 		memset(&pipe_config, 0, sizeof(pipe_config));
 
@@ -12792,22 +12791,6 @@  check_crtc_state(struct drm_device *dev)
 		I915_STATE_WARN(crtc->active && !crtc->base.state->enable,
 		     "active crtc, but not enabled in sw tracking\n");
 
-		for_each_intel_encoder(dev, encoder) {
-			if (encoder->base.crtc != &crtc->base)
-				continue;
-			enabled = true;
-			if (encoder->connectors_active)
-				active = true;
-		}
-
-		I915_STATE_WARN(active != crtc->active,
-		     "crtc's computed active state doesn't match tracked active state "
-		     "(expected %i, found %i)\n", active, crtc->active);
-		I915_STATE_WARN(enabled != crtc->base.state->enable,
-		     "crtc's computed enabled state doesn't match tracked enabled state "
-		     "(expected %i, found %i)\n", enabled,
-				crtc->base.state->enable);
-
 		active = dev_priv->display.get_pipe_config(crtc,
 							   &pipe_config);