aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2012-08-08 09:53:15 -0400
committerDave Airlie <airlied@redhat.com>2012-08-23 19:28:53 -0400
commit25e9dc69709afad2be8de4ac2ecd6015356936ca (patch)
treef1eaabec65a02c8470107b17ee19a8ff47f060a6
parent4dabd1b94da7aedb5c18b67e85c6a71cc1161eac (diff)
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: 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>
-rw-r--r--drivers/gpu/drm/gma500/cdv_intel_display.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c b/drivers/gpu/drm/gma500/cdv_intel_display.c
index a68509ba22a8..5c3a3121ad18 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_display.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_display.c
@@ -791,7 +791,7 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
791 case DRM_MODE_DPMS_STANDBY: 791 case DRM_MODE_DPMS_STANDBY:
792 case DRM_MODE_DPMS_SUSPEND: 792 case DRM_MODE_DPMS_SUSPEND:
793 if (psb_intel_crtc->active) 793 if (psb_intel_crtc->active)
794 return; 794 break;
795 795
796 psb_intel_crtc->active = true; 796 psb_intel_crtc->active = true;
797 797
@@ -835,7 +835,6 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
835 REG_WRITE(map->status, temp); 835 REG_WRITE(map->status, temp);
836 REG_READ(map->status); 836 REG_READ(map->status);
837 837
838 cdv_intel_update_watermark(dev, crtc);
839 cdv_intel_crtc_load_lut(crtc); 838 cdv_intel_crtc_load_lut(crtc);
840 839
841 /* Give the overlay scaler a chance to enable 840 /* 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 break; 844 break;
846 case DRM_MODE_DPMS_OFF: 845 case DRM_MODE_DPMS_OFF:
847 if (!psb_intel_crtc->active) 846 if (!psb_intel_crtc->active)
848 return; 847 break;
849 848
850 psb_intel_crtc->active = false; 849 psb_intel_crtc->active = false;
851 850
@@ -892,10 +891,10 @@ static void cdv_intel_crtc_dpms(struct drm_crtc *crtc, int mode)
892 891
893 /* Wait for the clocks to turn off. */ 892 /* Wait for the clocks to turn off. */
894 udelay(150); 893 udelay(150);
895 cdv_intel_update_watermark(dev, crtc);
896 psb_intel_crtc->crtc_enable = false; 894 psb_intel_crtc->crtc_enable = false;
897 break; 895 break;
898 } 896 }
897 cdv_intel_update_watermark(dev, crtc);
899 /*Set FIFO Watermarks*/ 898 /*Set FIFO Watermarks*/
900 REG_WRITE(DSPARB, 0x3F3E); 899 REG_WRITE(DSPARB, 0x3F3E);
901} 900}