Skip to content

Commit

Permalink
gma500: Fix incorrect SR issue when disabling CRTC already in disable…
Browse files Browse the repository at this point in the history
…d 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: Zhao Yakui <yakui.zhao@intel.com>
[Ported to in kernel driver]
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Zhao Yakui authored and Dave Airlie committed Aug 23, 2012
1 parent 4dabd1b commit 25e9dc6
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/gpu/drm/gma500/cdv_intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_SUSPEND:
if (psb_intel_crtc->active)
return;
break;

psb_intel_crtc->active = true;

Expand Down Expand Up @@ -835,7 +835,6 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
REG_WRITE(map->status, temp);
REG_READ(map->status);

cdv_intel_update_watermark(dev, crtc);
cdv_intel_crtc_load_lut(crtc);

/* Give the overlay scaler a chance to enable
Expand All @@ -845,7 +844,7 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
break;
case DRM_MODE_DPMS_OFF:
if (!psb_intel_crtc->active)
return;
break;

psb_intel_crtc->active = false;

Expand Down Expand Up @@ -892,10 +891,10 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)

/* Wait for the clocks to turn off. */
udelay(150);
cdv_intel_update_watermark(dev, crtc);
psb_intel_crtc->crtc_enable = false;
break;
}
cdv_intel_update_watermark(dev, crtc);
/*Set FIFO Watermarks*/
REG_WRITE(DSPARB, 0x3F3E);
}
Expand Down

0 comments on commit 25e9dc6

Please sign in to comment.