Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp3659634pxp; Tue, 15 Mar 2022 03:45:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw3px5XFUc9NmRLxrGrvbXwm/xIG09Ppwah78bUwxN8MbR0PQwXvW5JSGnsTEQHGvwm2taS X-Received: by 2002:a17:906:58c7:b0:6da:955b:d300 with SMTP id e7-20020a17090658c700b006da955bd300mr22240614ejs.481.1647341104102; Tue, 15 Mar 2022 03:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647341104; cv=none; d=google.com; s=arc-20160816; b=gDQ3En0QZCMzWzSdm5sCsvlvbA+UMCbJ7BZcCqXJWZ5SvY7zLZsia+/IUECf2T6Uy4 NghsdaHDq2086KoQ/n/ZBzHc7wBlAQA+vzyBdS9bMpflUU5qITVYzh17Yi0NyBd9Kb1/ pXiDsimCWU8GTSJ4LvglwvD7ifc0aKIqjBVeMeImkaDJ7WBmBVJ2QbVVfWyZi19CEzNo swJAHzFHrcZEqoZD5qxTqVJhEQmEQefjasnmN4a6VixAU5j8K/ORn3VnIh0ClpZEGu6p PvpcIViKCGwh8yPJm2w4SxUx0xfeUUtmkkR4Suk0hqWnoE6ZU48F+ooU5Smcu5JBAwQJ BCCA== 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=Ddr0Sz9Y3gvJhEs5xRgHdRuXw/lzqZi+2gJwgMFAU3P2gx3Jod8T4WFOVO/FPvCaji 0fGgNjclXTgnatKHMprq1jaPJOvrN1BEowh3/XTSQ+1064GVZlzJFHLyEC7bbnZytPNT J/VffYMs6cz+ODLLwkwj89Qx5IeP0ygsj03jap4chN00NeMpLzPxr/wtwDJZSrJiku1x d/hLew1FpRCYbBhSLlHXzWYcexr5TdsLgvLPjKHGa/4O+oPOMTL3fyXCLpKL45sXN4pY fZEmnQDnveZgovqZLyIKwDtRNxVJypbm42vR6APgsaTotpMBmglyXErO7XzgnB6lB7UB AFpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=D7fGJzNd; 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 lb22-20020a170907785600b006db688323d9si10698040ejc.987.2022.03.15.03.44.39; Tue, 15 Mar 2022 03:45:04 -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=D7fGJzNd; 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 S242261AbiCNMSx (ORCPT + 99 others); Mon, 14 Mar 2022 08:18:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242432AbiCNMJ5 (ORCPT ); Mon, 14 Mar 2022 08:09:57 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B749813F45; Mon, 14 Mar 2022 05:08:13 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 212E76130F; Mon, 14 Mar 2022 12:08:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 175A3C340E9; Mon, 14 Mar 2022 12:08:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1647259692; bh=q8RsPXMoCCqmPZ40Vrs5tp3m4huDF+NIsBimtd/u2C0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D7fGJzNdA4ESxPCQkZEZPOwjuvCcSbXlGuR2tBEjfyjslErJwbjwNzx8KogJry/v6 3+EMEvwcqsLlqWrT6P6717l01A7Df8qqejHxNiIDptt+VwFm4yGNHqNvAd0HezB6qP /hXafIteRUmgUj8rSdWg319xc57T4oXThPl+hjHc= 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.15 066/110] drm/amdgpu: bypass tiling flag check in virtual display case (v2) Date: Mon, 14 Mar 2022 12:54:08 +0100 Message-Id: <20220314112744.878139382@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220314112743.029192918@linuxfoundation.org> References: <20220314112743.029192918@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