Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50684C433EF for ; Wed, 24 Nov 2021 13:43:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348727AbhKXNqu (ORCPT ); Wed, 24 Nov 2021 08:46:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:33126 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353407AbhKXNmJ (ORCPT ); Wed, 24 Nov 2021 08:42:09 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DA4A7632A4; Wed, 24 Nov 2021 12:58:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637758700; bh=C9JyTFEP2I1MunIKWhszB52d9voWWeZuEe5OJS9CxuU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vd+WRA+ivlZkUN8ZfEnJpWEpjg6magvOyJOPn38hL/F3wYyiyLAkaaqetWSInLG+M A/t/U3WB1CYAKlE3op3BJfvNDvOFkIgYXyUii5VBu647q/eGJwQYe/XhL3M8vdx3AQ Xqm0Scaq0cwVz6vdMLlIE/bGgzoL5FThV0McdS5M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, hongao , Alex Deucher Subject: [PATCH 5.10 143/154] drm/amdgpu: fix set scaling mode Full/Full aspect/Center not works on vga and dvi connectors Date: Wed, 24 Nov 2021 12:58:59 +0100 Message-Id: <20211124115707.113567376@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115702.361983534@linuxfoundation.org> References: <20211124115702.361983534@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: hongao commit bf552083916a7f8800477b5986940d1c9a31b953 upstream. amdgpu_connector_vga_get_modes missed function amdgpu_get_native_mode which assign amdgpu_encoder->native_mode with *preferred_mode result in amdgpu_encoder->native_mode.clock always be 0. That will cause amdgpu_connector_set_property returned early on: if ((rmx_type != DRM_MODE_SCALE_NONE) && (amdgpu_encoder->native_mode.clock == 0)) when we try to set scaling mode Full/Full aspect/Center. Add the missing function to amdgpu_connector_vga_get_mode can fix this. It also works on dvi connectors because amdgpu_connector_dvi_helper_funcs.get_mode use the same method. Signed-off-by: hongao Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c @@ -827,6 +827,7 @@ static int amdgpu_connector_vga_get_mode amdgpu_connector_get_edid(connector); ret = amdgpu_connector_ddc_get_modes(connector); + amdgpu_get_native_mode(connector); return ret; }