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

Kazlauskas, Nicholas nicholas.kazlauskas at amd.com
Tue Dec 7 19:26:19 UTC 2021


On 2021-12-07 1:55 p.m., Fangzhi Zuo wrote:
> It is w/a to check DP2 SST behavior on M42d box.

Isn't this useful beyond just the m42d/dp2?

This should affect regular DP MST support I think. Adding this debug 
flag is okay I think, but I think the names should be updated (inline).

> 
> Signed-off-by: Fangzhi Zuo <Jerry.Zuo at amd.com>
> ---
>   .../amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 27 +++++++++++++++++++
>   1 file changed, 27 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..9590c0acba1f 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");
>   
> +/*
> + * w/a to force in SST mode for M42D DP2 receiver.
> + * Example usage: echo 1 > /sys/kernel/debug/dri/0/amdgpu_dm_dp2_force_sst
> + */
> +static int dp2_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 dp2_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(dp2_force_sst_ops, dp2_force_sst_get,
> +			 dp2_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
> @@ -3371,4 +3395,7 @@ void dtn_debugfs_init(struct amdgpu_device *adev)
>   	debugfs_create_file_unsafe("amdgpu_dm_disable_hpd", 0644, root, adev,
>   				   &disable_hpd_ops);
>   
> +	debugfs_create_file_unsafe("amdgpu_dm_dp2_force_sst", 0644, root, adev,
> +					&dp2_force_sst_ops);

"amdgpu_dm_dp_set_mst_en_for_sst"

...might be a better name.

Regards,
Nicholas Kazlauskas

> +
>   }
> 



More information about the amd-gfx mailing list