Trying to fix drm/prime: remove drm_prime_lookup_buf_by_handle

Saarinen, Jani jani.saarinen at intel.com
Fri Jun 13 14:32:08 UTC 2025


Hi, 
> -----Original Message-----
> From: Christian König <ckoenig.leichtzumerken at gmail.com>
> Sent: Friday, 13 June 2025 16.12
> To: Saarinen, Jani <jani.saarinen at intel.com>; jani.nikula at linux.intel.com;
> tursulin at ursulin.net; simona.vetter at ffwll.ch; tzimmermann at suse.de; dri-
> devel at lists.freedesktop.org
> Subject: Trying to fix drm/prime: remove drm_prime_lookup_buf_by_handle
> 
> The problem with this patch is that we now don't check if the handle already
> existed any more, but just blindly try to add it again.
> 
> This obviously breaks re-exporting DMA-bufs but also surfaces an issue that
> we don't seem to take into account that multiple handles can point to the
> same GEM object.
> 
> Try to fix this by just ignoring adding the same DMA-buf to the rb tree multiple
> times. Not sure if that is the best approach, but it should fix the issue at hand.

Please send also to intel gfx and xe mailing lists to see how that works as now both as as discussed broken 
I915: https://intel-gfx-ci.01.org/tree/drm-tip/index.html?testfilter=prime 
Xe: https://intel-gfx-ci.01.org/tree/intel-xe/index.html?testfilter=prime

> 
> Regards,
> Christian.
> 



More information about the dri-devel mailing list