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>
This commit is contained in:
parent
01fd789ad5
commit
a99e85db9e
|
@ -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"
|
||||
|
@ -821,7 +822,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…
Reference in New Issue