All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: intel-gfx@lists.freedesktop.org, Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: Re: [PATCH v3] drm/i915/psr: Update PSR2 resolution check for Cannonlake
Date: Tue, 6 Mar 2018 22:38:43 +0200	[thread overview]
Message-ID: <20180306203843.GK5453@intel.com> (raw)
In-Reply-To: <20180306203355.29292-1-dhinakaran.pandiyan@intel.com>

On Tue, Mar 06, 2018 at 12:33:55PM -0800, Dhinakaran Pandiyan wrote:
> In fact, apply the Cannonlake resolution check for all >= Gen-10 platforms
> to be safe.
> 
> v3: Update GLK too. (Ville)
>     Longer variable names.
>     if-else in place of ternary operator.
> v2: Use local variables for resolution limits and print them (Ville)
> 
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Cc: Elio Martinez Monroy <elio.martinez.monroy@intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_psr.c | 21 +++++++++++++++------
>  1 file changed, 15 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
> index 05770790a4e9..23175c5c4a50 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -451,8 +451,9 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
>  {
>  	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
>  	struct drm_i915_private *dev_priv = to_i915(dig_port->base.base.dev);
> -	const struct drm_display_mode *adjusted_mode =
> -		&crtc_state->base.adjusted_mode;
> +	int crtc_hdisplay = crtc_state->base.adjusted_mode.crtc_hdisplay;
> +	int crtc_vdisplay = crtc_state->base.adjusted_mode.crtc_vdisplay;
            ^^^^^
The crtc_ prefix is pretty much redundant.

> +	int psr_max_h = 0, psr_max_v = 0;

And this still reads as "max height" to my brain, but meh.

>  
>  	/*
>  	 * FIXME psr2_support is messed up. It's both computed
> @@ -462,10 +463,18 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
>  	if (!dev_priv->psr.psr2_support)
>  		return false;
>  
> -	/* PSR2 is restricted to work with panel resolutions up to 3640x2304 */
> -	if (adjusted_mode->crtc_hdisplay > 3640 ||
> -	    adjusted_mode->crtc_vdisplay > 2304) {
> -		DRM_DEBUG_KMS("PSR2 not enabled, panel resolution too big\n");
> +	if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv)) {
> +		psr_max_h = 4096;
> +		psr_max_v = 2304;
> +	} else if (IS_GEN9(dev_priv)) {
> +		psr_max_h = 3640;
> +		psr_max_v = 2304;
> +	}

pre-SKL?

> +
> +	if (crtc_hdisplay > psr_max_h || crtc_vdisplay > psr_max_v) {
> +		DRM_DEBUG_KMS("PSR2 not enabled, resolution %dx%d > max supported %dx%d\n",
> +			      crtc_hdisplay, crtc_vdisplay,
> +			      psr_max_h, psr_max_v);
>  		return false;
>  	}
>  
> -- 
> 2.14.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-03-06 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 20:33 [PATCH v3] drm/i915/psr: Update PSR2 resolution check for Cannonlake Dhinakaran Pandiyan
2018-03-06 20:38 ` Ville Syrjälä [this message]
2018-03-06 20:45   ` Pandiyan, Dhinakaran
2018-03-06 21:24     ` Ville Syrjälä
2018-03-06 21:36       ` Pandiyan, Dhinakaran
2018-03-06 22:36       ` Rodrigo Vivi
2018-03-06 21:19 ` ✓ Fi.CI.BAT: success for drm/i915/psr: Update PSR2 resolution check for Cannonlake (rev3) Patchwork
2018-03-07  1:17 ` ✓ 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=20180306203843.GK5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dhinakaran.pandiyan@intel.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.