Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm/i915: Use fb->format->is_yuv for the g4x+ sprite RGB vs. YUV check
Date: Fri, 11 Sep 2020 21:13:18 +0300	[thread overview]
Message-ID: <87d02syyf5.fsf@intel.com> (raw)
In-Reply-To: <20200206201204.31704-2-ville.syrjala@linux.intel.com>

On Thu, 06 Feb 2020, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> g4x+ sprites have an extra cdclk limitation listed for RGB formats.
> For some random reason I chose to use cpp>=4 as the check for that.
> While that does actually work let's deobfuscate it by checking
> for !is_yuv instead. I suspect is_yuv didn't exist way back when
> I originally write the code.

Mmh, there are formats with cpp >= 4 && is_yuv == true making this look
like a functional change... but I presume those are not relevant and/or
this change is the right thing to do anyway.

Acked-by: Jani Nikula <jani.nikula@intel.com>

>
> Also drop the duplicate comment.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_sprite.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
> index 6e2e22d9bbaa..f95fe2c99468 100644
> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> @@ -1624,8 +1624,8 @@ static int g4x_sprite_min_cdclk(const struct intel_crtc_state *crtc_state,
>  	limit -= decimate;
>  
>  	/* -10% for RGB */
> -	if (fb->format->cpp[0] >= 4)
> -		limit--; /* -10% for RGB */
> +	if (!fb->format->is_yuv)
> +		limit--;
>  
>  	/*
>  	 * We should also do -10% if sprite scaling is enabled

-- 
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2020-09-11 18:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200206201204.31704-1-ville.syrjala@linux.intel.com>
2020-09-11 18:03 ` [Intel-gfx] [PATCH 1/2] drm/i915: Fix g4x+ sprite dotclock limit for upscaling Jani Nikula
2020-09-14 13:48   ` Ville Syrjälä
     [not found] ` <20200206201204.31704-2-ville.syrjala@linux.intel.com>
2020-09-11 18:13   ` Jani Nikula [this message]
2020-09-14 13:44     ` [Intel-gfx] [PATCH 2/2] drm/i915: Use fb->format->is_yuv for the g4x+ sprite RGB vs. YUV check Ville Syrjälä
2020-09-14 15:20       ` Jani Nikula

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=87d02syyf5.fsf@intel.com \
    --to=jani.nikula@linux.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