From: Mario Kleiner <mario.kleiner.de@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Dave Airlie <airlied@redhat.com>
Subject: [PATCH 4/5] drm/qxl: Fix qxl_noop_get_vblank_counter()
Date: Mon, 4 May 2015 06:29:47 +0200 [thread overview]
Message-ID: <1430713787-29687-5-git-send-email-mario.kleiner.de@gmail.com> (raw)
In-Reply-To: <1430713787-29687-1-git-send-email-mario.kleiner.de@gmail.com>
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>
---
drivers/gpu/drm/qxl/qxl_drv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c
index 1d9b80c..577dc45 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)
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-05-04 4:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-04 4:29 Tiny fixes - resent Mario Kleiner
2015-05-04 4:29 ` [PATCH 1/5] drm/tegra: Don't use vblank_disable_immediate on incapable driver Mario Kleiner
2015-05-04 4:29 ` [PATCH 2/5] drm: Prevent invalid use of vblank_disable_immediate. (v2) Mario Kleiner
2015-05-04 4:29 ` [PATCH 3/5] drm: Zero out invalid vblank timestamp in drm_update_vblank_count. (v2) Mario Kleiner
2015-05-04 4:29 ` Mario Kleiner [this message]
2015-05-04 9:15 ` Tiny fixes - resent Daniel Vetter
2015-05-08 23:20 ` Mario Kleiner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1430713787-29687-5-git-send-email-mario.kleiner.de@gmail.com \
--to=mario.kleiner.de@gmail.com \
--cc=airlied@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox