From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] drm: shmobile: Add support for DRM_FORMAT_XRGB8888
Date: Wed, 5 Apr 2023 06:06:07 +0300 [thread overview]
Message-ID: <20230405030607.GH9915@pendragon.ideasonboard.com> (raw)
In-Reply-To: <34ad1c1798b37a68ce08cffa8402be497ac2162e.1680273039.git.geert+renesas@glider.be>
Hi Geert,
Thank you for the patch.
On Fri, Mar 31, 2023 at 04:48:08PM +0200, Geert Uytterhoeven wrote:
> DRM_FORMAT_XRGB8888 aka XR24 is the modus francus of DRM, and should be
> supported by all drivers.
>
> The handling for DRM_FORMAT_XRGB8888 is similar to DRM_FORMAT_ARGB8888,
> just ignore the alpha channel.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 1 +
> drivers/gpu/drm/shmobile/shmob_drm_kms.c | 5 +++++
> drivers/gpu/drm/shmobile/shmob_drm_plane.c | 5 +++++
> 3 files changed, 11 insertions(+)
>
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
> index 713a7612244c647a..08dc1428aa16caf0 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_crtc.c
> @@ -232,6 +232,7 @@ static void shmob_drm_crtc_start(struct shmob_drm_crtc *scrtc)
> value = LDDDSR_LS | LDDDSR_WS | LDDDSR_BS;
> break;
> case DRM_FORMAT_ARGB8888:
> + case DRM_FORMAT_XRGB8888:
> default:
> value = LDDDSR_LS;
> break;
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_kms.c b/drivers/gpu/drm/shmobile/shmob_drm_kms.c
> index 3c5fe3bc183c7c13..99381cc0abf3ae1f 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_kms.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_kms.c
> @@ -39,6 +39,11 @@ static const struct shmob_drm_format_info shmob_drm_format_infos[] = {
> .bpp = 32,
> .yuv = false,
> .lddfr = LDDFR_PKF_ARGB32,
> + }, {
> + .fourcc = DRM_FORMAT_XRGB8888,
> + .bpp = 32,
> + .yuv = false,
> + .lddfr = LDDFR_PKF_ARGB32,
> }, {
> .fourcc = DRM_FORMAT_NV12,
> .bpp = 12,
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_plane.c b/drivers/gpu/drm/shmobile/shmob_drm_plane.c
> index 604ae23825daaafd..850986cee848226a 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_plane.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_plane.c
> @@ -80,6 +80,7 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane,
> format |= LDBBSIFR_SWPL | LDBBSIFR_SWPW | LDBBSIFR_SWPB;
> break;
> case DRM_FORMAT_ARGB8888:
> + case DRM_FORMAT_XRGB8888:
> default:
> format |= LDBBSIFR_SWPL;
> break;
> @@ -95,6 +96,9 @@ static void __shmob_drm_plane_setup(struct shmob_drm_plane *splane,
> case DRM_FORMAT_ARGB8888:
> format |= LDBBSIFR_AL_PK | LDBBSIFR_RY | LDDFR_PKF_ARGB32;
> break;
> + case DRM_FORMAT_XRGB8888:
> + format |= LDBBSIFR_AL_1 | LDBBSIFR_RY | LDDFR_PKF_ARGB32;
> + break;
> case DRM_FORMAT_NV12:
> case DRM_FORMAT_NV21:
> format |= LDBBSIFR_AL_1 | LDBBSIFR_CHRR_420;
> @@ -231,6 +235,7 @@ static const uint32_t formats[] = {
> DRM_FORMAT_RGB565,
> DRM_FORMAT_RGB888,
> DRM_FORMAT_ARGB8888,
> + DRM_FORMAT_XRGB8888,
> DRM_FORMAT_NV12,
> DRM_FORMAT_NV21,
> DRM_FORMAT_NV16,
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2023-04-05 3:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-31 14:48 [PATCH 0/5] drm: shmobile: Fixes and enhancements Geert Uytterhoeven
2023-03-31 14:48 ` [PATCH 1/5] drm: shmobile: Use %p4cc to print fourcc codes Geert Uytterhoeven
2023-04-05 3:05 ` Laurent Pinchart
2023-03-31 14:48 ` [PATCH 2/5] drm: shmobile: Add support for DRM_FORMAT_XRGB8888 Geert Uytterhoeven
2023-04-05 3:06 ` Laurent Pinchart [this message]
2023-03-31 14:48 ` [PATCH 3/5] drm: shmobile: Switch to drm_crtc_init_with_planes() Geert Uytterhoeven
2023-04-05 3:59 ` Laurent Pinchart
2023-04-10 9:35 ` Geert Uytterhoeven
2023-04-10 12:26 ` Laurent Pinchart
2023-03-31 14:48 ` [PATCH 4/5] drm: shmobile: Add missing call to drm_fbdev_generic_setup() Geert Uytterhoeven
2023-04-05 4:00 ` Laurent Pinchart
2023-03-31 14:48 ` [PATCH 5/5] drm: shmobile: Make DRM_SHMOBILE visible on Renesas SoC platforms Geert Uytterhoeven
2023-04-05 4:02 ` Laurent Pinchart
2023-04-10 9:45 ` Geert Uytterhoeven
2023-03-31 15:35 ` [PATCH 0/5] drm: shmobile: Fixes and enhancements Thomas Zimmermann
2023-04-03 13:14 ` Thomas Zimmermann
2023-04-03 13:52 ` Geert Uytterhoeven
2023-04-05 4:03 ` Laurent Pinchart
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=20230405030607.GH9915@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=geert+renesas@glider.be \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).