drm/radeon: Fix max_vblank_count value for current display engines
authorMichel Dänzer <michel.daenzer@amd.com>
Tue, 26 May 2015 08:53:39 +0000 (17:53 +0900)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 28 May 2015 04:15:30 +0000 (00:15 -0400)
The value was much too low, which could cause the userspace visible
vblank counter to move backwards when the hardware counter wrapped
around.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_irq_kms.c

index f682e5351252e88df2601e590b2f476d6ca21b68..1162bfa464f3036192854f4d0f3f363eb1ee8cff 100644 (file)
@@ -145,7 +145,13 @@ void radeon_driver_irq_preinstall_kms(struct drm_device *dev)
  */
 int radeon_driver_irq_postinstall_kms(struct drm_device *dev)
 {
-       dev->max_vblank_count = 0x001fffff;
+       struct radeon_device *rdev = dev->dev_private;
+
+       if (ASIC_IS_AVIVO(rdev))
+               dev->max_vblank_count = 0x00ffffff;
+       else
+               dev->max_vblank_count = 0x001fffff;
+
        return 0;
 }