diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-11-04 10:20:35 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-11-07 07:04:48 +0300 |
commit | 986edb91b273f6af622f46b9afe9002cb5cc2130 (patch) | |
tree | 1c93668b81a4aeab9501e45d8acc2f5eaf05f29c /drivers/gpu/drm/nouveau/nouveau_display.c | |
parent | d6455379a9ab87ababce828d6691bdaf7383b2a9 (diff) | |
download | linux-986edb91b273f6af622f46b9afe9002cb5cc2130.tar.xz |
drm/nouveau/kms: prepare to support vbl timestamp calculation with atomic
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_display.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 1c4b2ca6bfd5..340ca3ee1304 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -158,9 +158,13 @@ nouveau_display_vblstamp(struct drm_device *dev, unsigned int pipe, list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { if (nouveau_crtc(crtc)->index == pipe) { + struct drm_display_mode *mode; + if (dev->mode_config.funcs->atomic_commit) + mode = &crtc->state->adjusted_mode; + else + mode = &crtc->hwmode; return drm_calc_vbltimestamp_from_scanoutpos(dev, - pipe, max_error, time, flags, - &crtc->hwmode); + pipe, max_error, time, flags, mode); } } |