From: Greg Kroah-Hartman Date: Wed, 17 Oct 2012 21:39:08 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.0.47~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f0516b2c29d253dbcc409163724c62f1a023c738;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: drm-i915-use-adjusted_mode-instead-of-mode-for-checking-the-6bpc-force-flag.patch drm-radeon-don-t-destroy-i2c-bus-rec-in-radeon_ext_tmds_enc_destroy.patch --- diff --git a/queue-3.4/drm-i915-use-adjusted_mode-instead-of-mode-for-checking-the-6bpc-force-flag.patch b/queue-3.4/drm-i915-use-adjusted_mode-instead-of-mode-for-checking-the-6bpc-force-flag.patch new file mode 100644 index 00000000000..9b63f87cca5 --- /dev/null +++ b/queue-3.4/drm-i915-use-adjusted_mode-instead-of-mode-for-checking-the-6bpc-force-flag.patch @@ -0,0 +1,65 @@ +From 0c96c65b48fba3ffe9822a554cbc0cd610765cd5 Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Wed, 26 Sep 2012 18:43:10 +0300 +Subject: drm/i915: use adjusted_mode instead of mode for checking the 6bpc force flag + +From: Jani Nikula + +commit 0c96c65b48fba3ffe9822a554cbc0cd610765cd5 upstream. + +The dithering introduced in + +commit 3b5c78a35cf7511c15e09a9b0ffab290a42d9bcf +Author: Adam Jackson +Date: Tue Dec 13 15:41:00 2011 -0800 + + drm/i915/dp: Dither down to 6bpc if it makes the mode fit + +stores the INTEL_MODE_DP_FORCE_6BPC flag in the private_flags of the +adjusted mode, while i9xx_crtc_mode_set() and ironlake_crtc_mode_set() use +the original mode, without the flag, so it would never have any +effect. However, the BPC was clamped by VBT settings, making things work by +coincidence, until that part was removed in + +commit 4344b813f105a19f793f1fd93ad775b784648b95 +Author: Daniel Vetter +Date: Fri Aug 10 11:10:20 2012 +0200 + +Use adjusted_mode instead of mode when checking for +INTEL_MODE_DP_FORCE_6BPC to make the flag have effect. + +v2: Don't forget to fix this in i9xx_crtc_mode_set() also, pointed out by +Daniel both before and after sending the first patch. + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=47621 +CC: Adam Jackson +Signed-off-by: Jani Nikula +Reviewed-by: Adam Jackson +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + + +--- + drivers/gpu/drm/i915/intel_display.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -5318,7 +5318,7 @@ static int i9xx_crtc_mode_set(struct drm + /* default to 8bpc */ + pipeconf &= ~(PIPECONF_BPP_MASK | PIPECONF_DITHER_EN); + if (is_dp) { +- if (mode->private_flags & INTEL_MODE_DP_FORCE_6BPC) { ++ if (adjusted_mode->private_flags & INTEL_MODE_DP_FORCE_6BPC) { + pipeconf |= PIPECONF_BPP_6 | + PIPECONF_DITHER_EN | + PIPECONF_DITHER_TYPE_SP; +@@ -5782,7 +5782,7 @@ static int ironlake_crtc_mode_set(struct + /* determine panel color depth */ + temp = I915_READ(PIPECONF(pipe)); + temp &= ~PIPE_BPC_MASK; +- dither = intel_choose_pipe_bpp_dither(crtc, &pipe_bpp, mode); ++ dither = intel_choose_pipe_bpp_dither(crtc, &pipe_bpp, adjusted_mode); + switch (pipe_bpp) { + case 18: + temp |= PIPE_6BPC; diff --git a/queue-3.4/drm-radeon-don-t-destroy-i2c-bus-rec-in-radeon_ext_tmds_enc_destroy.patch b/queue-3.4/drm-radeon-don-t-destroy-i2c-bus-rec-in-radeon_ext_tmds_enc_destroy.patch new file mode 100644 index 00000000000..4320c422768 --- /dev/null +++ b/queue-3.4/drm-radeon-don-t-destroy-i2c-bus-rec-in-radeon_ext_tmds_enc_destroy.patch @@ -0,0 +1,44 @@ +From 082918471139b07964967cfe5f70230909c82ae1 Mon Sep 17 00:00:00 2001 +From: Egbert Eich +Date: Mon, 15 Oct 2012 08:21:39 +0200 +Subject: drm/radeon: Don't destroy I2C Bus Rec in radeon_ext_tmds_enc_destroy(). + +From: Egbert Eich + +commit 082918471139b07964967cfe5f70230909c82ae1 upstream. + +radeon_i2c_fini() walks thru the list of I2C bus recs rdev->i2c_bus[] +to destroy each of them. +radeon_ext_tmds_enc_destroy() however also has code to destroy it's +associated I2C bus rec which has been obtained by radeon_i2c_lookup() +and is therefore also in the i2c_bus[] list. +This causes a double free resulting in a kernel panic when unloading +the radeon driver. +Removing destroy code from radeon_ext_tmds_enc_destroy() fixes this +problem. + +agd5f: fix compiler warning + +Signed-off-by: Egbert Eich +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/radeon_legacy_encoders.c | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +--- a/drivers/gpu/drm/radeon/radeon_legacy_encoders.c ++++ b/drivers/gpu/drm/radeon/radeon_legacy_encoders.c +@@ -973,11 +973,7 @@ static void radeon_legacy_tmds_ext_mode_ + static void radeon_ext_tmds_enc_destroy(struct drm_encoder *encoder) + { + struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder); +- struct radeon_encoder_ext_tmds *tmds = radeon_encoder->enc_priv; +- if (tmds) { +- if (tmds->i2c_bus) +- radeon_i2c_destroy(tmds->i2c_bus); +- } ++ /* don't destroy the i2c bus record here, this will be done in radeon_i2c_fini */ + kfree(radeon_encoder->enc_priv); + drm_encoder_cleanup(encoder); + kfree(radeon_encoder); diff --git a/queue-3.4/series b/queue-3.4/series index 256ade9677b..a4bfd644d73 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -42,3 +42,5 @@ netfilter-nf_ct_expect-fix-possible-access-to-uninitialized-timer.patch netfilter-limit-hashlimit-avoid-duplicated-inline.patch netfilter-xt_limit-have-r-cost-0-case-work.patch add-cdc-acm-support-for-the-cx93010-2x-ucmxx-usb-modem.patch +drm-radeon-don-t-destroy-i2c-bus-rec-in-radeon_ext_tmds_enc_destroy.patch +drm-i915-use-adjusted_mode-instead-of-mode-for-checking-the-6bpc-force-flag.patch