From: Robert Fekete <robert.fekete@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: Add some more bits to CURSOR_POS_MASK
Date: Wed, 4 Nov 2015 10:35:19 +0100 [thread overview]
Message-ID: <1446629719-1074-1-git-send-email-robert.fekete@linux.intel.com> (raw)
The old value of 0x7FF will wrap the position at 2048 giving wrong
coordinate values on panels larger than 2048 pixels in any direction.
Used in i915_debugfs atm. Looking at all hw specs available at 01.org
shows that X position is bit 0:11, and even 0:12 on some hw where
remaining bits up to bit 14 is MBZ. For Y position it is bits 16-27
where bits 28:30 is MBZ. It should be safe to increase CURSOR_POS_MASK
to 13 bits (0x1FFF) making 8192 as a new wrap around value still getting
valid cursor positions on platforms with only 12bits available thanks to
MBZ on adjacent bits above.
Signed-off-by: Robert Fekete <robert.fekete@linux.intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index 894253228947..f351f46f8cb9 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -4883,7 +4883,7 @@ enum skl_disp_power_wells {
#define CURSOR_TRICKLE_FEED_DISABLE (1 << 14)
#define _CURABASE 0x70084
#define _CURAPOS 0x70088
-#define CURSOR_POS_MASK 0x007FF
+#define CURSOR_POS_MASK 0x01FFF
#define CURSOR_POS_SIGN 0x8000
#define CURSOR_X_SHIFT 0
#define CURSOR_Y_SHIFT 16
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2015-11-04 9:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-04 9:35 Robert Fekete [this message]
2015-11-04 9:59 ` [PATCH] drm/i915: Add some more bits to CURSOR_POS_MASK Patrik Jakobsson
2015-11-18 9:17 ` Daniel Vetter
2015-11-25 12:54 ` Robert Fekete
2015-11-25 16:54 ` Patrik Jakobsson
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=1446629719-1074-1-git-send-email-robert.fekete@linux.intel.com \
--to=robert.fekete@linux.intel.com \
--cc=intel-gfx@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;
as well as URLs for NNTP newsgroup(s).