All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Chaitanya Kumar Borah" <chaitanya.kumar.borah@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/color: Add YUV buffer support on HDR planes
Date: Wed, 12 Aug 2026 09:48:27 +0000	[thread overview]
Message-ID: <20260812094828.47F861F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260812085908.3159828-3-chaitanya.kumar.borah@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Critical] Adding INTEL_PLANE_CB_CSC_FF to the color pipeline arrays increases their size beyond the MAX_COLOROP limit, causing a stack buffer overflow.
--

--- Patch [2]: [PATCH 2/2] drm/i915/color: Add YUV buffer support on HDR planes ---
commit 659bb21b3ebb587a758df27788a2ccbde4332e70
Author: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>

drm/i915/color: Add YUV buffer support on HDR planes

This commit adds the INTEL_PLANE_CB_CSC_FF (fixed function CSC) color
block as the first stage for HDR planes to enable YUV-to-RGB color space
conversion. It also updates the CSC programming logic to account for the
color pipeline programming.

> diff --git a/drivers/gpu/drm/i915/display/intel_color_pipeline.c b/drivers/gpu/drm/i915/display/intel_color_pipeline.c
> index 38cfd6ed585d0..3f76b8d80430b 100644
> --- a/drivers/gpu/drm/i915/display/intel_color_pipeline.c
> +++ b/drivers/gpu/drm/i915/display/intel_color_pipeline.c
> @@ -31,6 +31,7 @@ static const struct drm_colorop_funcs intel_colorop_funcs = {
>   * the pipeline totally unusable.
>   */
>  static const enum intel_color_block xe3plpd_primary_plane_pipeline[] = {
> +	INTEL_PLANE_CB_CSC_FF,
>  	INTEL_PLANE_CB_PRE_CSC_LUT,
>  	INTEL_PLANE_CB_CSC,
>  	INTEL_PLANE_CB_3DLUT,
> @@ -38,6 +39,7 @@ static const enum intel_color_block xe3plpd_primary_plane_pipeline[] = {
>  };

[Severity: Critical]
By adding this element, xe3plpd_primary_plane_pipeline now has 5 elements.
However, MAX_COLOROP is still defined as 4 in this file.

When initializing the pipeline in _intel_color_pipeline_plane_init(), the local
colorop array is sized using MAX_COLOROP:

	struct intel_colorop *colorop[MAX_COLOROP];
	...
	if (plane_has_3dlut(display, pipe, plane)) {
		pipeline = xe3plpd_primary_plane_pipeline;
		pipeline_len = ARRAY_SIZE(xe3plpd_primary_plane_pipeline);
	}
	...
	for (i = 0; i < pipeline_len; i++) {
		colorop[i] = intel_color_pipeline_plane_add_colorop(plane, prev,
								    pipeline[i]);

Since pipeline_len evaluates to 5 for xe3plpd_primary_plane_pipeline, does this
loop overflow the colorop[] stack array on the final iteration?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260812085908.3159828-1-chaitanya.kumar.borah@intel.com?part=2

  reply	other threads:[~2026-08-12 17:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  8:59 [PATCH 0/2] Support YUV buffers in HDR planes Chaitanya Kumar Borah
2026-08-12  8:59 ` [PATCH 1/2] [DO_NOT_REVIEW] drm/i915/color: Add color pipeline support for SDR planes Chaitanya Kumar Borah
2026-08-12  9:56   ` sashiko-bot
2026-08-12  8:59 ` [PATCH 2/2] drm/i915/color: Add YUV buffer support on HDR planes Chaitanya Kumar Borah
2026-08-12  9:48   ` sashiko-bot [this message]
2026-08-12  9:30 ` ✓ CI.KUnit: success for Support YUV buffers in " Patchwork
2026-08-12 10:24 ` ✗ Xe.CI.BAT: failure " Patchwork
2026-08-12 10:48 ` ✓ i915.CI.BAT: success " Patchwork
2026-08-12 11:13 ` ✓ Xe.CI.FULL: " Patchwork
2026-08-12 12:28 ` ✗ i915.CI.Full: 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=20260812094828.47F861F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=chaitanya.kumar.borah@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.