Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156523
b: refs/heads/master
c: 24f119c
h: refs/heads/master
i:
  156521: 589d54c
  156519: cd40b08
v: v3
  • Loading branch information
Zhenyu Wang authored and Eric Anholt committed Jul 29, 2009
1 parent 091ae26 commit e7221d8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cdaa052b05e26d96a990af5d253fd2af5db2b1fc
refs/heads/master: 24f119c769bacac5729297b682fec7811a983cc6
28 changes: 25 additions & 3 deletions trunk/drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,6 +998,29 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
return 0;
}

/* Disable the VGA plane that we never use */
static void i915_disable_vga (struct drm_device *dev)
{
struct drm_i915_private *dev_priv = dev->dev_private;
u8 sr1;
u32 vga_reg;

if (IS_IGDNG(dev))
vga_reg = CPU_VGACNTRL;
else
vga_reg = VGACNTRL;

if (I915_READ(vga_reg) & VGA_DISP_DISABLE)
return;

I915_WRITE8(VGA_SR_INDEX, 1);
sr1 = I915_READ8(VGA_SR_DATA);
I915_WRITE8(VGA_SR_DATA, sr1 | (1 << 5));
udelay(100);

I915_WRITE(vga_reg, VGA_DISP_DISABLE);
}

static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
{
struct drm_device *dev = crtc->dev;
Expand Down Expand Up @@ -1200,8 +1223,7 @@ static void igdng_crtc_dpms(struct drm_crtc *crtc, int mode)
case DRM_MODE_DPMS_OFF:
DRM_DEBUG("crtc %d dpms off\n", pipe);

/* Disable the VGA plane that we never use */
I915_WRITE(CPU_VGACNTRL, VGA_DISP_DISABLE);
i915_disable_vga(dev);

/* Disable display plane */
temp = I915_READ(dspcntr_reg);
Expand Down Expand Up @@ -1342,7 +1364,7 @@ static void i9xx_crtc_dpms(struct drm_crtc *crtc, int mode)
//intel_crtc_dpms_video(crtc, FALSE); TODO

/* Disable the VGA plane that we never use */
I915_WRITE(VGACNTRL, VGA_DISP_DISABLE);
i915_disable_vga(dev);

/* Disable display plane */
temp = I915_READ(dspcntr_reg);
Expand Down

0 comments on commit e7221d8

Please sign in to comment.