[PATCH v6 2/3] drm: Add support for the LogiCVC display controller

Paul Kocialkowski paul.kocialkowski at bootlin.com
Thu May 7 20:11:03 UTC 2020


Hi Emil,

Thanks for the review!

On Mon 04 May 20, 14:28, Emil Velikov wrote:
> Just had a casual quick look for custom KMS properties, since new
> drivers made that mistake in the past.
> Thanks for not including any o/

Yeah I made sure not to include any, I know it easily gets very problematic and
creates disparity between drivers while needing to be kept alive even when a
standard way arises due to the no API breakage policy.

The not-for-merge patch that I've sent does introduce some for the colorkey,
and that's why they are marked as such :)

> I made a couple of trivial suggestions - if you agree, feel free to
> keep them as follow-up patches.
> 
> On Thu, 30 Apr 2020 at 20:28, Paul Kocialkowski
> <paul.kocialkowski at bootlin.com> wrote:
> 
> > +int logicvc_of_property_parse_u32(struct device_node *of_node,
> > +                                 const char *name, u32 *target)
> > +{
> > +       struct logicvc_of_property *property;
> > +       const char *string;
> > +       u32 value;
> > +       int ret;
> > +
> > +       property = logicvc_of_property_lookup(name);
> > +       if (!property)
> > +               return -EINVAL;
> > +
> One could have the logicvc_of_properties[] entries indexed with the
> logicvc_of_property_parse_{u32,bool} caller, using that instead of the
> name string.

Do I understand correctly that you're suggesting passing each entry's
struct logicvc_of_property pointer to the function?

I went for strings to make the code explicit and easy to read so I'd really
like to keep it that way and avoid passing things like
&logicvc_of_properties[4] or an index integer.

> Aside: I suspect the array (as most other arrays in this patch) should
> be annotated const, correct?

Ah yes that's a good point, thanks!

> 
> > +       if (property->range[0] || property->range[1])
> > +               if (value < property->range[0] || value > property->range[1])
> Combine the two ifs?

Definitely :)

Cheers,

Paul

-- 
Paul Kocialkowski, 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: 488 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200507/f78d38ff/attachment-0001.sig>


More information about the dri-devel mailing list