Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329300
b: refs/heads/master
c: 9a9f578
h: refs/heads/master
v: v3
  • Loading branch information
Zhao Yakui authored and Dave Airlie committed Aug 23, 2012
1 parent aa63c1e commit 68ba6e5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d112a8163f83752361dd639a9a579ae5cc05c6cf
refs/heads/master: 9a9f5786fcccda3cc61eaa8f537690327eff6853
24 changes: 24 additions & 0 deletions trunk/drivers/gpu/drm/gma500/cdv_intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,28 @@ static bool cdv_intel_dpc_is_edp(struct drm_device *dev)
return false;
}

/* Cedarview display clock gating
We need this disable dot get correct behaviour while enabling
DP/eDP. TODO - investigate if we can turn it back to normality
after enabling */
static void cdv_disable_intel_clock_gating(struct drm_device *dev)
{
u32 reg_value;
reg_value = REG_READ(DSPCLK_GATE_D);

reg_value |= (DPUNIT_PIPEB_GATE_DISABLE |
DPUNIT_PIPEA_GATE_DISABLE |
DPCUNIT_CLOCK_GATE_DISABLE |
DPLSUNIT_CLOCK_GATE_DISABLE |
DPOUNIT_CLOCK_GATE_DISABLE |
DPIOUNIT_CLOCK_GATE_DISABLE);

REG_WRITE(DSPCLK_GATE_D, reg_value);

udelay(500);
}

void
cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev, int output_reg)
{
Expand Down Expand Up @@ -1841,6 +1863,8 @@ cdv_intel_dp_init(struct drm_device *dev, struct psb_intel_mode_device *mode_dev
break;
}

cdv_disable_intel_clock_gating(dev);

cdv_intel_dp_i2c_init(psb_intel_connector, psb_intel_encoder, name);
/* FIXME:fail check */
cdv_intel_dp_add_properties(connector);
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/gpu/drm/gma500/psb_intel_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,10 @@ No status bits are changed.
# define VRHUNIT_CLOCK_GATE_DISABLE (1 << 28) /* Fixed value on CDV */
# define DPOUNIT_CLOCK_GATE_DISABLE (1 << 11)
# define DPIOUNIT_CLOCK_GATE_DISABLE (1 << 6)
# define DPUNIT_PIPEB_GATE_DISABLE (1 << 30)
# define DPUNIT_PIPEA_GATE_DISABLE (1 << 25)
# define DPCUNIT_CLOCK_GATE_DISABLE (1 << 24)
# define DPLSUNIT_CLOCK_GATE_DISABLE (1 << 13)

#define RAMCLK_GATE_D 0x6210

Expand Down

0 comments on commit 68ba6e5

Please sign in to comment.