From cc43c4a9e56a5f6dd66e6e67074c219e6f87ba26 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Tue, 8 Aug 2017 11:42:02 -0500 Subject: [PATCH] st/dri2: fix kms_swrast driconf option handling MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit e794f8bf8bdb ("gallium: move loading of drirc to pipe-loader") moved the option cache to the pipe_loader_device. However, the screen->dev pointer is not set when dri_init_options() is called. Move the call to after the pipe_loader_sw_probe_kms() call so screen->dev is set. This mirrors the code flow for dri2_init_screen(). Fixes: e794f8bf8bdb ("gallium: move loading of drirc to pipe-loader") Reviewed-by: Nicolai Hähnle Cc: Marek Olšák Signed-off-by: Rob Herring --- src/gallium/state_trackers/dri/dri2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index 4e58bcb9c5b..1e8bb481044 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -2061,10 +2061,10 @@ dri_kms_init_screen(__DRIscreen * sPriv) if (screen->fd < 0 || (fd = fcntl(screen->fd, F_DUPFD_CLOEXEC, 3)) < 0) goto free_screen; - dri_init_options(screen); - - if (pipe_loader_sw_probe_kms(&screen->dev, fd)) + if (pipe_loader_sw_probe_kms(&screen->dev, fd)) { + dri_init_options(screen); pscreen = pipe_loader_create_screen(screen->dev); + } if (!pscreen) goto release_pipe; -- 2.30.2