Am Mittwoch, dem 18.06.2025 um 22:43 +0200 schrieb Gert Wollny: > 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. > I'm surprised that this works on your platform at all. You can not move the identification here, as the GPU is still treated as suspended in etnaviv_gpu_bind, so on platforms with clock or power gating reading the ID registers will cause aborts or system hangs.
Regards, Lucas > Signed-off-by: Gert Wollny <gert.wol...@collabora.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;