mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 05:28:05 +02:00
etnaviv: drm: Stop after model query failure
Calling etna_gpu_new() with a nonexisting core can happen when iterating all cores. Bail immediately if querying the model failed, there is no use in also failing to query the revision. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28921>
This commit is contained in:
parent
ba59882212
commit
06683288e0
1 changed files with 3 additions and 3 deletions
|
|
@ -217,12 +217,12 @@ struct etna_gpu *etna_gpu_new(struct etna_device *dev, unsigned int core)
|
|||
gpu->dev = dev;
|
||||
gpu->core = core;
|
||||
|
||||
gpu->info.model = get_param(dev, core, ETNAVIV_PARAM_GPU_MODEL);
|
||||
gpu->info.revision = get_param(dev, core, ETNAVIV_PARAM_GPU_REVISION);
|
||||
|
||||
gpu->info.model = get_param(dev, core, ETNAVIV_PARAM_GPU_MODEL);
|
||||
if (!gpu->info.model)
|
||||
goto fail;
|
||||
|
||||
gpu->info.revision = get_param(dev, core, ETNAVIV_PARAM_GPU_REVISION);
|
||||
|
||||
DEBUG_MSG(" GPU model: 0x%x (rev %x)", gpu->info.model, gpu->info.revision);
|
||||
|
||||
if (dev->drm_version >= ETNA_DRM_VERSION(1, 4)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue