[PATCH 6/6] drm/amd/display: Tidy up mem_input_program_surface_flip_and_addr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2017-05-23 11:17 AM, Deucher, Alexander wrote:
>> -----Original Message-----
>> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
>> Of Tom St Denis
>> Sent: Tuesday, May 16, 2017 10:22 AM
>> To: amd-gfx at lists.freedesktop.org
>> Cc: StDenis, Tom
>> Subject: [PATCH 6/6] drm/amd/display: Tidy up
>> mem_input_program_surface_flip_and_addr()
>>
>> Signed-off-by: Tom St Denis <tom.stdenis at amd.com>
> 
> Patches are Acked-by: Alex Deucher <alexander.deucher at amd.com>
> 
> If Harry is ok with them, please coordinate to pull them through the dal tree.
> 

Thanks, Alex.

Already part of the internal dal tree and on the way for amd-staging-4.9 
as part of today's set of DC patches.

Harry


> Alex
> 
>> ---
>>   .../drm/amd/display/dc/dce120/dce120_mem_input.c   | 27 ++++++++-------
>> -------
>>   1 file changed, 9 insertions(+), 18 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/dc/dce120/dce120_mem_input.c
>> b/drivers/gpu/drm/amd/display/dc/dce120/dce120_mem_input.c
>> index c0677211bd93..5a7edfd8fbf7 100644
>> --- a/drivers/gpu/drm/amd/display/dc/dce120/dce120_mem_input.c
>> +++ b/drivers/gpu/drm/amd/display/dc/dce120/dce120_mem_input.c
>> @@ -195,20 +195,12 @@ static bool
>> mem_input_program_surface_flip_and_addr(
>>   	 * non-XDMA Mode: GRPH_SURFACE_UPDATE_IMMEDIATE_EN = 1
>>   	 * XDMA Mode: GRPH_SURFACE_UPDATE_H_RETRACE_EN = 1
>>   	 */
>> -	DCP_REG_UPDATE(DCP0_GRPH_UPDATE,
>> -			GRPH_UPDATE_LOCK, 1);
>> -
>> -	if (flip_immediate) {
>> -		DCP_REG_UPDATE_2(
>> -			DCP0_GRPH_FLIP_CONTROL,
>> -			GRPH_SURFACE_UPDATE_IMMEDIATE_EN, 0,
>> -			GRPH_SURFACE_UPDATE_H_RETRACE_EN, 1);
>> -	} else {
>> -		DCP_REG_UPDATE_2(
>> -			DCP0_GRPH_FLIP_CONTROL,
>> -			GRPH_SURFACE_UPDATE_IMMEDIATE_EN, 0,
>> -			GRPH_SURFACE_UPDATE_H_RETRACE_EN, 0);
>> -	}
>> +	DCP_REG_UPDATE(DCP0_GRPH_UPDATE, GRPH_UPDATE_LOCK, 1);
>> +
>> +	DCP_REG_UPDATE_2(
>> +		DCP0_GRPH_FLIP_CONTROL,
>> +		GRPH_SURFACE_UPDATE_IMMEDIATE_EN, 0,
>> +		GRPH_SURFACE_UPDATE_H_RETRACE_EN, flip_immediate ?
>> 1 : 0);
>>
>>   	switch (address->type) {
>>   	case PLN_ADDR_TYPE_GRAPHICS:
>> @@ -217,8 +209,8 @@ static bool
>> mem_input_program_surface_flip_and_addr(
>>   		program_pri_addr(mem_input110, address->grph.addr);
>>   		break;
>>   	case PLN_ADDR_TYPE_GRPH_STEREO:
>> -		if (address->grph_stereo.left_addr.quad_part == 0
>> -			|| address->grph_stereo.right_addr.quad_part == 0)
>> +		if (address->grph_stereo.left_addr.quad_part == 0 ||
>> +		    address->grph_stereo.right_addr.quad_part == 0)
>>   			break;
>>   		program_pri_addr(mem_input110, address-
>>> grph_stereo.left_addr);
>>   		program_sec_addr(mem_input110, address-
>>> grph_stereo.right_addr);
>> @@ -234,8 +226,7 @@ static bool
>> mem_input_program_surface_flip_and_addr(
>>   	if (flip_immediate)
>>   		mem_input->current_address = *address;
>>
>> -	DCP_REG_UPDATE(DCP0_GRPH_UPDATE,
>> -			GRPH_UPDATE_LOCK, 0);
>> +	DCP_REG_UPDATE(DCP0_GRPH_UPDATE, GRPH_UPDATE_LOCK, 0);
>>
>>   	return true;
>>   }
>> --
>> 2.12.0
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> 


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux