Skip to contentSkip to conversation

drm/i915: Consolidate ILK_DSPCLK_GATE and PCH_DSPCLK_GATE

PATCH In review Damien Lespiau 2 participants 6 messages Oct 17, 2012 – Oct 18, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 drm/i915: Consolidate ILK_DSPCLK_GATE and PCH_DSPCLK_GATE

From: Damien Lespiau <[email protected]>

Register 0x42020 was defined twice under the names PCH_DSPCLK_GATE_D and ILK_DSPCLK_GATE. This patch consolidate the 2 sets of defines in one.

The transforms done are:

PCH_DSPCLK_GATE_D -> ILK_DSPCLK_GATE_D
ILK_DSPCLK_GATE -> ILK_DSPCLK_GATE_D

DPARBUNIT_CLOCK_GATE_DISABLE -> ILK_DPARBUNIT_CLOCK_GATE_DISABLE
ILK_DPARB_CLK_GATE -> ILK_DPARBUNIT_CLOCK_GATE_DISABLE

DPFDUNIT_CLOCK_GATE_DISABLE -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE
ILK_DPFD_CLK_GATE -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE
ILK_CLK_FBC -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE

DPFCRUNIT_CLOCK_GATE_DISABLE -> ILK_DPFCRUNIT_CLOCK_GATE_DISABLE
ILK_DPFC_DIS1 -> ILK_DPFCRUNIT_CLOCK_GATE_DISABLE

DPFCUNIT_CLOCK_GATE_DISABLE -> ILK_DPFCUNIT_CLOCK_GATE_DISABLE
ILK_DPFC_DIS2 -> ILK_DPFCUNIT_CLOCK_GATE_DISABLE

We have a VHRUNIT_CLOCK_GATE_DISABLE define for the pre-ILK DSPCLK_GATE_D. Even if the same bit is used in ILK_DSPCLK_GATE_D, other bits in the register change, so I went with re-defining it, well more precisely rename IVB_VRHUNIT_CLK_GATE, which is not specific to IVB+. So:

IVB_VRHUNIT_CLK_GATE -> ILK_VHRUNIT_CLOCK_GATE_DISABLE
VHRUNIT_CLOCK_GATE_DISABLE -> ILK_VHRUNIT_CLOCK_GATE_DISABLE (ILK+ code)

This commit is only a renaming commit, further commits will clean up the logic.

---
 drivers/gpu/drm/i915/i915_reg.h |   22 +++++-----------
 drivers/gpu/drm/i915/intel_pm.c |   52 +++++++++++++++++++-------------------
 2 files changed, 33 insertions(+), 41 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +7 -15
index 8200c31..ac09d66 100644
@@ -3245,12 +3245,6 @@
 #define DISPLAY_PORT_PLL_BIOS_1         0x46010
 #define DISPLAY_PORT_PLL_BIOS_2         0x46014
 
-#define PCH_DSPCLK_GATE_D	0x42020
-# define DPFCUNIT_CLOCK_GATE_DISABLE		(1 << 9)
-# define DPFCRUNIT_CLOCK_GATE_DISABLE		(1 << 8)
-# define DPFDUNIT_CLOCK_GATE_DISABLE		(1 << 7)
-# define DPARBUNIT_CLOCK_GATE_DISABLE		(1 << 5)
-
 #define PCH_3DCGDIS0		0x46020
 # define MARIUNIT_CLOCK_GATE_DISABLE		(1 << 18)
 # define SVSMUNIT_CLOCK_GATE_DISABLE		(1 << 1)
@@ -3422,15 +3416,13 @@
 #define  ILK_HDCP_DISABLE		(1<<25)
 #define  ILK_eDP_A_DISABLE		(1<<24)
 #define  ILK_DESKTOP			(1<<23)
-#define ILK_DSPCLK_GATE		0x42020
-#define  IVB_VRHUNIT_CLK_GATE	(1<<28)
-#define  ILK_DPARB_CLK_GATE	(1<<5)
-#define  ILK_DPFD_CLK_GATE	(1<<7)
-
-/* According to spec this bit 7/8/9 of 0x42020 should be set to enable FBC */
-#define   ILK_CLK_FBC		(1<<7)
-#define   ILK_DPFC_DIS1		(1<<8)
-#define   ILK_DPFC_DIS2		(1<<9)
+
+#define ILK_DSPCLK_GATE_D			0x42020
+#define   ILK_VRHUNIT_CLOCK_GATE_DISABLE	(1 << 28)
+#define   ILK_DPFCUNIT_CLOCK_GATE_DISABLE	(1 << 9)
+#define   ILK_DPFCRUNIT_CLOCK_GATE_DISABLE	(1 << 8)
+#define   ILK_DPFDUNIT_CLOCK_GATE_DISABLE	(1 << 7)
+#define   ILK_DPARBUNIT_CLOCK_GATE_DISABLE	(1 << 5)
 
 #define IVB_CHICKEN3	0x4200c
 # define CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE	(1 << 5)
drivers/gpu/drm/i915/intel_pm.c +26 -26

117 lines not on this page · raw message

Signature · 1 line
1.7.7.5
#1 lore raw

PATCH 2/3 drm/i915: Program DSPCLK_GATE_D only once on Ironlake

From: Damien Lespiau <[email protected]>

With the consolidated registers, it appears that we're setting the same bis several times. Let's just collect the bit we want to set and program it once.

---
 drivers/gpu/drm/i915/intel_pm.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +4 -11
index 76e10c0..be42b2c 100644
@@ -3316,8 +3316,6 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(PCH_3DCGDIS1,
 		   VFMUNIT_CLOCK_GATE_DISABLE);
 
-	I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
-
 	/*
 	 * According to the spec the following bits should be set in
 	 * order to enable memory self-refresh
@@ -3328,9 +3326,7 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
 	I915_WRITE(ILK_DISPLAY_CHICKEN2,
 		   (I915_READ(ILK_DISPLAY_CHICKEN2) |
 		    ILK_DPARB_GATE | ILK_VSDPFD_FULL));
-	I915_WRITE(ILK_DSPCLK_GATE_D,
-		   (I915_READ(ILK_DSPCLK_GATE_D) |
-		    ILK_DPARBUNIT_CLOCK_GATE_DISABLE));
+	dspclk_gate |= ILK_DPARBUNIT_CLOCK_GATE_DISABLE;
 	I915_WRITE(DISP_ARB_CTL,
 		   (I915_READ(DISP_ARB_CTL) |
 		    DISP_FBC_WM_DIS));
@@ -3343,7 +3339,7 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
 	 * should be set unconditionally in order to enable FBC.
 	 * The bit 22 of 0x42000
 	 * The bit 22 of 0x42004
-	 * The bit 7,8,9 of 0x42020.
+	 * The bit 7,8,9 of 0x42020 (dspclk_gate is set above)
 	 */
 	if (IS_IRONLAKE_M(dev)) {
 		I915_WRITE(ILK_DISPLAY_CHICKEN1,
@@ -3352,13 +3348,10 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
 		I915_WRITE(ILK_DISPLAY_CHICKEN2,
 			   I915_READ(ILK_DISPLAY_CHICKEN2) |
 			   ILK_DPARB_GATE);
-		I915_WRITE(ILK_DSPCLK_GATE_D,
-			   I915_READ(ILK_DSPCLK_GATE_D) |
-			   ILK_DPFCRUNIT_CLOCK_GATE_DISABLE |
-			   ILK_DPFCUNIT_CLOCK_GATE_DISABLE |
-			   ILK_DPFDUNIT_CLOCK_GATE_DISABLE);
 	}
 
+	I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
+
 	I915_WRITE(ILK_DISPLAY_CHICKEN2,
 		   I915_READ(ILK_DISPLAY_CHICKEN2) |
 		   ILK_ELPIN_409_SELECT);
Signature · 1 line
1.7.7.5
#2 lore raw

Re: [PATCH 2/3] drm/i915: Program DSPCLK_GATE_D only once on Ironlake

2012/10/17 Damien Lespiau <[email protected]>:

Quoted 4 lines

From: Damien Lespiau <[email protected]>

With the consolidated registers, it appears that we're setting the same bis several times. Let's just collect the bit we want to set and program

s/bis/bits/

Quoted 21 lines

it once.

---
 drivers/gpu/drm/i915/intel_pm.c |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -2
index 76e10c0..be42b2c 100644
@@ -3316,8 +3316,6 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
        I915_WRITE(PCH_3DCGDIS1,
                   VFMUNIT_CLOCK_GATE_DISABLE);
 
-       I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
-
        /*
         * According to the spec the following bits should be set in
         * order to enable memory self-refresh

drivers/gpu/drm/i915/intel_pm.c static void ironlake_init_clock_gating(struct drm_device *dev) · line 3329

Quoted 7 lines
drivers/gpu/drm/i915/intel_pm.c +1 -3
@@ -3328,9 +3326,7 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
        I915_WRITE(ILK_DISPLAY_CHICKEN2,
                   (I915_READ(ILK_DISPLAY_CHICKEN2) |
                    ILK_DPARB_GATE | ILK_VSDPFD_FULL));
-       I915_WRITE(ILK_DSPCLK_GATE_D,
-                  (I915_READ(ILK_DSPCLK_GATE_D) |
-                   ILK_DPARBUNIT_CLOCK_GATE_DISABLE));
+       dspclk_gate |= ILK_DPARBUNIT_CLOCK_GATE_DISABLE;

We are still doing "dspclk_gate |= ILK_DPARBUNIT_CLOCK_GATE_DISABLE;"
twice: here and also at the beginning of the function.

If you look at the function after this patch it looks like this:

ironlake_init_clock_gating {

/* Required for FBC */
dspclk_gate |= XXX;

/* Required for CxSR */
dspclk_gate |= YYY;

/* According to the spec, required by CxSR, big comment */ dspclk_gate |= YYY;

/* Based on document, required by FBC, big comment */ (no "dpslclk_gate |= XXX" setting here since it is already above) }

