[PATCH 1/7] drm/hisilicon/hibmc: Fix preferred depth and bpp
Javier Martinez Canillas
javierm at redhat.com
Fri Nov 18 13:31:56 UTC 2022
On 11/18/22 14:18, Thomas Zimmermann wrote:
[...]
>>
>> In the cover letter you said "color depth is the number of color and alpha bits
>> that affect image composition" but it should be "only the number of color bits
>> excluding the alpha bits" a better description right?
>
> I was looking at drm_fourcc.c, where alpha formats, such as ARGB888,
> have alpha included in their depth value. [1] Alpha obviously effects
> image composition.
>
> But meaning of these terms is somewhat fuzzy, as the command-line
> arguments of video= include a BPP value that is more similar to DRM's
> depth value.
>
I see.
> [1]
> https://elixir.bootlin.com/linux/latest/source/drivers/gpu/drm/drm_fourcc.c#L175
>
>>
>> I also wonder if instead of using a 24 magic number, TRUE_COLOR_DEPTH constant
>> macro or XRGB8888_COLOR_DEPTH could be defined?
>
> Please not. What we should do is to replace the preferred depth and bpp
> with a single format constant (as 4cc or drm_format_info) that
> designates a preferred default. From that format constant, the values
> exported to userspace and fbdev emulation should be retrieved automatically.
>
> If anything, I'd add a TODO item to convert the DRM codebase.
>
Right. That makes more sense indeed.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
More information about the dri-devel
mailing list