public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Vidya Srinivas <vidya.srinivas@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add PLANE_CUS_CTL restriction in max_width
Date: Thu, 2 Dec 2021 15:06:52 +0200	[thread overview]
Message-ID: <YajE7MGCilq4joly@intel.com> (raw)
In-Reply-To: <20211202110836.17536-1-vidya.srinivas@intel.com>

On Thu, Dec 02, 2021 at 04:38:36PM +0530, Vidya Srinivas wrote:
> 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
> 
> v3: Addressed review comments from Ville. Changed names of
> HDR and SDR max_width functions to icl_hdr_plane_max_width
> and icl_sdr_plane_max_width
> 
> v4: Fixed paranthesis alignment. No code change
> 
> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>

Pushed to drm-intel-next. Thanks.

> ---
>  .../drm/i915/display/skl_universal_plane.c    | 21 +++++++++++++++----
>  1 file changed, 17 insertions(+), 4 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..e717eb58b105 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -420,9 +420,19 @@ static int icl_plane_min_width(const struct drm_framebuffer *fb,
>  	}
>  }
>  
> -static int icl_plane_max_width(const struct drm_framebuffer *fb,
> -			       int color_plane,
> -			       unsigned int rotation)
> +static int icl_hdr_plane_max_width(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_sdr_plane_max_width(const struct drm_framebuffer *fb,
> +				int color_plane,
> +				unsigned int rotation)
>  {
>  	return 5120;
>  }
> @@ -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_hdr_plane_max_width;
> +		else
> +			plane->max_width = icl_sdr_plane_max_width;
>  		plane->max_height = icl_plane_max_height;
>  		plane->min_cdclk = icl_plane_min_cdclk;
>  	} else if (DISPLAY_VER(dev_priv) >= 10) {
> -- 
> 2.33.0

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2021-12-02 13:06 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
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ä [this message]
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=YajE7MGCilq4joly@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=vidya.srinivas@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