From: Yongbang Shi <shiyongbang@huawei.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
<xinliang.liu@linaro.org>, <tiantao6@hisilicon.com>,
<kong.kongxinwei@hisilicon.com>, <sumit.semwal@linaro.org>,
<yongqin.liu@linaro.org>, <jstultz@google.com>,
<maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
<airlied@gmail.com>, <simona@ffwll.ch>
Cc: <dri-devel@lists.freedesktop.org>,
Rongrong Zou <zourongrong@gmail.com>,
Sean Paul <seanpaul@chromium.org>,
Dmitry Baryshkov <lumag@kernel.org>,
Baihan Li <libaihan@huawei.com>, <stable@vger.kernel.org>,
<shiyongbang@huawei.com>
Subject: Re: [PATCH 2/4] drm/hibmc: Fix list of formats on the primary plane
Date: Wed, 15 Apr 2026 11:19:26 +0800 [thread overview]
Message-ID: <0668b6ec-b844-4fef-804c-91e488b39516@huawei.com> (raw)
In-Reply-To: <20260413085037.17491-3-tzimmermann@suse.de>
> Remove all formats from the primary plane that are unsupported for
> various reasons.
>
> * Formats with alpha channel: planes should not announce alpha channels
> unless they support transparency. There's no transparency support in
> the primary plane's implementation.
>
> * Formats with BGR order. The common format is in RGB channel order.
> There's no BGR support in the primary plane's implementation.
>
> * RGB888: atomic_update programs the format from cpp[0] * 8 / 16. For
> RGB888's cpp value of 3 this returns 1.5; rounded to 1. Programming
> the value of 1 to HIBMC_CRT_DISP_CTL_FORMAT sets up RGB565. Hence, the
> output is distorted. This can be tested by booting with video=1024x768-24.
>
I tested this method and was able to reproduce the issue. Thank you for
pointing it out.
> Removing all unsupported formats leaves XRGB8888 and RGB565. Both of
> which are supported and work correctly.
>
You're right, I checked the DataSheet and confirmed that it only
supports RGB565 and XRGB8888.
Also, I looked at the commit history, and this format was already
present in the first version of the hibmc driver. This is a historic
issue, and it's a bit difficult to determine why it was implemented this
way.
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Fixes: da52605eea8f ("drm/hisilicon/hibmc: Add support for display engine")
> Cc: Rongrong Zou <zourongrong@gmail.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: Xinliang Liu <xinliang.liu@linaro.org>
> Cc: Dmitry Baryshkov <lumag@kernel.org>
> Cc: Yongbang Shi <shiyongbang@huawei.com>
> Cc: Baihan Li <libaihan@huawei.com>
> Cc: <stable@vger.kernel.org> # v4.10+
> ---
> drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
> index 8fa2a95bcdd1..c4f9ebd9250d 100644
> --- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
> +++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_de.c
> @@ -118,10 +118,8 @@ static void hibmc_plane_atomic_update(struct drm_plane *plane,
> }
>
> static const u32 channel_formats1[] = {
> - DRM_FORMAT_RGB565, DRM_FORMAT_BGR565, DRM_FORMAT_RGB888,
> - DRM_FORMAT_BGR888, DRM_FORMAT_XRGB8888, DRM_FORMAT_XBGR8888,
> - DRM_FORMAT_RGBA8888, DRM_FORMAT_BGRA8888, DRM_FORMAT_ARGB8888,
> - DRM_FORMAT_ABGR8888
> + DRM_FORMAT_XRGB8888,
> + DRM_FORMAT_RGB565,
> };
>
> static const struct drm_plane_funcs hibmc_plane_funcs = {
Reviewed-by: Yongbang Shi <shiyongbang@huawei.com>
next prev parent reply other threads:[~2026-04-15 3:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260413085037.17491-1-tzimmermann@suse.de>
2026-04-13 8:40 ` [PATCH 1/4] drm/hibmc: Use drm_atomic_helper_check_plane_state() Thomas Zimmermann
2026-04-16 6:53 ` Yongbang Shi
2026-04-16 9:41 ` Thomas Zimmermann
2026-04-16 13:22 ` Yongbang Shi
2026-04-17 6:17 ` Thomas Zimmermann
2026-04-17 7:08 ` Yongbang Shi
2026-04-13 8:40 ` [PATCH 2/4] drm/hibmc: Fix list of formats on the primary plane Thomas Zimmermann
2026-04-15 3:19 ` Yongbang Shi [this message]
2026-04-15 6:09 ` 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=0668b6ec-b844-4fef-804c-91e488b39516@huawei.com \
--to=shiyongbang@huawei.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jstultz@google.com \
--cc=kong.kongxinwei@hisilicon.com \
--cc=libaihan@huawei.com \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=seanpaul@chromium.org \
--cc=simona@ffwll.ch \
--cc=stable@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
--cc=tiantao6@hisilicon.com \
--cc=tzimmermann@suse.de \
--cc=xinliang.liu@linaro.org \
--cc=yongqin.liu@linaro.org \
--cc=zourongrong@gmail.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