[Intel-gfx] [v2][PATCH 2/3] drm/i915/display: Extract icl_read_luts()

Sharma, Swati2 swati2.sharma at intel.com
Wed Sep 18 11:30:11 UTC 2019


On 18-Sep-19 3:31 PM, Jani Nikula wrote:
> On Tue, 17 Sep 2019, Swati Sharma <swati2.sharma at intel.com> wrote:
>> For icl+, have hw read out to create hw blob of gamma
>> lut values. icl+ platforms supports multi segmented gamma
>> mode, add hw lut creation for this mode.
>>
>> This will be used to validate gamma programming using dsb
>> (display state buffer) which is a tgl feature.
>>
>> v2: -readout code for multisegmented gamma has to come
>>       up with some intermediate entries that aren't preserved
>>       in hardware (Jani N)
>>      -linear interpolation (Ville)
>>      -moved common code to check gamma_enable to specific funcs,
>>       since icl doesn't support that
>>
>> Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_color.c | 243 ++++++++++++++++++++++++++---
>>   drivers/gpu/drm/i915/i915_reg.h            |   7 +
>>   2 files changed, 230 insertions(+), 20 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
>> index b1f0f7e..0008011 100644
>> --- a/drivers/gpu/drm/i915/display/intel_color.c
>> +++ b/drivers/gpu/drm/i915/display/intel_color.c
>> @@ -1370,6 +1370,9 @@ static int icl_color_check(struct intel_crtc_state *crtc_state)
>>   
>>   static int i9xx_gamma_precision(const struct intel_crtc_state *crtc_state)
>>   {
>> +	if (!crtc_state->gamma_enable)
>> +		return 0;    >> +
> 
> Why are you moving these checks back to the individual functions?
As stated in commit message, moved common code to check gamma_enable to 
specific funcs, since icl doesn't support gamma_enable and code will 
return 0. If i need to make it generic, i need to make gamma_enable true 
in icl_color_check() func. Is it fine? ICL enables gamma through 
gamma_mode unlike other platforms.


-- 
~Swati Sharma


More information about the Intel-gfx mailing list