From: Greg Kroah-Hartman Date: Mon, 5 Nov 2012 13:57:10 +0000 (+0100) Subject: 3.4-stable patches X-Git-Tag: v3.0.52~39 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e23253ca6e00e395bb0be58dd667256dc9eab669;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: drm-radeon-fix-load-detection-on-legacy-primary-dac.patch drm-udl-fix-stride-issues-scanning-out-stride-width-bpp.patch --- diff --git a/queue-3.4/drm-radeon-fix-load-detection-on-legacy-primary-dac.patch b/queue-3.4/drm-radeon-fix-load-detection-on-legacy-primary-dac.patch new file mode 100644 index 00000000000..583d807ce6f --- /dev/null +++ b/queue-3.4/drm-radeon-fix-load-detection-on-legacy-primary-dac.patch @@ -0,0 +1,29 @@ +From 83325d072185899b706de2956170b246585aaec9 Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Wed, 24 Oct 2012 18:29:49 +0200 +Subject: DRM/Radeon: Fix Load Detection on legacy primary DAC. + +From: Egbert Eich + +commit 83325d072185899b706de2956170b246585aaec9 upstream. + +An uninitialized variable led to broken load detection. + +Signed-off-by: Egbert Eich +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c ++++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +@@ -650,6 +650,7 @@ static enum drm_connector_status radeon_ + tmp |= RADEON_DAC_RANGE_CNTL_PS2 | RADEON_DAC_CMP_EN; + WREG32(RADEON_DAC_CNTL, tmp); + ++ tmp = dac_macro_cntl; + tmp &= ~(RADEON_DAC_PDWN_R | + RADEON_DAC_PDWN_G | + RADEON_DAC_PDWN_B); diff --git a/queue-3.4/drm-udl-fix-stride-issues-scanning-out-stride-width-bpp.patch b/queue-3.4/drm-udl-fix-stride-issues-scanning-out-stride-width-bpp.patch new file mode 100644 index 00000000000..6322d62b169 --- /dev/null +++ b/queue-3.4/drm-udl-fix-stride-issues-scanning-out-stride-width-bpp.patch @@ -0,0 +1,84 @@ +From 3916e1d71b62b120888aa50bcc8d9a6200fc19a7 Mon Sep 17 00:00:00 2001 +From: Dave Airlie +Date: Thu, 1 Nov 2012 13:47:09 +1000 +Subject: drm/udl: fix stride issues scanning out stride != width*bpp + +From: Dave Airlie + +commit 3916e1d71b62b120888aa50bcc8d9a6200fc19a7 upstream. + +When buffer sharing with the i915 and using a 1680x1050 monitor, +the i915 gives is a 6912 buffer for the 6720 width, the code doesn't +render this properly as it uses one value to set the base address for +reading from the vmap and for where to start on the device. + +This fixes it by calculating the values correctly for the device and +for the pixmap. No idea how I haven't seen this before now. + +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/udl/udl_drv.h | 2 +- + drivers/gpu/drm/udl/udl_fb.c | 12 +++++++----- + drivers/gpu/drm/udl/udl_transfer.c | 5 +++-- + 3 files changed, 11 insertions(+), 8 deletions(-) + +--- a/drivers/gpu/drm/udl/udl_drv.h ++++ b/drivers/gpu/drm/udl/udl_drv.h +@@ -103,7 +103,7 @@ udl_fb_user_fb_create(struct drm_device + + int udl_render_hline(struct drm_device *dev, int bpp, struct urb **urb_ptr, + const char *front, char **urb_buf_ptr, +- u32 byte_offset, u32 byte_width, ++ u32 byte_offset, u32 device_byte_offset, u32 byte_width, + int *ident_ptr, int *sent_ptr); + + int udl_dumb_create(struct drm_file *file_priv, +--- a/drivers/gpu/drm/udl/udl_fb.c ++++ b/drivers/gpu/drm/udl/udl_fb.c +@@ -114,9 +114,10 @@ static void udlfb_dpy_deferred_io(struct + list_for_each_entry(cur, &fbdefio->pagelist, lru) { + + if (udl_render_hline(dev, (ufbdev->ufb.base.bits_per_pixel / 8), +- &urb, (char *) info->fix.smem_start, +- &cmd, cur->index << PAGE_SHIFT, +- PAGE_SIZE, &bytes_identical, &bytes_sent)) ++ &urb, (char *) info->fix.smem_start, ++ &cmd, cur->index << PAGE_SHIFT, ++ cur->index << PAGE_SHIFT, ++ PAGE_SIZE, &bytes_identical, &bytes_sent)) + goto error; + bytes_rendered += PAGE_SIZE; + } +@@ -178,10 +179,11 @@ int udl_handle_damage(struct udl_framebu + for (i = y; i < y + height ; i++) { + const int line_offset = fb->base.pitches[0] * i; + const int byte_offset = line_offset + (x * bpp); +- ++ const int dev_byte_offset = (fb->base.width * bpp * i) + (x * bpp); + if (udl_render_hline(dev, bpp, &urb, + (char *) fb->obj->vmapping, +- &cmd, byte_offset, width * bpp, ++ &cmd, byte_offset, dev_byte_offset, ++ width * bpp, + &bytes_identical, &bytes_sent)) + goto error; + } +--- a/drivers/gpu/drm/udl/udl_transfer.c ++++ b/drivers/gpu/drm/udl/udl_transfer.c +@@ -213,11 +213,12 @@ static void udl_compress_hline16( + */ + int udl_render_hline(struct drm_device *dev, int bpp, struct urb **urb_ptr, + const char *front, char **urb_buf_ptr, +- u32 byte_offset, u32 byte_width, ++ u32 byte_offset, u32 device_byte_offset, ++ u32 byte_width, + int *ident_ptr, int *sent_ptr) + { + const u8 *line_start, *line_end, *next_pixel; +- u32 base16 = 0 + (byte_offset / bpp) * 2; ++ u32 base16 = 0 + (device_byte_offset / bpp) * 2; + struct urb *urb = *urb_ptr; + u8 *cmd = *urb_buf_ptr; + u8 *cmd_end = (u8 *) urb->transfer_buffer + urb->transfer_buffer_length; diff --git a/queue-3.4/series b/queue-3.4/series index 04e1c9925f0..7903b564c10 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -13,3 +13,5 @@ wireless-drop-invalid-mesh-address-extension-frames.patch mac80211-use-blacklist-for-duplicate-ie-check.patch mac80211-only-process-mesh-config-header-on-frames-that-ra_match.patch mac80211-don-t-inspect-sequence-control-field-on-control-frames.patch +drm-radeon-fix-load-detection-on-legacy-primary-dac.patch +drm-udl-fix-stride-issues-scanning-out-stride-width-bpp.patch