Lines Matching refs:fd2
57 check_bo(int fd1, uint32_t handle1, int fd2, uint32_t handle2) in check_bo() argument
64 ptr2 = gem_mmap__cpu(fd2, handle2, 0, BO_SIZE, PROT_READ | PROT_WRITE); in check_bo()
67 gem_set_domain(fd2, handle2, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); in check_bo()
86 int fd1, fd2; in test_with_fd_dup() local
93 fd2 = drm_open_driver(DRIVER_INTEL); in test_with_fd_dup()
102 handle_import = prime_fd_to_handle(fd2, dma_buf_fd2); in test_with_fd_dup()
103 check_bo(fd2, handle_import, fd2, handle_import); in test_with_fd_dup()
106 check_bo(fd2, handle_import, fd2, handle_import); in test_with_fd_dup()
109 close(fd2); in test_with_fd_dup()
114 int fd1, fd2; in test_with_two_bos() local
121 fd2 = drm_open_driver(DRIVER_INTEL); in test_with_two_bos()
127 handle_import = prime_fd_to_handle(fd2, dma_buf_fd); in test_with_two_bos()
133 handle_import = prime_fd_to_handle(fd2, dma_buf_fd); in test_with_two_bos()
134 check_bo(fd1, handle2, fd2, handle_import); in test_with_two_bos()
139 check_bo(fd2, handle_import, fd2, handle_import); in test_with_two_bos()
142 close(fd2); in test_with_two_bos()
147 int fd1, fd2; in test_with_one_bo_two_files() local
152 fd2 = drm_open_driver(DRIVER_INTEL); in test_with_one_bo_two_files()
158 handle_open = gem_open(fd2, flink_name); in test_with_one_bo_two_files()
160 dma_buf_fd2 = prime_handle_to_fd(fd2, handle_open); in test_with_one_bo_two_files()
161 handle_import = prime_fd_to_handle(fd2, dma_buf_fd2); in test_with_one_bo_two_files()
167 close(fd2); in test_with_one_bo_two_files()
174 int fd1, fd2; in test_with_one_bo() local
179 fd2 = drm_open_driver(DRIVER_INTEL); in test_with_one_bo()
184 handle_import1 = prime_fd_to_handle(fd2, dma_buf_fd); in test_with_one_bo()
186 check_bo(fd1, handle, fd2, handle_import1); in test_with_one_bo()
190 handle_import2 = prime_fd_to_handle(fd2, dma_buf_fd); in test_with_one_bo()
199 check_bo(fd1, handle, fd2, handle_import1); in test_with_one_bo()
202 check_bo(fd2, handle_import1, fd2, handle_import1); in test_with_one_bo()
205 dma_buf_fd = prime_handle_to_fd(fd2, handle_import1); in test_with_one_bo()
207 gem_close(fd2, handle_import1); in test_with_one_bo()
209 handle_import1 = prime_fd_to_handle(fd2, dma_buf_fd); in test_with_one_bo()
210 check_bo(fd1, handle, fd2, handle_import1); in test_with_one_bo()
214 check_bo(fd2, handle_import1, fd2, handle_import1); in test_with_one_bo()