Lines Matching refs:prime_fpriv
101 static int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv, in drm_prime_add_buf_handle() argument
116 p = &prime_fpriv->dmabufs.rb_node; in drm_prime_add_buf_handle()
128 rb_insert_color(&member->dmabuf_rb, &prime_fpriv->dmabufs); in drm_prime_add_buf_handle()
131 p = &prime_fpriv->handles.rb_node; in drm_prime_add_buf_handle()
143 rb_insert_color(&member->handle_rb, &prime_fpriv->handles); in drm_prime_add_buf_handle()
148 static struct dma_buf *drm_prime_lookup_buf_by_handle(struct drm_prime_file_private *prime_fpriv, in drm_prime_lookup_buf_by_handle() argument
153 rb = prime_fpriv->handles.rb_node; in drm_prime_lookup_buf_by_handle()
169 static int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpriv, in drm_prime_lookup_buf_handle() argument
175 rb = prime_fpriv->dmabufs.rb_node; in drm_prime_lookup_buf_handle()
193 void drm_prime_remove_buf_handle(struct drm_prime_file_private *prime_fpriv, in drm_prime_remove_buf_handle() argument
198 mutex_lock(&prime_fpriv->lock); in drm_prime_remove_buf_handle()
200 rb = prime_fpriv->handles.rb_node; in drm_prime_remove_buf_handle()
206 rb_erase(&member->handle_rb, &prime_fpriv->handles); in drm_prime_remove_buf_handle()
207 rb_erase(&member->dmabuf_rb, &prime_fpriv->dmabufs); in drm_prime_remove_buf_handle()
219 mutex_unlock(&prime_fpriv->lock); in drm_prime_remove_buf_handle()
222 void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv) in drm_prime_init_file_private() argument
224 mutex_init(&prime_fpriv->lock); in drm_prime_init_file_private()
225 prime_fpriv->dmabufs = RB_ROOT; in drm_prime_init_file_private()
226 prime_fpriv->handles = RB_ROOT; in drm_prime_init_file_private()
229 void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv) in drm_prime_destroy_file_private() argument
232 WARN_ON(!RB_EMPTY_ROOT(&prime_fpriv->dmabufs)); in drm_prime_destroy_file_private()