diff options
author | Alexander Kanavin <alex@linutronix.de> | 2022-06-09 11:42:05 +0200 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2022-06-15 01:44:21 +0000 |
commit | 934bc2e8ca42d30376c11656a81676ed95dab24a (patch) | |
tree | c907ef9310706dec261180214893fb2af6944d89 | |
parent | fd91295473ee12b32e7f7b3d3b05d6338aa0c37c (diff) |
swrast_kms: use swkmsDRI2Extension instead of driDRI2Extension
This set of changes:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15649
caused a regression in Xorg when using swrast_kms:
(EE) AIGLX error: Calling driver entry point failed
This commit changes the swrast_kms driver to use a dedicated screen init function
(which I believe was overlooked); I also took the opportunity to rename the
associated plumbling to have swrast-specific names.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16942>
-rw-r--r-- | src/gallium/frontends/dri/dri2.c | 16 | ||||
-rw-r--r-- | src/gallium/frontends/dri/dri_screen.h | 4 | ||||
-rw-r--r-- | src/gallium/frontends/dri/dri_util.c | 2 | ||||
-rw-r--r-- | src/gallium/targets/dri/target.c | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index 611ac5cd0c8..504945c6984 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -2507,7 +2507,7 @@ release_pipe: * Returns the struct gl_config supported by this driver. */ static const __DRIconfig ** -dri_kms_init_screen(__DRIscreen * sPriv) +dri_swrast_kms_init_screen(__DRIscreen * sPriv) { #if defined(GALLIUM_SOFTPIPE) const __DRIconfig **configs; @@ -2611,8 +2611,8 @@ static const struct __DRIDriverVtableExtensionRec galliumdrm_vtable = { * hook. The latter is used to explicitly initialise the kms_swrast driver * rather than selecting the approapriate driver as suggested by the loader. */ -const struct __DriverAPIRec dri_kms_driver_api = { - .InitScreen = dri_kms_init_screen, +const struct __DriverAPIRec dri_swrast_kms_driver_api = { + .InitScreen = dri_swrast_kms_init_screen, .DestroyScreen = dri_destroy_screen, .CreateBuffer = dri2_create_buffer, .DestroyBuffer = dri_destroy_buffer, @@ -2631,17 +2631,17 @@ const __DRIextension *galliumdrm_driver_extensions[] = { NULL }; -static const struct __DRIDriverVtableExtensionRec dri_kms_vtable = { +static const struct __DRIDriverVtableExtensionRec dri_swrast_kms_vtable = { .base = { __DRI_DRIVER_VTABLE, 1 }, - .vtable = &dri_kms_driver_api, + .vtable = &dri_swrast_kms_driver_api, }; -const __DRIextension *dri_kms_driver_extensions[] = { +const __DRIextension *dri_swrast_kms_driver_extensions[] = { &driCoreExtension.base, &driImageDriverExtension.base, - &driDRI2Extension.base, + &swkmsDRI2Extension.base, &gallium_config_options.base, - &dri_kms_vtable.base, + &dri_swrast_kms_vtable.base, NULL }; diff --git a/src/gallium/frontends/dri/dri_screen.h b/src/gallium/frontends/dri/dri_screen.h index fc7d63699c4..e01eb3d7960 100644 --- a/src/gallium/frontends/dri/dri_screen.h +++ b/src/gallium/frontends/dri/dri_screen.h @@ -165,8 +165,8 @@ dri_destroy_screen_helper(struct dri_screen * screen); void dri_destroy_screen(__DRIscreen * sPriv); -extern const struct __DriverAPIRec dri_kms_driver_api; -extern const __DRIextension *dri_kms_driver_extensions[]; +extern const struct __DriverAPIRec dri_swrast_kms_driver_api; +extern const __DRIextension *dri_swrast_kms_driver_extensions[]; extern const struct __DriverAPIRec galliumdrm_driver_api; extern const __DRIextension *galliumdrm_driver_extensions[]; extern const struct __DriverAPIRec galliumsw_driver_api; diff --git a/src/gallium/frontends/dri/dri_util.c b/src/gallium/frontends/dri/dri_util.c index 4207eff3f43..4a6c201387e 100644 --- a/src/gallium/frontends/dri/dri_util.c +++ b/src/gallium/frontends/dri/dri_util.c @@ -191,7 +191,7 @@ swkmsCreateNewScreen(int scrn, int fd, const __DRIconfig ***driver_configs, void *data) { return driCreateNewScreen2(scrn, fd, extensions, - dri_kms_driver_extensions, + dri_swrast_kms_driver_extensions, driver_configs, data); } diff --git a/src/gallium/targets/dri/target.c b/src/gallium/targets/dri/target.c index 9b78351fa8f..e02b03b5817 100644 --- a/src/gallium/targets/dri/target.c +++ b/src/gallium/targets/dri/target.c @@ -25,7 +25,7 @@ const __DRIextension **__driDriverGetExtensions_kms_swrast(void); PUBLIC const __DRIextension **__driDriverGetExtensions_kms_swrast(void) { - return dri_kms_driver_extensions; + return dri_swrast_kms_driver_extensions; } #endif |