[PATCH v2] drm/amd/display: Add Debugfs Entry to Force in SST Sequence

Aurabindo Pillai aurabindo.pillai at amd.com
Tue Dec 7 20:37:34 UTC 2021


Reviewed-by: Aurabindo Pillai <aurabindo.pillai at amd.com>

On 12/7/21 2:57 PM, Fangzhi Zuo wrote:
> It is to force SST sequence in MST capable receiver.
> 
> Signed-off-by: Fangzhi Zuo <Jerry.Zuo at amd.com>
> ---
>   .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 26 +++++++++++++++++++
>   1 file changed, 26 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> index 31c05eb5c64a..1779c7daaf72 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
> @@ -3237,6 +3237,30 @@ static int disable_hpd_get(void *data, u64 *val)
>   DEFINE_DEBUGFS_ATTRIBUTE(disable_hpd_ops, disable_hpd_get,
>   			 disable_hpd_set, "%llu\n");
>   
> +/*
> + * Force sst sequence in mst capable receiver.
> + * Example usage: echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_dp_set_mst_en_for_sst
> + */
> +static int dp_force_sst_set(void *data, u64 val)
> +{
> +	struct amdgpu_device *adev = data;
> +
> +	adev->dm.dc->debug.set_mst_en_for_sst = val;
> +
> +	return 0;
> +}
> +
> +static int dp_force_sst_get(void *data, u64 *val)
> +{
> +	struct amdgpu_device *adev = data;
> +
> +	*val = adev->dm.dc->debug.set_mst_en_for_sst;
> +
> +	return 0;
> +}
> +DEFINE_DEBUGFS_ATTRIBUTE(dp_set_mst_en_for_sst_ops, dp_force_sst_get,
> +			 dp_force_sst_set, "%llu\n");
> +
>   /*
>    * Sets the DC visual confirm debug option from the given string.
>    * Example usage: echo 1 > /sys/kernel/debug/dri/0/amdgpu_visual_confirm
> @@ -3346,6 +3370,8 @@ void dtn_debugfs_init(struct amdgpu_device *adev)
>   			    adev, &mst_topo_fops);
>   	debugfs_create_file("amdgpu_dm_dtn_log", 0644, root, adev,
>   			    &dtn_log_fops);
> +	debugfs_create_file("amdgpu_dm_dp_set_mst_en_for_sst", 0644, root, adev,
> +				&dp_set_mst_en_for_sst_ops);
>   
>   	debugfs_create_file_unsafe("amdgpu_dm_visual_confirm", 0644, root, adev,
>   				   &visual_confirm_fops);
> 


More information about the amd-gfx mailing list