From: Mario Kleiner Date: Mon, 4 May 2015 04:29:47 +0000 (+0200) Subject: drm/qxl: Fix qxl_noop_get_vblank_counter() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=337eb43c8d0000fef80b88e43fee7752a84afab2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/qxl: Fix qxl_noop_get_vblank_counter() This breaks under the vblank timestamp cleanup patch by Daniel Vetter. Also it is pointless to return anything but zero (or any other constant) if the function doesn't actually query a hw vblank counter. The bogus return of the current drm vblank counter via direct readout or via drm_vblank_count() is found in many of the new kms drivers, but it does exactly nothing different from returning any arbitrary constant - it's a no operation. Let's simply return 0 - Easy and fast. Signed-off-by: Mario Kleiner Cc: Dave Airlie Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index e2d07085b6a5..83f6f0b5e9ef 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -198,7 +198,7 @@ static int qxl_pm_restore(struct device *dev) static u32 qxl_noop_get_vblank_counter(struct drm_device *dev, int crtc) { - return dev->vblank[crtc].count.counter; + return 0; } static int qxl_noop_enable_vblank(struct drm_device *dev, int crtc)