From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D510BC35641 for ; Fri, 21 Feb 2020 08:03:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A98B620801 for ; Fri, 21 Feb 2020 08:03:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272232; bh=kXOCbXtX884i/0EwkkynxVIHBuW1afWpJr5gJ0/prvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=aRQjnbtdY+sD0ORY1o2qVenM597c6HkAFWUkCNj8bnDPl8xDNk8lErMBURagudGub PegAoBvDiE4LWqgkWKs9M92lbSA0TToHRwAtpJ5qWQe+t9MXAq+KCWgf6GTWckWXhQ AjEnWauQ6jLMg+MWWnWDRvmHFKHhbmeAlgMrSg30= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731377AbgBUIDv (ORCPT ); Fri, 21 Feb 2020 03:03:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:36644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728953AbgBUIDs (ORCPT ); Fri, 21 Feb 2020 03:03:48 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7DD2020801; Fri, 21 Feb 2020 08:03:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582272228; bh=kXOCbXtX884i/0EwkkynxVIHBuW1afWpJr5gJ0/prvE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dgiNcBd22RpmWRI1x9iYSCdwM6LwcMaAsXqIYn1r2pS09lVKfAY3mD1HVUVV7b4CI nN6Ypk5L6CZsvtgNYmkRoeFOGqxELQdu9sNwUL2q0uUCLxZxIBza0S+v9vdOV5HbeO Tag59/9xOv78ns1Q1dgnG2KBbqdS7A4AY6pgS1Sc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Amanda Liu , Anthony Koo , Harry Wentland , Rodrigo Siqueira , Alex Deucher , Sasha Levin Subject: [PATCH 5.4 062/344] drm/amd/display: Clear state after exiting fixed active VRR state Date: Fri, 21 Feb 2020 08:37:41 +0100 Message-Id: <20200221072354.663221434@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200221072349.335551332@linuxfoundation.org> References: <20200221072349.335551332@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Amanda Liu [ Upstream commit 6f8f76444baf405bacb0591d97549a71a9aaa1ac ] [why] Upon exiting a fixed active VRR state, the state isn't cleared. This leads to the variable VRR range to be calculated incorrectly. [how] Set fixed active state to false when updating vrr params Signed-off-by: Amanda Liu Reviewed-by: Anthony Koo Acked-by: Harry Wentland Acked-by: Rodrigo Siqueira Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/display/modules/freesync/freesync.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c index 0978c698f0f85..7d67cb2c61f04 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/freesync.c +++ b/drivers/gpu/drm/amd/display/modules/freesync/freesync.c @@ -803,6 +803,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, 2 * in_out_vrr->min_refresh_in_uhz) in_out_vrr->btr.btr_enabled = false; + in_out_vrr->fixed.fixed_active = false; in_out_vrr->btr.btr_active = false; in_out_vrr->btr.inserted_duration_in_us = 0; in_out_vrr->btr.frames_to_insert = 0; @@ -822,6 +823,7 @@ void mod_freesync_build_vrr_params(struct mod_freesync *mod_freesync, in_out_vrr->adjust.v_total_max = stream->timing.v_total; } else if (in_out_vrr->state == VRR_STATE_ACTIVE_VARIABLE && refresh_range >= MIN_REFRESH_RANGE_IN_US) { + in_out_vrr->adjust.v_total_min = calc_v_total_from_refresh(stream, in_out_vrr->max_refresh_in_uhz); -- 2.20.1