Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 04/10] drm/i915: Move crtc_state to tighter scope
Date: Wed, 13 Nov 2019 16:09:18 -0800	[thread overview]
Message-ID: <20191114000918.GE28227@intel.com> (raw)
In-Reply-To: <20191112141503.1116-5-ville.syrjala@linux.intel.com>

On Tue, Nov 12, 2019 at 04:14:57PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> intel_modeset_setup_hw_state() doesn't need the crtc_state at the
> top level scope. Move it to where it's needed.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Looks good even though it does add to the code size since we need to derive it in
3 different places and might be more in the future.
But logically makes sense to limit its scop to for loops where its needed.

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 89d150b45520..e52ea9643790 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -17716,7 +17716,6 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  			     struct drm_modeset_acquire_ctx *ctx)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> -	struct intel_crtc_state *crtc_state;
>  	struct intel_encoder *encoder;
>  	struct intel_crtc *crtc;
>  	intel_wakeref_t wakeref;
> @@ -17749,7 +17748,8 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  	 * waits, so we need vblank interrupts restored beforehand.
>  	 */
>  	for_each_intel_crtc(&dev_priv->drm, crtc) {
> -		crtc_state = to_intel_crtc_state(crtc->base.state);
> +		struct intel_crtc_state *crtc_state =
> +			to_intel_crtc_state(crtc->base.state);
>  
>  		drm_crtc_vblank_reset(&crtc->base);
>  
> @@ -17763,7 +17763,9 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  		intel_sanitize_encoder(encoder);
>  
>  	for_each_intel_crtc(&dev_priv->drm, crtc) {
> -		crtc_state = to_intel_crtc_state(crtc->base.state);
> +		struct intel_crtc_state *crtc_state =
> +			crtc_state = to_intel_crtc_state(crtc->base.state);
> +
>  		intel_sanitize_crtc(crtc, ctx);
>  		intel_dump_pipe_config(crtc_state, NULL, "[setup_hw_state]");
>  	}
> @@ -17796,9 +17798,10 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  	}
>  
>  	for_each_intel_crtc(dev, crtc) {
> +		struct intel_crtc_state *crtc_state =
> +			to_intel_crtc_state(crtc->base.state);
>  		u64 put_domains;
>  
> -		crtc_state = to_intel_crtc_state(crtc->base.state);
>  		put_domains = modeset_get_crtc_power_domains(crtc_state);
>  		if (WARN_ON(put_domains))
>  			modeset_put_power_domains(dev_priv, put_domains);
> -- 
> 2.23.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Manasi Navare <manasi.d.navare@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 04/10] drm/i915: Move crtc_state to tighter scope
Date: Wed, 13 Nov 2019 16:09:18 -0800	[thread overview]
Message-ID: <20191114000918.GE28227@intel.com> (raw)
Message-ID: <20191114000918.uuy7Ycr3xeMAobKhT-hdpGSi1USs5kYs2xTIuh1mbW0@z> (raw)
In-Reply-To: <20191112141503.1116-5-ville.syrjala@linux.intel.com>

On Tue, Nov 12, 2019 at 04:14:57PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> intel_modeset_setup_hw_state() doesn't need the crtc_state at the
> top level scope. Move it to where it's needed.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Looks good even though it does add to the code size since we need to derive it in
3 different places and might be more in the future.
But logically makes sense to limit its scop to for loops where its needed.

Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>

Manasi

> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 89d150b45520..e52ea9643790 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -17716,7 +17716,6 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  			     struct drm_modeset_acquire_ctx *ctx)
>  {
>  	struct drm_i915_private *dev_priv = to_i915(dev);
> -	struct intel_crtc_state *crtc_state;
>  	struct intel_encoder *encoder;
>  	struct intel_crtc *crtc;
>  	intel_wakeref_t wakeref;
> @@ -17749,7 +17748,8 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  	 * waits, so we need vblank interrupts restored beforehand.
>  	 */
>  	for_each_intel_crtc(&dev_priv->drm, crtc) {
> -		crtc_state = to_intel_crtc_state(crtc->base.state);
> +		struct intel_crtc_state *crtc_state =
> +			to_intel_crtc_state(crtc->base.state);
>  
>  		drm_crtc_vblank_reset(&crtc->base);
>  
> @@ -17763,7 +17763,9 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  		intel_sanitize_encoder(encoder);
>  
>  	for_each_intel_crtc(&dev_priv->drm, crtc) {
> -		crtc_state = to_intel_crtc_state(crtc->base.state);
> +		struct intel_crtc_state *crtc_state =
> +			crtc_state = to_intel_crtc_state(crtc->base.state);
> +
>  		intel_sanitize_crtc(crtc, ctx);
>  		intel_dump_pipe_config(crtc_state, NULL, "[setup_hw_state]");
>  	}
> @@ -17796,9 +17798,10 @@ intel_modeset_setup_hw_state(struct drm_device *dev,
>  	}
>  
>  	for_each_intel_crtc(dev, crtc) {
> +		struct intel_crtc_state *crtc_state =
> +			to_intel_crtc_state(crtc->base.state);
>  		u64 put_domains;
>  
> -		crtc_state = to_intel_crtc_state(crtc->base.state);
>  		put_domains = modeset_get_crtc_power_domains(crtc_state);
>  		if (WARN_ON(put_domains))
>  			modeset_put_power_domains(dev_priv, put_domains);
> -- 
> 2.23.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-11-14  0:06 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-12 14:14 [PATCH 00/10] drm/i915: Cleanups around .crtc_enable/disable() Ville Syrjala
2019-11-12 14:14 ` [Intel-gfx] " Ville Syrjala
2019-11-12 14:14 ` [PATCH 01/10] drm/i915: Change intel_encoders_<hook>() calling convention Ville Syrjala
2019-11-12 14:14   ` [Intel-gfx] " Ville Syrjala
2019-11-13 23:48   ` Manasi Navare
2019-11-13 23:48     ` [Intel-gfx] " Manasi Navare
2019-11-12 14:14 ` [PATCH 02/10] drm/i915: Add intel_crtc_vblank_off() Ville Syrjala
2019-11-12 14:14   ` [Intel-gfx] " Ville Syrjala
2019-11-13 23:50   ` Manasi Navare
2019-11-13 23:50     ` [Intel-gfx] " Manasi Navare
2019-11-12 14:14 ` [PATCH 03/10] drm/i915: Move assert_vblank_disabled() into intel_crtc_vblank_on() Ville Syrjala
2019-11-12 14:14   ` [Intel-gfx] " Ville Syrjala
2019-11-14  0:05   ` Manasi Navare
2019-11-14  0:05     ` [Intel-gfx] " Manasi Navare
2019-11-12 14:14 ` [PATCH 04/10] drm/i915: Move crtc_state to tighter scope Ville Syrjala
2019-11-12 14:14   ` [Intel-gfx] " Ville Syrjala
2019-11-14  0:09   ` Manasi Navare [this message]
2019-11-14  0:09     ` Manasi Navare
2019-11-12 14:14 ` [PATCH 05/10] drm/i915: Pass intel_crtc to ironlake_fdi_disable() Ville Syrjala
2019-11-12 14:14   ` [Intel-gfx] " Ville Syrjala
2019-11-14  0:10   ` Manasi Navare
2019-11-14  0:10     ` [Intel-gfx] " Manasi Navare
2019-11-12 14:14 ` [PATCH 06/10] drm/i915: Change watermark hook calling convention Ville Syrjala
2019-11-12 14:14   ` [Intel-gfx] " Ville Syrjala
2019-11-14  0:22   ` Manasi Navare
2019-11-14  0:22     ` [Intel-gfx] " Manasi Navare
2019-11-15 15:18     ` Ville Syrjälä
2019-11-15 15:18       ` [Intel-gfx] " Ville Syrjälä
2019-11-12 14:15 ` [PATCH 07/10] drm/i915: Pass dev_priv to cpt_verify_modeset() Ville Syrjala
2019-11-12 14:15   ` [Intel-gfx] " Ville Syrjala
2019-11-14  0:23   ` Manasi Navare
2019-11-14  0:23     ` [Intel-gfx] " Manasi Navare
2019-11-12 14:15 ` [PATCH 08/10] drm/i915: s/intel_crtc/crtc/ in .crtc_enable() and .crtc_disable() Ville Syrjala
2019-11-12 14:15   ` [Intel-gfx] " Ville Syrjala
2019-11-14  0:27   ` Manasi Navare
2019-11-14  0:27     ` [Intel-gfx] " Manasi Navare
2019-11-12 14:15 ` [PATCH 09/10] drm/i915: s/pipe_config/new_crtc_state/ in .crtc_enable() Ville Syrjala
2019-11-12 14:15   ` [Intel-gfx] " Ville Syrjala
2019-11-14  0:35   ` Manasi Navare
2019-11-14  0:35     ` [Intel-gfx] " Manasi Navare
2019-11-15 15:15     ` Ville Syrjälä
2019-11-15 15:15       ` [Intel-gfx] " Ville Syrjälä
2019-11-12 14:15 ` [PATCH 10/10] drm/i915: Change .crtc_enable/disable() calling convention Ville Syrjala
2019-11-12 14:15   ` [Intel-gfx] " Ville Syrjala
2019-11-14  0:37   ` Manasi Navare
2019-11-14  0:37     ` [Intel-gfx] " Manasi Navare
2019-11-12 15:37 ` ✗ Fi.CI.BAT: failure for drm/i915: Cleanups around .crtc_enable/disable() Patchwork
2019-11-12 15:37   ` [Intel-gfx] " Patchwork
2019-11-15 21:36 ` ✗ Fi.CI.BUILD: failure for drm/i915: Cleanups around .crtc_enable/disable() (rev2) Patchwork
2019-11-15 21:36   ` [Intel-gfx] " Patchwork

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=20191114000918.GE28227@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox