[v2 1/7] drm: Add gamma mode caps property

Shankar, Uma uma.shankar at intel.com
Mon Apr 8 14:45:28 UTC 2019



>-----Original Message-----
>From: dri-devel [mailto:dri-devel-bounces at lists.freedesktop.org] On Behalf Of Sam
>Ravnborg
>Sent: Tuesday, April 2, 2019 12:03 AM
>To: Shankar, Uma <uma.shankar at intel.com>
>Cc: dcastagna at chromium.org; intel-gfx at lists.freedesktop.org;
>emil.l.velikov at gmail.com; dri-devel at lists.freedesktop.org;
>seanpaul at chromium.org; Syrjala, Ville <ville.syrjala at intel.com>; Lankhorst, Maarten
><maarten.lankhorst at intel.com>
>Subject: Re: [v2 1/7] drm: Add gamma mode caps property
>
>Hi Uma.
>
>> diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index
>> 58ad983..cdfda90 100644
>> --- a/include/drm/drm_crtc.h
>> +++ b/include/drm/drm_crtc.h
>> @@ -249,6 +249,13 @@ struct drm_crtc_state {
>>  	struct drm_property_blob *mode_blob;
>>
>>  	/**
>> +	 * @gamma_mode:
>> +	 *
>> +	 * FIXME
>> +	 */
>> +	struct drm_property_blob *gamma_mode_caps;
>
>This looks wrong as "gamma_mode" != "gamma_mode_caps".
>Could you fix it, and also add some documentation to help the next reader.

Hi Sam,
Thanks for the review.

Sure will update the naming and add more documentation once we have the
design agreement on this. Idea is to converge to just one property.

Regards,
Uma Shankar


>
>> +/*
>> + * DRM_MODE_LUT_GAMMA|DRM_MODE_LUT_DEGAMMA is legal and means
>the LUT
>> + * can be used for either purpose, but not simultaneously. To expose
>> + * modes that support gamma and degamma simultaneously the gamma mode
>> + * must declare distinct DRM_MODE_LUT_GAMMA and
>DRM_MODE_LUT_DEGAMMA
>> + * ranges.
>> + */
>> +/* LUT is for gamma (after CTM) */
>> +#define DRM_MODE_LUT_GAMMA (1 << 0)
>> +/* LUT is for degamma (before CTM) */ #define DRM_MODE_LUT_DEGAMMA (1
>> +<< 1)
>> +/* linearly interpolate between the points */ #define
>> +DRM_MODE_LUT_INTERPOLATE (1 << 2)
>
>Use BIT(2), and same for the other bits above and below?

Sure, will update this.

>> +/*
>> + * the last value of the previous range is the
>> + * first value of the current range.
>> + */
>> +#define DRM_MODE_LUT_REUSE_LAST (1 << 3)
>> +/* the curve must be non-decreasing */ #define
>> +DRM_MODE_LUT_NON_DECREASING (1 << 4)
>> +/* the curve is reflected across origin for negative inputs */
>> +#define DRM_MODE_LUT_REFLECT_NEGATIVE (1 << 5)
>> +/* the same curve (red) is used for blue and green channels as well
>> +*/ #define DRM_MODE_LUT_SINGLE_CHANNEL (1 << 6)
>
>	Sam
>
>_______________________________________________
>dri-devel mailing list
>dri-devel at lists.freedesktop.org
>https://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list