Re: [PATCH] drm/amd/display: Only allow VRR when vrefresh is within supported range

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

 



On Thu, Mar 21, 2019 at 11:53 AM Nicholas Kazlauskas
<nicholas.kazlauskas@xxxxxxx> wrote:
>
> [Why]
> Black screens or artifacting can occur when enabling FreeSync outside
> of the supported range of the monitor. This can happen since the
> supported range isn't always the min/max vrefresh range available for
> the monitor.
>
> [How]
> There was previously a fix that prevented this from happening in the
> low range but it didn't cover the upper range. Expand the condition
> to include both.
>
> Cc: Sun peng Li <Sunpeng.Li@xxxxxxx>
> Cc: Harry Wentland <Harry.Wentland@xxxxxxx>
> Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@xxxxxxx>

Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>

> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++-
>  1 file 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 01a46119512b..5b7a85e28fab 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -5551,9 +5551,11 @@ static void get_freesync_config_for_crtc(
>         struct amdgpu_dm_connector *aconnector =
>                         to_amdgpu_dm_connector(new_con_state->base.connector);
>         struct drm_display_mode *mode = &new_crtc_state->base.mode;
> +       int vrefresh = drm_mode_vrefresh(mode);
>
>         new_crtc_state->vrr_supported = new_con_state->freesync_capable &&
> -               aconnector->min_vfreq <= drm_mode_vrefresh(mode);
> +                                       vrefresh >= aconnector->min_vfreq &&
> +                                       vrefresh <= aconnector->max_vfreq;
>
>         if (new_crtc_state->vrr_supported) {
>                 new_crtc_state->stream->ignore_msa_timing_param = true;
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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