aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-08-04 07:24:42 -0400
committerEric Anholt <eric@anholt.net>2010-08-09 14:24:30 -0400
commit87f8ebf309b2df69b57be96bf36d2d61009fd296 (patch)
tree165a58616aa4e6dcf1a825a69cb81d8ae884616f
parent6146b3d61925116e3fecce36c2fd873665bd6614 (diff)
drm/i915: Disable the cursor for DPMS_OFF
The comments have long desired that we should switch off the cursor along with the display plane, make it so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Eric Anholt <eric@anholt.net>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
-rw-r--r--drivers/gpu/drm/i915/intel_drv.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 22966bd9aa96..24fbd0f24507 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2470,9 +2470,6 @@ static void i9xx_crtc_dpms(struct drm_crtc *crtc, int mode)
2470 2470
2471/** 2471/**
2472 * Sets the power management mode of the pipe and plane. 2472 * Sets the power management mode of the pipe and plane.
2473 *
2474 * This code should probably grow support for turning the cursor off and back
2475 * on appropriately at the same time as we're turning the pipe off/on.
2476 */ 2473 */
2477static void intel_crtc_dpms(struct drm_crtc *crtc, int mode) 2474static void intel_crtc_dpms(struct drm_crtc *crtc, int mode)
2478{ 2475{
@@ -2487,6 +2484,9 @@ static void intel_crtc_dpms(struct drm_crtc *crtc, int mode)
2487 2484
2488 intel_crtc->dpms_mode = mode; 2485 intel_crtc->dpms_mode = mode;
2489 2486
2487 intel_crtc->cursor_on = mode == DRM_MODE_DPMS_ON;
2488 intel_crtc_update_cursor(crtc);
2489
2490 if (!dev->primary->master) 2490 if (!dev->primary->master)
2491 return; 2491 return;
2492 2492
@@ -4242,7 +4242,7 @@ static void intel_crtc_update_cursor(struct drm_crtc *crtc)
4242 4242
4243 pos = 0; 4243 pos = 0;
4244 4244
4245 if (crtc->fb) { 4245 if (intel_crtc->cursor_on && crtc->fb) {
4246 base = intel_crtc->cursor_addr; 4246 base = intel_crtc->cursor_addr;
4247 if (x > (int) crtc->fb->width) 4247 if (x > (int) crtc->fb->width)
4248 base = 0; 4248 base = 0;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 1075d4386b87..a44b8cb4d2cc 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -154,7 +154,7 @@ struct intel_crtc {
154 uint32_t cursor_addr; 154 uint32_t cursor_addr;
155 int16_t cursor_x, cursor_y; 155 int16_t cursor_x, cursor_y;
156 int16_t cursor_width, cursor_height; 156 int16_t cursor_width, cursor_height;
157 bool cursor_visble; 157 bool cursor_visble, cursor_on;
158}; 158};
159 159
160#define to_intel_crtc(x) container_of(x, struct intel_crtc, base) 160#define to_intel_crtc(x) container_of(x, struct intel_crtc, base)