From: Shashank Sharma <shashank.sharma@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Lukas Rusak <lorusak@gmail.com>,
Juha-pekka Heikkila <juha-pekka.heikkila@intel.com>,
Maarten Lankhorst <maarten.lankhorst@intel.com>
Subject: [PATCH] drm/i915: Fix skl plane scaling for planner YUV buffers
Date: Wed, 8 May 2019 17:34:37 +0530 [thread overview]
Message-ID: <20190508120437.12339-1-shashank.sharma@intel.com> (raw)
From: Lukas Rusak <lorusak@gmail.com>
Plane scaling for YUV planar formats should be max 2 times.
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
next reply other threads:[~2019-05-08 12:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 12:04 Shashank Sharma [this message]
2019-05-08 12:57 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Fix skl plane scaling for planner YUV buffers Patchwork
2019-05-08 13:26 ` ✓ Fi.CI.BAT: success " Patchwork
2019-05-08 13:56 ` [PATCH] " Ville Syrjälä
2019-05-08 16:54 ` ✓ Fi.CI.IGT: success for " 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=20190508120437.12339-1-shashank.sharma@intel.com \
--to=shashank.sharma@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=juha-pekka.heikkila@intel.com \
--cc=lorusak@gmail.com \
--cc=maarten.lankhorst@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