Re: [PATCH] drm/tilcdc: Set preferred depth

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



March 17, 2024 at 9:18 PM, "Frej Drejhammar" <frej.drejhammar@xxxxxxxxx mailto:frej.drejhammar@xxxxxxxxx?to=%22Frej%20Drejhammar%22%20%3Cfrej.drejhammar%40gmail.com%3E > wrote:
> 
> Hi Kevin,
> 
> Kevin Hao <haokexin@xxxxxxxxx> writes:
> 
> > 
> > But after kernel commit c91acda3a380, the FB will not be created
> > successfully due to the check of the valid pixel format. Then the bpp
> > is set to 24, but the 'depth = 16' and 'bpp = 24' combo is not a valid
> > pixel format.
> > 
> > Fix this issue by explicitly setting the preferred_depth in this driver.
> > With this change, the modesetting driver would choose the correct
> > depth/bpp combo based on our setting in xorg.conf.
> > 
> 
> Check the fix in [1], with it not only does the X-server work with a
> color depth of 16 bits, it also enables the use of a 24 bit color depth.
> 
> As I'm the author of the solution in [1] I'm partial to it as it is a
> more general solution to the regression. I have no standing in this
> community as [1] is my first contribution to the DRM system, but if I
> had, I would NAK this patch as it only fixes the regression for one
> driver and does not enable the use of a 24 bit color depth which is
> something the hardware is capable of.
> 
> Best regards,
> 

So the trouble here is the 16bpp and 24/32bpp color wiring being crossed, right? I'd just like to remind that there is another option to overcome the issue by editing device tree files. The current configuration from some 8 years back supports RG16, BG24, and XB24 formats, but on Beaglebone-Black its possible - thanks to tda998x - change the support to BG16, RG24, and XR24, by changing these lines before building a new dtb-file:

Change value of blue-and-red-wiring to "crossed" here:
https://github.com/torvalds/linux/blob/b3603fcb79b1036acae10602bffc4855a4b9af80/arch/arm/boot/dts/ti/omap/am335x-boneblack-hdmi.dtsi#L61

and comment this this line:
https://github.com/torvalds/linux/blob/b3603fcb79b1036acae10602bffc4855a4b9af80/arch/arm/boot/dts/ti/omap/am335x-boneblack-hdmi.dtsi#L82

There is also the option of removing the blue-and-red-wiring property all together if one does not really mind about the colors. In this case the driver reports the formats RG16, RG24, and XR24 being supported, despite the colors being wrong in either 16-bit or 24-bit color modes.

Please let me know If Frej's patch does not make it (I am not in CC and I do not have the bandwidth to follow dri-devel), and I will merge Kevin's patch through drm-misc-next.

Best regards,
Jyri

> --Frej
> 
> [1] https://lore.kernel.org/all/e7ef6d422365986f49746b596735f7a0b939574d.1710698387.git.frej.drejhammar@xxxxxxxxx/
>




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux