>-----Original Message-----
>From: Ville Syrjälä [mailto:ville.syrj...@linux.intel.com]
>Sent: Monday, April 8, 2019 3:39 PM
>To: Shankar, Uma <uma.shan...@intel.com>
>Cc: intel-gfx@lists.freedesktop.org; dri-de...@lists.freedesktop.org; 
>Lankhorst,
>Maarten <maarten.lankho...@intel.com>; Syrjala, Ville 
><ville.syrj...@intel.com>;
>Sharma, Shashank <shashank.sha...@intel.com>; emil.l.veli...@gmail.com;
>brian.star...@arm.com; dcasta...@chromium.org; seanp...@chromium.org;
>harry.wentl...@amd.com; Roper, Matthew D <matthew.d.ro...@intel.com>
>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ä <ville.syrj...@linux.intel.com>
>>
>> This defines the color lut ranges for 10bit and multi segmented gamma
>> range for ICL.
>>
>> Signed-off-by: Ville Syrjälä <ville.syrj...@linux.intel.com>
>> Signed-off-by: Uma Shankar <uma.shan...@intel.com>
>> ---
>>  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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to