[Mesa-dev] [PATCH] st/dri2: fix kms_swrast driconf option handling

Rob Herring robh at kernel.org
Tue Aug 8 16:50:23 UTC 2017


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")
Cc: Nicolai Hähnle <nicolai.haehnle at amd.com>
Cc: Marek Olšák <marek.olsak at amd.com>
Signed-off-by: Rob Herring <robh at kernel.org>
---
 src/gallium/state_trackers/dri/dri2.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 3555107856c8..680826f58144 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -2164,9 +2164,8 @@ 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))
+      dri_init_options(screen);
       pscreen = pipe_loader_create_screen(screen->dev);
 
    if (!pscreen)
-- 
2.11.0



More information about the mesa-dev mailing list