From d73b751b90efe40956fff9a0d3462eb5686b5f7c Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Thu, 7 Nov 2024 10:28:00 +0100 Subject: [PATCH] etnaviv: Fix incorrect pipe_nn creation When etna_screen_create(..) is called with gpu != NULL and npu == NULL, screen->pipe_nn is incorrectly set up. This leads to an unintended stream configuration for compute-only contexts, as determined by pipe = (compute_only && screen->pipe_nn) ? screen->pipe_nn : screen->pipe; To address this, extend the gpu != npu condition by adding a check for npu != NULL to ensure pipe_nn is only initialized when both gpu and npu are provided. Fixes: a4653587cc4 ("etnaviv: Add a separate NPU pipe") Signed-off-by: Christian Gmeiner Reviewed-by: Philipp Zabel Part-of: (cherry picked from commit f4e8849d79de2cdc6c91f877cb223ed375d6a50c) --- .pick_status.json | 2 +- src/gallium/drivers/etnaviv/etnaviv_screen.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index e0c164f021f..b0675a9cc5b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -84,7 +84,7 @@ "description": "etnaviv: Fix incorrect pipe_nn creation", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "a4653587cc434e8dbaa2b06cd18c8132ab611f78", "notes": null diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index 3debf8f33a9..eba38f06cf2 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -1102,7 +1102,7 @@ etna_screen_create(struct etna_device *dev, struct etna_gpu *gpu, goto fail; } - if (gpu != npu) { + if (npu && gpu != npu) { screen->pipe_nn = etna_pipe_new(npu, ETNA_PIPE_3D); if (!screen->pipe_nn) { DBG("could not create nn pipe");