diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2014-08-13 04:57:05 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-13 08:23:38 -0400 |
commit | dc41c154ffc30afb7ee7e891140dead26fce5c39 (patch) | |
tree | 645f8aa91896ad6a42d8693db346a89cc8382756 /drivers/gpu/drm/i915/i915_reg.h | |
parent | 8ac5466926daef2406f7b25e9a272567cb81adb0 (diff) |
drm/i915: Add support for variable cursor size on 845/865
845/865 support different cursor sizes as well, albeit a bit differently
than later platforms. Add the necessary code to make them work.
Untested due to lack of hardware.
v2: Warn but accept invalid stride (Chris)
Rewrite the cursor size checks for other platforms (Chris)
v3: More polish and magic to the cursor size checks (Chris)
v4: Moar polish and a comment (Chris)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_reg.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index f79c20d49d99..203062e93452 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -4128,7 +4128,8 @@ enum punit_power_well { | |||
4128 | /* Old style CUR*CNTR flags (desktop 8xx) */ | 4128 | /* Old style CUR*CNTR flags (desktop 8xx) */ |
4129 | #define CURSOR_ENABLE 0x80000000 | 4129 | #define CURSOR_ENABLE 0x80000000 |
4130 | #define CURSOR_GAMMA_ENABLE 0x40000000 | 4130 | #define CURSOR_GAMMA_ENABLE 0x40000000 |
4131 | #define CURSOR_STRIDE_MASK 0x30000000 | 4131 | #define CURSOR_STRIDE_SHIFT 28 |
4132 | #define CURSOR_STRIDE(x) ((ffs(x)-9) << CURSOR_STRIDE_SHIFT) /* 256,512,1k,2k */ | ||
4132 | #define CURSOR_PIPE_CSC_ENABLE (1<<24) | 4133 | #define CURSOR_PIPE_CSC_ENABLE (1<<24) |
4133 | #define CURSOR_FORMAT_SHIFT 24 | 4134 | #define CURSOR_FORMAT_SHIFT 24 |
4134 | #define CURSOR_FORMAT_MASK (0x07 << CURSOR_FORMAT_SHIFT) | 4135 | #define CURSOR_FORMAT_MASK (0x07 << CURSOR_FORMAT_SHIFT) |