DRM全解析 —— CRTC详解(2)

接前一篇文章:DRM全解析 —— CRTC详解(1)

本文继续对DRM中CRTC的核心结构struct drm_crtc的成员进行释义。

3. drm_crtc结构释义

(5)struct drm_modeset_lock mutex

    /**
	 * @mutex:
	 *
	 * This provides a read lock for the overall CRTC state (mode, dpms
	 * state, ...) and a write lock for everything which can be update
	 * without a full modeset (fb, cursor data, CRTC properties ...). A full
	 * modeset also need to grab &drm_mode_config.connection_mutex.
	 *
	 * For atomic drivers specifically this protects @state.
	 */
	struct drm_modeset_lock mutex;

此项为整个CRTC状态(mode、dpms state……)提供了读取锁,并为所有可以在没有完整modeset的情况下更新的内容(fb、cursor data、CRTC properties……)提供写入锁。完整的modeset还需要获取&drm_mode_config.connection_tmutex。

对于原子驱动程序,

你可能感兴趣的:(DRM,DRM)