From patchwork Thu Dec 1 09:21:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 28266 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp160569wrr; Thu, 1 Dec 2022 01:26:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf6VhVbKtPf5NbHkQUf9tJ5V6FIE1NsWZqbraYCa64QHVVb1EKoDYNU5TWadQPdafE/1TRgy X-Received: by 2002:a17:907:a50a:b0:7c0:7902:885f with SMTP id vr10-20020a170907a50a00b007c07902885fmr14416447ejc.233.1669886812992; Thu, 01 Dec 2022 01:26:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669886812; cv=none; d=google.com; s=arc-20160816; b=JXP9vFflMVJ2UT/pGFpdfD5FqcoUEs7CHwKdq40+jFgUyN4tXMIeXmvp+/ZYPyyvpl njQlqnVimxJVn4lvzJkKkJ8eo5aFbLBoa0T8appALCv0ZBRd0RKq0VWm0OGHqJrxIDte SU1mef8PUh8qpAwtX/n3fFtwPMOQtd7PpeuEVlRaMYDYlzMSa40WIaWntS4wSERdPnnp /pyntX94t5pZNirLzS8KLW1PLRB1aP6JwBQcwmWw66iieqP5Nq6UtUhqTlI90prH1K/f qxiztVN9CwR8po4xL685IVrbGHLkQ+NrezeuAxYQuW31Crmn5V/FcEeT6fiGvGwrpgaJ DB2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from:sender :dkim-signature; bh=ZxpUnfBd0p8vcBE3KJWC/GuBXuBQqcwTN9Z0iX5mpvg=; b=NNHdKv8K485hogluO74rM56a4gy8NDDdScnJfAHnOFd+qRM4eFOTp3IfyIqrEELxix 2pBuG3ClbKHcxSAykbUd9jHp/9wV0JFcfH3pRFPpp21BA7r99zjKcOq3bYP5qzOAtH5l RnOJT5O8hHD4NpxIQ5R1pbdRzML0jv94zNSoaS93BT+U4HxzfznaSZZiCmISN3KFPCDU xm3New3jdNl/ZmOa/dwHUd7Y76kAJZ8YBRJj8yq8zAswhIGpVQ0LNAD7yoBJ/ehaFPqI xH4RfqaRaC1i5+TVmSRZJuSjL5u2pCg20Ge7PNUUJ9iDC7WBp3dq0teSfY3cBRNg6nkO 3UYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20210112 header.b="HD5y/WXR"; 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=fail (p=NONE sp=NONE 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 hs33-20020a1709073ea100b007a7a3b40920si3804988ejc.995.2022.12.01.01.26.27; Thu, 01 Dec 2022 01:26:52 -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=fail header.i=@gmail.com header.s=20210112 header.b="HD5y/WXR"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230098AbiLAJWQ (ORCPT + 99 others); Thu, 1 Dec 2022 04:22:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbiLAJWK (ORCPT ); Thu, 1 Dec 2022 04:22:10 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FC2A8BD2F for ; Thu, 1 Dec 2022 01:22:08 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id s12so1510278edd.5 for ; Thu, 01 Dec 2022 01:22:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=ZxpUnfBd0p8vcBE3KJWC/GuBXuBQqcwTN9Z0iX5mpvg=; b=HD5y/WXR910sg83kjV2BWWD+qL/7BH8Xo4u7soFHYUr5CtSS9XJJU6O7ZscoquM91K 6i8CKACWUqe/EphfLVNL2AHfOvDiEB044SEXeiwUHAsO2Jug0lRYot3mwxw96t79SLgK 2iqa6epHYKcFXijhbisR/YZ3N9lhnp//SQWLMlTdL958FSj2WhAvDdmJIWdcfV7iFcP8 tTj8SjoHaM4lifnQ1ICKCqtYfDBJitNjdgyn11dBfVbHqs2Dh+PsU617DNKiLxHj7vXx ASv/A9z6YvKKX9AVQwdse0/25qgPMFHyAACGc+tmr8vfUArHhK+A/P+quLM8po7jBoq3 IwMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZxpUnfBd0p8vcBE3KJWC/GuBXuBQqcwTN9Z0iX5mpvg=; b=qg8cWyBw6w1H+n8AELbl+Yi/BBWRXge4x13PGFL4t5G2vpcEcuMwC+VXDueUcoDzxw MSNPzYhaDjFDqvjl7a1JBvUoUA1sgvDKNJK7anZJlfvbyawlSvWUssveMke82e0vQk3N UM0g0B3ys7edQU2yEB5KCub3O8sUmEPaqOyH1QBIAQuumtinAunNuIicztrZmGgoH1Ye HjwpC3cOHF7WeSHbq4fnRivfAIvKtyyWbATERYwSb8wgM/My9qtdpuDqwV7kWjtqtCKc cx3aiG554kUXNi5vm3UGTArYkfjzZwr9mJxLsk8TwmrYXEgKEyckuztXtmD4yvVvw1iy GihQ== X-Gm-Message-State: ANoB5pmVC7DALDQaXMgXM8iEo7PQfCtdSrneQeyJP02P3vHhcB3brBmi Iainy2QGmpM7S8LkLm+reJw= X-Received: by 2002:aa7:c042:0:b0:462:2f5a:8618 with SMTP id k2-20020aa7c042000000b004622f5a8618mr59546512edo.42.1669886527062; Thu, 01 Dec 2022 01:22:07 -0800 (PST) Received: from cizrna.home (cst-prg-44-69.cust.vodafone.cz. [46.135.44.69]) by smtp.gmail.com with ESMTPSA id 18-20020a170906211200b007b29eb8a4dbsm1587879ejt.13.2022.12.01.01.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Dec 2022 01:22:06 -0800 (PST) Sender: Tomeu Vizoso From: Tomeu Vizoso Cc: italonicola@collabora.com, Tomeu Vizoso , Lucas Stach , Russell King , Christian Gmeiner , David Airlie , Daniel Vetter , etnaviv@lists.freedesktop.org (moderated list:DRM DRIVERS FOR VIVANTE GPU IP), dri-devel@lists.freedesktop.org (open list:DRM DRIVERS FOR VIVANTE GPU IP), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v4 6/7] drm/etnaviv: Add nn_core_count to chip feature struct Date: Thu, 1 Dec 2022 10:21:27 +0100 Message-Id: <20221201092131.62867-7-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221201092131.62867-1-tomeu.vizoso@collabora.com> References: <20221201092131.62867-1-tomeu.vizoso@collabora.com> MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) 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?1751003234965687399?= X-GMAIL-MSGID: =?utf-8?q?1751003234965687399?= We will use these for differentiating between GPUs and NPUs, as the downstream driver does. Signed-off-by: Tomeu Vizoso --- drivers/gpu/drm/etnaviv/etnaviv_gpu.h | 3 +++ drivers/gpu/drm/etnaviv/etnaviv_hwdb.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h index 85eddd492774..c8f3ad2031ce 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.h @@ -50,6 +50,9 @@ struct etnaviv_chip_identity { /* Number of shader cores. */ u32 shader_core_count; + /* Number of Neural Network cores. */ + u32 nn_core_count; + /* Size of the vertex cache. */ u32 vertex_cache_size; diff --git a/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c b/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c index 3f6fd9a3c088..9fc5223299e4 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c @@ -16,6 +16,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = { .register_max = 64, .thread_count = 128, .shader_core_count = 1, + .nn_core_count = 0, .vertex_cache_size = 8, .vertex_output_buffer_size = 1024, .pixel_pipes = 1, @@ -47,6 +48,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = { .register_max = 64, .thread_count = 512, .shader_core_count = 2, + .nn_core_count = 0, .vertex_cache_size = 16, .vertex_output_buffer_size = 1024, .pixel_pipes = 1, @@ -78,6 +80,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = { .register_max = 64, .thread_count = 512, .shader_core_count = 2, + .nn_core_count = 0, .vertex_cache_size = 16, .vertex_output_buffer_size = 1024, .pixel_pipes = 1, @@ -109,6 +112,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = { .register_max = 64, .thread_count = 1024, .shader_core_count = 4, + .nn_core_count = 0, .vertex_cache_size = 16, .vertex_output_buffer_size = 1024, .pixel_pipes = 2, @@ -140,6 +144,7 @@ static const struct etnaviv_chip_identity etnaviv_chip_identities[] = { .register_max = 64, .thread_count = 256, .shader_core_count = 1, + .nn_core_count = 8, .vertex_cache_size = 16, .vertex_output_buffer_size = 1024, .pixel_pipes = 1,