[kernel] r16502 - in dists/sid/linux-2.6/debian: . patches/bugfix/all patches/series
Maximilian Attems
maks at alioth.debian.org
Fri Oct 29 10:42:14 UTC 2010
Author: maks
Date: Fri Oct 29 10:42:08 2010
New Revision: 16502
Log:
Add missing drm changes from 2.6.32.24+drm33.11
Added:
dists/sid/linux-2.6/debian/patches/bugfix/all/drm-Only-decouple-the-old_fb-from-the-crtc-is-we-cal.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-Prevent-double-dpms-on.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-Unset-cursor-if-out-of-bounds-upon-mode-cha.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-agp-intel-Add-second-set-of-PCI-IDs-for-B43.patch
dists/sid/linux-2.6/debian/patches/bugfix/all/i915-return-EFAULT-if-copy_to_user-fails.patch
Modified:
dists/sid/linux-2.6/debian/changelog
dists/sid/linux-2.6/debian/patches/series/27
Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog Fri Oct 29 10:04:41 2010 (r16501)
+++ dists/sid/linux-2.6/debian/changelog Fri Oct 29 10:42:08 2010 (r16502)
@@ -34,6 +34,12 @@
[ maximilian attems ]
* 2.6.33.stable-queue: drm/radeon: fix PCI ID 5657 to be an RV410.
+ * Add drm changes from 2.6.32.24+drm33.11:
+ - i915: return -EFAULT if copy_to_user fails.
+ - drm/i915: Prevent double dpms on
+ - drm: Only decouple the old_fb from the crtc is we call mode_set*
+ - drm/i915: Unset cursor if out-of-bounds upon mode change (v4)
+ - drm/i915,agp/intel: Add second set of PCI-IDs for B43
-- Ben Hutchings <ben at decadent.org.uk> Tue, 19 Oct 2010 23:27:23 +0100
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/drm-Only-decouple-the-old_fb-from-the-crtc-is-we-cal.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/drm-Only-decouple-the-old_fb-from-the-crtc-is-we-cal.patch Fri Oct 29 10:42:08 2010 (r16502)
@@ -0,0 +1,51 @@
+From 4d6cbb459d1ea3ccbd441bdbd0ebbc08f8ee55e0 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris at chris-wilson.co.uk>
+Date: Thu, 9 Sep 2010 09:41:32 +0100
+Subject: [PATCH 03/13] drm: Only decouple the old_fb from the crtc is we call mode_set*
+
+BugLink: http://bugs.launchpad.net/bugs/663176
+
+commit 356ad3cd616185631235ffb48b3efbf39f9923b3 upstream.
+
+Otherwise when disabling the output we switch to the new fb (which is
+likely NULL) and skip the call to mode_set -- leaking driver private
+state on the old_fb.
+
+Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29857
+Reported-by: Sitsofe Wheeler <sitsofe at yahoo.com>
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+Cc: Dave Airlie <airlied at redhat.com>
+Signed-off-by: Dave Airlie <airlied at redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+(cherry-picked from 2.6.32.22/2.6.35.5)
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+Acked-by: Leann Ogasawara <leann.ogasawara at canonical.com>
+Acked-by: Brad Figg <brad.figg at canonical.com>
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+---
+ drivers/gpu/drm/drm_crtc_helper.c | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
+index 99907c3..ec8cfd6 100644
+--- a/drivers/gpu/drm/drm_crtc_helper.c
++++ b/drivers/gpu/drm/drm_crtc_helper.c
+@@ -925,13 +925,13 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
+ mode_changed = true;
+
+ if (mode_changed) {
+- old_fb = set->crtc->fb;
+- set->crtc->fb = set->fb;
+ set->crtc->enabled = (set->mode != NULL);
+ if (set->mode != NULL) {
+ DRM_DEBUG_KMS("attempting to set mode from"
+ " userspace\n");
+ drm_mode_debug_printmodeline(set->mode);
++ old_fb = set->crtc->fb;
++ set->crtc->fb = set->fb;
+ if (!drm_crtc_helper_set_mode(set->crtc, set->mode,
+ set->x, set->y,
+ old_fb)) {
+--
+1.7.1
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-Prevent-double-dpms-on.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-Prevent-double-dpms-on.patch Fri Oct 29 10:42:08 2010 (r16502)
@@ -0,0 +1,52 @@
+From de031ef1420423693b74543a2e99a3dfec8f334a Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris at chris-wilson.co.uk>
+Date: Mon, 6 Sep 2010 16:17:22 +0100
+Subject: [PATCH 02/13] drm/i915: Prevent double dpms on
+
+BugLink: http://bugs.launchpad.net/bugs/663176
+
+commit 032d2a0d068b0368296a56469761394ef03207c3 upstream.
+
+Arguably this is a bug in drm-core in that we should not be called twice
+in succession with DPMS_ON, however this is still occuring and we see
+FDI link training failures on the second call leading to the occassional
+blank display. For the time being ignore the repeated call.
+
+Original patch by Dave Airlie <airlied at redhat.com>
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+(cherry-picked from 2.6.32.22/2.6.35.5)
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+Acked-by: Leann Ogasawara <leann.ogasawara at canonical.com>
+Acked-by: Brad Figg <brad.figg at canonical.com>
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+---
+ drivers/gpu/drm/i915/intel_display.c | 5 ++++-
+ 1 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 2958a5a..60efe12 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -2053,6 +2053,9 @@ static void intel_crtc_dpms(struct drm_crtc *crtc, int mode)
+ int pipe = intel_crtc->pipe;
+ bool enabled;
+
++ if (intel_crtc->dpms_mode == mode)
++ return;
++
+ dev_priv->display.dpms(crtc, mode);
+
+ intel_crtc->dpms_mode = mode;
+@@ -4350,7 +4353,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
+ dev_priv->pipe_to_crtc_mapping[intel_crtc->pipe] = &intel_crtc->base;
+
+ intel_crtc->cursor_addr = 0;
+- intel_crtc->dpms_mode = DRM_MODE_DPMS_OFF;
++ intel_crtc->dpms_mode = -1;
+ drm_crtc_helper_add(&intel_crtc->base, &intel_helper_funcs);
+
+ intel_crtc->busy = false;
+--
+1.7.1
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-Unset-cursor-if-out-of-bounds-upon-mode-cha.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-Unset-cursor-if-out-of-bounds-upon-mode-cha.patch Fri Oct 29 10:42:08 2010 (r16502)
@@ -0,0 +1,294 @@
+From ec4e30c7f7002603ff9874e97dabaf41e773d478 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris at chris-wilson.co.uk>
+Date: Fri, 9 Jul 2010 08:45:04 +0100
+Subject: [PATCH 05/13] drm/i915: Unset cursor if out-of-bounds upon mode change (v4)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+BugLink: http://bugs.launchpad.net/bugs/663176
+BugLink: http://bugs.launchpad.net/bugs/586325
+
+commit cda4b7d3a5b1dcbc0d8e7bad52134347798e9047 upstream.
+
+The docs warn that to position the cursor such that no part of it is
+visible on the pipe is an undefined operation. Avoid such circumstances
+upon changing the mode, or at any other time, by unsetting the cursor if
+it moves out of bounds.
+
+"For normal high resolution display modes, the cursor must have at least a
+single pixel positioned over the active screen.” (p143, p148 of the hardware
+registers docs).
+
+Fixes:
+
+ Bug 24748 - [965G] Graphics crashes when resolution is changed with KMS
+ enabled
+ https://bugs.freedesktop.org/show_bug.cgi?id=24748
+
+v2: Only update the cursor registers if they change.
+v3: Fix the unsigned comparision of x,y against width,height.
+v4: Always set CUR.BASE or else the cursor may become corrupt.
+
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+Reported-by: Christian Eggers <ceggers at gmx.de>
+Cc: Christopher James Halse Rogers <chalserogers at gmail.com>
+Signed-off-by: Eric Anholt <eric at anholt.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+
+[apw at canonical.com: backported to v2.6.33 drm for Lucid]
+Signed-off-by: Andy Whitcroft <apw at canonical.com>
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+Acked-by: Leann Ogasawara <leann.ogasawara at canonical.com>
+Acked-by: Brad Figg <brad.figg at canonical.com>
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+---
+ drivers/gpu/drm/i915/intel_display.c | 145 ++++++++++++++++++++++------------
+ drivers/gpu/drm/i915/intel_drv.h | 8 ++-
+ 2 files changed, 100 insertions(+), 53 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 60efe12..800c933 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -41,6 +41,7 @@
+ bool intel_pipe_has_type (struct drm_crtc *crtc, int type);
+ static void intel_update_watermarks(struct drm_device *dev);
+ static void intel_increase_pllclock(struct drm_crtc *crtc, bool schedule);
++static void intel_crtc_update_cursor(struct drm_crtc *crtc);
+
+ typedef struct {
+ /* given values */
+@@ -2993,6 +2994,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
+ return -EINVAL;
+ }
+
++ /* Ensure that the cursor is valid for the new mode before changing... */
++ intel_crtc_update_cursor(crtc);
++
+ if (is_lvds && dev_priv->lvds_downclock_avail) {
+ has_reduced_clock = limit->find_pll(limit, crtc,
+ dev_priv->lvds_downclock,
+@@ -3456,6 +3460,85 @@ void intel_crtc_load_lut(struct drm_crtc *crtc)
+ }
+ }
+
++/* If no-part of the cursor is visible on the framebuffer, then the GPU may hang... */
++static void intel_crtc_update_cursor(struct drm_crtc *crtc)
++{
++ struct drm_device *dev = crtc->dev;
++ struct drm_i915_private *dev_priv = dev->dev_private;
++ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
++ int pipe = intel_crtc->pipe;
++ int x = intel_crtc->cursor_x;
++ int y = intel_crtc->cursor_y;
++ uint32_t base, pos;
++ bool visible;
++
++ pos = 0;
++
++ if (crtc->fb) {
++ base = intel_crtc->cursor_addr;
++ if (x > (int) crtc->fb->width)
++ base = 0;
++
++ if (y > (int) crtc->fb->height)
++ base = 0;
++ } else
++ base = 0;
++
++ if (x < 0) {
++ if (x + intel_crtc->cursor_width < 0)
++ base = 0;
++
++ pos |= CURSOR_POS_SIGN << CURSOR_X_SHIFT;
++ x = -x;
++ }
++ pos |= x << CURSOR_X_SHIFT;
++
++ if (y < 0) {
++ if (y + intel_crtc->cursor_height < 0)
++ base = 0;
++
++ pos |= CURSOR_POS_SIGN << CURSOR_Y_SHIFT;
++ y = -y;
++ }
++ pos |= y << CURSOR_Y_SHIFT;
++
++ visible = base != 0;
++ if (!visible && !intel_crtc->cursor_visble)
++ return;
++
++ I915_WRITE(pipe == 0 ? CURAPOS : CURBPOS, pos);
++ if (intel_crtc->cursor_visble != visible) {
++ uint32_t cntl = I915_READ(pipe == 0 ? CURACNTR : CURBCNTR);
++ if (base) {
++ /* Hooray for CUR*CNTR differences */
++ if (IS_MOBILE(dev) || IS_I9XX(dev)) {
++ cntl &= ~(CURSOR_MODE | MCURSOR_PIPE_SELECT);
++ cntl |= CURSOR_MODE_64_ARGB_AX | MCURSOR_GAMMA_ENABLE;
++ cntl |= pipe << 28; /* Connect to correct pipe */
++ } else {
++ cntl &= ~(CURSOR_FORMAT_MASK);
++ cntl |= CURSOR_ENABLE;
++ cntl |= CURSOR_FORMAT_ARGB | CURSOR_GAMMA_ENABLE;
++ }
++ } else {
++ if (IS_MOBILE(dev) || IS_I9XX(dev)) {
++ cntl &= ~(CURSOR_MODE | MCURSOR_GAMMA_ENABLE);
++ cntl |= CURSOR_MODE_DISABLE;
++ } else {
++ cntl &= ~(CURSOR_ENABLE | CURSOR_GAMMA_ENABLE);
++ }
++ }
++ I915_WRITE(pipe == 0 ? CURACNTR : CURBCNTR, cntl);
++
++ intel_crtc->cursor_visble = visible;
++ }
++ /* and commit changes on next vblank */
++ I915_WRITE(pipe == 0 ? CURABASE : CURBBASE, base);
++
++ if (visible)
++ intel_mark_busy(dev, to_intel_framebuffer(crtc->fb)->obj);
++}
++
+ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
+ struct drm_file *file_priv,
+ uint32_t handle,
+@@ -3466,11 +3549,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+ struct drm_gem_object *bo;
+ struct drm_i915_gem_object *obj_priv;
+- int pipe = intel_crtc->pipe;
+- uint32_t control = (pipe == 0) ? CURACNTR : CURBCNTR;
+- uint32_t base = (pipe == 0) ? CURABASE : CURBBASE;
+- uint32_t temp = I915_READ(control);
+- size_t addr;
++ uint32_t addr;
+ int ret;
+
+ DRM_DEBUG_KMS("\n");
+@@ -3478,12 +3557,6 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
+ /* if we want to turn off the cursor ignore width and height */
+ if (!handle) {
+ DRM_DEBUG_KMS("cursor off\n");
+- if (IS_MOBILE(dev) || IS_I9XX(dev)) {
+- temp &= ~(CURSOR_MODE | MCURSOR_GAMMA_ENABLE);
+- temp |= CURSOR_MODE_DISABLE;
+- } else {
+- temp &= ~(CURSOR_ENABLE | CURSOR_GAMMA_ENABLE);
+- }
+ addr = 0;
+ bo = NULL;
+ mutex_lock(&dev->struct_mutex);
+@@ -3518,7 +3591,9 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
+ }
+ addr = obj_priv->gtt_offset;
+ } else {
+- ret = i915_gem_attach_phys_object(dev, bo, (pipe == 0) ? I915_GEM_PHYS_CURSOR_0 : I915_GEM_PHYS_CURSOR_1);
++ ret = i915_gem_attach_phys_object(dev, bo,
++ (intel_crtc->pipe == 0) ? I915_GEM_PHYS_CURSOR_0 : I915_GEM_PHYS_CURSOR_1);
++
+ if (ret) {
+ DRM_ERROR("failed to attach phys object\n");
+ goto fail_locked;
+@@ -3529,21 +3604,7 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
+ if (!IS_I9XX(dev))
+ I915_WRITE(CURSIZE, (height << 12) | width);
+
+- /* Hooray for CUR*CNTR differences */
+- if (IS_MOBILE(dev) || IS_I9XX(dev)) {
+- temp &= ~(CURSOR_MODE | MCURSOR_PIPE_SELECT);
+- temp |= CURSOR_MODE_64_ARGB_AX | MCURSOR_GAMMA_ENABLE;
+- temp |= (pipe << 28); /* Connect to correct pipe */
+- } else {
+- temp &= ~(CURSOR_FORMAT_MASK);
+- temp |= CURSOR_ENABLE;
+- temp |= CURSOR_FORMAT_ARGB | CURSOR_GAMMA_ENABLE;
+- }
+-
+ finish:
+- I915_WRITE(control, temp);
+- I915_WRITE(base, addr);
+-
+ if (intel_crtc->cursor_bo) {
+ if (dev_priv->info->cursor_needs_physical) {
+ if (intel_crtc->cursor_bo != bo)
+@@ -3557,6 +3618,10 @@ static int intel_crtc_cursor_set(struct drm_crtc *crtc,
+
+ intel_crtc->cursor_addr = addr;
+ intel_crtc->cursor_bo = bo;
++ intel_crtc->cursor_width = width;
++ intel_crtc->cursor_height = height;
++
++ intel_crtc_update_cursor(crtc);
+
+ return 0;
+ fail:
+@@ -3569,34 +3634,12 @@ fail_locked:
+
+ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
+ {
+- struct drm_device *dev = crtc->dev;
+- struct drm_i915_private *dev_priv = dev->dev_private;
+ struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
+- struct intel_framebuffer *intel_fb;
+- int pipe = intel_crtc->pipe;
+- uint32_t temp = 0;
+- uint32_t adder;
+-
+- if (crtc->fb) {
+- intel_fb = to_intel_framebuffer(crtc->fb);
+- intel_mark_busy(dev, intel_fb->obj);
+- }
+-
+- if (x < 0) {
+- temp |= CURSOR_POS_SIGN << CURSOR_X_SHIFT;
+- x = -x;
+- }
+- if (y < 0) {
+- temp |= CURSOR_POS_SIGN << CURSOR_Y_SHIFT;
+- y = -y;
+- }
+
+- temp |= x << CURSOR_X_SHIFT;
+- temp |= y << CURSOR_Y_SHIFT;
++ intel_crtc->cursor_x = x;
++ intel_crtc->cursor_y = y;
+
+- adder = intel_crtc->cursor_addr;
+- I915_WRITE((pipe == 0) ? CURAPOS : CURBPOS, temp);
+- I915_WRITE((pipe == 0) ? CURABASE : CURBBASE, adder);
++ intel_crtc_update_cursor(crtc);
+
+ return 0;
+ }
+diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
+index 46034dc..cc7bc74 100644
+--- a/drivers/gpu/drm/i915/intel_drv.h
++++ b/drivers/gpu/drm/i915/intel_drv.h
+@@ -140,8 +140,6 @@ struct intel_crtc {
+ struct drm_crtc base;
+ enum pipe pipe;
+ enum plane plane;
+- struct drm_gem_object *cursor_bo;
+- uint32_t cursor_addr;
+ u8 lut_r[256], lut_g[256], lut_b[256];
+ int dpms_mode;
+ bool busy; /* is scanout buffer being updated frequently? */
+@@ -149,6 +147,12 @@ struct intel_crtc {
+ bool lowfreq_avail;
+ struct intel_overlay *overlay;
+ struct intel_unpin_work *unpin_work;
++
++ struct drm_gem_object *cursor_bo;
++ uint32_t cursor_addr;
++ int16_t cursor_x, cursor_y;
++ int16_t cursor_width, cursor_height;
++ bool cursor_visble;
+ };
+
+ #define to_intel_crtc(x) container_of(x, struct intel_crtc, base)
+--
+1.7.1
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-agp-intel-Add-second-set-of-PCI-IDs-for-B43.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/drm-i915-agp-intel-Add-second-set-of-PCI-IDs-for-B43.patch Fri Oct 29 10:42:08 2010 (r16502)
@@ -0,0 +1,103 @@
+From f8ff12522bde5a3670d761dc18a442cc486880f5 Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris at chris-wilson.co.uk>
+Date: Fri, 17 Sep 2010 08:22:30 +0100
+Subject: [PATCH 11/13] drm/i915,agp/intel: Add second set of PCI-IDs for B43
+
+BugLink: http://bugs.launchpad.net/bugs/663176
+BugLink: http://bugs.launchpad.net/bugs/640214
+
+There is a second revision of B43 (a desktop gen4 part) floating around,
+functionally equivalent to the original B43, so simply add the new
+PCI-IDs.
+
+Bugzilla: https://bugs.freedesktop.org/show_bugs.cgi?id=30221
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+Cc: stable at kernel.org
+
+(backported from commit 41a51428916ab04587bacee2dda61c4a0c4fc02f upstream)
+Signed-off-by: Ike Panhc <ike.pan at canonical.com>
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+Acked-by: Leann Ogasawara <leann.ogasawara at canonical.com>
+Acked-by: Brad Figg <brad.figg at canonical.com>
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+---
+ drivers/char/agp/intel-agp.c | 7 +++++++
+ drivers/gpu/drm/i915/i915_drv.c | 1 +
+ drivers/gpu/drm/i915/i915_drv.h | 3 ++-
+ 3 files changed, 10 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
+index 66798ba..4cbe4f5 100644
+--- a/drivers/char/agp/intel-agp.c
++++ b/drivers/char/agp/intel-agp.c
+@@ -52,6 +52,8 @@ EXPORT_SYMBOL(intel_agp_enabled);
+ #define PCI_DEVICE_ID_INTEL_Q33_IG 0x29D2
+ #define PCI_DEVICE_ID_INTEL_B43_HB 0x2E40
+ #define PCI_DEVICE_ID_INTEL_B43_IG 0x2E42
++#define PCI_DEVICE_ID_INTEL_B43_1_HB 0x2E90
++#define PCI_DEVICE_ID_INTEL_B43_1_IG 0x2E92
+ #define PCI_DEVICE_ID_INTEL_GM45_HB 0x2A40
+ #define PCI_DEVICE_ID_INTEL_GM45_IG 0x2A42
+ #define PCI_DEVICE_ID_INTEL_IGD_E_HB 0x2E00
+@@ -99,6 +101,7 @@ EXPORT_SYMBOL(intel_agp_enabled);
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB || \
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G41_HB || \
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_B43_HB || \
++ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_B43_1_HB || \
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGDNG_D_HB || \
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGDNG_M_HB || \
+ agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGDNG_MA_HB || \
+@@ -1356,6 +1359,7 @@ static void intel_i965_get_gtt_range(int *gtt_offset, int *gtt_size)
+ case PCI_DEVICE_ID_INTEL_G45_HB:
+ case PCI_DEVICE_ID_INTEL_G41_HB:
+ case PCI_DEVICE_ID_INTEL_B43_HB:
++ case PCI_DEVICE_ID_INTEL_B43_1_HB:
+ case PCI_DEVICE_ID_INTEL_IGDNG_D_HB:
+ case PCI_DEVICE_ID_INTEL_IGDNG_M_HB:
+ case PCI_DEVICE_ID_INTEL_IGDNG_MA_HB:
+@@ -2355,6 +2359,8 @@ static const struct intel_driver_description {
+ "G45/G43", NULL, &intel_i965_driver },
+ { PCI_DEVICE_ID_INTEL_B43_HB, PCI_DEVICE_ID_INTEL_B43_IG, 0,
+ "B43", NULL, &intel_i965_driver },
++ { PCI_DEVICE_ID_INTEL_B43_1_HB, PCI_DEVICE_ID_INTEL_B43_1_IG, 0,
++ "B43", NULL, &intel_i965_driver },
+ { PCI_DEVICE_ID_INTEL_G41_HB, PCI_DEVICE_ID_INTEL_G41_IG, 0,
+ "G41", NULL, &intel_i965_driver },
+ { PCI_DEVICE_ID_INTEL_IGDNG_D_HB, PCI_DEVICE_ID_INTEL_IGDNG_D_IG, 0,
+@@ -2566,6 +2572,7 @@ static struct pci_device_id agp_intel_pci_table[] = {
+ ID(PCI_DEVICE_ID_INTEL_G45_HB),
+ ID(PCI_DEVICE_ID_INTEL_G41_HB),
+ ID(PCI_DEVICE_ID_INTEL_B43_HB),
++ ID(PCI_DEVICE_ID_INTEL_B43_1_HB),
+ ID(PCI_DEVICE_ID_INTEL_IGDNG_D_HB),
+ ID(PCI_DEVICE_ID_INTEL_IGDNG_M_HB),
+ ID(PCI_DEVICE_ID_INTEL_IGDNG_MA_HB),
+diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
+index 4239d68..e304a49 100644
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
+@@ -165,6 +165,7 @@ const static struct pci_device_id pciidlist[] = {
+ INTEL_VGA_DEVICE(0x2e22, &intel_g45_info),
+ INTEL_VGA_DEVICE(0x2e32, &intel_g45_info),
+ INTEL_VGA_DEVICE(0x2e42, &intel_g45_info),
++ INTEL_VGA_DEVICE(0x2e92, &intel_g45_info),
+ INTEL_VGA_DEVICE(0xa001, &intel_pineview_info),
+ INTEL_VGA_DEVICE(0xa011, &intel_pineview_info),
+ INTEL_VGA_DEVICE(0x0042, &intel_ironlake_d_info),
+diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
+index b26d0ed..ecc4fbe 100644
+--- a/drivers/gpu/drm/i915/i915_drv.h
++++ b/drivers/gpu/drm/i915/i915_drv.h
+@@ -1067,7 +1067,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
+ (dev)->pci_device == 0x2E22 || \
+ (dev)->pci_device == 0x2E32 || \
+ (dev)->pci_device == 0x2A42 || \
+- (dev)->pci_device == 0x2E42)
++ (dev)->pci_device == 0x2E42 || \
++ (dev)->pci_device == 0x2E92)
+
+ #define I915_NEED_GFX_HWS(dev) (INTEL_INFO(dev)->need_gfx_hws)
+
+--
+1.7.1
+
Added: dists/sid/linux-2.6/debian/patches/bugfix/all/i915-return-EFAULT-if-copy_to_user-fails.patch
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ dists/sid/linux-2.6/debian/patches/bugfix/all/i915-return-EFAULT-if-copy_to_user-fails.patch Fri Oct 29 10:42:08 2010 (r16502)
@@ -0,0 +1,68 @@
+From 3ae759a515035366939d5a5f970d1cc8f3825df3 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <error27 at gmail.com>
+Date: Sat, 19 Jun 2010 15:12:51 +0200
+Subject: [PATCH] i915: return -EFAULT if copy_to_user fails
+
+BugLink: http://bugs.launchpad.net/bugs/663176
+
+commit 9927a403ca8c97798129953fa9cbb5dc259c7cb9 upstream.
+
+copy_to_user returns the number of bytes remaining to be copied, but we
+want to return a negative error code here. These are returned to
+userspace.
+
+Signed-off-by: Dan Carpenter <error27 at gmail.com>
+Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
+(cherry-picked from 2.6.32.22/2.6.35.5)
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+Acked-by: Leann Ogasawara <leann.ogasawara at canonical.com>
+Acked-by: Brad Figg <brad.figg at canonical.com>
+Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
+---
+ drivers/gpu/drm/i915/i915_dma.c | 12 +++++++++---
+ 1 files changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
+index 2918fbc..7f13d50 100644
+--- a/drivers/gpu/drm/i915/i915_dma.c
++++ b/drivers/gpu/drm/i915/i915_dma.c
+@@ -687,8 +687,10 @@ static int i915_batchbuffer(struct drm_device *dev, void *data,
+ ret = copy_from_user(cliprects, batch->cliprects,
+ batch->num_cliprects *
+ sizeof(struct drm_clip_rect));
+- if (ret != 0)
++ if (ret != 0) {
++ ret = -EFAULT;
+ goto fail_free;
++ }
+ }
+
+ mutex_lock(&dev->struct_mutex);
+@@ -729,8 +731,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,
+ return -ENOMEM;
+
+ ret = copy_from_user(batch_data, cmdbuf->buf, cmdbuf->sz);
+- if (ret != 0)
++ if (ret != 0) {
++ ret = -EFAULT;
+ goto fail_batch_free;
++ }
+
+ if (cmdbuf->num_cliprects) {
+ cliprects = kcalloc(cmdbuf->num_cliprects,
+@@ -743,8 +747,10 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,
+ ret = copy_from_user(cliprects, cmdbuf->cliprects,
+ cmdbuf->num_cliprects *
+ sizeof(struct drm_clip_rect));
+- if (ret != 0)
++ if (ret != 0) {
++ ret = -EFAULT;
+ goto fail_clip_free;
++ }
+ }
+
+ mutex_lock(&dev->struct_mutex);
+--
+1.7.1
+
Modified: dists/sid/linux-2.6/debian/patches/series/27
==============================================================================
--- dists/sid/linux-2.6/debian/patches/series/27 Fri Oct 29 10:04:41 2010 (r16501)
+++ dists/sid/linux-2.6/debian/patches/series/27 Fri Oct 29 10:42:08 2010 (r16502)
@@ -14,3 +14,8 @@
+ bugfix/arm/kirkwood-reset-pcie-restrict.patch
+ bugfix/all/phonet-device-notifier-only-runs-on-initial-namespace.patch
+ bugfix/all/drm-radeon-fix-pci-id-5657-to-be-an-rv410.patch
++ bugfix/all/i915-return-EFAULT-if-copy_to_user-fails.patch
++ bugfix/all/drm-i915-Prevent-double-dpms-on.patch
++ bugfix/all/drm-Only-decouple-the-old_fb-from-the-crtc-is-we-cal.patch
++ bugfix/all/drm-i915-Unset-cursor-if-out-of-bounds-upon-mode-cha.patch
++ bugfix/all/drm-i915-agp-intel-Add-second-set-of-PCI-IDs-for-B43.patch
More information about the Kernel-svn-changes
mailing list