mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
iris:Duplicate DRM fd internally instead of reuse.
Scenario we want to avoid is double close of DRM fd in iris driver.
Signed-off-by: Nagappa Koppad, Basanagouda <basanagouda.nagappa.koppad@intel.com>
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6620
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16886>
(cherry picked from commit a99e85db9e)
This commit is contained in:
parent
8c6c80b0a0
commit
7026ff1857
2 changed files with 3 additions and 2 deletions
|
|
@ -625,7 +625,7 @@
|
|||
"description": "iris:Duplicate DRM fd internally instead of reuse.",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "pipe/p_context.h"
|
||||
#include "pipe/p_screen.h"
|
||||
#include "util/debug.h"
|
||||
#include "util/os_file.h"
|
||||
#include "util/u_cpu_detect.h"
|
||||
#include "util/u_inlines.h"
|
||||
#include "util/format/u_format.h"
|
||||
|
|
@ -825,7 +826,7 @@ iris_screen_create(int fd, const struct pipe_screen_config *config)
|
|||
return NULL;
|
||||
|
||||
screen->fd = iris_bufmgr_get_fd(screen->bufmgr);
|
||||
screen->winsys_fd = fd;
|
||||
screen->winsys_fd = os_dupfd_cloexec(fd);
|
||||
|
||||
screen->id = iris_bufmgr_create_screen_id(screen->bufmgr);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue