Skip to content

Commit

Permalink
drm/qxl: Fix qxl_noop_get_vblank_counter()
Browse files Browse the repository at this point in the history
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 <mario.kleiner.de@gmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Mario Kleiner authored and Daniel Vetter committed May 4, 2015
1 parent d66a1e3 commit 337eb43
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/qxl/qxl_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 337eb43

Please sign in to comment.