summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2016-08-03 10:00:56 -0700
committerRodrigo Vivi <rodrigo.vivi@intel.com>2016-08-05 09:40:07 -0700
commit4194c088df6808336bcb1fe434332fb64bdb240e (patch)
treea80f6ecd0aacf9adf61f719f0ab748cff2d69ec3
parent4e9121e6b4f9fee47e6746bfdb6745951b7a9b20 (diff)
downloadlinux-stable-4194c088df6808336bcb1fe434332fb64bdb240e.tar.gz
linux-stable-4194c088df6808336bcb1fe434332fb64bdb240e.tar.bz2
linux-stable-4194c088df6808336bcb1fe434332fb64bdb240e.zip
drm/i915: Use drm official vblank_no_hw_counter callback.
No functional change. Instead of defining a new empty function let's use what is available on drm. It gets cleaner, and easy to read, and understand. Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 006a855877ad..591f452ece68 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -656,12 +656,6 @@ static void i915_enable_asle_pipestat(struct drm_i915_private *dev_priv)
* of horizontal active on the first line of vertical active
*/
-static u32 i8xx_get_vblank_counter(struct drm_device *dev, unsigned int pipe)
-{
- /* Gen2 doesn't have a hardware frame counter */
- return 0;
-}
-
/* Called from drm generic code, passed a 'crtc', which
* we use as a pipe index
*/
@@ -4538,8 +4532,9 @@ void intel_irq_init(struct drm_i915_private *dev_priv)
i915_hangcheck_elapsed);
if (IS_GEN2(dev_priv)) {
+ /* Gen2 doesn't have a hardware frame counter */
dev->max_vblank_count = 0;
- dev->driver->get_vblank_counter = i8xx_get_vblank_counter;
+ dev->driver->get_vblank_counter = drm_vblank_no_hw_counter;
} else if (IS_G4X(dev_priv) || INTEL_INFO(dev_priv)->gen >= 5) {
dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */
dev->driver->get_vblank_counter = g4x_get_vblank_counter;