From patchwork Tue Feb 28 10:27:01 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: 62400 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2933519wrd; Tue, 28 Feb 2023 02:30:27 -0800 (PST) X-Google-Smtp-Source: AK7set/+m0xo/Z38yGcmnJ8u4s7loP61bDI9tVGu9ib+Y9StNKDRqJKs8ed4kH3lMYAXc0dB9Zjg X-Received: by 2002:aa7:dc17:0:b0:4af:70a5:55ee with SMTP id b23-20020aa7dc17000000b004af70a555eemr2547673edu.3.1677580227468; Tue, 28 Feb 2023 02:30:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677580227; cv=none; d=google.com; s=arc-20160816; b=wztbR7YlGbpwh83FSA5EBdaiOcs0UKoN4aZLwgde5wGMw6r5LChimGSkzcSP5UhxEC KkRctvuHZRDnGTXI05OjNENzSSebTOZwU99xImI8eF+12gtVeNWlthVjbU9+VNECOApW gUkgrlA9w//Np2w7xw/TnK1pZszyEORWUHKU7e0mhqK76j6i49UPC5xUQYnNXhVEGq01 M5aksk0Y2TzOXSDIJqiqbO0ROrL1MauCKV6TEGZ4QPZoQBJnjGmVu/fDOM217UiDLfKg 0Ly8Qh4I6Pg6eiTuv+jODSSsg0AhyPcQLI/2V1BzF8QVaTGMYJ2EC0JqIC2Z3Sws3Ktr 6hDg== 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=QvezWPXdSLni5ufqA9Vnf7A1sBWOfOMGvkteCAS0kquPfR1sJAWO+quWN4HWCtcrSc bxdu1JJhY/du6gU5pTUug6WqPHcv0jSfPulKY4ifRfkyeR68vg7R0z9aXhmUn/UBLQIZ QxDYpCoAI/NUYb+qK69TBDVgyGs39AbOrPlPxyA3oSmhRqYuIcNXd+w3LCpYqP6X/0xl HiVp8uwgCO9DV1fJqwjIit4tqDcawdV+3mw6SgFxOnulCVYQfBEJJxZC/41sl6t87NF0 /oR0zWx+ogTC5OtG91WWWrSbsvJ6U9/5p3iHst7UXjCesumWEDIh4KuReCbs7nJV9u/k YuJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=i3y3MIK8; 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 i19-20020a056402055300b004acbdb25b3bsi11160269edx.628.2023.02.28.02.30.04; Tue, 28 Feb 2023 02:30:27 -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=i3y3MIK8; 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 S230313AbjB1K1n (ORCPT + 99 others); Tue, 28 Feb 2023 05:27:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231266AbjB1K1U (ORCPT ); Tue, 28 Feb 2023 05:27:20 -0500 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C4F62D160; Tue, 28 Feb 2023 02:27:18 -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 5A9496602FDF; Tue, 28 Feb 2023 10:27:16 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1677580037; bh=HedQD3Ilc5pEnx8vhQO81s7TTNK+oqpJPvaglDZ6DvY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i3y3MIK8tlPXFTrBcJE92aYQveJmU6nA7x6I3fYH7PSDC9nygTAK9zh8T9ygeyXFE TNT54P9E50hy62QWRG1IZEV3tgjZCJLW920xA3a2VNUumEJXBYpBBO3Ats+6jdDbiE frdAVKNaUpJaMY1ndEblkJ41bb+GHhvSJblSU1MDlYgfSEtKjw3rWxhjkYI8BDPyJC IsvuZoZbG/5HGmVpAGZI2jhUCQpqRL99hrxy7ra82MGZle+gFXaYKllkuyeKeLtm7z z1tn6NckeGui7MUHSf8vw68vgI0RN1ak2/f9DzCKlNy+0GYFvv4CqfHrAG/0ZeWus9 6luMsCNwnJzZQ== 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 v4 09/12] drm/panfrost: Add the MT8192 GPU ID Date: Tue, 28 Feb 2023 11:27:01 +0100 Message-Id: <20230228102704.708150-9-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230228102704.708150-1-angelogioacchino.delregno@collabora.com> References: <20230228102704.708150-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?1759070364593156603?= X-GMAIL-MSGID: =?utf-8?q?1759070364593156603?= 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 Tested-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)