Re: [RESEND PATCH v6 17/20] drm/mediatek: Support MT8188 Padding in display driver

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

 



Il 28/09/23 05:39, Shawn Sung (宋孝謙) ha scritto:
Hi CK,

On Thu, 2023-09-28 at 03:05 +0000, CK Hu (胡俊光) wrote:
Hi, Hsiao-chien:

On Mon, 2023-09-11 at 15:42 +0800, Hsiao Chien Sung wrote:
Padding is a new display module on MT8188, it provides ability
to add pixels to width and height of a layer with specified colors.

Due to hardware design, Mixer in VDOSYS1 requires width of a layer
to be 2-pixel-align, or 4-pixel-align when ETHDR is enabled,
we need Padding to deal with odd width.

Please notice that even if the Padding is in bypass mode,
settings in register must be cleared to 0,
or undefined behaviors could happen.

You just set padding to bypass mode and not clear settings to 0. Any
thing wrong?


Since the deafult value of all the registers in Padding is zero, and
we are not using Padding currently, it's fine if we just set padding to
bypass mode witout clearing other registers.

The comment is just a reminder in case we forget it in the future.

Do *not* rely on default register values, because you don't know what booted
Linux in the first place: you shall *not* expect a clean state and you shall
*not* expect a clean boot.

Besides, what I see is that you're setting GENMASK(1, 0) without explaining
why in the code: you have to add at least the definitions for PADDING_EN and
PADDING_BYPASS.

I also don't see why you shouldn't add at least basic handling for this block,
as it looks easy enough: after all, you anyway have to make sure that the
registers are cleared - might as well just add a little more effort on top
and actually set them to meaningful values? That's ultimately your choice, but
I don't want to see any GENMASK(31,0) write even for register clearing.

Please make this driver proper.

Thanks,
Angelo


Regards,
Hsiao Chien Sung





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux