From: Thomas Zimmermann <tzimmermann@suse.de>
To: Icenowy Zheng <zhengxingda@iscas.ac.cn>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Icenowy Zheng <uwu@icenowy.me>
Subject: Re: [PATCH drm-misc-next v2 1/3] drm: verisilicon: make vs_format conversion function return int
Date: Thu, 5 Mar 2026 11:18:12 +0100 [thread overview]
Message-ID: <abaa02f4-a252-4051-8919-b45c893fb054@suse.de> (raw)
In-Reply-To: <20260305075926.3642501-2-zhengxingda@iscas.ac.cn>
Hi
Am 05.03.26 um 08:59 schrieb Icenowy Zheng:
> This is for further proper invalid drm_format handling before committing
> the plane state change.
>
> The return value is not yet checked yet, and will be checked in
> atomic_check in the future.
>
> Signed-off-by: Icenowy Zheng <zhengxingda@iscas.ac.cn>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
> Changes in v2:
> - Move a bogus #include clause to the next patch.
>
> drivers/gpu/drm/verisilicon/vs_plane.c | 6 ++++--
> drivers/gpu/drm/verisilicon/vs_plane.h | 2 +-
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/verisilicon/vs_plane.c b/drivers/gpu/drm/verisilicon/vs_plane.c
> index 2f3953e588a34..fa88ed14e41d7 100644
> --- a/drivers/gpu/drm/verisilicon/vs_plane.c
> +++ b/drivers/gpu/drm/verisilicon/vs_plane.c
> @@ -12,7 +12,7 @@
>
> #include "vs_plane.h"
>
> -void drm_format_to_vs_format(u32 drm_format, struct vs_format *vs_format)
> +int drm_format_to_vs_format(u32 drm_format, struct vs_format *vs_format)
> {
> switch (drm_format) {
> case DRM_FORMAT_XRGB4444:
> @@ -62,7 +62,7 @@ void drm_format_to_vs_format(u32 drm_format, struct vs_format *vs_format)
> vs_format->color = VSDC_COLOR_FORMAT_A2R10G10B10;
> break;
> default:
> - pr_warn("Unexpected drm format!\n");
> + return -EINVAL;
> }
>
> switch (drm_format) {
> @@ -101,6 +101,8 @@ void drm_format_to_vs_format(u32 drm_format, struct vs_format *vs_format)
>
> /* N/A for non-YUV formats */
> vs_format->uv_swizzle = false;
> +
> + return 0;
> }
>
> dma_addr_t vs_fb_get_dma_addr(struct drm_framebuffer *fb,
> diff --git a/drivers/gpu/drm/verisilicon/vs_plane.h b/drivers/gpu/drm/verisilicon/vs_plane.h
> index 41875ea3d66a5..a88cc19f2202e 100644
> --- a/drivers/gpu/drm/verisilicon/vs_plane.h
> +++ b/drivers/gpu/drm/verisilicon/vs_plane.h
> @@ -63,7 +63,7 @@ struct vs_format {
> bool uv_swizzle;
> };
>
> -void drm_format_to_vs_format(u32 drm_format, struct vs_format *vs_format);
> +int drm_format_to_vs_format(u32 drm_format, struct vs_format *vs_format);
> dma_addr_t vs_fb_get_dma_addr(struct drm_framebuffer *fb,
> const struct drm_rect *src_rect);
>
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)
next prev parent reply other threads:[~2026-03-05 10:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 7:59 [PATCH drm-misc-next v2 0/3] drm: verisilicon: convert drm_format to vs_format in atomic_check Icenowy Zheng
2026-03-05 7:59 ` [PATCH drm-misc-next v2 1/3] drm: verisilicon: make vs_format conversion function return int Icenowy Zheng
2026-03-05 10:18 ` Thomas Zimmermann [this message]
2026-03-05 7:59 ` [PATCH drm-misc-next v2 2/3] drm: verisilicon: subclass drm_plane_state Icenowy Zheng
2026-03-05 10:34 ` Thomas Zimmermann
2026-03-05 14:06 ` Icenowy Zheng
2026-03-05 8:09 ` [PATCH drm-misc-next v2 3/3] drm: verisilicon: fill plane's vs_format in atomic_check Icenowy Zheng
2026-03-05 11:36 ` Thomas Zimmermann
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=abaa02f4-a252-4051-8919-b45c893fb054@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=uwu@icenowy.me \
--cc=zhengxingda@iscas.ac.cn \
/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
all inboxes | Powered by JetHome®