Commit 25e9dc69 authored by Zhao Yakui's avatar Zhao Yakui Committed by Dave Airlie

gma500: Fix incorrect SR issue when disabling CRTC already in disabled state

Currently when trying to call the DPMS off again for one CRTC with DPMS off,
it will firstly disable the SR and can't enable it again because of the
incorrect check/logic. In such case the self refresh is still disabled
although one CRTC pipe is active. This is wrong.
Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
[Ported to in kernel driver]
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 4dabd1b9
...@@ -791,7 +791,7 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode) ...@@ -791,7 +791,7 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
case DRM_MODE_DPMS_STANDBY: case DRM_MODE_DPMS_STANDBY:
case DRM_MODE_DPMS_SUSPEND: case DRM_MODE_DPMS_SUSPEND:
if (psb_intel_crtc->active) if (psb_intel_crtc->active)
return; break;
psb_intel_crtc->active = true; psb_intel_crtc->active = true;
...@@ -835,7 +835,6 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode) ...@@ -835,7 +835,6 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
REG_WRITE(map->status, temp); REG_WRITE(map->status, temp);
REG_READ(map->status); REG_READ(map->status);
cdv_intel_update_watermark(dev, crtc);
cdv_intel_crtc_load_lut(crtc); cdv_intel_crtc_load_lut(crtc);
/* Give the overlay scaler a chance to enable /* Give the overlay scaler a chance to enable
...@@ -845,7 +844,7 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode) ...@@ -845,7 +844,7 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
break; break;
case DRM_MODE_DPMS_OFF: case DRM_MODE_DPMS_OFF:
if (!psb_intel_crtc->active) if (!psb_intel_crtc->active)
return; break;
psb_intel_crtc->active = false; psb_intel_crtc->active = false;
...@@ -892,10 +891,10 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode) ...@@ -892,10 +891,10 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
/* Wait for the clocks to turn off. */ /* Wait for the clocks to turn off. */
udelay(150); udelay(150);
cdv_intel_update_watermark(dev, crtc);
psb_intel_crtc->crtc_enable = false; psb_intel_crtc->crtc_enable = false;
break; break;
} }
cdv_intel_update_watermark(dev, crtc);
/*Set FIFO Watermarks*/ /*Set FIFO Watermarks*/
REG_WRITE(DSPARB, 0x3F3E); REG_WRITE(DSPARB, 0x3F3E);
} }
......
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