Re: [PATCH 1/3] drm/mediatek: Refactor pixel format logic

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

 





On 02/02/2023 19:59, Justin Green wrote:
Hi Matthias,

mt8173_formats are the same as the old struct formats. Maybe we should use that
and only overwrite where we actually use a different array.
I think this was sort of how the original patch worked, but we wanted
to add some flexibility to allow different components to support
different formats. In patch 3 of the series, we actually overwrite
this field with mt8195_formats.


Yes, I had a comment on the naming in that patch. Never the less, I think if we don't need to "overwrite" the value, we should use just one struct for the values instead of copying them to the different .c files and give them SoC specific names.


Why can't we use ARRAY_SIZE(formats) here like we did before?
I think ARRAY_SIZE is just a macro for getting the length of
statically allocated arrays. Because we won't know until runtime which
list of pixel formats we will be using, I'm not sure we can use that
in this circumstance?


You are probably right.

Regards,
Matthias



[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