Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp277919pxp; Wed, 16 Mar 2022 05:48:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzdv7mshwfQyiPZmeyCI9ur9xiYkLo6GlobJmJ3zYQlmJgvFIIJmT9hVIudiHkNu86e6sf X-Received: by 2002:a17:906:a1a:b0:6cf:d2d9:410c with SMTP id w26-20020a1709060a1a00b006cfd2d9410cmr27396373ejf.713.1647434932047; Wed, 16 Mar 2022 05:48:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647434932; cv=none; d=google.com; s=arc-20160816; b=hTvKrffNc2I0GMIWnDTnIPExT8viKToC8flthcxB4COegKXDs+FcManhmPXW+sHV9R +zj6WyfYPNMNRvOEJKmNuSI8iF0+18Sr0yn9r6my52KbS2IEgRQRBxcv1nJNux9aW0yu bxbj6QckG4Qx1XBtwRSBRqVIWAZzZcgC1JlMkUQ4h9bGKGsIJOMygxtkD0a1VfmsJbpk lExZOGy13qwtD9Wb3tBPfJYNLVcej+dMyWXHIvXYyBBWTKby60IG9yuleFUyjoWsa+Uq i7npyPn+Kgdi6ayiqQ9wxJ86HvIZTtV6pTqKTKiuO313MRpXUemEItJI5e5aU9W46pqG 604A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jkz31zPUXYAKlGN5ybx4qojoHaAevqAqMOATnM2qSBI=; b=YqQbc17JcTUUacbUAUWm04XwyTXb+brspwe1ec/2O5+uaVhd97XfDU3e5EqVdBCs9c pDREeUfPygX4R0nOfcpM5hOIL5ESLZaxCFgsmUNN7EL5JXKoQCEWmCt/3Ng20uFG6tGn 4A20NxE2jHnnbWDCA1ij57S9HKBAG88toO5nBH66Q4vX2BSJCFVI4X/8ugfU8QsvZu1k Erg/U/hYeMVYRlFI1/VsWkDlwkpOfo1X+L3yv/F0qKXv51HD4tzoFu2Wo29h3yaA3T6M aKAiff71DHFBg9WpN6CDRWC4x8C1Mm5nstjeQZVWcTiZEWE1LCGDaNJ3xpCS+zaZoIIo S0Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m4MTyS0E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h7-20020a170906854700b006d20ad132acsi1003911ejy.11.2022.03.16.05.48.24; Wed, 16 Mar 2022 05:48:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=m4MTyS0E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241975AbiCNM2d (ORCPT + 99 others); Mon, 14 Mar 2022 08:28:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243530AbiCNMUz (ORCPT ); Mon, 14 Mar 2022 08:20:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F5E354698; Mon, 14 Mar 2022 05:16:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B05D4B80D24; Mon, 14 Mar 2022 12:16:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5CF3C340EC; Mon, 14 Mar 2022 12:16:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647260172; bh=q8RsPXMoCCqmPZ40Vrs5tp3m4huDF+NIsBimtd/u2C0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m4MTyS0EoCWEcqMgCrMyjeanQxcbEaWVfxArECbuTSRc26mm9BQh7UNTzaFLaWo/K BQSMINvckl+WJ8qMNvkdd72y49sRI2svS34+8YUjpt/qLRcyTS5zAq2s1K1K4izI48 +dzhoXB7hjp7XTTWuRu2f171D7e327jYXeZv7E84= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leslie Shi , Guchun Chen , Alex Deucher , Sasha Levin Subject: [PATCH 5.16 077/121] drm/amdgpu: bypass tiling flag check in virtual display case (v2) Date: Mon, 14 Mar 2022 12:54:20 +0100 Message-Id: <20220314112746.270164115@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112744.120491875@linuxfoundation.org> References: <20220314112744.120491875@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guchun Chen [ Upstream commit e2b993302f40c4eb714ecf896dd9e1c5be7d4cd7 ] vkms leverages common amdgpu framebuffer creation, and also as it does not support FB modifier, there is no need to check tiling flags when initing framebuffer when virtual display is enabled. This can fix below calltrace: amdgpu 0000:00:08.0: GFX9+ requires FB check based on format modifier WARNING: CPU: 0 PID: 1023 at drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:1150 amdgpu_display_framebuffer_init+0x8e7/0xb40 [amdgpu] v2: check adev->enable_virtual_display instead as vkms can be enabled in bare metal as well. Signed-off-by: Leslie Shi Signed-off-by: Guchun Chen Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c index dc50c05f23fc..5c08047adb59 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c @@ -1145,7 +1145,7 @@ int amdgpu_display_framebuffer_init(struct drm_device *dev, if (ret) return ret; - if (!dev->mode_config.allow_fb_modifiers) { + if (!dev->mode_config.allow_fb_modifiers && !adev->enable_virtual_display) { drm_WARN_ONCE(dev, adev->family >= AMDGPU_FAMILY_AI, "GFX9+ requires FB check based on format modifier\n"); ret = check_tiling_flags_gfx6(rfb); -- 2.34.1