I was told that CxSR is the same as memory self-refresh, so I guess we could clean up the function by de-duplicating even the comments since they're talking about the same things. My suggestion would be to eliminate the first comments/code, leaving just the multi-line comments and setting dspclk_gate after each of these (also taking care to set the FBC bits not only for mobile).

Quoted 35 lines
drivers/gpu/drm/i915/intel_pm.c +3 -7
        I915_WRITE(DISP_ARB_CTL,
                   (I915_READ(DISP_ARB_CTL) |
                    DISP_FBC_WM_DIS));
@@ -3343,7 +3339,7 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
         * should be set unconditionally in order to enable FBC.
         * The bit 22 of 0x42000
         * The bit 22 of 0x42004
-        * The bit 7,8,9 of 0x42020.
+        * The bit 7,8,9 of 0x42020 (dspclk_gate is set above)
         */
        if (IS_IRONLAKE_M(dev)) {
                I915_WRITE(ILK_DISPLAY_CHICKEN1,
@@ -3352,13 +3348,10 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
                I915_WRITE(ILK_DISPLAY_CHICKEN2,
                           I915_READ(ILK_DISPLAY_CHICKEN2) |
                           ILK_DPARB_GATE);
-               I915_WRITE(ILK_DSPCLK_GATE_D,
-                          I915_READ(ILK_DSPCLK_GATE_D) |
-                          ILK_DPFCRUNIT_CLOCK_GATE_DISABLE |
-                          ILK_DPFCUNIT_CLOCK_GATE_DISABLE |
-                          ILK_DPFDUNIT_CLOCK_GATE_DISABLE);
        }
 
+       I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
+
        I915_WRITE(ILK_DISPLAY_CHICKEN2,
                   I915_READ(ILK_DISPLAY_CHICKEN2) |
                   ILK_ELPIN_409_SELECT);
--

1.7.7.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni
#3 lore raw

PATCH 3/3 drm/i915: Don't program DSPCLK_GATE_D twice on IVB and VLV

In reply to Damien Lespiau

From: Damien Lespiau <[email protected]>

We were programming register 0x42020 twice on those platforms. Once should be enough.

---
 drivers/gpu/drm/i915/intel_pm.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -6
index be42b2c..724ca4b 100644
@@ -3506,11 +3506,8 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	int pipe;
-	uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
 	uint32_t snpcr;
 
-	I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
-
 	I915_WRITE(WM3_LP_ILK, 0);
 	I915_WRITE(WM2_LP_ILK, 0);
 	I915_WRITE(WM1_LP_ILK, 0);
@@ -3588,9 +3585,6 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	int pipe;
-	uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
-
-	I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
 
 	I915_WRITE(WM3_LP_ILK, 0);
 	I915_WRITE(WM2_LP_ILK, 0);
Signature · 1 line
1.7.7.5
Reviewed-by on v1 3/3
#4 lore raw

Re: [PATCH 3/3] drm/i915: Don't program DSPCLK_GATE_D twice on IVB and VLV

Hi

2012/10/17 Damien Lespiau <[email protected]>:

Quoted 6 lines

From: Damien Lespiau <[email protected]>

We were programming register 0x42020 twice on those platforms. Once should be enough.

Quoted 37 lines
---
 drivers/gpu/drm/i915/intel_pm.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
drivers/gpu/drm/i915/intel_pm.c +0 -7
index be42b2c..724ca4b 100644
@@ -3506,11 +3506,8 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
        int pipe;
-       uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
        uint32_t snpcr;
 
-       I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
-
        I915_WRITE(WM3_LP_ILK, 0);
        I915_WRITE(WM2_LP_ILK, 0);
        I915_WRITE(WM1_LP_ILK, 0);
@@ -3588,9 +3585,6 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
        int pipe;
-       uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
-
-       I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
 
        I915_WRITE(WM3_LP_ILK, 0);
        I915_WRITE(WM2_LP_ILK, 0);
--

1.7.7.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni
Reviewed-by on v1 1/3
#5 lore raw
In reply to Damien Lespiau

Hi

2012/10/17 Damien Lespiau <[email protected]>:

Quoted 67 lines

From: Damien Lespiau <[email protected]>

Register 0x42020 was defined twice under the names PCH_DSPCLK_GATE_D and ILK_DSPCLK_GATE. This patch consolidate the 2 sets of defines in one.

The transforms done are:

PCH_DSPCLK_GATE_D -> ILK_DSPCLK_GATE_D
ILK_DSPCLK_GATE -> ILK_DSPCLK_GATE_D

DPARBUNIT_CLOCK_GATE_DISABLE -> ILK_DPARBUNIT_CLOCK_GATE_DISABLE
ILK_DPARB_CLK_GATE -> ILK_DPARBUNIT_CLOCK_GATE_DISABLE

DPFDUNIT_CLOCK_GATE_DISABLE -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE
ILK_DPFD_CLK_GATE -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE
ILK_CLK_FBC -> ILK_DPFDUNIT_CLOCK_GATE_DISABLE

DPFCRUNIT_CLOCK_GATE_DISABLE -> ILK_DPFCRUNIT_CLOCK_GATE_DISABLE
ILK_DPFC_DIS1 -> ILK_DPFCRUNIT_CLOCK_GATE_DISABLE

DPFCUNIT_CLOCK_GATE_DISABLE -> ILK_DPFCUNIT_CLOCK_GATE_DISABLE
ILK_DPFC_DIS2 -> ILK_DPFCUNIT_CLOCK_GATE_DISABLE

We have a VHRUNIT_CLOCK_GATE_DISABLE define for the pre-ILK DSPCLK_GATE_D. Even if the same bit is used in ILK_DSPCLK_GATE_D, other bits in the register change, so I went with re-defining it, well more precisely rename IVB_VRHUNIT_CLK_GATE, which is not specific to IVB+. So:

IVB_VRHUNIT_CLK_GATE -> ILK_VHRUNIT_CLOCK_GATE_DISABLE
VHRUNIT_CLOCK_GATE_DISABLE -> ILK_VHRUNIT_CLOCK_GATE_DISABLE (ILK+ code)

This commit is only a renaming commit, further commits will clean up the logic.

---
 drivers/gpu/drm/i915/i915_reg.h |   22 +++++-----------
 drivers/gpu/drm/i915/intel_pm.c |   52 +++++++++++++++++++-------------------
 2 files changed, 33 insertions(+), 41 deletions(-)
drivers/gpu/drm/i915/i915_reg.h +0 -12
index 8200c31..ac09d66 100644
@@ -3245,12 +3245,6 @@
 #define DISPLAY_PORT_PLL_BIOS_1         0x46010
 #define DISPLAY_PORT_PLL_BIOS_2         0x46014
 
-#define PCH_DSPCLK_GATE_D      0x42020
-# define DPFCUNIT_CLOCK_GATE_DISABLE           (1 << 9)
-# define DPFCRUNIT_CLOCK_GATE_DISABLE          (1 << 8)
-# define DPFDUNIT_CLOCK_GATE_DISABLE           (1 << 7)
-# define DPARBUNIT_CLOCK_GATE_DISABLE          (1 << 5)
-
 #define PCH_3DCGDIS0           0x46020
 # define MARIUNIT_CLOCK_GATE_DISABLE           (1 << 18)
 # define SVSMUNIT_CLOCK_GATE_DISABLE           (1 << 1)
@@ -3422,15 +3416,13 @@
 #define  ILK_HDCP_DISABLE              (1<<25)
 #define  ILK_eDP_A_DISABLE             (1<<24)
 #define  ILK_DESKTOP                   (1<<23)
-#define ILK_DSPCLK_GATE                0x42020
-#define  IVB_VRHUNIT_CLK_GATE  (1<<28)
-#define  ILK_DPARB_CLK_GATE    (1<<5)
-#define  ILK_DPFD_CLK_GATE     (1<<7)
-
-/* According to spec this bit 7/8/9 of 0x42020 should be set to enable FBC */

drivers/gpu/drm/i915/i915_reg.h line 3425

Quoted 10 lines
drivers/gpu/drm/i915/i915_reg.h +7 -3
-#define   ILK_CLK_FBC          (1<<7)
-#define   ILK_DPFC_DIS1                (1<<8)
-#define   ILK_DPFC_DIS2                (1<<9)
+
+#define ILK_DSPCLK_GATE_D                      0x42020
+#define   ILK_VRHUNIT_CLOCK_GATE_DISABLE       (1 << 28)
+#define   ILK_DPFCUNIT_CLOCK_GATE_DISABLE      (1 << 9)
+#define   ILK_DPFCRUNIT_CLOCK_GATE_DISABLE     (1 << 8)
+#define   ILK_DPFDUNIT_CLOCK_GATE_DISABLE      (1 << 7)
+#define   ILK_DPARBUNIT_CLOCK_GATE_DISABLE     (1 << 5)

Setting bits 7 and 5 to "1" actually means "enable", even though the bit name is "dxxxunit clock gating disable". So my suggestion would be:

+#define   ILK_DPFDUNIT_CLOCK_GATE_ENABLE      (1 << 7)
+#define   ILK_DPARBUNIT_CLOCK_GATE_ENABLE     (1 << 5)

The other bits are fine, since setting them to 1 actually means "disable".

With that fixed:

Quoted 139 lines
drivers/gpu/drm/i915/i915_reg.h +0 -0
 #define IVB_CHICKEN3   0x4200c
 # define CHICKEN3_DGMG_REQ_OUT_FIX_DISABLE     (1 << 5)
drivers/gpu/drm/i915/intel_pm.c +26 -27
index 07da990..76e10c0 100644
@@ -3301,14 +3301,14 @@ void intel_enable_gt_powersave(struct drm_device *dev)
 static void ironlake_init_clock_gating(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
-       uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
+       uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
 
        /* Required for FBC */
-       dspclk_gate |= DPFCUNIT_CLOCK_GATE_DISABLE |
-               DPFCRUNIT_CLOCK_GATE_DISABLE |
-               DPFDUNIT_CLOCK_GATE_DISABLE;
+       dspclk_gate |= ILK_DPFCUNIT_CLOCK_GATE_DISABLE |
+               ILK_DPFCRUNIT_CLOCK_GATE_DISABLE |
+               ILK_DPFDUNIT_CLOCK_GATE_DISABLE;
        /* Required for CxSR */
-       dspclk_gate |= DPARBUNIT_CLOCK_GATE_DISABLE;
+       dspclk_gate |= ILK_DPARBUNIT_CLOCK_GATE_DISABLE;
 
        I915_WRITE(PCH_3DCGDIS0,
                   MARIUNIT_CLOCK_GATE_DISABLE |
@@ -3316,7 +3316,7 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
        I915_WRITE(PCH_3DCGDIS1,
                   VFMUNIT_CLOCK_GATE_DISABLE);
 
-       I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
+       I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
 
        /*
         * According to the spec the following bits should be set in
@@ -3328,9 +3328,9 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
        I915_WRITE(ILK_DISPLAY_CHICKEN2,
                   (I915_READ(ILK_DISPLAY_CHICKEN2) |
                    ILK_DPARB_GATE | ILK_VSDPFD_FULL));
-       I915_WRITE(ILK_DSPCLK_GATE,
-                  (I915_READ(ILK_DSPCLK_GATE) |
-                   ILK_DPARB_CLK_GATE));
+       I915_WRITE(ILK_DSPCLK_GATE_D,
+                  (I915_READ(ILK_DSPCLK_GATE_D) |
+                   ILK_DPARBUNIT_CLOCK_GATE_DISABLE));
        I915_WRITE(DISP_ARB_CTL,
                   (I915_READ(DISP_ARB_CTL) |
                    DISP_FBC_WM_DIS));
@@ -3352,11 +3352,11 @@ static void ironlake_init_clock_gating(struct drm_device *dev)
                I915_WRITE(ILK_DISPLAY_CHICKEN2,
                           I915_READ(ILK_DISPLAY_CHICKEN2) |
                           ILK_DPARB_GATE);
-               I915_WRITE(ILK_DSPCLK_GATE,
-                          I915_READ(ILK_DSPCLK_GATE) |
-                          ILK_DPFC_DIS1 |
-                          ILK_DPFC_DIS2 |
-                          ILK_CLK_FBC);
+               I915_WRITE(ILK_DSPCLK_GATE_D,
+                          I915_READ(ILK_DSPCLK_GATE_D) |
+                          ILK_DPFCRUNIT_CLOCK_GATE_DISABLE |
+                          ILK_DPFCUNIT_CLOCK_GATE_DISABLE |
+                          ILK_DPFDUNIT_CLOCK_GATE_DISABLE);
        }
 
        I915_WRITE(ILK_DISPLAY_CHICKEN2,
@@ -3371,9 +3371,9 @@ static void gen6_init_clock_gating(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
        int pipe;
-       uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
+       uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
 
-       I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
+       I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
 
        I915_WRITE(ILK_DISPLAY_CHICKEN2,
                   I915_READ(ILK_DISPLAY_CHICKEN2) |
@@ -3428,10 +3428,10 @@ static void gen6_init_clock_gating(struct drm_device *dev)
        I915_WRITE(ILK_DISPLAY_CHICKEN2,
                   I915_READ(ILK_DISPLAY_CHICKEN2) |
                   ILK_DPARB_GATE | ILK_VSDPFD_FULL);
-       I915_WRITE(ILK_DSPCLK_GATE,
-                  I915_READ(ILK_DSPCLK_GATE) |
-                  ILK_DPARB_CLK_GATE  |
-                  ILK_DPFD_CLK_GATE);
+       I915_WRITE(ILK_DSPCLK_GATE_D,
+                  I915_READ(ILK_DSPCLK_GATE_D) |
+                  ILK_DPARBUNIT_CLOCK_GATE_DISABLE  |
+                  ILK_DPFDUNIT_CLOCK_GATE_DISABLE);
 
        I915_WRITE(GEN6_MBCTL, I915_READ(GEN6_MBCTL) |
                   GEN6_MBCTL_ENABLE_BOOT_FETCH);
@@ -3513,16 +3513,16 @@ static void ivybridge_init_clock_gating(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
        int pipe;
-       uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
+       uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
        uint32_t snpcr;
 
-       I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
+       I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
 
        I915_WRITE(WM3_LP_ILK, 0);
        I915_WRITE(WM2_LP_ILK, 0);
        I915_WRITE(WM1_LP_ILK, 0);
 
-       I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE);
+       I915_WRITE(ILK_DSPCLK_GATE_D, ILK_VRHUNIT_CLOCK_GATE_DISABLE);
 
        /* WaDisableEarlyCull */
        I915_WRITE(_3D_CHICKEN3,
@@ -3595,15 +3595,15 @@ static void valleyview_init_clock_gating(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
        int pipe;
-       uint32_t dspclk_gate = VRHUNIT_CLOCK_GATE_DISABLE;
+       uint32_t dspclk_gate = ILK_VRHUNIT_CLOCK_GATE_DISABLE;
 
-       I915_WRITE(PCH_DSPCLK_GATE_D, dspclk_gate);
+       I915_WRITE(ILK_DSPCLK_GATE_D, dspclk_gate);
 
        I915_WRITE(WM3_LP_ILK, 0);
        I915_WRITE(WM2_LP_ILK, 0);
        I915_WRITE(WM1_LP_ILK, 0);
 
-       I915_WRITE(ILK_DSPCLK_GATE, IVB_VRHUNIT_CLK_GATE);
+       I915_WRITE(ILK_DSPCLK_GATE_D, ILK_VRHUNIT_CLOCK_GATE_DISABLE);
 
        /* WaDisableEarlyCull */
        I915_WRITE(_3D_CHICKEN3,
--

1.7.7.5

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Paulo Zanoni