|
@@ -8409,8 +8409,8 @@ static void i845_update_cursor(struct drm_crtc *crtc, u32 base)
|
|
|
uint32_t cntl = 0, size = 0;
|
|
|
|
|
|
if (base) {
|
|
|
- unsigned int width = intel_crtc->cursor_width;
|
|
|
- unsigned int height = intel_crtc->cursor_height;
|
|
|
+ unsigned int width = intel_crtc->base.cursor->state->crtc_w;
|
|
|
+ unsigned int height = intel_crtc->base.cursor->state->crtc_h;
|
|
|
unsigned int stride = roundup_pow_of_two(width) * 4;
|
|
|
|
|
|
switch (stride) {
|
|
@@ -8474,7 +8474,7 @@ static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base)
|
|
|
cntl = 0;
|
|
|
if (base) {
|
|
|
cntl = MCURSOR_GAMMA_ENABLE;
|
|
|
- switch (intel_crtc->cursor_width) {
|
|
|
+ switch (intel_crtc->base.cursor->state->crtc_w) {
|
|
|
case 64:
|
|
|
cntl |= CURSOR_MODE_64_ARGB_AX;
|
|
|
break;
|
|
@@ -8485,7 +8485,7 @@ static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base)
|
|
|
cntl |= CURSOR_MODE_256_ARGB_AX;
|
|
|
break;
|
|
|
default:
|
|
|
- MISSING_CASE(intel_crtc->cursor_width);
|
|
|
+ MISSING_CASE(intel_crtc->base.cursor->state->crtc_w);
|
|
|
return;
|
|
|
}
|
|
|
cntl |= pipe << 28; /* Connect to correct pipe */
|
|
@@ -8532,7 +8532,7 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
|
|
|
base = 0;
|
|
|
|
|
|
if (x < 0) {
|
|
|
- if (x + intel_crtc->cursor_width <= 0)
|
|
|
+ if (x + intel_crtc->base.cursor->state->crtc_w <= 0)
|
|
|
base = 0;
|
|
|
|
|
|
pos |= CURSOR_POS_SIGN << CURSOR_X_SHIFT;
|
|
@@ -8541,7 +8541,7 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
|
|
|
pos |= x << CURSOR_X_SHIFT;
|
|
|
|
|
|
if (y < 0) {
|
|
|
- if (y + intel_crtc->cursor_height <= 0)
|
|
|
+ if (y + intel_crtc->base.cursor->state->crtc_h <= 0)
|
|
|
base = 0;
|
|
|
|
|
|
pos |= CURSOR_POS_SIGN << CURSOR_Y_SHIFT;
|
|
@@ -8557,8 +8557,8 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc,
|
|
|
/* ILK+ do this automagically */
|
|
|
if (HAS_GMCH_DISPLAY(dev) &&
|
|
|
crtc->cursor->state->rotation == BIT(DRM_ROTATE_180)) {
|
|
|
- base += (intel_crtc->cursor_height *
|
|
|
- intel_crtc->cursor_width - 1) * 4;
|
|
|
+ base += (intel_crtc->base.cursor->state->crtc_h *
|
|
|
+ intel_crtc->base.cursor->state->crtc_w - 1) * 4;
|
|
|
}
|
|
|
|
|
|
if (IS_845G(dev) || IS_I865G(dev))
|
|
@@ -12302,7 +12302,7 @@ intel_check_cursor_plane(struct drm_plane *plane,
|
|
|
|
|
|
finish:
|
|
|
if (intel_crtc->active) {
|
|
|
- if (intel_crtc->cursor_width != state->base.crtc_w)
|
|
|
+ if (intel_crtc->base.cursor->state->crtc_w != state->base.crtc_w)
|
|
|
intel_crtc->atomic.update_wm = true;
|
|
|
|
|
|
intel_crtc->atomic.fb_bits |=
|
|
@@ -12345,8 +12345,6 @@ intel_commit_cursor_plane(struct drm_plane *plane,
|
|
|
intel_crtc->cursor_addr = addr;
|
|
|
intel_crtc->cursor_bo = obj;
|
|
|
update:
|
|
|
- intel_crtc->cursor_width = state->base.crtc_w;
|
|
|
- intel_crtc->cursor_height = state->base.crtc_h;
|
|
|
|
|
|
if (intel_crtc->active)
|
|
|
intel_crtc_update_cursor(crtc, state->visible);
|