All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paulo Zanoni <paulo.r.zanoni@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Hans de Goede <hdegoede@redhat.com>,
	Daniel Vetter <daniel.vetter@intel.com>, Lyude <cpaul@redhat.com>
Subject: Re: [PATCH] drm/i915: Avoid using dev_priv->info.gen directly.
Date: Tue, 26 Sep 2017 18:21:43 -0300	[thread overview]
Message-ID: <1506460903.2634.12.camel@intel.com> (raw)
In-Reply-To: <20170926211346.12009-1-rodrigo.vivi@intel.com>

Em Ter, 2017-09-26 às 14:13 -0700, Rodrigo Vivi escreveu:
> Let's stop this usage before it spreads so much.
> 
> 1. This check is not part of usual searches happening when adding
> new platform.
> 2. There is already a duplication here with INTEL_INFO(dev_priv)->gen
> and INTEL_GEN(dev_priv).
> 
> So let's please avoid yet another way.
> 
> Fixes: b22ca995ba1c ("drm/i915: prepare pipe for YCBCR420 output")
> Fixes: 27082493e9c6 ("drm/i915/skl: Update DDB values atomically with
> wms/plane attrs")

Not sure if the Fixes tags are appropriate since this is not a bug fix.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

> Cc: Lyude <cpaul@redhat.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Hans de Goede <hdegoede@redhat.com>
> Cc: Matt Roper <matthew.d.roper@intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_display.c
> index 487b43ba3139..fba76f1bb6dd 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -9310,11 +9310,11 @@ static bool haswell_get_pipe_config(struct
> intel_crtc *crtc,
>  	pipe_config->gamma_mode =
>  		I915_READ(GAMMA_MODE(crtc->pipe)) &
> GAMMA_MODE_MODE_MASK;
>  
> -	if (IS_BROADWELL(dev_priv) || dev_priv->info.gen >= 9) {
> +	if (IS_BROADWELL(dev_priv) || INTEL_GEN(dev_priv) >= 9) {
>  		u32 tmp = I915_READ(PIPEMISC(crtc->pipe));
>  		bool clrspace_yuv = tmp &
> PIPEMISC_OUTPUT_COLORSPACE_YUV;
>  
> -		if (IS_GEMINILAKE(dev_priv) || dev_priv->info.gen >=
> 10) {
> +		if (IS_GEMINILAKE(dev_priv) || INTEL_GEN(dev_priv)
> >= 10) {
>  			bool blend_mode_420 = tmp &
>  					      PIPEMISC_YUV420_MODE_F
> ULL_BLEND;
>  
> @@ -14217,7 +14217,7 @@ void intel_init_display_hooks(struct
> drm_i915_private *dev_priv)
>  		dev_priv->display.fdi_link_train =
> hsw_fdi_link_train;
>  	}
>  
> -	if (dev_priv->info.gen >= 9)
> +	if (INTEL_GEN(dev_priv) >= 9)
>  		dev_priv->display.update_crtcs = skl_update_crtcs;
>  	else
>  		dev_priv->display.update_crtcs = intel_update_crtcs;
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-09-26 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-26 21:13 [PATCH] drm/i915: Avoid using dev_priv->info.gen directly Rodrigo Vivi
2017-09-26 21:21 ` Paulo Zanoni [this message]
2017-09-26 21:47   ` Rodrigo Vivi
2017-09-27  7:03     ` Jani Nikula
2017-09-27 19:32       ` Rodrigo Vivi
2017-09-29  9:05         ` Joonas Lahtinen
2017-10-02  8:33           ` Jani Nikula
2017-09-26 21:27 ` Matt Roper
2017-09-26 21:35 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-09-27  8:07 ` ✓ Fi.CI.IGT: " 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=1506460903.2634.12.camel@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --cc=cpaul@redhat.com \
    --cc=daniel.vetter@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=rodrigo.vivi@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.