virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Javier Martinez Canillas <javierm@redhat.com>,
	daniel@ffwll.ch, airlied@gmail.com, mripard@kernel.org,
	maarten.lankhorst@linux.intel.com, xinliang.liu@linaro.org,
	tiantao6@hisilicon.com, jstultz@google.com,
	kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com,
	paul.kocialkowski@bootlin.com, airlied@redhat.com,
	kraxel@redhat.com
Cc: dri-devel@lists.freedesktop.org,
	virtualization@lists.linux-foundation.org
Subject: Re: [PATCH 2/7] drm/logicvc: Fix preferred fbdev cpp
Date: Fri, 18 Nov 2022 14:48:17 +0100	[thread overview]
Message-ID: <2d2bf68d-6a6a-d00c-a277-4ebc492e8fae@suse.de> (raw)
In-Reply-To: <5893d46d-ca8a-81e4-2884-aa682ef69872@redhat.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 1495 bytes --]

Hi

Am 18.11.22 um 14:41 schrieb Javier Martinez Canillas:
> On 11/18/22 14:22, Thomas Zimmermann wrote:
> 
> [...]
> 
>>>
>>> I'm also not sure if this is needed. Since IIUC in logicvc_mode_init() the
>>> driver does:
>>>
>>> 	preferred_depth = layer_primary->formats->depth;
>>>
>>> 	/* DRM counts alpha in depth, our driver doesn't. */
>>> 	if (layer_primary->formats->alpha)
>>> 		preferred_depth += 8;
>>>
>>> 	...
>>> 	mode_config->preferred_depth = preferred_depth;
>>>
>>> So it seems this patch is not needed? Unless I'm misunderstanding the code.
>>
>> The driver uses XRGB8888, so the 24-bit color depth has a 32-bit bpp
>> value. Hence the switch.
>>
> 
> Ah, I see. So is to set 32-bit bpp for both XRGB8888 and ARGB8888. But then
> I think that you also need to fix logicvc_mode_init() to remove that += 8?
> 
> Because right now the preferred_depth += 8 would set a preferred_depth of 32
> when should be just 24 even if alpha is enabled?
> 
> Or am I confusing again the meaning of the color depth?

For DRM, it's defined in drm_fourcc.c. ARGB8888 has a depth of 32 and 
XRGB8888 has a depth of 24. Both have a bpp of 32.

BUT in logicvc's internal data structure, both formats have a color 
depth of 24 and a bpp of 32.

Best regards
Thomas

> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

[-- Attachment #2: Type: text/plain, Size: 183 bytes --]

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

  parent reply	other threads:[~2022-11-18 13:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-16 16:09 [PATCH 0/7] drm: Fix the color-depth/bpp confusion Thomas Zimmermann
2022-11-16 16:09 ` [PATCH 1/7] drm/hisilicon/hibmc: Fix preferred depth and bpp Thomas Zimmermann
     [not found]   ` <b0421c22-2893-d76a-4cd8-07f5fdb9add1@redhat.com>
2022-11-18 13:18     ` Thomas Zimmermann
2022-11-16 16:09 ` [PATCH 2/7] drm/logicvc: Fix preferred fbdev cpp Thomas Zimmermann
     [not found]   ` <521e43bb-0c76-f3b7-aa78-8ed97edce613@redhat.com>
2022-11-18 13:22     ` Thomas Zimmermann
     [not found]       ` <5893d46d-ca8a-81e4-2884-aa682ef69872@redhat.com>
2022-11-18 13:48         ` Thomas Zimmermann [this message]
2022-11-16 16:09 ` [PATCH 3/7] drm/cirrus: Decouple fbdev bpp value from color depth Thomas Zimmermann
2022-11-16 16:09 ` [PATCH 4/7] drm/ofdrm: Set preferred depth from format of scanout buffer Thomas Zimmermann
2022-11-16 16:09 ` [PATCH 5/7] drm/simpledrm: " Thomas Zimmermann
2022-11-16 16:09 ` [PATCH 6/7] drm/solomon: Set preferred color depth and bpp to the correct values Thomas Zimmermann
2022-11-16 16:09 ` [PATCH 7/7] drm/fb-helper: Don't use the preferred depth for the BPP default Thomas Zimmermann
2022-11-22 14:43   ` Daniel Vetter

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=2d2bf68d-6a6a-d00c-a277-4ebc492e8fae@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=jstultz@google.com \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=kraxel@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=puck.chen@hisilicon.com \
    --cc=tiantao6@hisilicon.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=xinliang.liu@linaro.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).