Commit d7ce484e authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/i915: Move CURSIZE setup to i845_update_cursor()

CURSIZE register exists on 845/865 only, so move it to
i845_update_cursor(). Changes to cursor size must be done only when the
cursor is disabled, so do the write just before enabling the cursor.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a08a42ad
...@@ -8070,6 +8070,7 @@ static void i845_update_cursor(struct drm_crtc *crtc, u32 base) ...@@ -8070,6 +8070,7 @@ static void i845_update_cursor(struct drm_crtc *crtc, u32 base)
CURSOR_GAMMA_ENABLE | CURSOR_GAMMA_ENABLE |
CURSOR_FORMAT_ARGB); CURSOR_FORMAT_ARGB);
if (intel_crtc->cursor_cntl != cntl) { if (intel_crtc->cursor_cntl != cntl) {
I915_WRITE(CURSIZE, (64 << 12) | 64);
I915_WRITE(_CURACNTR, cntl); I915_WRITE(_CURACNTR, cntl);
POSTING_READ(_CURACNTR); POSTING_READ(_CURACNTR);
intel_crtc->cursor_cntl = cntl; intel_crtc->cursor_cntl = cntl;
...@@ -8219,7 +8220,6 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc, ...@@ -8219,7 +8220,6 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
uint32_t width, uint32_t height) uint32_t width, uint32_t height)
{ {
struct drm_device *dev = crtc->dev; struct drm_device *dev = crtc->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(crtc); struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
enum pipe pipe = intel_crtc->pipe; enum pipe pipe = intel_crtc->pipe;
unsigned old_width; unsigned old_width;
...@@ -8292,9 +8292,6 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc, ...@@ -8292,9 +8292,6 @@ static int intel_crtc_cursor_set_obj(struct drm_crtc *crtc,
addr = obj->phys_handle->busaddr; addr = obj->phys_handle->busaddr;
} }
if (IS_GEN2(dev))
I915_WRITE(CURSIZE, (height << 12) | width);
finish: finish:
if (intel_crtc->cursor_bo) { if (intel_crtc->cursor_bo) {
if (!INTEL_INFO(dev)->cursor_needs_physical) if (!INTEL_INFO(dev)->cursor_needs_physical)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment