KWin、libdrm、DRM从上到下全过程 —— drmModeAddFBxxx(26)

2023-12-18 11:30:27

接前一篇文章:KWin、libdrm、DRM从上到下全过程 —— drmModeAddFBxxx(25)

上一回对于idr_find函数的功能、参数进行了讲解,并介绍了IDR的机制。本回从数据结构以及上下文方面继续进行讲解。为了便于理解,再次贴出相关源码。

  • i915_gem_object_lookup_rcu函数

i915_gem_object_lookup_rcu函数在drivers/gpu/drm/i915/gem/i915_gem_object.h中,代码如下:

/**
 * i915_gem_object_lookup_rcu - look up a temporary GEM object from its handle
 * @filp: DRM file private date
 * @handle: userspace handle
 *
 * Returns:
 *
 * A pointer to the object named by the handle if such exists on @filp, NULL
 * otherwise. This object is only valid whilst under the RCU read lock, and
 * note carefully the object may be in the process of being destroyed.
 */
static inline struct drm_i915_gem_object *
i915_gem_object_lookup_rcu(struct drm_file *file,

文章来源:https://blog.csdn.net/phmatthaus/article/details/135049590
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。