Re: [RFC PATCH 03/20] drm/fourcc: Pass the format_info pointer to drm_format_plane_cpp
From: Maxime Ripard
Date: Thu Mar 21 2019 - 06:13:42 EST
On Wed, Mar 20, 2019 at 03:24:26PM +0100, Paul Kocialkowski wrote:
> 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 Ripard, Bootlin
Embedded Linux and Kernel engineering
Description: PGP signature