Author: arekm Date: Wed Jul 29 06:43:37 2009 GMT Module: packages Tag: HEAD ---- Log message: - add intel drm driver fixes
---- Files affected: packages/kernel: kernel.spec (1.686 -> 1.687) , kernel-intel-2009q2-against-2.6.30.1.patch (NONE -> 1.1) (NEW) ---- Diffs: ================================================================ Index: packages/kernel/kernel.spec diff -u packages/kernel/kernel.spec:1.686 packages/kernel/kernel.spec:1.687 --- packages/kernel/kernel.spec:1.686 Tue Jul 28 10:58:19 2009 +++ packages/kernel/kernel.spec Wed Jul 29 08:43:30 2009 @@ -306,6 +306,8 @@ Patch200: kernel-ppc-ICE-hacks.patch +Patch250: kernel-intel-2009q2-against-2.6.30.1.patch + # The following patch extend the routing functionality in Linux # to support static routes (defined by user), new way to use the # alternative routes, the reverse path protection (rp_filter), @@ -925,6 +927,8 @@ #patch200 -p1 %endif +%patch250 -p1 + # routes %patch300 -p1 @@ -1609,6 +1613,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.687 2009/07/29 06:43:30 arekm +- add intel drm driver fixes + Revision 1.686 2009/07/28 08:58:19 arekm - 2.6.30.3 ================================================================ Index: packages/kernel/kernel-intel-2009q2-against-2.6.30.1.patch diff -u /dev/null packages/kernel/kernel-intel-2009q2-against-2.6.30.1.patch:1.1 --- /dev/null Wed Jul 29 08:43:37 2009 +++ packages/kernel/kernel-intel-2009q2-against-2.6.30.1.patch Wed Jul 29 08:43:30 2009 @@ -0,0 +1,390 @@ +From c250320bf1cb656c39abebac06ae2f56e36b7e78 Mon Sep 17 00:00:00 2001 +From: Eric Anholt <[email protected]> +Date: Wed, 3 Jun 2009 07:26:58 +0000 +Subject: [PATCH] drm/i915: Save/restore cursor state on suspend/resume. + +This may fix cursor corruption in X on resume, which would persist until +the cursor was hidden and then shown again. + +V2: Also include the cursor control regs. + +Signed-off-by: Eric Anholt <[email protected]> +Reviewed-by: Jesse Barnes <[email protected]> +(cherry picked from commit 1fd1c624362819ecc36db2458c6a972c48ae92d6) +--- + drivers/gpu/drm/i915/i915_drv.h | 8 ++++++++ + drivers/gpu/drm/i915/i915_suspend.c | 20 ++++++++++++++++++++ + 2 files changed, 28 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h +index c431fa5..fcaa544 100644 +--- a/drivers/gpu/drm/i915/i915_drv.h ++++ b/drivers/gpu/drm/i915/i915_drv.h +@@ -285,6 +285,13 @@ typedef struct drm_i915_private { + u8 saveDACMASK; + u8 saveCR[37]; + uint64_t saveFENCE[16]; ++ u32 saveCURACNTR; ++ u32 saveCURAPOS; ++ u32 saveCURABASE; ++ u32 saveCURBCNTR; ++ u32 saveCURBPOS; ++ u32 saveCURBBASE; ++ u32 saveCURSIZE; + + struct { + struct drm_mm gtt_space; +@@ -642,6 +649,7 @@ void i915_gem_detach_phys_object(struct drm_device *dev, + void i915_gem_free_all_phys_object(struct drm_device *dev); + int i915_gem_object_get_pages(struct drm_gem_object *obj); + void i915_gem_object_put_pages(struct drm_gem_object *obj); ++void i915_gem_release(struct drm_device * dev, struct drm_file *file_priv); + + /* i915_gem_tiling.c */ + void i915_gem_detect_bit_6_swizzle(struct drm_device *dev); +diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c +index ce8a213..a98e283 100644 +--- a/drivers/gpu/drm/i915/i915_suspend.c ++++ b/drivers/gpu/drm/i915/i915_suspend.c +@@ -295,6 +295,16 @@ int i915_save_state(struct drm_device *dev) + i915_save_palette(dev, PIPE_B); + dev_priv->savePIPEBSTAT = I915_READ(PIPEBSTAT); + ++ /* Cursor state */ ++ dev_priv->saveCURACNTR = I915_READ(CURACNTR); ++ dev_priv->saveCURAPOS = I915_READ(CURAPOS); ++ dev_priv->saveCURABASE = I915_READ(CURABASE); ++ dev_priv->saveCURBCNTR = I915_READ(CURBCNTR); ++ dev_priv->saveCURBPOS = I915_READ(CURBPOS); ++ dev_priv->saveCURBBASE = I915_READ(CURBBASE); ++ if (!IS_I9XX(dev)) ++ dev_priv->saveCURSIZE = I915_READ(CURSIZE); ++ + /* CRT state */ + dev_priv->saveADPA = I915_READ(ADPA); + +@@ -480,6 +490,16 @@ int i915_restore_state(struct drm_device *dev) + I915_WRITE(DSPBCNTR, dev_priv->saveDSPBCNTR); + I915_WRITE(DSPBADDR, I915_READ(DSPBADDR)); + ++ /* Cursor state */ ++ I915_WRITE(CURAPOS, dev_priv->saveCURAPOS); ++ I915_WRITE(CURACNTR, dev_priv->saveCURACNTR); ++ I915_WRITE(CURABASE, dev_priv->saveCURABASE); ++ I915_WRITE(CURBPOS, dev_priv->saveCURBPOS); ++ I915_WRITE(CURBCNTR, dev_priv->saveCURBCNTR); ++ I915_WRITE(CURBBASE, dev_priv->saveCURBBASE); ++ if (!IS_I9XX(dev)) ++ I915_WRITE(CURSIZE, dev_priv->saveCURSIZE); ++ + /* CRT state */ + I915_WRITE(ADPA, dev_priv->saveADPA); + +-- +1.5.4.5 + + +From 9ade9105535556fbbb2ac29dfddbadeee4c15b0e Mon Sep 17 00:00:00 2001 +From: Jarod Wilson <[email protected]> +Date: Wed, 27 May 2009 17:20:39 -0400 +Subject: [PATCH] drm/i915: add ignore lvds quirk info for AOpen Mini PC + +Fix a FIXME in the intel LVDS bring-up code, adding the appropriate +blacklist entry for the AOpen Mini PC, courtesy of a dmidecode +dump from Florian Demmer. + +Signed-off-by: Jarod Wilson <[email protected]> +CC: Florian Demmer <[email protected]> +Signed-off-by: Eric Anholt <[email protected]> +(cherry picked from commit 70aa96ca2d8d938fc036ef8fd189b0151f4fc3ba) +--- + drivers/gpu/drm/i915/intel_lvds.c | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c +index 53cccfa..ecbaa0f 100644 +--- a/drivers/gpu/drm/i915/intel_lvds.c ++++ b/drivers/gpu/drm/i915/intel_lvds.c +@@ -420,8 +420,14 @@ static const struct dmi_system_id intel_no_lvds[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "Studio Hybrid 140g"), + }, + }, +- +- /* FIXME: add a check for the Aopen Mini PC */ ++ { ++ .callback = intel_no_lvds_dmi_callback, ++ .ident = "AOpen Mini PC", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "AOpen"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "i965GMx-IF"), ++ }, ++ }, + + { } /* terminating entry */ + }; +-- +1.5.4.5 + + +From 38d9e61c921dd1e14e3135df5ad7d5d4d7e45ffe Mon Sep 17 00:00:00 2001 +From: Jesse Barnes <[email protected]> +Date: Tue, 5 May 2009 13:13:16 -0700 +Subject: [PATCH] drm/i915: apply G45 vblank count code to all G4x chips and fix max_frame_count + +All G4x and newer chips use the new style frame count register, with a +full 32 bit frame count. Update the code to reflect this. + +Signed-off-by: Jesse Barnes <[email protected]> +Signed-off-by: Eric Anholt <[email protected]> +(cherry picked from commit 42c2798b35b95c471877133e19ccc3cab00e9b65) +--- + drivers/gpu/drm/i915/i915_dma.c | 5 ++++- + drivers/gpu/drm/i915/i915_irq.c | 2 -- + 2 files changed, 4 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c +index 0ccb63e..bb58797 100644 +--- a/drivers/gpu/drm/i915/i915_dma.c ++++ b/drivers/gpu/drm/i915/i915_dma.c +@@ -1153,8 +1153,11 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) + #endif + + dev->driver->get_vblank_counter = i915_get_vblank_counter; +- if (IS_GM45(dev)) ++ dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ ++ if (IS_G4X(dev)) { ++ dev->max_vblank_count = 0xffffffff; /* full 32 bit counter */ + dev->driver->get_vblank_counter = gm45_get_vblank_counter; ++ } + + i915_gem_load(dev); + +diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c +index 98bb4c8..8ee0969 100644 +--- a/drivers/gpu/drm/i915/i915_irq.c ++++ b/drivers/gpu/drm/i915/i915_irq.c +@@ -572,8 +572,6 @@ int i915_driver_irq_postinstall(struct drm_device *dev) + + dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A | DRM_I915_VBLANK_PIPE_B; + +- dev->max_vblank_count = 0xffffff; /* only 24 bits of frame count */ +- + /* Unmask the interrupts that we always want on. */ + dev_priv->irq_mask_reg = ~I915_INTERRUPT_ENABLE_FIX; + +-- +1.5.4.5 + + +From 61731f5a5cb17a9535d08a4727e255cd2ff3d529 Mon Sep 17 00:00:00 2001 +From: Jesse Barnes <[email protected]> +Date: Fri, 15 May 2009 14:11:48 -0700 +Subject: [PATCH] drm/i915: avoid non-atomic sysrq execution + +The sysrq functions are executed in hardirq context, so we shouldn't be +calling sleeping functions from them, like mutex_locks or memory +allocations. + +Fix up the i915 sysrq handler to avoid this. + +Signed-off-by: Jesse Barnes <[email protected]> +Signed-off-by: Eric Anholt <[email protected]> +(cherry picked from commit b66d18ddb16603d1e1ec39cb2ff3abf3fd212180) +--- + drivers/gpu/drm/i915/intel_fb.c | 8 +++++++- + 1 files changed, 7 insertions(+), 1 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c +index e4652dc..7a66b91 100644 +--- a/drivers/gpu/drm/i915/intel_fb.c ++++ b/drivers/gpu/drm/i915/intel_fb.c +@@ -857,9 +857,15 @@ void intelfb_restore(void) + drm_crtc_helper_set_config(&kernelfb_mode); + } + ++static void intelfb_restore_work_fn(struct work_struct *ignored) ++{ ++ intelfb_restore(); ++} ++static DECLARE_WORK(intelfb_restore_work, intelfb_restore_work_fn); ++ + static void intelfb_sysrq(int dummy1, struct tty_struct *dummy3) + { +- intelfb_restore(); ++ schedule_work(&intelfb_restore_work); + } + + static struct sysrq_key_op sysrq_intelfb_restore_op = { +-- +1.5.4.5 + + +From 0025e6e6dd0878f145659a7fa185c1c41ff823c1 Mon Sep 17 00:00:00 2001 +From: Michael Cousin <[email protected]> +Date: Fri, 5 Jun 2009 21:16:22 +0200 +Subject: [PATCH] drm/i915: Skip lvds with Aopen i945GTt-VFA + +Signed-off-by: Michael Cousin <[email protected]> +Signed-off-by: Eric Anholt <[email protected]> +(cherry picked from commit fa0864b26b4bfa1dd4bb78eeffbc1f398cb56425) +--- + drivers/gpu/drm/i915/intel_lvds.c | 7 +++++++ + 1 files changed, 7 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c +index ecbaa0f..1e06379 100644 +--- a/drivers/gpu/drm/i915/intel_lvds.c ++++ b/drivers/gpu/drm/i915/intel_lvds.c +@@ -428,6 +428,13 @@ static const struct dmi_system_id intel_no_lvds[] = { + DMI_MATCH(DMI_PRODUCT_NAME, "i965GMx-IF"), + }, + }, ++ { ++ .callback = intel_no_lvds_dmi_callback, ++ .ident = "Aopen i945GTt-VFA", ++ .matches = { ++ DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"), ++ }, ++ }, + + { } /* terminating entry */ + }; +-- +1.5.4.5 + + +From 189e96a590446c03977d1f1563290c75266ecacc Mon Sep 17 00:00:00 2001 +From: Keith Packard <[email protected]> +Date: Fri, 5 Jun 2009 18:19:56 -0700 +Subject: [PATCH] drm/i915: Hook connector to encoder during load detection (fixes tv/vga detect) + +With the DRM-driven DPMS code, encoders are considered idle unless a +connector is hooked to them, so mode setting is skipped. This makes load +detection fail as none of the hardware is enabled. + +Signed-off-by: Keith Packard <[email protected]> +Signed-off-by: Eric Anholt <[email protected]> +(cherry picked from commit 03d6069912babc07a3da20e715dd6a5dc8f0f867) +--- + drivers/gpu/drm/i915/intel_display.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c +index c9d6f10..5469f2c 100644 +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -1590,6 +1590,7 @@ struct drm_crtc *intel_get_load_detect_pipe(struct intel_output *intel_output, + } + + encoder->crtc = crtc; ++ intel_output->base.encoder = encoder; + intel_output->load_detect_temp = true; + + intel_crtc = to_intel_crtc(crtc); +@@ -1625,6 +1626,7 @@ void intel_release_load_detect_pipe(struct intel_output *intel_output, int dpms_ + + if (intel_output->load_detect_temp) { + encoder->crtc = NULL; ++ intel_output->base.encoder = NULL; + intel_output->load_detect_temp = false; + crtc->enabled = drm_helper_crtc_in_use(crtc); + drm_helper_disable_unused_functions(dev); +-- +1.5.4.5 + + +From ac6a82f4aa69cbc58264004cd1db9143a241df95 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Gr=C3=A9goire=20Henry?= <[email protected]> +Date: Tue, 23 Jun 2009 15:41:02 +0200 +Subject: [PATCH] drm/i915: initialize fence registers to zero when loading GEM +MIME-Version: 1.0 +Content-Type: text/plain; charset=utf-8 +Content-Transfer-Encoding: 8bit + +Unitialized fence register could leads to corrupted display. Problem +encountered on MacBooks (revision 1 and 2), directly booting from EFI +or through BIOS emulation. + +(bug #21710 at freedestop.org) + +Signed-off-by: Grégoire Henry <[email protected]> +Signed-off-by: Eric Anholt <[email protected]> +(cherry picked from commit b5aa8a0fc132dd512c33e7c2621d075e3b77a65e) +--- + drivers/gpu/drm/i915/i915_gem.c | 13 +++++++++++++ + 1 files changed, 13 insertions(+), 0 deletions(-) + +diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c +index 39f5c65..91ad93d 100644 +--- a/drivers/gpu/drm/i915/i915_gem.c ++++ b/drivers/gpu/drm/i915/i915_gem.c +@@ -4154,6 +4154,7 @@ i915_gem_lastclose(struct drm_device *dev) + void + i915_gem_load(struct drm_device *dev) + { ++ int i; + drm_i915_private_t *dev_priv = dev->dev_private; + + spin_lock_init(&dev_priv->mm.active_list_lock); +@@ -4173,6 +4174,18 @@ i915_gem_load(struct drm_device *dev) + else + dev_priv->num_fence_regs = 8; + ++ /* Initialize fence registers to zero */ ++ if (IS_I965G(dev)) { ++ for (i = 0; i < 16; i++) ++ I915_WRITE64(FENCE_REG_965_0 + (i * 8), 0); ++ } else { ++ for (i = 0; i < 8; i++) ++ I915_WRITE(FENCE_REG_830_0 + (i * 4), 0); ++ if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) ++ for (i = 0; i < 8; i++) ++ I915_WRITE(FENCE_REG_945_8 + (i * 4), 0); ++ } ++ + i915_gem_detect_bit_6_swizzle(dev); + } + +-- +1.5.4.5 + + +From d2a55f12b2425ed1febb9e29e10bb405b91aa8dd Mon Sep 17 00:00:00 2001 +From: [email protected] <[email protected]> +Date: Thu, 25 Jun 2009 10:59:22 +0800 +Subject: [PATCH] drm/i915: Set SSC frequency for 8xx chips correctly + +All 8xx class chips have the 66/48 split, not just 855. + +Signed-off-by: Ma Ling <[email protected]> +Reviewed-by: Jesse Barnes <[email protected]> +Signed-off-by: Eric Anholt <[email protected]> +(cherry picked from commit 6ff4fd05676bc5b5c930bef25901e489f7843660) +--- + drivers/gpu/drm/i915/intel_bios.c | 10 ++++++---- + 1 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c +index 9d78cff..cf2a971 100644 +--- a/drivers/gpu/drm/i915/intel_bios.c ++++ b/drivers/gpu/drm/i915/intel_bios.c +@@ -185,10 +185,12 @@ parse_general_features(struct drm_i915_private *dev_priv, + dev_priv->lvds_use_ssc = general->enable_ssc; + + if (dev_priv->lvds_use_ssc) { +- if (IS_I855(dev_priv->dev)) +- dev_priv->lvds_ssc_freq = general->ssc_freq ? 66 : 48; +- else +- dev_priv->lvds_ssc_freq = general->ssc_freq ? 100 : 96; ++ if (IS_I85X(dev_priv->dev)) ++ dev_priv->lvds_ssc_freq = ++ general->ssc_freq ? 66 : 48; ++ else ++ dev_priv->lvds_ssc_freq = ++ general->ssc_freq ? 100 : 96; + } + } + } +-- +1.5.4.5 + ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.686&r2=1.687&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
