From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Shashank Sharma <shashank.sharma@intel.com>
Cc: Lukas Rusak <lorusak@gmail.com>,
intel-gfx@lists.freedesktop.org,
Juha-pekka Heikkila <juha-pekka.heikkila@intel.com>,
Maarten Lankhorst <maarten.lankhorst@intel.com>
Subject: Re: [PATCH] drm/i915: Fix skl plane scaling for planner YUV buffers
Date: Wed, 8 May 2019 16:56:08 +0300 [thread overview]
Message-ID: <20190508135608.GV24299@intel.com> (raw)
In-Reply-To: <20190508120437.12339-1-shashank.sharma@intel.com>
On Wed, May 08, 2019 at 05:34:37PM +0530, Shashank Sharma wrote:
> From: Lukas Rusak <lorusak@gmail.com>
>
> Plane scaling for YUV planar formats should be max 2 times.
Nope. Spec says it should be < 2.0 on pre-glk, and < 3.0 on glk+.
>
> Cc: Maarten Lankhorst <maarten.lankhorst@intel.com>
> Cc: Juha-pekka Heikkila <juha-pekka.heikkila@intel.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
>
> Signed-off-by: Lukas Rusak <lorusak@gmail.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 13 ++++++++-----
> 1 file changed, 8 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index a351c8e219ba..2ac0a55a9c9f 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -13897,7 +13897,7 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,
> {
> struct intel_crtc *crtc = to_intel_crtc(crtc_state->base.crtc);
> struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> - int max_scale, mult;
> + int max_scale, mult, remainder;
> int crtc_clock, max_dotclk, tmpclk1, tmpclk2;
>
> if (!crtc_state->base.enable)
> @@ -13914,12 +13914,15 @@ skl_max_scale(const struct intel_crtc_state *crtc_state,
>
> /*
> * skl max scale is lower of:
> - * close to 3 but not 3, -1 is for that purpose
> - * or
> - * cdclk/crtc_clock
> + * for planar YUV formats: 2
> + * or
> + * for other formats: close to 3 but not 3, -1 is for that purpose
> + * or
> + * cdclk/crtc_clock
> */
> mult = is_planar_yuv_format(pixel_format) ? 2 : 3;
> - tmpclk1 = (1 << 16) * mult - 1;
> + remainder = is_planar_yuv_format(pixel_format) ? 0 : 1;
> + tmpclk1 = (1 << 16) * mult - remainder;
> tmpclk2 = (1 << 8) * ((max_dotclk << 8) / crtc_clock);
> max_scale = min(tmpclk1, tmpclk2);
>
> --
> 2.17.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-05-08 13:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 12:04 [PATCH] drm/i915: Fix skl plane scaling for planner YUV buffers Shashank Sharma
2019-05-08 12:57 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2019-05-08 13:26 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-08 13:56 ` Ville Syrjälä [this message]
2019-05-08 16:54 ` ✓ 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=20190508135608.GV24299@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=juha-pekka.heikkila@intel.com \
--cc=lorusak@gmail.com \
--cc=maarten.lankhorst@intel.com \
--cc=shashank.sharma@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