|
XenevaOS
|
#include <drm_vblank.h>

Public Attributes | |
| struct drm_device * | dev |
| wait_queue_head_t | queue |
| struct timer_list | disable_timer |
| seqlock_t | seqlock |
| atomic64_t | count |
| ktime_t | time |
| atomic_t | refcount |
| u32 | last |
| u32 | max_vblank_count |
| unsigned int | inmodeset |
| unsigned int | pipe |
| int | framedur_ns |
| int | linedur_ns |
| struct drm_display_mode | hwmode |
| struct drm_vblank_crtc_config | config |
| bool | enabled |
| struct kthread_worker * | worker |
| struct list_head | pending_work |
| wait_queue_head_t | work_wait_queue |
| struct drm_vblank_crtc_timer | vblank_timer |
struct drm_vblank_crtc - vblank tracking for a CRTC
This structure tracks the vblank state for one CRTC.
Note that for historical reasons - the vblank handling code is still shared with legacy/non-kms drivers - this is a free-standing structure not directly connected to &struct drm_crtc. But all public interface functions are taking a &struct drm_crtc to hide this implementation detail.
| struct drm_vblank_crtc_config drm_vblank_crtc::config |
@config: Stores vblank configuration values for a given CRTC. Also, see drm_crtc_vblank_on_config().
| atomic64_t drm_vblank_crtc::count |
@count:
Current software vblank counter.
Note that for a given vblank counter value drm_crtc_handle_vblank() and drm_crtc_vblank_count() or drm_crtc_vblank_count_and_time() provide a barrier: Any writes done before calling drm_crtc_handle_vblank() will be visible to callers of the later functions, iff the vblank count is the same or a later one.
IMPORTANT: This guarantee requires barriers, therefor never access this field directly. Use drm_crtc_vblank_count() instead.
| struct drm_device* drm_vblank_crtc::dev |
@dev: Pointer to the &drm_device.
| struct timer_list drm_vblank_crtc::disable_timer |
@disable_timer: Disable timer for the delayed vblank disabling hysteresis logic. Vblank disabling is controlled through &drm_vblank_crtc_config.offdelay_ms and the setting of the &drm_device.max_vblank_count value.
| bool drm_vblank_crtc::enabled |
@enabled: Tracks the enabling state of the corresponding &drm_crtc to avoid double-disabling and hence corrupting saved state. Needed by drivers not using atomic KMS, since those might go through their CRTC disabling functions multiple times.
| int drm_vblank_crtc::framedur_ns |
@framedur_ns: Frame/Field duration in ns, used by drm_crtc_vblank_helper_get_vblank_timestamp() and computed by drm_calc_timestamping_constants().
| struct drm_display_mode drm_vblank_crtc::hwmode |
@hwmode:
Cache of the current hardware display mode. Only valid when @enabled is set. This is used by helpers like drm_crtc_vblank_helper_get_vblank_timestamp(). We can't just access the hardware mode by e.g. looking at &drm_crtc_state.adjusted_mode, because that one is really hard to get from interrupt context.
| unsigned int drm_vblank_crtc::inmodeset |
@inmodeset: Tracks whether the vblank is disabled due to a modeset. For legacy driver bit 2 additionally tracks whether an additional temporary vblank reference has been acquired to paper over the hardware counter resetting/jumping. KMS drivers should instead just call drm_crtc_vblank_off() and drm_crtc_vblank_on(), which explicitly save and restore the vblank count.
| u32 drm_vblank_crtc::last |
@last: Protected by &drm_device.vbl_lock, used for wraparound handling.
| int drm_vblank_crtc::linedur_ns |
@linedur_ns: Line duration in ns, used by drm_crtc_vblank_helper_get_vblank_timestamp() and computed by drm_calc_timestamping_constants().
| u32 drm_vblank_crtc::max_vblank_count |
@max_vblank_count:
Maximum value of the vblank registers for this crtc. This value +1 will result in a wrap-around of the vblank register. It is used by the vblank core to handle wrap-arounds.
If set to zero the vblank core will try to guess the elapsed vblanks between times when the vblank interrupt is disabled through high-precision timestamps. That approach is suffering from small races and imprecision over longer time periods, hence exposing a hardware vblank counter is always recommended.
This is the runtime configurable per-crtc maximum set through drm_crtc_set_max_vblank_count(). If this is used the driver must leave the device wide &drm_device.max_vblank_count at zero.
If non-zero, &drm_crtc_funcs.get_vblank_counter must be set.
| struct list_head drm_vblank_crtc::pending_work |
@pending_work: A list of scheduled &drm_vblank_work items that are waiting for a future vblank.
| unsigned int drm_vblank_crtc::pipe |
@pipe: drm_crtc_index() of the &drm_crtc corresponding to this structure.
| wait_queue_head_t drm_vblank_crtc::queue |
@queue: Wait queue for vblank waiters.
| atomic_t drm_vblank_crtc::refcount |
@refcount: Number of users/waiters of the vblank interrupt. Only when this refcount reaches 0 can the hardware interrupt be disabled using @disable_timer.
| seqlock_t drm_vblank_crtc::seqlock |
@seqlock: Protect vblank count and time.
| ktime_t drm_vblank_crtc::time |
@time: Vblank timestamp corresponding to @count.
| struct drm_vblank_crtc_timer drm_vblank_crtc::vblank_timer |
@vblank_timer: Holds the state of the vblank timer
| wait_queue_head_t drm_vblank_crtc::work_wait_queue |
@work_wait_queue: The wait queue used for signaling that a &drm_vblank_work item has either finished executing, or was cancelled.
| struct kthread_worker* drm_vblank_crtc::worker |
@worker: The &kthread_worker used for executing vblank works.