From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 3/6] drm/cirrus: Workaround for HDR access
Date: Wed, 25 Jul 2012 13:07:44 +1000 [thread overview]
Message-ID: <1343185664.3715.35.camel@pasglop> (raw)
Qemu has an odd behaviour with the access to HDR (could be a qemu
bug, I'm investigating separately, but it affects current qemu's
so we should try to work around it).
Basically the internal counter that counts the reads of the 3c6
register in order to give you access to the HDR on the 5th access
is initialized in such a way that it overflows if you start doing
the 4-reads sequence right after reset, and thus fails to pickup
the subsequent write.
We work around this by doing a write before the 4 reads, which
resets the counter properly.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
drivers/gpu/drm/cirrus/cirrus_drv.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.h b/drivers/gpu/drm/cirrus/cirrus_drv.h
index 64ea597..b5685d3 100644
--- a/drivers/gpu/drm/cirrus/cirrus_drv.h
+++ b/drivers/gpu/drm/cirrus/cirrus_drv.h
@@ -74,6 +74,7 @@
#define WREG_HDR(v) \
do { \
+ WREG8(VGA_DAC_MASK, v); /* reset counter */ \
RREG8(VGA_DAC_MASK); \
RREG8(VGA_DAC_MASK); \
RREG8(VGA_DAC_MASK); \
reply other threads:[~2012-07-25 3:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1343185664.3715.35.camel@pasglop \
--to=benh@kernel.crashing.org \
--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