Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D435FC678D5 for ; Fri, 24 Feb 2023 13:53:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229587AbjBXNxK (ORCPT ); Fri, 24 Feb 2023 08:53:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjBXNxI (ORCPT ); Fri, 24 Feb 2023 08:53:08 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3BAB71F91C; Fri, 24 Feb 2023 05:53:07 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C76CC1042; Fri, 24 Feb 2023 05:53:49 -0800 (PST) Received: from [10.1.38.16] (e122027.cambridge.arm.com [10.1.38.16]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 454093F71A; Fri, 24 Feb 2023 05:53:04 -0800 (PST) Message-ID: <8c20f01a-2123-b76d-bf70-bf75aec9efb8@arm.com> Date: Fri, 24 Feb 2023 13:53:02 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.7.1 Subject: Re: [PATCH v3 08/11] drm/panfrost: Add the MT8192 GPU ID To: AngeloGioacchino Del Regno , Chen-Yu Tsai , Alyssa Rosenzweig Cc: airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, 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 References: <20230223133440.80941-1-angelogioacchino.delregno@collabora.com> <20230223133440.80941-9-angelogioacchino.delregno@collabora.com> <61ebdd1a-2737-0516-08fd-3b9aa0ddd4fe@collabora.com> Content-Language: en-GB From: Steven Price In-Reply-To: <61ebdd1a-2737-0516-08fd-3b9aa0ddd4fe@collabora.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/02/2023 13:08, AngeloGioacchino Del Regno wrote: > Il 24/02/23 11:06, Chen-Yu Tsai ha scritto: >> On Thu, Feb 23, 2023 at 9:35 PM AngeloGioacchino Del Regno >> wrote: >>> >>> 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 >> >> As previously mentioned, MT8195 Mali G57 has minor revision number 1. >> Do we need to handle that? >> > > Maybe something went wrong while sending the reply to the same question > on v2? > > Anyway, from what I can see on my MT8195 machine, it works fine without > adding > any particular handling... > > Alyssa, Steven, > are you aware of anything that we should consider? The minor revision means that the set of HW workarounds might be different. Specifically it appears that "BASE_HW_ISSUE_TTRX_3485" applies to G57 ('Natt') r0p0 but not r0p1. That particular workaround is a horrendous "dummy job" in kbase and we don't have an implementation in Panfrost. However Panfrost also doesn't (yet[1]) proactively SOFT_STOP jobs so is also unlikely to be affected. TLDR; Minor revision 1 has a HW bug fixed, Panfrost isn't affected by the bug anyway. Steve [1] It's been on my todo list for a while to look at improving job scheduling, but to be honest I doubt I'm going to get round to it with Panfrost, and PanCSF obviously changes the job scheduling anyway. > Regards, > Angelo > >>> --- >>>   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) >>> -- >>> 2.39.2 >>> > >