Lines Matching refs:fd1
57 check_bo(int fd1, uint32_t handle1, int fd2, uint32_t handle2) in check_bo() argument
63 ptr1 = gem_mmap__cpu(fd1, handle1, 0, BO_SIZE, PROT_READ | PROT_WRITE); in check_bo()
66 gem_set_domain(fd1, handle1, I915_GEM_DOMAIN_CPU, I915_GEM_DOMAIN_CPU); in check_bo()
86 int fd1, fd2; in test_with_fd_dup() local
92 fd1 = drm_open_driver(DRIVER_INTEL); in test_with_fd_dup()
95 handle = gem_create(fd1, BO_SIZE); in test_with_fd_dup()
97 dma_buf_fd1 = prime_handle_to_fd(fd1, handle); in test_with_fd_dup()
98 gem_close(fd1, handle); in test_with_fd_dup()
108 close(fd1); in test_with_fd_dup()
114 int fd1, fd2; in test_with_two_bos() local
120 fd1 = drm_open_driver(DRIVER_INTEL); in test_with_two_bos()
123 handle1 = gem_create(fd1, BO_SIZE); in test_with_two_bos()
124 handle2 = gem_create(fd1, BO_SIZE); in test_with_two_bos()
126 dma_buf_fd = prime_handle_to_fd(fd1, handle1); in test_with_two_bos()
130 gem_close(fd1, handle1); in test_with_two_bos()
132 dma_buf_fd = prime_handle_to_fd(fd1, handle2); in test_with_two_bos()
134 check_bo(fd1, handle2, fd2, handle_import); in test_with_two_bos()
136 gem_close(fd1, handle2); in test_with_two_bos()
141 close(fd1); in test_with_two_bos()
147 int fd1, fd2; in test_with_one_bo_two_files() local
151 fd1 = drm_open_driver(DRIVER_INTEL); in test_with_one_bo_two_files()
154 handle_orig = gem_create(fd1, BO_SIZE); in test_with_one_bo_two_files()
155 dma_buf_fd1 = prime_handle_to_fd(fd1, handle_orig); in test_with_one_bo_two_files()
157 flink_name = gem_flink(fd1, handle_orig); in test_with_one_bo_two_files()
166 close(fd1); in test_with_one_bo_two_files()
174 int fd1, fd2; in test_with_one_bo() local
178 fd1 = drm_open_driver(DRIVER_INTEL); in test_with_one_bo()
181 handle = gem_create(fd1, BO_SIZE); in test_with_one_bo()
183 dma_buf_fd = prime_handle_to_fd(fd1, handle); in test_with_one_bo()
186 check_bo(fd1, handle, fd2, handle_import1); in test_with_one_bo()
194 handle_selfimport = prime_fd_to_handle(fd1, dma_buf_fd); in test_with_one_bo()
199 check_bo(fd1, handle, fd2, handle_import1); in test_with_one_bo()
201 gem_close(fd1, handle); in test_with_one_bo()
208 handle = prime_fd_to_handle(fd1, dma_buf_fd); in test_with_one_bo()
210 check_bo(fd1, handle, fd2, handle_import1); in test_with_one_bo()
213 close(fd1); in test_with_one_bo()