From f3f0b87bf8f0a8b304f23c6d88a58a6f8575d3d9 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Tue, 30 Jul 2024 14:47:25 -0400 Subject: [PATCH] dri: fix kms_swrast screen fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this should match all the other screen init functions cc: mesa-stable Reviewed-by: Marek Olšák Reviewed-by: Adam Jackson Part-of: (cherry picked from commit d6ac254c0152cbb760ee87e8243c78f87503f805) --- .pick_status.json | 2 +- src/gallium/frontends/dri/dri2.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index dd6924b4fb4..0dd2ea5b447 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2294,7 +2294,7 @@ "description": "dri: fix kms_swrast screen fail", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index ff10389c066..da1e26f1af6 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -2402,7 +2402,7 @@ dri_swrast_kms_init_screen(struct dri_screen *screen, bool driver_name_is_inferr #endif if (!pscreen) - goto fail; + return NULL; dri_init_options(screen); dri2_init_screen_extensions(screen, pscreen, true); @@ -2431,7 +2431,7 @@ dri_swrast_kms_init_screen(struct dri_screen *screen, bool driver_name_is_inferr return configs; fail: - dri_release_screen(screen); + pipe_loader_release(&screen->dev, 1); #endif // GALLIUM_SOFTPIPE return NULL;