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 B64A8C433FE for ; Wed, 24 Nov 2021 12:47:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346096AbhKXMu4 (ORCPT ); Wed, 24 Nov 2021 07:50:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:54256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344371AbhKXMsc (ORCPT ); Wed, 24 Nov 2021 07:48:32 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5673461283; Wed, 24 Nov 2021 12:28:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1637756891; bh=zYXwbgEYWgxlYP9C7v/XibW1lWqX/jwOOw5A2yKDD6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=03htBlCsX0gjtkSJ/WHn8Suu2Aoy46RUQI1Wu37eqFPgCyFZycN/uUab98AIb6mSw XRfFYk+O9jsbJNVH2ADj6IUPk2QN4NtttoVxpzb34WTJedxpliYnkdugYVnbcs42Kq sGvsfFoy8V9Dk2Pw+GEPplxuLhE2Wjh85QMfHmNk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, hongao , Alex Deucher Subject: [PATCH 4.14 241/251] drm/amdgpu: fix set scaling mode Full/Full aspect/Center not works on vga and dvi connectors Date: Wed, 24 Nov 2021 12:58:03 +0100 Message-Id: <20211124115718.706518208@linuxfoundation.org> X-Mailer: git-send-email 2.34.0 In-Reply-To: <20211124115710.214900256@linuxfoundation.org> References: <20211124115710.214900256@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 @@ -844,6 +844,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; }