Re: [PATCH] drm/amd/display: Get min/max vfreq from display_info

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

 



On Tue, Mar 12, 2024 at 9:57 AM Harry Wentland <harry.wentland@xxxxxxx> wrote:
>
> We need the min/max vfreq on the amdgpu_dm_connector in order to
> program VRR.
>
> Fixes: db3e4f1cbb84 ("drm/amd/display: Use freesync when `DRM_EDID_FEATURE_CONTINUOUS_FREQ` found")
> Signed-off-by: Harry Wentland <harry.wentland@xxxxxxx>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> 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 b1ca0aee0b30..cffb2655177c 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -11278,12 +11278,15 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
>
>                 if (is_dp_capable_without_timing_msa(adev->dm.dc,
>                                                      amdgpu_dm_connector)) {
> -                       if (edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ)
> +                       if (edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ) {
>                                 freesync_capable = true;
> -                       else
> +                               amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq;
> +                               amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq;

Does this need special handling for DRM_EDID_RANGE_OFFSET_MIN_VFREQ
and DRM_EDID_RANGE_OFFSET_MAX_VFREQ as well (similar to the code below
it)?

Alex

> +                       } else {
>                                 edid_check_required = edid->version > 1 ||
>                                                       (edid->version == 1 &&
>                                                        edid->revision > 1);
> +                       }
>                 }
>
>                 if (edid_check_required) {
> --
> 2.44.0
>




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

  Powered by Linux