Lines Matching refs:prime_fpriv

96 static int drm_prime_add_buf_handle(struct drm_prime_file_private *prime_fpriv,  in drm_prime_add_buf_handle()  argument
111 p = &prime_fpriv->dmabufs.rb_node; in drm_prime_add_buf_handle()
123 rb_insert_color(&member->dmabuf_rb, &prime_fpriv->dmabufs); in drm_prime_add_buf_handle()
126 p = &prime_fpriv->handles.rb_node; in drm_prime_add_buf_handle()
138 rb_insert_color(&member->handle_rb, &prime_fpriv->handles); in drm_prime_add_buf_handle()
143 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
148 rb = prime_fpriv->handles.rb_node; in drm_prime_lookup_buf_by_handle()
164 static int drm_prime_lookup_buf_handle(struct drm_prime_file_private *prime_fpriv, in drm_prime_lookup_buf_handle() argument
170 rb = prime_fpriv->dmabufs.rb_node; in drm_prime_lookup_buf_handle()
188 void drm_prime_remove_buf_handle(struct drm_prime_file_private *prime_fpriv, in drm_prime_remove_buf_handle() argument
193 mutex_lock(&prime_fpriv->lock); in drm_prime_remove_buf_handle()
195 rb = prime_fpriv->handles.rb_node; in drm_prime_remove_buf_handle()
201 rb_erase(&member->handle_rb, &prime_fpriv->handles); in drm_prime_remove_buf_handle()
202 rb_erase(&member->dmabuf_rb, &prime_fpriv->dmabufs); in drm_prime_remove_buf_handle()
214 mutex_unlock(&prime_fpriv->lock); in drm_prime_remove_buf_handle()
217 void drm_prime_init_file_private(struct drm_prime_file_private *prime_fpriv) in drm_prime_init_file_private() argument
219 mutex_init(&prime_fpriv->lock); in drm_prime_init_file_private()
220 prime_fpriv->dmabufs = RB_ROOT; in drm_prime_init_file_private()
221 prime_fpriv->handles = RB_ROOT; in drm_prime_init_file_private()
224 void drm_prime_destroy_file_private(struct drm_prime_file_private *prime_fpriv) in drm_prime_destroy_file_private() argument
227 WARN_ON(!RB_EMPTY_ROOT(&prime_fpriv->dmabufs)); in drm_prime_destroy_file_private()