[PATCH v3] drm/framebuffer: Acquire internal references on GEM handles

Thomas Zimmermann tzimmermann at suse.de
Mon Jul 7 13:33:32 UTC 2025


Hi

Am 07.07.25 um 15:21 schrieb Christian König:

>>   
>> +#define DRM_FRAMEBUFFER_HAS_HANDLE_REF(_i)	BIT(0u + (_i))
> Why the "0u + (_i)" here? An macro trick?

You mean why not just BIT(_i)? internal_flags could possibly contain 
additional flags. Just using BIT(_i) would make it look as if it's only 
for those handle refs.

Best regards
Thomas

>
> Regards,
> Christian.
>
>> +
>>   /**
>>    * struct drm_framebuffer - frame buffer object
>>    *
>> @@ -188,6 +191,10 @@ struct drm_framebuffer {
>>   	 * DRM_MODE_FB_MODIFIERS.
>>   	 */
>>   	int flags;
>> +	/**
>> +	 * @internal_flags: Framebuffer flags like DRM_FRAMEBUFFER_HAS_HANDLE_REF.
>> +	 */
>> +	unsigned int internal_flags;
>>   	/**
>>   	 * @filp_head: Placed on &drm_file.fbs, protected by &drm_file.fbs_lock.
>>   	 */

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)



More information about the dri-devel mailing list