Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp1464707rwj; Sun, 18 Dec 2022 08:41:44 -0800 (PST) X-Google-Smtp-Source: AMrXdXv6QyzNVZ7s/tlLX3pDucENyzOhait6gA18mNdQVU5wGtwMzDekyj2Wpsikx7OJ8Up9VCsB X-Received: by 2002:a17:907:d408:b0:7c1:d4c:f08c with SMTP id vi8-20020a170907d40800b007c10d4cf08cmr8981489ejc.4.1671381704105; Sun, 18 Dec 2022 08:41:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671381704; cv=none; d=google.com; s=arc-20160816; b=MI6/G0XpC2VTF0/4NxN/Aev4J+RIyKn/rc9AgXavUmMB4g47trhRmLR1QFu7HyRUgU Kapi4WZldOq46mRSQ2mssiTlITEcHZn1LasIotCcUHUdriDAWfTVwMfpP3V4MRu6iAMC D2TVlZeVUIbR4Y5S8iTyUVaoet7mnws7Fm7Ldm2KFijHToESAlavY74s163XyWC+UNaN 5nLTKfU0DF8TIEz5g6nBIdtgH9oCpf1xcJcFoKZumRx85IvwQrw36lXXQ4MLxzWNhpbj DZE2lqSvcZXhyDol9BrFp5/KWNN9khj9G7C3xCPltFijUE40IodisZc7OqxAQjORnx78 vJ3Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Ew5n3LXI9iXxGroJC4TjWyMExH7FX+NwR1wN4qGdtNQ=; b=UpizgwSLyH6h5Ytn/88vLvL+WThDAINTsbVVF9snUpop5cYYo/Curht1IenMVK0MeE 0Ywb30nQk8T5z/kkgHc1Ea8NmbZDLRJuqhScHuPQfnD1P4yQ32l78CxcVF3v+YvVM5uW 3UdmDv6jQESqrp9M+1EMk1esd2ZXA0Wql9GnKfABc8vKRR51HIXQz5a0o9l1mqO6Ylwo CtVfL6ZKKNFL2DVmz0LCJWRRurzYiWs3Mi2JgB6/v+DPPpasUPjgq9x8C9O7q7vewv8L 631/oXpSLu+5Ng8MysuWoN0OczAkfNYUmccMY7m+EuoseTqPbWElcYsLLp+kEGqfx/Nt pGag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=g8GtzOBD; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jg20-20020a170907971400b007bf9de4fe93si7950455ejc.154.2022.12.18.08.41.27; Sun, 18 Dec 2022 08:41:44 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=g8GtzOBD; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232399AbiLRQff (ORCPT + 70 others); Sun, 18 Dec 2022 11:35:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52850 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbiLRQdx (ORCPT ); Sun, 18 Dec 2022 11:33:53 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 876F8270D; Sun, 18 Dec 2022 08:12:48 -0800 (PST) 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 224C160DB4; Sun, 18 Dec 2022 16:12:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7BB47C433EF; Sun, 18 Dec 2022 16:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1671379967; bh=kvU+2fSgBjunwK2CfNT1L4BIgyAbAMZJL4sX1ZHUArQ=; h=From:To:Cc:Subject:Date:From; b=g8GtzOBDXIazXIunYnmhHBjvxD6dDRXH8dajDWvqrAFYC+bBRw9TgnIzzoT65KyHE wB+T9lzvgPZk0Hgj3k0c7NAUg8+EDS2KB85/gf8p2KHIyhU1fEwW+39V2yLoO8sxQb mF8yGSB8MA7VCo0Zqg0lPBL4yMgZ8RNPL3kTcOViFDElQUgYH4BF4YYFr2YFKC8AXy nni9rA7M18kGGJO8JlLGF34lU+yPn3wb+Od6vRPEJRnpVXq3kJKA5Kz3KRqcTQNHL3 pY7XkAtjs53Lmt4OBZLjYbt7Yf4gPrt9XfHhz3SacI8hIss3wUs+qYWaI1ASokSgKa MI515eORqgTpA== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Doug Brown , Christian Gmeiner , Lucas Stach , Sasha Levin , airlied@gmail.com, daniel@ffwll.ch, etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.15 01/46] drm/etnaviv: add missing quirks for GC300 Date: Sun, 18 Dec 2022 11:11:59 -0500 Message-Id: <20221218161244.930785-1-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 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: Doug Brown [ Upstream commit cc7d3fb446a91f24978a6aa59cbb578f92e22242 ] The GC300's features register doesn't specify that a 2D pipe is available, and like the GC600, its idle register reports zero bits where modules aren't present. Signed-off-by: Doug Brown Reviewed-by: Christian Gmeiner Signed-off-by: Lucas Stach Signed-off-by: Sasha Levin --- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index cc5b07f86346..e8ff70be449a 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -416,6 +416,12 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu) if (gpu->identity.model == chipModel_GC700) gpu->identity.features &= ~chipFeatures_FAST_CLEAR; + /* These models/revisions don't have the 2D pipe bit */ + if ((gpu->identity.model == chipModel_GC500 && + gpu->identity.revision <= 2) || + gpu->identity.model == chipModel_GC300) + gpu->identity.features |= chipFeatures_PIPE_2D; + if ((gpu->identity.model == chipModel_GC500 && gpu->identity.revision < 2) || (gpu->identity.model == chipModel_GC300 && @@ -449,8 +455,9 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu) gpu_read(gpu, VIVS_HI_CHIP_MINOR_FEATURE_5); } - /* GC600 idle register reports zero bits where modules aren't present */ - if (gpu->identity.model == chipModel_GC600) + /* GC600/300 idle register reports zero bits where modules aren't present */ + if (gpu->identity.model == chipModel_GC600 || + gpu->identity.model == chipModel_GC300) gpu->idle_mask = VIVS_HI_IDLE_STATE_TX | VIVS_HI_IDLE_STATE_RA | VIVS_HI_IDLE_STATE_SE | -- 2.35.1