On 19/02/18 22:19, Ville Syrjälä wrote:
>>> +int drm_plane_create_color_properties(struct drm_plane *plane,
>>> +                                 u32 supported_encodings,
>>> +                                 u32 supported_ranges,
>> Is 0 in the above two supported_ masks a valid value? If yes, should we
>> still register the prop in that case? If no, please add a WARN_ON early
>> exit case to catch this.
> I guess if we go for that we should also check that the supported
> bitmasks don't contain undefined enum values, and that the default
> enum values are included in the bitmasks.

Agreed. I wonder if there should still be check in
drm_property_create_enum() for empty enum list. I can not imagine any
good reason for having an enum property without valid options. It is
almost a contradiction in terms.

> Jyri said he's not looked at this in a while, so I'll just go ahead
> and respin this myself.

Thanks, please do.

>> Similar, if there's only 1 possible value I guess we should make the prop
>> immutable?
> I wonder if we should put that logic into
> drm_property_create_enum() & co. actually?

Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Intel-gfx mailing list

Reply via email to