From 9d7808f03d34d7f851cf32a27575c18578620aa4 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sun, 7 Feb 2010 21:03:16 +0100 Subject: [PATCH] linux: - update to linux-2.6.33-rc7 --- ...915-enable-memory-self-refresh-on-9xx.diff | 93 ------------------ ...3-drm-i915-enable-vblank-for-ironlake.diff | 95 ------------------- ...6.33-drm-i915-pineview-deviceinfo-fix.diff | 29 ------ packages/linux/url | 2 +- 4 files changed, 1 insertion(+), 218 deletions(-) delete mode 100644 packages/linux/patches/linux-2.6.33-drm-i915-enable-memory-self-refresh-on-9xx.diff delete mode 100644 packages/linux/patches/linux-2.6.33-drm-i915-enable-vblank-for-ironlake.diff delete mode 100644 packages/linux/patches/linux-2.6.33-drm-i915-pineview-deviceinfo-fix.diff diff --git a/packages/linux/patches/linux-2.6.33-drm-i915-enable-memory-self-refresh-on-9xx.diff b/packages/linux/patches/linux-2.6.33-drm-i915-enable-memory-self-refresh-on-9xx.diff deleted file mode 100644 index 05ec7fce93..0000000000 --- a/packages/linux/patches/linux-2.6.33-drm-i915-enable-memory-self-refresh-on-9xx.diff +++ /dev/null @@ -1,93 +0,0 @@ -From 7373cc1452c551f7c3ef7523483d76d2dd16373e Mon Sep 17 00:00:00 2001 -From: Li Peng -Date: Tue, 19 Jan 2010 02:13:00 -0500 -Subject: drm/i915: enable memory self refresh on 9xx - -Enabling memory self refresh (SR) on 9xx needs to set additional -register bits. On 945, we need bit 31 of FW_BLC_SELF to enable the -write to self refresh bit and bit 16 to enable the write of self -refresh watermark. On 915, bit 12 of INSTPM is used to enable SR. - -SR will take effect when CPU enters C3+ state and its entry/exit -should be automatically controlled by H/W, driver only needs to set -SR enable bits in wm update. But this isn't safe in my test on 945 -because GPU is hung. So this patch explicitly enables SR when GPU -is idle, and disables SR when it is busy. In my test on a netbook of -945GSE chipset, it saves about 0.8W idle power. - -Signed-off-by: Li Peng ---- - drivers/gpu/drm/i915/i915_reg.h | 5 ++++- - drivers/gpu/drm/i915/intel_display.c | 22 +++++++++++++++++++++- - 2 files changed, 25 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h -index 847006c..3921e5a 100644 ---- a/drivers/gpu/drm/i915/i915_reg.h -+++ b/drivers/gpu/drm/i915/i915_reg.h -@@ -306,11 +306,14 @@ - #define I915_ERROR_MEMORY_REFRESH (1<<1) - #define I915_ERROR_INSTRUCTION (1<<0) - #define INSTPM 0x020c0 -+#define INSTPM_SELF_EN (1<<12) /* 915GM only */ - #define ACTHD 0x020c8 - #define FW_BLC 0x020d8 - #define FW_BLC2 0x020dc - #define FW_BLC_SELF 0x020e0 /* 915+ only */ --#define FW_BLC_SELF_EN (1<<15) -+#define FW_BLC_SELF_EN_MASK (1<<31) -+#define FW_BLC_SELF_FIFO_MASK (1<<16) /* 945 only */ -+#define FW_BLC_SELF_EN (1<<15) /* 945 only */ - #define MM_BURST_LENGTH 0x00700000 - #define MM_FIFO_WATERMARK 0x0001F000 - #define LM_BURST_LENGTH 0x00000700 -diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c -index 45da78e..d042955 100644 ---- a/drivers/gpu/drm/i915/intel_display.c -+++ b/drivers/gpu/drm/i915/intel_display.c -@@ -2629,7 +2629,13 @@ static void i9xx_update_wm(struct drm_device *dev, int planea_clock, - srwm = total_size - sr_entries; - if (srwm < 0) - srwm = 1; -- I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN | (srwm & 0x3f)); -+ if (IS_I945G(dev) || IS_I945GM(dev)) -+ I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_FIFO_MASK | (srwm & 0xff)); -+ else if (IS_I915GM(dev)) { -+ /* 915M has a smaller SRWM field */ -+ I915_WRITE(FW_BLC_SELF, srwm & 0x3f); -+ I915_WRITE(INSTPM, I915_READ(INSTPM) | INSTPM_SELF_EN); -+ } - } - - DRM_DEBUG_KMS("Setting FIFO watermarks - A: %d, B: %d, C: %d, SR %d\n", -@@ -3879,6 +3885,11 @@ static void intel_idle_update(struct work_struct *work) - - mutex_lock(&dev->struct_mutex); - -+ if (IS_I945G(dev) || IS_I945GM(dev)) { -+ DRM_DEBUG_DRIVER("enable memory self refresh on 945\n"); -+ I915_WRITE(FW_BLC_SELF, FW_BLC_SELF_EN_MASK | FW_BLC_SELF_EN); -+ } -+ - list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { - /* Skip inactive CRTCs */ - if (!crtc->fb) -@@ -3912,6 +3923,15 @@ void intel_mark_busy(struct drm_device *dev, struct drm_gem_object *obj) - if (!drm_core_check_feature(dev, DRIVER_MODESET)) - return; - -+ if (IS_I945G(dev) || IS_I945GM(dev)) { -+ u32 fw_blc_self; -+ -+ DRM_DEBUG_DRIVER("disable memory self refresh on 945\n"); -+ fw_blc_self = I915_READ(FW_BLC_SELF); -+ fw_blc_self &= ~FW_BLC_SELF_EN; -+ I915_WRITE(FW_BLC_SELF, fw_blc_self | FW_BLC_SELF_EN_MASK); -+ } -+ - if (!dev_priv->busy) - dev_priv->busy = true; - else --- -1.6.1.3 - diff --git a/packages/linux/patches/linux-2.6.33-drm-i915-enable-vblank-for-ironlake.diff b/packages/linux/patches/linux-2.6.33-drm-i915-enable-vblank-for-ironlake.diff deleted file mode 100644 index 9a70822343..0000000000 --- a/packages/linux/patches/linux-2.6.33-drm-i915-enable-vblank-for-ironlake.diff +++ /dev/null @@ -1,95 +0,0 @@ -From d9bd8741f35be8bdb11e4ff8ac513375188dcc2c Mon Sep 17 00:00:00 2001 -From: Li Peng -Date: Fri, 22 Jan 2010 20:59:59 +0800 -Subject: drm/i915: enable vblank interrupt on ironlake - -so far vblank interrupt on ironlake is disabled, this would cause -bad gfx performance if userspace calls drm_wait_vblank. This patch -enables vblank interrupt on ironlake and follows vblank get/put -model. - -Signed-off-by: Li Peng ---- - drivers/gpu/drm/i915/i915_irq.c | 30 +++++++++++++++++++----------- - drivers/gpu/drm/i915/intel_display.c | 1 + - 2 files changed, 20 insertions(+), 11 deletions(-) - -diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c -index 89a071a..e7472d8 100644 ---- a/drivers/gpu/drm/i915/i915_irq.c -+++ b/drivers/gpu/drm/i915/i915_irq.c -@@ -309,6 +309,12 @@ irqreturn_t ironlake_irq_handler(struct drm_device *dev) - if (de_iir & DE_GSE) - ironlake_opregion_gse_intr(dev); - -+ if (de_iir & DE_PIPEA_VBLANK) -+ drm_handle_vblank(dev, 0); -+ -+ if (de_iir & DE_PIPEB_VBLANK) -+ drm_handle_vblank(dev, 1); -+ - /* check event from PCH */ - if ((de_iir & DE_PCH_EVENT) && - (pch_iir & SDE_HOTPLUG_MASK)) { -@@ -844,11 +850,11 @@ int i915_enable_vblank(struct drm_device *dev, int pipe) - if (!(pipeconf & PIPEACONF_ENABLE)) - return -EINVAL; - -- if (IS_IRONLAKE(dev)) -- return 0; -- - spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); -- if (IS_I965G(dev)) -+ if (IS_IRONLAKE(dev)) -+ ironlake_enable_display_irq(dev_priv, (pipe == 0) ? -+ DE_PIPEA_VBLANK: DE_PIPEB_VBLANK); -+ else if (IS_I965G(dev)) - i915_enable_pipestat(dev_priv, pipe, - PIPE_START_VBLANK_INTERRUPT_ENABLE); - else -@@ -866,13 +872,14 @@ void i915_disable_vblank(struct drm_device *dev, int pipe) - drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - unsigned long irqflags; - -- if (IS_IRONLAKE(dev)) -- return; -- - spin_lock_irqsave(&dev_priv->user_irq_lock, irqflags); -- i915_disable_pipestat(dev_priv, pipe, -- PIPE_VBLANK_INTERRUPT_ENABLE | -- PIPE_START_VBLANK_INTERRUPT_ENABLE); -+ if (IS_IRONLAKE(dev)) -+ ironlake_disable_display_irq(dev_priv, (pipe == 0) ? -+ DE_PIPEA_VBLANK: DE_PIPEB_VBLANK); -+ else -+ i915_disable_pipestat(dev_priv, pipe, -+ PIPE_VBLANK_INTERRUPT_ENABLE | -+ PIPE_START_VBLANK_INTERRUPT_ENABLE); - spin_unlock_irqrestore(&dev_priv->user_irq_lock, irqflags); - } - -@@ -1015,7 +1022,8 @@ static int ironlake_irq_postinstall(struct drm_device *dev) - { - drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - /* enable kind of interrupts always enabled */ -- u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT; -+ u32 display_mask = DE_MASTER_IRQ_CONTROL | DE_GSE | DE_PCH_EVENT | -+ DE_PIPEA_VBLANK | DE_PIPEB_VBLANK; - u32 render_mask = GT_USER_INTERRUPT; - u32 hotplug_mask = SDE_CRT_HOTPLUG | SDE_PORTB_HOTPLUG | - SDE_PORTC_HOTPLUG | SDE_PORTD_HOTPLUG; -diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c -index 45da78e..2cc489b 100644 ---- a/drivers/gpu/drm/i915/intel_display.c -+++ b/drivers/gpu/drm/i915/intel_display.c -@@ -1638,6 +1638,7 @@ static void ironlake_crtc_dpms(struct drm_crtc *crtc, int mode) - case DRM_MODE_DPMS_OFF: - DRM_DEBUG_KMS("crtc %d dpms off\n", pipe); - -+ drm_vblank_off(dev, pipe); - /* Disable display plane */ - temp = I915_READ(dspcntr_reg); - if ((temp & DISPLAY_PLANE_ENABLE) != 0) { --- -1.6.6 - diff --git a/packages/linux/patches/linux-2.6.33-drm-i915-pineview-deviceinfo-fix.diff b/packages/linux/patches/linux-2.6.33-drm-i915-pineview-deviceinfo-fix.diff deleted file mode 100644 index 5885a61aec..0000000000 --- a/packages/linux/patches/linux-2.6.33-drm-i915-pineview-deviceinfo-fix.diff +++ /dev/null @@ -1,29 +0,0 @@ -From 349ff4274278d4fd4abd47c638e048f679ea1ca4 Mon Sep 17 00:00:00 2001 -From: Li Peng -Date: Thu, 21 Jan 2010 18:09:13 +0800 -Subject: drm/i915: Fix the device info of Pineview - -Pineview doesn't has CXSR and need GTT-based hardware status page. -It fixes a X boot hung issue on Pinview since commit cfdf1f - -Signed-off-by: Li Peng ---- - drivers/gpu/drm/i915/i915_drv.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c -index 46d8896..ecac882 100644 ---- a/drivers/gpu/drm/i915/i915_drv.c -+++ b/drivers/gpu/drm/i915/i915_drv.c -@@ -120,7 +120,7 @@ const static struct intel_device_info intel_gm45_info = { - - const static struct intel_device_info intel_pineview_info = { - .is_g33 = 1, .is_pineview = 1, .is_mobile = 1, .is_i9xx = 1, -- .has_pipe_cxsr = 1, -+ .need_gfx_hws = 1, - .has_hotplug = 1, - }; - --- -1.6.6 - diff --git a/packages/linux/url b/packages/linux/url index 36c256afa1..0cf3046126 100644 --- a/packages/linux/url +++ b/packages/linux/url @@ -1 +1 @@ -http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.33-rc6.tar.bz2 +http://www.kernel.org/pub/linux/kernel/v2.6/testing/linux-2.6.33-rc7.tar.bz2