From: Greg Kroah-Hartman Date: Mon, 4 Feb 2013 14:34:04 +0000 (-0800) Subject: 3.7-stable patches X-Git-Tag: v3.0.63~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea8a8e923e4108853590c7d5b6ea6765b4585839;p=thirdparty%2Fkernel%2Fstable-queue.git 3.7-stable patches added patches: digsig-fix-memory-leakage-in-digsig_verify_rsa.patch drm-radeon-add-quirk-for-rv100-board.patch drm-radeon-add-wait_until-to-the-non-vm-safe-regs-list-for-cayman-tn.patch drm-radeon-calling-object_unrefer-when-creating-fb-failure.patch drm-radeon-evergreen-wait-for-the-mc-to-settle-after-mc-blackout.patch drm-radeon-fix-backend-map-setup-on-1-rb-sumo-boards.patch drm-radeon-fix-mc-blackout-on-evergreen.patch drm-radeon-prevent-crash-in-the-ring-space-allocation.patch drm-radeon-protect-against-div-by-0-in-backend-setup.patch --- diff --git a/queue-3.7/digsig-fix-memory-leakage-in-digsig_verify_rsa.patch b/queue-3.7/digsig-fix-memory-leakage-in-digsig_verify_rsa.patch new file mode 100644 index 00000000000..b8b6ece811d --- /dev/null +++ b/queue-3.7/digsig-fix-memory-leakage-in-digsig_verify_rsa.patch @@ -0,0 +1,32 @@ +From 7810cc1e7721220f1ed2a23ca95113d6434f6dcd Mon Sep 17 00:00:00 2001 +From: YOSHIFUJI Hideaki +Date: Fri, 25 Jan 2013 16:54:20 +0200 +Subject: digsig: Fix memory leakage in digsig_verify_rsa() + +From: YOSHIFUJI Hideaki + +commit 7810cc1e7721220f1ed2a23ca95113d6434f6dcd upstream. + +digsig_verify_rsa() does not free kmalloc'ed buffer returned by +mpi_get_buffer(). + +Signed-off-by: YOSHIFUJI Hideaki +Signed-off-by: Dmitry Kasatkin +Signed-off-by: James Morris +Signed-off-by: Greg Kroah-Hartman + +--- + lib/digsig.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/lib/digsig.c ++++ b/lib/digsig.c +@@ -162,6 +162,8 @@ static int digsig_verify_rsa(struct key + memset(out1, 0, head); + memcpy(out1 + head, p, l); + ++ kfree(p); ++ + err = pkcs_1_v1_5_decode_emsa(out1, len, mblen, out2, &len); + if (err) + goto err; diff --git a/queue-3.7/drm-radeon-add-quirk-for-rv100-board.patch b/queue-3.7/drm-radeon-add-quirk-for-rv100-board.patch new file mode 100644 index 00000000000..7076604b128 --- /dev/null +++ b/queue-3.7/drm-radeon-add-quirk-for-rv100-board.patch @@ -0,0 +1,39 @@ +From 9200ee4941a6e5d1ec5df88982243686882dff3f Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Tue, 29 Jan 2013 16:36:47 -0500 +Subject: drm/radeon: add quirk for RV100 board + +From: Alex Deucher + +commit 9200ee4941a6e5d1ec5df88982243686882dff3f upstream. + +vbios says external TMDS while the board is actually +internal TMDS. + +fixes: +https://bugs.freedesktop.org/show_bug.cgi?id=60037 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_combios.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/gpu/drm/radeon/radeon_combios.c ++++ b/drivers/gpu/drm/radeon/radeon_combios.c +@@ -2470,6 +2470,14 @@ bool radeon_get_legacy_connector_info_fr + 1), + ATOM_DEVICE_CRT1_SUPPORT); + } ++ /* RV100 board with external TDMS bit mis-set. ++ * Actually uses internal TMDS, clear the bit. ++ */ ++ if (dev->pdev->device == 0x5159 && ++ dev->pdev->subsystem_vendor == 0x1014 && ++ dev->pdev->subsystem_device == 0x029A) { ++ tmp &= ~(1 << 4); ++ } + if ((tmp >> 4) & 0x1) { + devices |= ATOM_DEVICE_DFP2_SUPPORT; + radeon_add_legacy_encoder(dev, diff --git a/queue-3.7/drm-radeon-add-wait_until-to-the-non-vm-safe-regs-list-for-cayman-tn.patch b/queue-3.7/drm-radeon-add-wait_until-to-the-non-vm-safe-regs-list-for-cayman-tn.patch new file mode 100644 index 00000000000..606b6e7f5db --- /dev/null +++ b/queue-3.7/drm-radeon-add-wait_until-to-the-non-vm-safe-regs-list-for-cayman-tn.patch @@ -0,0 +1,27 @@ +From 674a16f2b4724880d07389abbb95abf320b924aa Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Sun, 27 Jan 2013 21:57:51 -0500 +Subject: drm/radeon: add WAIT_UNTIL to the non-VM safe regs list for cayman/TN + +From: Alex Deucher + +commit 674a16f2b4724880d07389abbb95abf320b924aa upstream. + +Newer versions of mesa emit this. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/reg_srcs/cayman | 1 + + 1 file changed, 1 insertion(+) + +--- a/drivers/gpu/drm/radeon/reg_srcs/cayman ++++ b/drivers/gpu/drm/radeon/reg_srcs/cayman +@@ -1,5 +1,6 @@ + cayman 0x9400 + 0x0000802C GRBM_GFX_INDEX ++0x00008040 WAIT_UNTIL + 0x000084FC CP_STRMOUT_CNTL + 0x000085F0 CP_COHER_CNTL + 0x000085F4 CP_COHER_SIZE diff --git a/queue-3.7/drm-radeon-calling-object_unrefer-when-creating-fb-failure.patch b/queue-3.7/drm-radeon-calling-object_unrefer-when-creating-fb-failure.patch new file mode 100644 index 00000000000..778257fa4dd --- /dev/null +++ b/queue-3.7/drm-radeon-calling-object_unrefer-when-creating-fb-failure.patch @@ -0,0 +1,35 @@ +From f2d68cf4daa4de97d400d94836b907e35228e54f Mon Sep 17 00:00:00 2001 +From: liu chuansheng +Date: Thu, 31 Jan 2013 22:13:00 +0800 +Subject: drm/radeon: Calling object_unrefer() when creating fb failure + +From: liu chuansheng + +commit f2d68cf4daa4de97d400d94836b907e35228e54f upstream. + +When kzalloc() failed in radeon_user_framebuffer_create(), need to +call object_unreference() to match the object_reference(). + +Signed-off-by: liu chuansheng +Signed-off-by: xueminsu +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_display.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/radeon_display.c ++++ b/drivers/gpu/drm/radeon/radeon_display.c +@@ -1111,8 +1111,10 @@ radeon_user_framebuffer_create(struct dr + } + + radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL); +- if (radeon_fb == NULL) ++ if (radeon_fb == NULL) { ++ drm_gem_object_unreference_unlocked(obj); + return ERR_PTR(-ENOMEM); ++ } + + ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj); + if (ret) { diff --git a/queue-3.7/drm-radeon-evergreen-wait-for-the-mc-to-settle-after-mc-blackout.patch b/queue-3.7/drm-radeon-evergreen-wait-for-the-mc-to-settle-after-mc-blackout.patch new file mode 100644 index 00000000000..349079e30b7 --- /dev/null +++ b/queue-3.7/drm-radeon-evergreen-wait-for-the-mc-to-settle-after-mc-blackout.patch @@ -0,0 +1,34 @@ +From ed39fadd6df01095378e499fac3674883f16b853 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 31 Jan 2013 09:00:52 -0500 +Subject: drm/radeon/evergreen+: wait for the MC to settle after MC blackout + +From: Alex Deucher + +commit ed39fadd6df01095378e499fac3674883f16b853 upstream. + +Some chips seem to need a little delay after blacking out +the MC before the requests actually stop. + +May fix: +https://bugs.freedesktop.org/show_bug.cgi?id=56139 +https://bugs.freedesktop.org/show_bug.cgi?id=57567 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/evergreen.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/radeon/evergreen.c ++++ b/drivers/gpu/drm/radeon/evergreen.c +@@ -1345,6 +1345,8 @@ void evergreen_mc_stop(struct radeon_dev + blackout &= ~BLACKOUT_MODE_MASK; + WREG32(MC_SHARED_BLACKOUT_CNTL, blackout | 1); + } ++ /* wait for the MC to settle */ ++ udelay(100); + } + + void evergreen_mc_resume(struct radeon_device *rdev, struct evergreen_mc_save *save) diff --git a/queue-3.7/drm-radeon-fix-backend-map-setup-on-1-rb-sumo-boards.patch b/queue-3.7/drm-radeon-fix-backend-map-setup-on-1-rb-sumo-boards.patch new file mode 100644 index 00000000000..88f3f2ee36e --- /dev/null +++ b/queue-3.7/drm-radeon-fix-backend-map-setup-on-1-rb-sumo-boards.patch @@ -0,0 +1,49 @@ +From f7eb97300832f4fe5fe916c5d84cd2e25169330e Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 30 Jan 2013 13:57:40 -0500 +Subject: drm/radeon: fix backend map setup on 1 RB sumo boards + +From: Alex Deucher + +commit f7eb97300832f4fe5fe916c5d84cd2e25169330e upstream. + +Need to adjust the backend map depending on which +RB is enabled. + +Fixes: +https://bugzilla.redhat.com/show_bug.cgi?id=892233 + +Reported-by: Mikko Tiihonen +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/evergreen.c | 17 ++++++++++++++--- + 1 file changed, 14 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/radeon/evergreen.c ++++ b/drivers/gpu/drm/radeon/evergreen.c +@@ -2045,9 +2045,20 @@ static void evergreen_gpu_init(struct ra + WREG32(DMIF_ADDR_CONFIG, gb_addr_config); + WREG32(HDP_ADDR_CONFIG, gb_addr_config); + +- tmp = gb_addr_config & NUM_PIPES_MASK; +- tmp = r6xx_remap_render_backend(rdev, tmp, rdev->config.evergreen.max_backends, +- EVERGREEN_MAX_BACKENDS, disabled_rb_mask); ++ if ((rdev->config.evergreen.max_backends == 1) && ++ (rdev->flags & RADEON_IS_IGP)) { ++ if ((disabled_rb_mask & 3) == 1) { ++ /* RB0 disabled, RB1 enabled */ ++ tmp = 0x11111111; ++ } else { ++ /* RB1 disabled, RB0 enabled */ ++ tmp = 0x00000000; ++ } ++ } else { ++ tmp = gb_addr_config & NUM_PIPES_MASK; ++ tmp = r6xx_remap_render_backend(rdev, tmp, rdev->config.evergreen.max_backends, ++ EVERGREEN_MAX_BACKENDS, disabled_rb_mask); ++ } + WREG32(GB_BACKEND_MAP, tmp); + + WREG32(CGTS_SYS_TCC_DISABLE, 0); diff --git a/queue-3.7/drm-radeon-fix-mc-blackout-on-evergreen.patch b/queue-3.7/drm-radeon-fix-mc-blackout-on-evergreen.patch new file mode 100644 index 00000000000..9592a5f82a0 --- /dev/null +++ b/queue-3.7/drm-radeon-fix-mc-blackout-on-evergreen.patch @@ -0,0 +1,59 @@ +From bb588820ef421c6098dca1fec29c3b347f1c8c19 Mon Sep 17 00:00:00 2001 +From: Christopher Staite +Date: Sat, 26 Jan 2013 11:10:58 -0500 +Subject: drm/radeon: fix MC blackout on evergreen+ + +From: Christopher Staite + +commit bb588820ef421c6098dca1fec29c3b347f1c8c19 upstream. + +Force the crtc mem requests on/off immediately rather +than waiting for the double buffered updates to kick in. +Seems we miss the update in certain conditions. Also +handle the DCE6 case. + +Signed-off-by: Christopher Staite +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/evergreen.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/gpu/drm/radeon/evergreen.c ++++ b/drivers/gpu/drm/radeon/evergreen.c +@@ -1313,14 +1313,18 @@ void evergreen_mc_stop(struct radeon_dev + if (!(tmp & EVERGREEN_CRTC_BLANK_DATA_EN)) { + radeon_wait_for_vblank(rdev, i); + tmp |= EVERGREEN_CRTC_BLANK_DATA_EN; ++ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); + WREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i], tmp); ++ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); + } + } else { + tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); + if (!(tmp & EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE)) { + radeon_wait_for_vblank(rdev, i); + tmp |= EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE; ++ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); + WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp); ++ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); + } + } + /* wait for the next frame */ +@@ -1380,11 +1384,15 @@ void evergreen_mc_resume(struct radeon_d + if (ASIC_IS_DCE6(rdev)) { + tmp = RREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i]); + tmp |= EVERGREEN_CRTC_BLANK_DATA_EN; ++ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); + WREG32(EVERGREEN_CRTC_BLANK_CONTROL + crtc_offsets[i], tmp); ++ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); + } else { + tmp = RREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i]); + tmp &= ~EVERGREEN_CRTC_DISP_READ_REQUEST_DISABLE; ++ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 1); + WREG32(EVERGREEN_CRTC_CONTROL + crtc_offsets[i], tmp); ++ WREG32(EVERGREEN_CRTC_UPDATE_LOCK + crtc_offsets[i], 0); + } + /* wait for the next frame */ + frame_count = radeon_get_vblank_counter(rdev, i); diff --git a/queue-3.7/drm-radeon-prevent-crash-in-the-ring-space-allocation.patch b/queue-3.7/drm-radeon-prevent-crash-in-the-ring-space-allocation.patch new file mode 100644 index 00000000000..eac49f1deea --- /dev/null +++ b/queue-3.7/drm-radeon-prevent-crash-in-the-ring-space-allocation.patch @@ -0,0 +1,40 @@ +From fd5d93a0015ce1a7db881382022b2fcdfdc61760 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 30 Jan 2013 14:24:09 -0500 +Subject: drm/radeon: prevent crash in the ring space allocation + +From: Alex Deucher + +commit fd5d93a0015ce1a7db881382022b2fcdfdc61760 upstream. + +If the requested number of DWs on the ring is larger than +the size of the ring itself, return an error. + +In testing with large VM updates, we've seen crashes when we +try and allocate more space on the ring than the total size +of the ring without checking. + +This prevents the crash but for large VM updates or bo moves +of very large buffers, we will need to break the transaction +down into multiple batches. I have patches to use IBs for +the next kernel. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_ring.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/gpu/drm/radeon/radeon_ring.c ++++ b/drivers/gpu/drm/radeon/radeon_ring.c +@@ -377,6 +377,9 @@ int radeon_ring_alloc(struct radeon_devi + { + int r; + ++ /* make sure we aren't trying to allocate more space than there is on the ring */ ++ if (ndw > (ring->ring_size / 4)) ++ return -ENOMEM; + /* Align requested size with padding so unlock_commit can + * pad safely */ + ndw = (ndw + ring->align_mask) & ~ring->align_mask; diff --git a/queue-3.7/drm-radeon-protect-against-div-by-0-in-backend-setup.patch b/queue-3.7/drm-radeon-protect-against-div-by-0-in-backend-setup.patch new file mode 100644 index 00000000000..cf784d522a3 --- /dev/null +++ b/queue-3.7/drm-radeon-protect-against-div-by-0-in-backend-setup.patch @@ -0,0 +1,43 @@ +From f689e3acbd2e48cc4101e0af454193f81af4baaf Mon Sep 17 00:00:00 2001 +From: Mikko Tiihonen +Date: Wed, 30 Jan 2013 14:10:04 -0500 +Subject: drm/radeon: protect against div by 0 in backend setup + +From: Mikko Tiihonen + +commit f689e3acbd2e48cc4101e0af454193f81af4baaf upstream. + +Make sure at least one RB is enabled in +r6xx_remap_render_backend() to avoid an division by +zero in some corner cases. + +See: +https://bugzilla.redhat.com/show_bug.cgi?id=892233 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/r600.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/radeon/r600.c ++++ b/drivers/gpu/drm/radeon/r600.c +@@ -1382,12 +1382,15 @@ u32 r6xx_remap_render_backend(struct rad + u32 disabled_rb_mask) + { + u32 rendering_pipe_num, rb_num_width, req_rb_num; +- u32 pipe_rb_ratio, pipe_rb_remain; ++ u32 pipe_rb_ratio, pipe_rb_remain, tmp; + u32 data = 0, mask = 1 << (max_rb_num - 1); + unsigned i, j; + + /* mask out the RBs that don't exist on that asic */ +- disabled_rb_mask |= (0xff << max_rb_num) & 0xff; ++ tmp = disabled_rb_mask | ((0xff << max_rb_num) & 0xff); ++ /* make sure at least one RB is available */ ++ if ((tmp & 0xff) != 0xff) ++ disabled_rb_mask = tmp; + + rendering_pipe_num = 1 << tiling_pipe_num; + req_rb_num = total_max_rb_num - r600_count_pipe_bits(disabled_rb_mask); diff --git a/queue-3.7/series b/queue-3.7/series index ea1bd21936e..3c36ae3be3a 100644 --- a/queue-3.7/series +++ b/queue-3.7/series @@ -1 +1,10 @@ powerpc-mm-fix-hash-computation-function.patch +digsig-fix-memory-leakage-in-digsig_verify_rsa.patch +drm-radeon-evergreen-wait-for-the-mc-to-settle-after-mc-blackout.patch +drm-radeon-add-wait_until-to-the-non-vm-safe-regs-list-for-cayman-tn.patch +drm-radeon-add-quirk-for-rv100-board.patch +drm-radeon-fix-mc-blackout-on-evergreen.patch +drm-radeon-fix-backend-map-setup-on-1-rb-sumo-boards.patch +drm-radeon-protect-against-div-by-0-in-backend-setup.patch +drm-radeon-prevent-crash-in-the-ring-space-allocation.patch +drm-radeon-calling-object_unrefer-when-creating-fb-failure.patch