All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 09/13] drm/i915: Remove some unneeded checks from check_crtc_state.
Date: Thu, 16 Jul 2015 11:24:51 +0200	[thread overview]
Message-ID: <20150716092451.GF6223@phenom.ffwll.local> (raw)
In-Reply-To: <1437037166-9339-10-git-send-email-maarten.lankhorst@linux.intel.com>

On Thu, Jul 16, 2015 at 10:59:22AM +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>

For all these "Remove ..." patches I think it'd be better to rewrite the
changed code to use atomic state for whatever it does directly and stop
using any of the legacy state (whether drm core or i915 legacy state). If
we do that conversion it's possible to review whether there's any cases
we're no longer checking. Trying to do that while we just rip out code
makes that harder.

hw state checker would then only compare hw state against atomic state,
and it would be the job of update_legacy_state and friends to make sure
atomic state matches up with legacy state.
-Daniel

> ---
>  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 2ca50e589ea4..30ece88703f0 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -12715,8 +12715,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));
>  
> @@ -12726,22 +12725,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);
>  
> -- 
> 2.1.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-07-16  9:22 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16  8:59 [PATCH 00/13] Make i915 dpms atomic Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 01/13] drm/atomic: Only update crtc->x/y if it's part of the state Maarten Lankhorst
2015-07-16  9:19   ` Daniel Vetter
2015-07-16  9:17     ` Maarten Lankhorst
2015-07-16  9:29       ` Daniel Vetter
2015-07-16  9:38         ` Maarten Lankhorst
2015-07-16 12:34           ` Daniel Vetter
2015-07-16 13:44             ` Maarten Lankhorst
2015-07-16 13:51   ` [PATCH v1.1 01/13] drm/atomic: Only update crtc->x/y if it's part of the state, v2 Maarten Lankhorst
2015-07-16 14:58     ` Daniel Vetter
2015-07-16  8:59 ` [PATCH 02/13] drm/atomic: Update legacy DPMS state during modesets Maarten Lankhorst
2015-07-16  9:19   ` Daniel Vetter
2015-07-16  9:24     ` Maarten Lankhorst
2015-07-16  9:31       ` Daniel Vetter
2015-07-27 11:04         ` [PATCH v1.1 02/13] drm/atomic: Update legacy DPMS state during modesets, v2 Maarten Lankhorst
2015-07-27 11:16           ` Daniel Vetter
2015-07-27 11:15             ` Maarten Lankhorst
2015-07-27 11:24             ` [PATCH v1.2 02/13] drm/atomic: Update legacy DPMS state during modesets, v3 Maarten Lankhorst
2015-07-27 13:56               ` Daniel Vetter
2015-07-16  8:59 ` [PATCH 03/13] drm/i915: Make the force_thru workaround atomic Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 04/13] drm/i915: Remove special dpms handling from intel_crt.c Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 05/13] drm/i915: Remove special dpms handling from intel_crtc.c Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 06/13] drm/i915: Remove special dpms handling from intel_sdvo.c Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 07/13] drm/i915: Get rid of dpms handling Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 08/13] drm/i915: Use proper locking for intel_dp_check_link_status Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 09/13] drm/i915: Remove some unneeded checks from check_crtc_state Maarten Lankhorst
2015-07-16  9:24   ` Daniel Vetter [this message]
2015-07-16  9:38     ` Maarten Lankhorst
2015-07-16 15:01       ` Daniel Vetter
2015-07-16 14:59         ` Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 10/13] drm/i915: Remove connectors_active from state checking Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 11/13] drm/i915: Remove connectors_active from sanitization Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 12/13] drm/i915: Remove connectors_active from intel_dp.c Maarten Lankhorst
2015-07-16  8:59 ` [PATCH 13/13] drm/i915: Remove connectors_active Maarten Lankhorst
2015-07-16  9:52 ` [PATCH 14/13] drm/i915: Only update mode related state if a modeset happened Maarten Lankhorst

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150716092451.GF6223@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=maarten.lankhorst@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.