All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jernej Skrabec" <jernej.skrabec@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org
Subject: Re: [PATCH v2 4/8] drm/sun4i: vi_layer: Limit formats for DE33
Date: Sat, 09 May 2026 20:58:43 +0000	[thread overview]
Message-ID: <20260509205844.7E51FC2BCB2@smtp.kernel.org> (raw)
In-Reply-To: <20260509190015.79086-5-jernej.skrabec@siol.net>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Exposing YCBCR color properties on a plane that does not support YUV formats introduces UAPI inconsistency.
--

commit 929b63037079ff8fc9eaecabce5ad91bde84083f
Author: Jernej Skrabec <jernej.skrabec@gmail.com>

drm/sun4i: vi_layer: Limit formats for DE33

This commit removes YUV formats from the supported list for DE33 planes
without scaler support. A new format array containing only RGB formats is
introduced and used when scaling is unavailable.

> diff --git a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c
> --- a/drivers/gpu/drm/sun4i/sun8i_vi_layer.c
> +++ b/drivers/gpu/drm/sun4i/sun8i_vi_layer.c

[ ... ]

> @@ -410,8 +437,17 @@ struct sun8i_layer *sun8i_vi_layer_init_one(struct drm_device *drm,
>  	layer->cfg = cfg;
>  
>  	if (layer->cfg->de_type >= SUN8I_MIXER_DE3) {
> -		formats = sun8i_vi_layer_de3_formats;
> -		format_count = ARRAY_SIZE(sun8i_vi_layer_de3_formats);
> +		/*
> +		 * TODO: DE33 drivers doesn't support scaling yet, which is a
> +		 * requirement for YUV support.
> +		 */
> +		if (layer->cfg->scaler_mask & BIT(phy_index)) {
> +			formats = sun8i_vi_layer_de3_formats;
> +			format_count = ARRAY_SIZE(sun8i_vi_layer_de3_formats);
> +		} else {
> +			formats = sun8i_vi_layer_de3_no_yuv_formats;
> +			format_count = ARRAY_SIZE(sun8i_vi_layer_de3_no_yuv_formats);
> +		}

Since sun8i_vi_layer_de3_no_yuv_formats only contains RGB formats, should
the driver skip calling drm_plane_create_color_properties() for this
configuration?

Later in sun8i_vi_layer_init_one(), the driver unconditionally calls
drm_plane_create_color_properties(), which exposes YCBCR color encoding and
range UAPI properties. Could this expose confusing or meaningless YUV
properties to userspace for planes where only RGB formats are supported?

>  	} else {
>  		formats = sun8i_vi_layer_formats;
>  		format_count = ARRAY_SIZE(sun8i_vi_layer_formats);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260509190015.79086-1-jernej.skrabec@siol.net?part=4

  reply	other threads:[~2026-05-09 20:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09 19:00 [PATCH v2 0/8] drm/sun4i: update DE33 support Jernej Skrabec
2026-05-09 19:00 ` [PATCH v2 1/8] clk: sunxi-ng: de2: Fix Display Engine 3.3 definitions Jernej Skrabec
2026-05-09 19:44   ` sashiko-bot
2026-05-10 19:11     ` Jernej Škrabec
2026-05-09 19:00 ` [PATCH v2 2/8] clk: sunxi-ng: de2: Export register regmap for DE33 Jernej Skrabec
2026-05-09 20:05   ` sashiko-bot
2026-05-09 19:00 ` [PATCH v2 3/8] drm/sun4i: Add support for DE33 CSC Jernej Skrabec
2026-05-09 19:00 ` [PATCH v2 4/8] drm/sun4i: vi_layer: Limit formats for DE33 Jernej Skrabec
2026-05-09 20:58   ` sashiko-bot [this message]
2026-05-09 19:00 ` [PATCH v2 5/8] dt-bindings: display: allwinner: Add DE33 planes Jernej Skrabec
2026-05-09 21:12   ` sashiko-bot
2026-05-14 12:01   ` Krzysztof Kozlowski
2026-05-09 19:00 ` [PATCH v2 6/8] drm/sun4i: Add planes driver Jernej Skrabec
2026-05-09 21:31   ` sashiko-bot
2026-05-09 19:00 ` [PATCH v2 7/8] dt-bindings: display: allwinner: Split H616 DE33 layer reg space Jernej Skrabec
2026-05-14 12:04   ` Krzysztof Kozlowski
2026-05-09 19:00 ` [PATCH v2 8/8] drm/sun4i: switch DE33 to new bindings Jernej Skrabec
2026-05-09 22:00   ` sashiko-bot

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=20260509205844.7E51FC2BCB2@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko@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.