summaryrefslogtreecommitdiff
path: root/src/egl/drivers/dri2/egl_dri2.h
diff options
context:
space:
mode:
authorYogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com>2022-12-17 23:17:15 +0530
committerMarge Bot <emma+marge@anholt.net>2023-01-24 12:51:35 +0000
commit31013f3ce7cfeb1e1e04b51215abd6856dd374a7 (patch)
tree5cac5c3afe98778afa264b3bf015b28c78a9e4e0 /src/egl/drivers/dri2/egl_dri2.h
parent1a0ec8e8d3750d580ded41158b782b8070ff0e0a (diff)
egl: remove is_different_gpu variable from struct dri2_egl_display
v2: fd number is different (Pierre-Eric) v1: remove is_different_gpu (Pierre-Eric) Signed-off-by: Yogesh Mohan Marimuthu <yogesh.mohanmarimuthu@amd.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13422>
Diffstat (limited to 'src/egl/drivers/dri2/egl_dri2.h')
-rw-r--r--src/egl/drivers/dri2/egl_dri2.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h
index d97371c14b1..c23083634e4 100644
--- a/src/egl/drivers/dri2/egl_dri2.h
+++ b/src/egl/drivers/dri2/egl_dri2.h
@@ -223,6 +223,12 @@ struct dri2_egl_display
int dri2_major;
int dri2_minor;
__DRIscreen *dri_screen_render_gpu;
+ /* dri_screen_display_gpu holds display GPU in case of prime gpu offloading else
+ * dri_screen_render_gpu and dri_screen_display_gpu is same.
+ * In case of prime gpu offloading, if display and render driver names are different
+ * (potentially not compatible), dri_screen_display_gpu will be NULL but fd_display_gpu
+ * will still hold fd for display driver.
+ */
__DRIscreen *dri_screen_display_gpu;
bool own_dri_screen;
const __DRIconfig **driver_configs;
@@ -244,7 +250,12 @@ struct dri2_egl_display
const __DRI2interopExtension *interop;
const __DRIconfigOptionsExtension *configOptions;
const __DRImutableRenderBufferDriverExtension *mutable_render_buffer;
+ /* fd of the GPU used for rendering. */
int fd_render_gpu;
+ /* fd of the GPU used for display. If the same GPU is used for display
+ * and rendering, then fd_render_gpu == fd_display_gpu (no need to use
+ * os_same_file_description).
+ */
int fd_display_gpu;
/* dri2_initialize/dri2_terminate increment/decrement this count, so does
@@ -304,7 +315,6 @@ struct dri2_egl_display
#endif
bool is_render_node;
- bool is_different_gpu;
};
struct dri2_egl_context