mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Anderson <sean.anderson@seco.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Mike Looijmans <mike.looijmans@topic.nl>,
	dri-devel@lists.freedesktop.org
Cc: David Airlie <airlied@gmail.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Michal Simek <michal.simek@amd.com>,
	Simona Vetter <simona@ffwll.ch>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: xlnx: zynqmp_dp: Support DRM_FORMAT_XRGB8888
Date: Thu, 13 Nov 2025 14:53:08 -0500	[thread overview]
Message-ID: <fbd1ce27-8c77-46c8-9a27-633d910215eb@seco.com> (raw)
In-Reply-To: <80ca3ab4-da77-4fb5-94f4-0d1d9acc7fa1@ideasonboard.com>

On 11/5/25 04:51, Tomi Valkeinen wrote:
> Hi,
> 
> On 27/06/2025 17:50, Mike Looijmans wrote:
>> XRGB8888 is the default mode that Xorg will want to use. Add support
>> for this to the Zynqmp DisplayPort driver, so that applications can use
>> 32-bit framebuffers. This solves that the X server would fail to start
>> unless one provided an xorg.conf that sets DefaultDepth to 16.
>> 
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>> ---
>> 
>>  drivers/gpu/drm/xlnx/zynqmp_disp.c | 5 +++++
>>  1 file changed, 5 insertions(+)
>> 
>> diff --git a/drivers/gpu/drm/xlnx/zynqmp_disp.c b/drivers/gpu/drm/xlnx/zynqmp_disp.c
>> index 80d1e499a18d..501428437000 100644
>> --- a/drivers/gpu/drm/xlnx/zynqmp_disp.c
>> +++ b/drivers/gpu/drm/xlnx/zynqmp_disp.c
>> @@ -312,6 +312,11 @@ static const struct zynqmp_disp_format avbuf_gfx_fmts[] = {
>>  		.buf_fmt	= ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_RGBA8888,
>>  		.swap		= true,
>>  		.sf		= scaling_factors_888,
>> +	}, {
>> +		.drm_fmt	= DRM_FORMAT_XRGB8888,
>> +		.buf_fmt	= ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_RGBA8888,
>> +		.swap		= true,
>> +		.sf		= scaling_factors_888,
>>  	}, {
>>  		.drm_fmt	= DRM_FORMAT_RGBA8888,
>>  		.buf_fmt	= ZYNQMP_DISP_AV_BUF_FMT_NL_GFX_ABGR8888,
> 
> I did some testing with this.
> 
> With current upstream, I can't start either weston or X. Weston says
> XRGB8888 not supported, X says modeset failed.

You have to configure X to use 16-bit color. e.g. set DefaultDepth 16 in
your screen section. That will cause X to use RGB565, which is
supported.

--Sean

> But we do have XRGB8888, on the VID plane. VID plane is even set as the
> first plane (perhaps intentionally, to have XRGB8888 on the first
> plane?). However, for VID plane, we set DRM_PLANE_TYPE_OVERLAY and for
> GFX plane we set DRM_PLANE_TYPE_PRIMARY. According to docs, these plane
> type flags are legacy, and are ignored by userspace that supports
> universal planes. So, both Weston and X should work, but don't.
> 
> Out of interest, I tested switching the plane types the other way
> around. This made weston start, but X still doesn't. So apparently
> weston does use those flags, and they're mandatory. I'm a bit surprised
> that X doesn't start. So having the first plane as PRIMARY with XRGB8888
> still wasn't enough for some reason.
> 
> With this patch, both weston and X start.
> 
> According to Anatoliy: "The ZynqMP DP blender ignores per pixel alpha if
> top plane alpha is enabled (which is always the case in the driver). So,
> AR24 is effectively treated as XR24 by the hardware". So should we then
> remove the alpha formats from the driver, as they are effectively not
> supported?
> 
>  Tomi
> 
> 
> 

      reply	other threads:[~2025-11-13 19:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1b153bce-a66a-45ee-a5c6-963ea6fb1c82.949ef384-8293-46b8-903f-40a477c056ae.fb98a918-329e-4536-a0a5-a99b22ba0120@emailsignatures365.codetwo.com>
2025-06-27 14:50 ` Mike Looijmans
2025-06-27 18:19   ` Laurent Pinchart
2025-06-30  8:03     ` Mike Looijmans
2025-06-30  8:21       ` Laurent Pinchart
2025-06-30 14:49         ` Mike Looijmans
2025-07-01  1:03           ` Klymenko, Anatoliy
2025-10-14 20:56             ` Klymenko, Anatoliy
2025-10-14 21:02               ` Klymenko, Anatoliy
2025-06-30  8:27       ` Maxime Ripard
2025-06-30  9:11         ` Laurent Pinchart
2025-06-30  9:29           ` Maxime Ripard
2025-06-30  9:33             ` Laurent Pinchart
2025-06-30 10:52               ` Maxime Ripard
2025-06-30 11:30                 ` Laurent Pinchart
2025-06-30 11:48                   ` Maxime Ripard
2025-06-30 14:47             ` Mike Looijmans
2025-11-04 21:53   ` Sean Anderson
2025-11-11 21:09     ` Sean Anderson
2025-11-12  9:31       ` Tomi Valkeinen
2025-11-13 15:36         ` Sean Anderson
2025-11-05  9:51   ` Tomi Valkeinen
2025-11-13 19:53     ` Sean Anderson [this message]

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=fbd1ce27-8c77-46c8-9a27-633d910215eb@seco.com \
    --to=sean.anderson@seco.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=michal.simek@amd.com \
    --cc=mike.looijmans@topic.nl \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=tzimmermann@suse.de \
    /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®