>-----Original Message-----
>From: Ville Syrjälä [mailto:[email protected]]
>Sent: Monday, April 8, 2019 3:39 PM
>To: Shankar, Uma <[email protected]>
>Cc: [email protected]; [email protected]; 
>Lankhorst,
>Maarten <[email protected]>; Syrjala, Ville 
><[email protected]>;
>Sharma, Shashank <[email protected]>; [email protected];
>[email protected]; [email protected]; [email protected];
>[email protected]; Roper, Matthew D <[email protected]>
>Subject: Re: [v2 2/7] drm/i915: Define color lut range structure
>
>On Mon, Apr 01, 2019 at 11:00:06PM +0530, Uma Shankar wrote:
>> From: Ville Syrjälä <[email protected]>
>>
>> This defines the color lut ranges for 10bit and multi segmented gamma
>> range for ICL.
>>
>> Signed-off-by: Ville Syrjälä <[email protected]>
>> Signed-off-by: Uma Shankar <[email protected]>
>> ---
>>  drivers/gpu/drm/i915/intel_color.c | 301
>> ++++++++++++++++++++++++++++++++++++-
>>  1 file changed, 297 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_color.c
>> b/drivers/gpu/drm/i915/intel_color.c
>> index f2907cf..84d93ec 100644
>> --- a/drivers/gpu/drm/i915/intel_color.c
>> +++ b/drivers/gpu/drm/i915/intel_color.c
>> @@ -1083,9 +1083,279 @@ static int icl_color_check(struct intel_crtc_state
>*crtc_state)
>>      return 0;
>>  }
>>
>> +enum {
>> +    I9XX_LUT_SIZE_8BIT = 256,
>> +    I9XX_LUT_SIZE_10BIT = 129,
>> +
>> +    ILK_LUT_SIZE_10BIT = 1024,
>> +    ILK_LUT_SIZE_12BIT = 513,
>> +
>> +    IVB_LUT_SIZE_SPLIT = 512,
>> +
>> +    CHV_LUT_SIZE_CGM_DEGAMMA = 65,
>> +    CHV_LUT_SIZE_CGM_GAMMA = 257,
>> +};
>> +
>> +#define I9XX_GAMMA_8 \
>> +    { \
>> +            .flags = DRM_MODE_LUT_GAMMA, \
>> +            .count = 256, \
>> +            .input_bpc = 8, .output_bpc = 8, \
>> +            .start = 0, .end = (1 << 8) - 1, \
>> +            .min = 0, .max = (1 << 8) - 1, \
>> +    }
>> +
>> +static const struct drm_color_lut_range i9xx_gamma_8[] = {
>> +    I9XX_GAMMA_8,
>> +};
>> +
>> +static const struct drm_color_lut_range i9xx_gamma_10_slope[] = {
>> +    {
>> +            .flags = (DRM_MODE_LUT_GAMMA |
>> +                      DRM_MODE_LUT_INTERPOLATE |
>> +                      DRM_MODE_LUT_NON_DECREASING),
>> +            .count = 129,
>> +            .input_bpc = 10, .output_bpc = 10,
>> +            .start = 0, .end = 1 << 10,
>> +            .min = 0, .max = (1 << 10) - 1,
>> +    },
>> +};
>
>Step 1 should probably be to advertise these for the gamma modes we currently 
>have,
>on every platform.

Ok, focussed here mainly on multi-segmented gamma. But will add all the gamma 
modes
supported on various platforms.

>--
>Ville Syrjälä
>Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to