Re: [PATCH] drm/amdgpu/display: add dc feature mask for psr enablement

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

 



On 2019-10-21 5:45 p.m., Roman.Li@xxxxxxx wrote:
> From: Roman Li <Roman.Li@xxxxxxx>
> 
> [Why]
> Adding psr mask to dc features allows selectively disable/enable psr.
> Current psr implementation may not work with non-pageflipping application.
> Until resolved it should be disabled by default.
> 
> [How]
> Add dcfeaturemask for psr enablement. Disable by default.
> To enable set amdgpu.dcfeaturemask=0x8 in grub kernel command line.
> 
> Signed-off-by: Roman Li <Roman.Li@xxxxxxx>
> ---
>   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
>   drivers/gpu/drm/amd/include/amd_shared.h          | 1 +
>   2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 1cf4beb..0f08879 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2424,7 +2424,8 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
>   		} else if (dc_link_detect(link, DETECT_REASON_BOOT)) {
>   			amdgpu_dm_update_connector_after_detect(aconnector);
>   			register_backlight_device(dm, link);
> -			amdgpu_dm_set_psr_caps(link);
> +			if (amdgpu_dc_feature_mask & DC_PSR_MASK)
> +				amdgpu_dm_set_psr_caps(link);
>   		}
>   
>   
> diff --git a/drivers/gpu/drm/amd/include/amd_shared.h b/drivers/gpu/drm/amd/include/amd_shared.h
> index 8889aac..1daa221 100644
> --- a/drivers/gpu/drm/amd/include/amd_shared.h
> +++ b/drivers/gpu/drm/amd/include/amd_shared.h
> @@ -143,6 +143,7 @@ enum PP_FEATURE_MASK {
>   enum DC_FEATURE_MASK {
>   	DC_FBC_MASK = 0x1,
>   	DC_MULTI_MON_PP_MCLK_SWITCH_MASK = 0x2,
> +	DC_PSR_MASK = 0x8,

Can this just be 0x4 instead? Any reason why we're skipping a flag here 
going from 0x2 to 0x8?

You can still have my:

Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx>

but my preference would be on fixing this up to a 0x4 first in the 
commit message / DC_FEATURE_MASK.

Nicholas Kazlauskas

>   };
>   
>   enum amd_dpm_forced_level;
> 

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
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