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 1/2] drm/i915: Fix g4x+ sprite dotclock limit for upscaling
Date: Fri, 11 Sep 2020 21:03:36 +0300 [thread overview]
Message-ID: <87ft7oyyvb.fsf@intel.com> (raw)
In-Reply-To: <20200206201204.31704-1-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>
>
> Even if we're not doing downscaling we should account for
> some of the extra dotclock limitations for g4x+ sprites. In
> particular we must never exceed the 90% rule, and with RGB
> that limits actually drops to 80%.
>
> So instead of bailing out when upscaling let's clamp the
> scaling factor appropriately and go through the rest of
> calculation normally. By luck we already did the full
> calculations for the 1:1 case.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_sprite.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c b/drivers/gpu/drm/i915/display/intel_sprite.c
> index 7abeefe8dce5..6e2e22d9bbaa 100644
> --- a/drivers/gpu/drm/i915/display/intel_sprite.c
> +++ b/drivers/gpu/drm/i915/display/intel_sprite.c
> @@ -1611,8 +1611,7 @@ static int g4x_sprite_min_cdclk(const struct intel_crtc_state *crtc_state,
> hscale = drm_rect_calc_hscale(&plane_state->uapi.src,
> &plane_state->uapi.dst,
> 0, INT_MAX);
> - if (hscale < 0x10000)
> - return pixel_rate;
> + hscale = max(hscale, 0x10000u);
It bugs me that drm_rect seems to be used for both integer and 16.16
fixed point and whatnot.
It also gives me an uneasy feeling that hscale is uint while
drm_rect_calc_hscale() may return -ERANGE... but I guess shouldn't
happen.
All in all,
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>
> /* Decimation steps at 2x,4x,8x,16x */
> decimate = ilog2(hscale >> 16);
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next parent reply other threads:[~2020-09-11 18:03 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 ` Jani Nikula [this message]
2020-09-14 13:48 ` [Intel-gfx] [PATCH 1/2] drm/i915: Fix g4x+ sprite dotclock limit for upscaling Ville Syrjälä
[not found] ` <20200206201204.31704-2-ville.syrjala@linux.intel.com>
2020-09-11 18:13 ` [Intel-gfx] [PATCH 2/2] drm/i915: Use fb->format->is_yuv for the g4x+ sprite RGB vs. YUV check Jani Nikula
2020-09-14 13:44 ` 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=87ft7oyyvb.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