[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250618204400.21808-5-gert.wollny@collabora.com>
Date: Wed, 18 Jun 2025 22:43:32 +0200
From: Gert Wollny <gert.wollny@...labora.com>
To: Lucas Stach <l.stach@...gutronix.de>,
Russell King <linux+etnaviv@...linux.org.uk>,
Christian Gmeiner <christian.gmeiner@...il.com>
Cc: etnaviv@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org,
Gert Wollny <gert.wollny@...labora.com>
Subject: [PATCH v2 4/6] drm/etnaviv: Identify GPU already when binding
This is required to know whether to be able to avoid allocating
the flop reset data if non of the available GPUs actually need
it.
Signed-off-by: Gert Wollny <gert.wollny@...labora.com>
---
drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
index cf0d9049bcf1..dc8a7ff3e797 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c
@@ -829,14 +829,6 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
goto fail;
}
- etnaviv_hw_identify(gpu);
-
- if (gpu->identity.model == 0) {
- dev_err(gpu->dev, "Unknown GPU model\n");
- ret = -ENXIO;
- goto fail;
- }
-
if (gpu->identity.nn_core_count > 0)
dev_warn(gpu->dev, "etnaviv has been instantiated on a NPU, "
"for which the UAPI is still experimental\n");
@@ -1808,6 +1800,13 @@ static int etnaviv_gpu_bind(struct device *dev, struct device *master,
INIT_WORK(&gpu->sync_point_work, sync_point_worker);
init_waitqueue_head(&gpu->fence_event);
+ etnaviv_hw_identify(gpu);
+
+ if (gpu->identity.model == 0) {
+ dev_err(gpu->dev, "Unknown GPU model\n");
+ ret = -ENXIO;
+ goto out_sched;
+ }
priv->gpu[priv->num_gpus++] = gpu;
return 0;
--
2.49.0
Powered by blists - more mailing lists