From patchwork Tue Feb 21 15:37:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 60142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp78881wrd; Tue, 21 Feb 2023 07:44:00 -0800 (PST) X-Google-Smtp-Source: AK7set8t6W4RCPm7n1P7BTFNwfD172lJx9/6u+rJlnbBdk5qs0XPpDg2l5Kj8+TWtHdgHw5SbfA5 X-Received: by 2002:a17:90b:3eca:b0:232:ce83:20a with SMTP id rm10-20020a17090b3eca00b00232ce83020amr7909841pjb.36.1676994240520; Tue, 21 Feb 2023 07:44:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676994240; cv=none; d=google.com; s=arc-20160816; b=UtU4PiU+Hj4/nA1uXlbP13d5UibXmntp/owlx0HQF8E+67gSKPIvaWD0bXjJ1wKO6C H3OuhBlCq6smbC8cu6IZPm2q3hFNV3N7xHMEOh9i9W7vLl0kB/LZh5LQjKjUeWcdk7e9 5R730vUIEdtHPnqZR2TexU9mYFO/u0r+h2xEBbU/XzEIplMKJZx9t1tqoZhlEwFDMjCe BNrTD7piIQ5MRxyTXpDj7JQHov6Kdcuqu8wRWKMmwXL3Akmh8FLowyYGKgADWE56tIk7 DVa5ehlKWmlEdH7Ye7G7/TogkuBu8oiG51sVaEOquhOgsCaTaXqFGrjTsGWvG3526wPW PUTg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oRRbmSQ3Rq/4N4LJOPHJPIMC9cy1PqF0Em/E+4AfhBU=; b=mR73yCEFm6Y+bHBLtuMlLl5vbb2ja3kil7BGRdZqjQT94m93hGQ+zZGc7+SOm/EZdd CJgPVOrpo51BSKC/g0XX3yI3vxdwJGbPYCajuCdqsbDQF717TS+nTyDNMjSh/83/faz5 vYi5UPpBwGCa2KF00dirXZVX7OYuMwS5QtJmxNYWI+cUjBFGNNOSJ55Wb//MuQcjhhak m6tlRyF4b9bg0ugLDp0fYsuvjA/3SZVhn3YySngnX8Qky/t4OQFXsBGBPfMA+VkqmuAU hBx1Dv48CWNSIR+J5PbuhQORyxRyRfgzvTao2Y7KDiL6ZXrb+VNmmOgDPgeMLKGmz1jA zBsw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=mzSAB68h; 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=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c4-20020a6566c4000000b00502d7941026si2909240pgw.442.2023.02.21.07.43.47; Tue, 21 Feb 2023 07:44:00 -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=@collabora.com header.s=mail header.b=mzSAB68h; 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=REJECT sp=REJECT dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234613AbjBUPiN (ORCPT + 99 others); Tue, 21 Feb 2023 10:38:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234186AbjBUPh5 (ORCPT ); Tue, 21 Feb 2023 10:37:57 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 170E623103; Tue, 21 Feb 2023 07:37:53 -0800 (PST) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 29E9266021CF; Tue, 21 Feb 2023 15:37:51 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1676993871; bh=HedQD3Ilc5pEnx8vhQO81s7TTNK+oqpJPvaglDZ6DvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mzSAB68huZi2FWdjCmbPQLcRx/D12xji2dNq7yFIsN0pLXxptw/dMPR76n0abG8lz xcx+ldXx+RYzOJ0Z/EyrgyjHYxS4dTBHPe2puZUkPf/pqMKV8sRY1BqdI0UsmEnFg0 yzMHNEuaeXf5jQBw+Psxdkt5mOTiW3OzmMMjwCSCoDv9X+G8ZnMwlqAH994GT/GuCR dmmBdZCS+Sv+N6O0da+H4/DQgL+2F7TAHQL6yqMcObaqIG7Z2q5RBfSXyZSsn9DdWZ LVGdO2sQLN7DPcdiZnyMxP6vAvdeKXavJeqC495UgF84b0OOVHDvdQ88rKmu6hSnYm 9OL2oeVX36WjA== From: AngeloGioacchino Del Regno To: airlied@gmail.com Cc: daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, steven.price@arm.com, alyssa.rosenzweig@collabora.com, matthias.bgg@gmail.com, robh@kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, wenst@chromium.org, AngeloGioacchino Del Regno Subject: [PATCH v2 08/10] drm/panfrost: Add the MT8192 GPU ID Date: Tue, 21 Feb 2023 16:37:38 +0100 Message-Id: <20230221153740.1620529-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> References: <20230221153740.1620529-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758455912210161020?= X-GMAIL-MSGID: =?utf-8?q?1758455912210161020?= From: Alyssa Rosenzweig MediaTek MT8192 has a Mali-G57 with a special GPU ID. Add its GPU ID, but treat it as otherwise identical to a standard Mali-G57. We do _not_ fix up the GPU ID here -- userspace needs to be aware of the special GPU ID, in case we find functional differences between MediaTek's implementation and the standard Mali-G57 down the line. Signed-off-by: Alyssa Rosenzweig Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: Steven Price Reviewed-by: Chen-Yu Tsai --- drivers/gpu/drm/panfrost/panfrost_gpu.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_gpu.c b/drivers/gpu/drm/panfrost/panfrost_gpu.c index 6452e4e900dd..d28b99732dde 100644 --- a/drivers/gpu/drm/panfrost/panfrost_gpu.c +++ b/drivers/gpu/drm/panfrost/panfrost_gpu.c @@ -204,6 +204,14 @@ static const struct panfrost_model gpu_models[] = { GPU_MODEL(g57, 0x9001, GPU_REV(g57, 0, 0)), + + /* MediaTek MT8192 has a Mali-G57 with a different GPU ID from the + * standard. Arm's driver does not appear to handle this model. + * ChromeOS has a hack downstream for it. Treat it as equivalent to + * standard Mali-G57 for now. + */ + GPU_MODEL(g57, 0x9003, + GPU_REV(g57, 0, 0)), }; static void panfrost_gpu_init_features(struct panfrost_device *pfdev)