Message ID | 1431548627-2527-2-git-send-email-maarten.lankhorst@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Op 13-05-15 om 22:23 schreef Maarten Lankhorst: > This is useful when calculating vblank in drivers that support it. > During a modeset the atomic state may not match the hardware state, > so if the driver wants to wait on a vblank they'll want to use > crtc->hwmode rather than crtc->state->adjusted_mode. > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > Drop this patch please, after discussion with danvet it seems better to do this inside the intel code of "[PATCH v2 16/17] drm/i915: Use crtc->hwmode for vblanks." instead.
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index d192b48d919a..63613ce673c7 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -673,6 +673,7 @@ drm_atomic_helper_update_legacy_modeset_state(struct drm_device *dev, /* set legacy state in the crtc structure */ for_each_crtc_in_state(old_state, crtc, old_crtc_state, i) { crtc->mode = crtc->state->mode; + crtc->hwmode = crtc->state->adjusted_mode; crtc->enabled = crtc->state->enable; crtc->x = crtc->primary->state->src_x >> 16; crtc->y = crtc->primary->state->src_y >> 16;
This is useful when calculating vblank in drivers that support it. During a modeset the atomic state may not match the hardware state, so if the driver wants to wait on a vblank they'll want to use crtc->hwmode rather than crtc->state->adjusted_mode. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> --- drivers/gpu/drm/drm_atomic_helper.c | 1 + 1 file changed, 1 insertion(+)