[PATCH] drm/prime: remove drm_prime_lookup_buf_by_handle

Ville Syrjälä ville.syrjala at linux.intel.com
Fri Jun 13 14:07:47 UTC 2025


On Fri, Jun 13, 2025 at 05:04:31PM +0300, Ville Syrjälä wrote:
> On Wed, Jun 04, 2025 at 01:32:34PM +0200, Christian König wrote:
> > This was added by Sima +10 years ago as a solution to avoid exporting
> > multiple dma-bufs for the same GEM object. I tried to remove it before,
> > but wasn't 100% sure about all the side effects.
> > 
> > Now Thomas recent modified drm_gem_prime_handle_to_dmabuf() which makes
> > it obvious that this is a superflous step. We try to look up the DMA-buf
> > by handle handle and if that fails for some reason (must likely because
> > the handle is a duplicate) the code just use the DMA-buf from the GEM
> > object.
> > 
> > Just using the DMA-buf from the GEM object in the first place has the
> > same effect as far as I can see.
> 
> This screwed up i915/xe:
> https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_16692/bat-twl-1/igt@prime_self_import@basic-with_one_bo.html

Never mind. Already being discussed.

-- 
Ville Syrjälä
Intel


More information about the dri-devel mailing list