public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Vidya Srinivas <vidya.srinivas@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Yashashvi Shantam <shantam.yashashvi@intel.com>
Subject: [Intel-gfx] [PATCH] drm/i915: Add PLANE_CUS_CTL restriction in max_width
Date: Tue, 30 Nov 2021 22:42:20 +0530	[thread overview]
Message-ID: <20211130171220.8622-1-vidya.srinivas@intel.com> (raw)
In-Reply-To: <20211130160534.7983-1-vidya.srinivas@intel.com>

PLANE_CUS_CTL has a restriction of 4096 width even though
PLANE_SIZE and scaler size registers supports max 5120.
Take care of this restriction in max_width.

Without this patch, when 5k content is sent on HDR plane
with NV12 content, FIFO underrun is seen and screen blanks
out.

v2: Addressed review comments from Ville. Added separate
functions for max_width - for HDR and SDR

Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Signed-off-by: Yashashvi Shantam <shantam.yashashvi@intel.com>
---
 .../gpu/drm/i915/display/skl_universal_plane.c  | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
index 28890876bdeb..d320a3ba1ade 100644
--- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
+++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
@@ -420,7 +420,17 @@ static int icl_plane_min_width(const struct drm_framebuffer *fb,
 	}
 }
 
-static int icl_plane_max_width(const struct drm_framebuffer *fb,
+static int icl_plane_max_width_hdr(const struct drm_framebuffer *fb,
+			       int color_plane,
+			       unsigned int rotation)
+{
+	if (intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier))
+		return 4096;
+	else
+		return 5120;
+}
+
+static int icl_plane_max_width_sdr(const struct drm_framebuffer *fb,
 			       int color_plane,
 			       unsigned int rotation)
 {
@@ -2108,7 +2118,10 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
 
 	if (DISPLAY_VER(dev_priv) >= 11) {
 		plane->min_width = icl_plane_min_width;
-		plane->max_width = icl_plane_max_width;
+		if (icl_is_hdr_plane(dev_priv, plane_id))
+			plane->max_width = icl_plane_max_width_hdr;
+		else
+			plane->max_width = icl_plane_max_width_sdr;
 		plane->max_height = icl_plane_max_height;
 		plane->min_cdclk = icl_plane_min_cdclk;
 	} else if (DISPLAY_VER(dev_priv) >= 10) {
-- 
2.33.0


  parent reply	other threads:[~2021-11-30 18:01 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-18  6:25 [Intel-gfx] [PATCH] drm/i915: Reject 5k on HDR planes for planar fb formats Vidya Srinivas
2021-11-18  7:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-11-18 15:48 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-11-30  9:30 ` [Intel-gfx] [PATCH] " Ville Syrjälä
2021-11-30 16:20   ` Srinivas, Vidya
2021-11-30 16:05 ` [Intel-gfx] [PATCH] drm/i915: Add PLANE_CUS_CTL restriction in max_width Vidya Srinivas
2021-11-30 16:30   ` Ville Syrjälä
2021-11-30 17:25     ` Srinivas, Vidya
2021-11-30 16:56   ` Vidya Srinivas
2021-11-30 17:12   ` Vidya Srinivas [this message]
2021-11-30 18:09     ` Ville Syrjälä
2021-12-01  1:33       ` Srinivas, Vidya
2021-12-01  1:23     ` Vidya Srinivas
2021-12-01  1:35     ` Vidya Srinivas
2021-12-01  3:47     ` Vidya Srinivas
2021-12-01 15:02       ` Ville Syrjälä
2021-12-02  3:25         ` Srinivas, Vidya
2021-12-02 10:55           ` Ville Syrjälä
2021-12-02 11:10             ` Srinivas, Vidya
2021-12-02 11:13               ` Ville Syrjälä
2021-12-02 11:19                 ` Srinivas, Vidya
2021-12-02 11:08       ` Vidya Srinivas
2021-12-02 13:06         ` Ville Syrjälä
2021-12-02 16:59           ` Srinivas, Vidya
2021-11-30 16:54 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Reject 5k on HDR planes for planar fb formats (rev2) Patchwork
2021-11-30 16:55 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-11-30 17:27 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-11-30 17:52 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Reject 5k on HDR planes for planar fb formats (rev4) Patchwork
2021-11-30 18:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-11-30 19:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Reject 5k on HDR planes for planar fb formats (rev5) Patchwork
2021-11-30 19:46 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2021-12-01  3:36 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Reject 5k on HDR planes for planar fb formats (rev7) Patchwork
2021-12-01  4:12 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Reject 5k on HDR planes for planar fb formats (rev8) Patchwork
2021-12-01  4:20 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Reject 5k on HDR planes for planar fb formats (rev7) Patchwork
2021-12-01  4:52 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Reject 5k on HDR planes for planar fb formats (rev8) Patchwork
2021-12-01  7:32 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-12-02 13:01 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Reject 5k on HDR planes for planar fb formats (rev9) Patchwork
2021-12-02 13:25 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-12-02 16:48 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=20211130171220.8622-1-vidya.srinivas@intel.com \
    --to=vidya.srinivas@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=shantam.yashashvi@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