From: Greg Kroah-Hartman Date: Mon, 6 Jan 2014 17:32:38 +0000 (-0800) Subject: 3.10-stable patches X-Git-Tag: v3.4.76~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=451868d8494400f09493139f206e4dae08c40bd9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: drm-edid-add-quirk-for-bpc-in-samsung-np700g7a-s01pl-notebook.patch drm-i915-don-t-update-the-dri1-breadcrumb-with-modesetting.patch drm-i915-hold-mutex-across-i915_gem_release.patch drm-i915-take-modeset-locks-around-intel_modeset_setup_hw_state.patch drm-radeon-add-missing-display-tiling-setup-for-oland.patch drm-radeon-fix-sideport-problems-on-certain-rs690-boards.patch --- diff --git a/queue-3.10/drm-edid-add-quirk-for-bpc-in-samsung-np700g7a-s01pl-notebook.patch b/queue-3.10/drm-edid-add-quirk-for-bpc-in-samsung-np700g7a-s01pl-notebook.patch new file mode 100644 index 00000000000..041ce89a2d6 --- /dev/null +++ b/queue-3.10/drm-edid-add-quirk-for-bpc-in-samsung-np700g7a-s01pl-notebook.patch @@ -0,0 +1,59 @@ +From 49d45a31b71d7d9da74485922bdb63faf3dc9684 Mon Sep 17 00:00:00 2001 +From: Rafał Miłecki +Date: Sat, 7 Dec 2013 13:22:42 +0100 +Subject: drm/edid: add quirk for BPC in Samsung NP700G7A-S01PL notebook + +From: Rafał Miłecki + +commit 49d45a31b71d7d9da74485922bdb63faf3dc9684 upstream. + +This bug in EDID was exposed by: + +commit eccea7920cfb009c2fa40e9ecdce8c36f61cab66 +Author: Alex Deucher +Date: Mon Mar 26 15:12:54 2012 -0400 + + drm/radeon/kms: improve bpc handling (v2) + +Which resulted in kind of regression in 3.5. This fixes +https://bugs.freedesktop.org/show_bug.cgi?id=70934 + +Signed-off-by: Rafał Miłecki +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/drm_edid.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/gpu/drm/drm_edid.c ++++ b/drivers/gpu/drm/drm_edid.c +@@ -68,6 +68,8 @@ + #define EDID_QUIRK_DETAILED_SYNC_PP (1 << 6) + /* Force reduced-blanking timings for detailed modes */ + #define EDID_QUIRK_FORCE_REDUCED_BLANKING (1 << 7) ++/* Force 8bpc */ ++#define EDID_QUIRK_FORCE_8BPC (1 << 8) + + struct detailed_mode_closure { + struct drm_connector *connector; +@@ -128,6 +130,9 @@ static struct edid_quirk { + + /* Medion MD 30217 PG */ + { "MED", 0x7b8, EDID_QUIRK_PREFER_LARGE_75 }, ++ ++ /* Panel in Samsung NP700G7A-S01PL notebook reports 6bpc */ ++ { "SEC", 0xd033, EDID_QUIRK_FORCE_8BPC }, + }; + + /* +@@ -2955,6 +2960,9 @@ int drm_add_edid_modes(struct drm_connec + + drm_add_display_info(edid, &connector->display_info); + ++ if (quirks & EDID_QUIRK_FORCE_8BPC) ++ connector->display_info.bpc = 8; ++ + return num_modes; + } + EXPORT_SYMBOL(drm_add_edid_modes); diff --git a/queue-3.10/drm-i915-don-t-update-the-dri1-breadcrumb-with-modesetting.patch b/queue-3.10/drm-i915-don-t-update-the-dri1-breadcrumb-with-modesetting.patch new file mode 100644 index 00000000000..a7e71fd8f2a --- /dev/null +++ b/queue-3.10/drm-i915-don-t-update-the-dri1-breadcrumb-with-modesetting.patch @@ -0,0 +1,57 @@ +From 6c719faca2aceca72f1bf5b1645c1734ed3e9447 Mon Sep 17 00:00:00 2001 +From: Daniel Vetter +Date: Tue, 10 Dec 2013 13:20:59 +0100 +Subject: drm/i915: don't update the dri1 breadcrumb with modesetting + +From: Daniel Vetter + +commit 6c719faca2aceca72f1bf5b1645c1734ed3e9447 upstream. + +The update is horribly racy since it doesn't protect at all against +concurrent closing of the master fd. And it can't really since that +requires us to grab a mutex. + +Instead of jumping through hoops and offloading this to a worker +thread just block this bit of code for the modesetting driver. + +Note that the race is fairly easy to hit since we call the breadcrumb +function for any interrupt. So the vblank interrupt (which usually +keeps going for a bit) is enough. But even if we'd block this and only +update the breadcrumb for user interrupts from the CS we could hit +this race with kms/gem userspace: If a non-master is waiting somewhere +(and hence has interrupts enabled) and the master closes its fd +(probably due to crashing). + +v2: Add a code comment to explain why fixing this for real isn't +really worth it. Also improve the commit message a bit. + +v3: Fix the spelling in the comment. + +Reported-by: Eugene Shatokhin +Cc: Eugene Shatokhin +Acked-by: Chris Wilson +Tested-by: Eugene Shatokhin +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_dma.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +--- a/drivers/gpu/drm/i915/i915_dma.c ++++ b/drivers/gpu/drm/i915/i915_dma.c +@@ -84,6 +84,14 @@ void i915_update_dri1_breadcrumb(struct + drm_i915_private_t *dev_priv = dev->dev_private; + struct drm_i915_master_private *master_priv; + ++ /* ++ * The dri breadcrumb update races against the drm master disappearing. ++ * Instead of trying to fix this (this is by far not the only ums issue) ++ * just don't do the update in kms mode. ++ */ ++ if (drm_core_check_feature(dev, DRIVER_MODESET)) ++ return; ++ + if (dev->primary->master) { + master_priv = dev->primary->master->driver_priv; + if (master_priv->sarea_priv) diff --git a/queue-3.10/drm-i915-hold-mutex-across-i915_gem_release.patch b/queue-3.10/drm-i915-hold-mutex-across-i915_gem_release.patch new file mode 100644 index 00000000000..bd4d5482658 --- /dev/null +++ b/queue-3.10/drm-i915-hold-mutex-across-i915_gem_release.patch @@ -0,0 +1,53 @@ +From 0d1430a3f4b7cfd8779b78740a4182321f3ca7f3 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Wed, 4 Dec 2013 14:52:06 +0000 +Subject: drm/i915: Hold mutex across i915_gem_release + +From: Chris Wilson + +commit 0d1430a3f4b7cfd8779b78740a4182321f3ca7f3 upstream. + +Inorder to serialise the closing of the file descriptor and its +subsequent release of client requests with i915_gem_free_request(), we +need to hold the struct_mutex in i915_gem_release(). Failing to do so +has the potential to trigger an OOPS, later with a use-after-free. + +Testcase: igt/gem_close_race +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70874 +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71029 +Reported-by: Eric Anholt +Signed-off-by: Chris Wilson +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_dma.c | 2 ++ + drivers/gpu/drm/i915/i915_gem_context.c | 2 -- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_dma.c ++++ b/drivers/gpu/drm/i915/i915_dma.c +@@ -1847,8 +1847,10 @@ void i915_driver_lastclose(struct drm_de + + void i915_driver_preclose(struct drm_device * dev, struct drm_file *file_priv) + { ++ mutex_lock(&dev->struct_mutex); + i915_gem_context_close(dev, file_priv); + i915_gem_release(dev, file_priv); ++ mutex_unlock(&dev->struct_mutex); + } + + void i915_driver_postclose(struct drm_device *dev, struct drm_file *file) +--- a/drivers/gpu/drm/i915/i915_gem_context.c ++++ b/drivers/gpu/drm/i915/i915_gem_context.c +@@ -291,10 +291,8 @@ void i915_gem_context_close(struct drm_d + { + struct drm_i915_file_private *file_priv = file->driver_priv; + +- mutex_lock(&dev->struct_mutex); + idr_for_each(&file_priv->context_idr, context_idr_cleanup, NULL); + idr_destroy(&file_priv->context_idr); +- mutex_unlock(&dev->struct_mutex); + } + + static struct i915_hw_context * diff --git a/queue-3.10/drm-i915-take-modeset-locks-around-intel_modeset_setup_hw_state.patch b/queue-3.10/drm-i915-take-modeset-locks-around-intel_modeset_setup_hw_state.patch new file mode 100644 index 00000000000..d6e769f72fc --- /dev/null +++ b/queue-3.10/drm-i915-take-modeset-locks-around-intel_modeset_setup_hw_state.patch @@ -0,0 +1,42 @@ +From 027476642811f8559cbe00ef6cc54db230e48a20 Mon Sep 17 00:00:00 2001 +From: Ville Syrjälä +Date: Mon, 2 Dec 2013 11:08:06 +0200 +Subject: drm/i915: Take modeset locks around intel_modeset_setup_hw_state() + +From: Ville Syrjälä + +commit 027476642811f8559cbe00ef6cc54db230e48a20 upstream. + +Some lower level things get angry if we don't have modeset locks +during intel_modeset_setup_hw_state(). Actually the resume and +lid_notify codepaths alreday hold the locks, but the init codepath +doesn't, so fix that. + +Note: This slipped through since we only disable pipes if the +plane/pipe linking doesn't match. Which is only relevant on older +gen3 mobile machines, if the BIOS fails to set up our preferred +linking. + +Signed-off-by: Ville Syrjälä +Tested-and-reported-by: Paul Bolle +[danvet: Add note now that I could confirm my theory with the log +files Paul Bolle provided.] +Signed-off-by: Daniel Vetter +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_display.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_display.c ++++ b/drivers/gpu/drm/i915/intel_display.c +@@ -9456,7 +9456,9 @@ void intel_modeset_gem_init(struct drm_d + + intel_setup_overlay(dev); + ++ drm_modeset_lock_all(dev); + intel_modeset_setup_hw_state(dev, false); ++ drm_modeset_unlock_all(dev); + } + + void intel_modeset_cleanup(struct drm_device *dev) diff --git a/queue-3.10/drm-radeon-add-missing-display-tiling-setup-for-oland.patch b/queue-3.10/drm-radeon-add-missing-display-tiling-setup-for-oland.patch new file mode 100644 index 00000000000..98483aacf97 --- /dev/null +++ b/queue-3.10/drm-radeon-add-missing-display-tiling-setup-for-oland.patch @@ -0,0 +1,32 @@ +From 227ae10f17a5f2fd1307b7e582b603ef7bbb7e97 Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Wed, 11 Dec 2013 11:43:58 -0500 +Subject: drm/radeon: add missing display tiling setup for oland + +From: Alex Deucher + +commit 227ae10f17a5f2fd1307b7e582b603ef7bbb7e97 upstream. + +Fixes improperly set up display params for 2D tiling on +oland. + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/atombios_crtc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/atombios_crtc.c ++++ b/drivers/gpu/drm/radeon/atombios_crtc.c +@@ -1176,7 +1176,9 @@ static int dce4_crtc_do_set_base(struct + if ((rdev->family == CHIP_TAHITI) || + (rdev->family == CHIP_PITCAIRN)) + fb_format |= SI_GRPH_PIPE_CONFIG(SI_ADDR_SURF_P8_32x32_8x16); +- else if (rdev->family == CHIP_VERDE) ++ else if ((rdev->family == CHIP_VERDE) || ++ (rdev->family == CHIP_OLAND) || ++ (rdev->family == CHIP_HAINAN)) /* for completeness. HAINAN has no display hw */ + fb_format |= SI_GRPH_PIPE_CONFIG(SI_ADDR_SURF_P4_8x16); + + switch (radeon_crtc->crtc_id) { diff --git a/queue-3.10/drm-radeon-fix-sideport-problems-on-certain-rs690-boards.patch b/queue-3.10/drm-radeon-fix-sideport-problems-on-certain-rs690-boards.patch new file mode 100644 index 00000000000..d3e4cd3edad --- /dev/null +++ b/queue-3.10/drm-radeon-fix-sideport-problems-on-certain-rs690-boards.patch @@ -0,0 +1,43 @@ +From 8333f0fe133be420ce3fcddfd568c3a559ab274e Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Mon, 2 Dec 2013 18:15:51 -0500 +Subject: drm/radeon: Fix sideport problems on certain RS690 boards + +From: Alex Deucher + +commit 8333f0fe133be420ce3fcddfd568c3a559ab274e upstream. + +Some RS690 boards with 64MB of sideport memory show up as +having 128MB sideport + 256MB of UMA. In this case, +just skip the sideport memory and use UMA. This fixes +rendering corruption and should improve performance. + +bug: +https://bugs.freedesktop.org/show_bug.cgi?id=35457 + +Signed-off-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/rs690.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/drivers/gpu/drm/radeon/rs690.c ++++ b/drivers/gpu/drm/radeon/rs690.c +@@ -162,6 +162,16 @@ static void rs690_mc_init(struct radeon_ + base = RREG32_MC(R_000100_MCCFG_FB_LOCATION); + base = G_000100_MC_FB_START(base) << 16; + rdev->mc.igp_sideport_enabled = radeon_atombios_sideport_present(rdev); ++ /* Some boards seem to be configured for 128MB of sideport memory, ++ * but really only have 64MB. Just skip the sideport and use ++ * UMA memory. ++ */ ++ if (rdev->mc.igp_sideport_enabled && ++ (rdev->mc.real_vram_size == (384 * 1024 * 1024))) { ++ base += 128 * 1024 * 1024; ++ rdev->mc.real_vram_size -= 128 * 1024 * 1024; ++ rdev->mc.mc_vram_size = rdev->mc.real_vram_size; ++ } + + /* Use K8 direct mapping for fast fb access. */ + rdev->fastfb_working = false; diff --git a/queue-3.10/series b/queue-3.10/series index d7f2311f3b1..f28b5eab406 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -37,3 +37,9 @@ sched-numa-skip-inaccessible-vmas.patch sched-rt-fix-rq-s-cpupri-leak-while-enqueue-dequeue-child-rt-entities.patch firewire-sbp2-bring-back-write-same-support.patch net_dma-mark-broken.patch +drm-edid-add-quirk-for-bpc-in-samsung-np700g7a-s01pl-notebook.patch +drm-radeon-fix-sideport-problems-on-certain-rs690-boards.patch +drm-radeon-add-missing-display-tiling-setup-for-oland.patch +drm-i915-take-modeset-locks-around-intel_modeset_setup_hw_state.patch +drm-i915-hold-mutex-across-i915_gem_release.patch +drm-i915-don-t-update-the-dri1-breadcrumb-with-modesetting.patch