[RFC PATCH 03/20] drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp

Maxime Ripard maxime.ripard at bootlin.com
Thu Mar 21 10:13:35 UTC 2019


On Wed, Mar 20, 2019 at 03:24:26PM +0100, Paul Kocialkowski wrote:
> Hi,
>
> Le mardi 19 mars 2019 à 22:57 +0100, Maxime Ripard a écrit :
> > So far, the drm_format_plane_cpp function was operating on the format's
> > fourcc and was doing a lookup to retrieve the drm_format_info structure and
> > return the cpp.
> >
> > However, this is inefficient since in most cases, we will have the
> > drm_format_info pointer already available so we shouldn't have to perform a
> > new lookup. Some drm_fourcc functions also already operate on the
> > drm_format_info pointer for that reason, so the API is quite inconsistent
> > there.
>
> Well, it seems that drm_fourcc functions that take a drm_format_info
> have a drm_format_info prefix, so having this would be more consistent.
>
> And given what the helper does, I think it would make good sense to
> switch it over to an inline drm_format_info_plane_cpp helper.
>
> What do you think?

That makes total sense, I'll change it. Thanks!
Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20190321/4ba64d5d/attachment.sig>


More information about the dri-devel mailing list