接前一篇文章:DRM全解析 —— CRTC详解(3)
本文继续对DRM中CRTC的核心结构struct drm_crtc的成员进行释义。
(21)struct drm_object_properties properties
/** @properties: property tracking for this CRTC */
struct drm_object_properties properties;
此crtc的属性跟踪。
(22)struct drm_property *scaling_filter_property
/**
* @scaling_filter_property: property to apply a particular filter while
* scaling.
*/
struct drm_property *scaling_filter_property;
属性,以便在缩放时应用特定的筛选器。
(23)struct drm_crtc_state *state
/**
* @state:
*
* Current atomic state for this CRTC.
*
* This is protected by @mutex. Note that nonblocking atomic commits
* access the current CRTC state without taking locks. Either by going
* through the &struct drm_atomic_state pointers, see
* for_each_oldnew_crtc_in_state(), for_each_old_crtc_in_state() and
* for_each_new_crtc_in_state(). Or through careful ordering of atomic
* commit operations as implemented in the atomic helpers, see
* &struct drm_crtc_commit.
*/
struct drm_crtc_state *state;
此CRTC的当前原子状态。
此项是由@mutex保护的。注意,非阻塞原子提交访问当前CRTC状态而不取得锁。或者通过遍历&struct drm_atomic_state指针(参见for_each_oldnew_crtc_in_state()、for_each_old _crtc_in.state()和for_each_new_crtc_in_state())。或者通过对atomic helpers中实现的原子提交操作进行仔细排序(参阅&struct drm_crtc_commit)。
(24)struct list_head commit_list
/**
* @commit_list:
*
* List of &drm_crtc_commit structures tracking pending commits.
* Protected by @commit_lock. This list holds its own full reference,
* as does the ongoing commit.
*
* "Note that the commit for a state change is also tracked in
* &drm_crtc_state.commit. For accessing the immediately preceding
* commit in an atomic update it is recommended to just use that
* pointer in the old CRTC state, since accessing that doesn't need
* any locking or list-walking. @commit_list should only be used to
* stall for framebuffer cleanup that's signalled through
* &drm_crtc_commit.cleanup_done."
*/
struct list_head commit_list;
跟踪挂起提交的&drm_crt_commit结构的列表。受@commit_lock保护。这个列表有自己的完整引用,正在进行的提交也是如此。
注意,状态更改的提交也在&drm_crtc_state.commit中进行跟踪。为了访问原子更新中紧接在前的提交,建议仅在旧CRTC状态下使用该指针,因为访问它不需要任何锁定或列表遍历。@commit_list应仅用于暂停通过&drm_crtc_commit.cleanup_done发出信号的帧缓冲区清理。
(25)spinlock_t commit_lock
/**
* @commit_lock:
*
* Spinlock to protect @commit_list.
*/
spinlock_t commit_lock;
保护@commit_list的自旋锁。
(26)struct dentry *debugfs_entry
/**
* @debugfs_entry:
*
* Debugfs directory for this CRTC.
*/
struct dentry *debugfs_entry;
此CRTC的debugfs目录。
(27) struct drm_crtc_crc crc
/**
* @crc:
*
* Configuration settings of CRC capture.
*/
struct drm_crtc_crc crc;
CRC捕获的配置设置。
(28)unsigned int fence_context
/**
* @fence_context:
*
* timeline context used for fence operations.
*/
unsigned int fence_context;
用于fence操作的时间线上下文。
(29)spinlock_t fence_lock
/**
* @fence_lock:
*
* spinlock to protect the fences in the fence_context.
*/
spinlock_t fence_lock;
保护fence_context中的fence的spinlock。
(30)unsigned long fence_seqno
/**
* @fence_seqno:
*
* Seqno variable used as monotonic counter for the fences
* created on the CRTC's timeline.
*/
unsigned long fence_seqno;
Seqno变量用作CRTC时间线上创建的fences的单调计数器。
(31)char timeline_name[32]
/**
* @timeline_name:
*
* The name of the CRTC's fence timeline.
*/
char timeline_name[32];
CRTC的fence时间线的名称。
(32)struct drm_self_refresh_data *self_refresh_data
/**
* @self_refresh_data: Holds the state for the self refresh helpers
*
* Initialized via drm_self_refresh_helper_init().
*/
struct drm_self_refresh_data *self_refresh_data;
保持自刷新助手的状态。
通过drm_self_refresh_helper_init()初始化。
至此,DRM CRTC的核心结构struct drm_crtc就释义完成了。后续会对此结构中涉及到的结构进行深入讲解。