From: Greg Kroah-Hartman Date: Fri, 15 May 2015 17:25:35 +0000 (-0700) Subject: 4.0-stable patches X-Git-Tag: v3.10.79~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b123ed37c16000323493b3cd5fafb0febafa2130;p=thirdparty%2Fkernel%2Fstable-queue.git 4.0-stable patches added patches: drm-amdkfd-allow-unregister-process-with-queues.patch drm-amdkfd-initialize-sdma-vm-when-creating-sdma-queue.patch drm-i915-add-missing-macbook-pro-models-with-dual-channel-lvds.patch drm-i915-assume-dual-channel-lvds-if-pixel-clock-necessitates-it.patch drm-i915-dp-there-is-no-audio-on-port-a.patch --- diff --git a/queue-4.0/drm-amdkfd-allow-unregister-process-with-queues.patch b/queue-4.0/drm-amdkfd-allow-unregister-process-with-queues.patch new file mode 100644 index 00000000000..eb6ba52bab3 --- /dev/null +++ b/queue-4.0/drm-amdkfd-allow-unregister-process-with-queues.patch @@ -0,0 +1,37 @@ +From 1e5ec956a057585adaa1365615c82810b2f5356f Mon Sep 17 00:00:00 2001 +From: Oded Gabbay +Date: Tue, 14 Apr 2015 14:13:18 +0300 +Subject: drm/amdkfd: allow unregister process with queues + +From: Oded Gabbay + +commit 1e5ec956a057585adaa1365615c82810b2f5356f upstream. + +Sometimes we might unregister process that have queues, because we couldn't +preempt the queues. Until now we blocked it with BUG_ON but instead just +print it as debug. + +Reviewed-by: Ben Goz +Signed-off-by: Oded Gabbay +Reviewed-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +@@ -429,9 +429,10 @@ static int unregister_process_nocpsch(st + + BUG_ON(!dqm || !qpd); + +- BUG_ON(!list_empty(&qpd->queues_list)); ++ pr_debug("In func %s\n", __func__); + +- pr_debug("kfd: In func %s\n", __func__); ++ pr_debug("qpd->queues_list is %s\n", ++ list_empty(&qpd->queues_list) ? "empty" : "not empty"); + + retval = 0; + mutex_lock(&dqm->lock); diff --git a/queue-4.0/drm-amdkfd-initialize-sdma-vm-when-creating-sdma-queue.patch b/queue-4.0/drm-amdkfd-initialize-sdma-vm-when-creating-sdma-queue.patch new file mode 100644 index 00000000000..65b78a9bcba --- /dev/null +++ b/queue-4.0/drm-amdkfd-initialize-sdma-vm-when-creating-sdma-queue.patch @@ -0,0 +1,36 @@ +From 79b066bd76d501cfe8328142153da301f5ca11d1 Mon Sep 17 00:00:00 2001 +From: Xihan Zhang +Date: Tue, 28 Apr 2015 23:48:40 +0800 +Subject: drm/amdkfd: Initialize sdma vm when creating sdma queue + +From: Xihan Zhang + +commit 79b066bd76d501cfe8328142153da301f5ca11d1 upstream. + +This patch fixes a bug where sdma vm wasn't initialized when +an sdma queue was created in HWS mode. + +This caused GPUVM faults to appear on dmesg and it is one of the +causes that SDMA queues are not working. + +Signed-off-by: Xihan Zhang +Reviewed-by: Ben Goz +Signed-off-by: Oded Gabbay +Reviewed-by: Alex Deucher +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c ++++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +@@ -879,6 +879,8 @@ static int create_queue_cpsch(struct dev + return -ENOMEM; + } + ++ init_sdma_vm(dqm, q, qpd); ++ + retval = mqd->init_mqd(mqd, &q->mqd, &q->mqd_mem_obj, + &q->gart_mqd_addr, &q->properties); + if (retval != 0) diff --git a/queue-4.0/drm-i915-add-missing-macbook-pro-models-with-dual-channel-lvds.patch b/queue-4.0/drm-i915-add-missing-macbook-pro-models-with-dual-channel-lvds.patch new file mode 100644 index 00000000000..7cdbdc47382 --- /dev/null +++ b/queue-4.0/drm-i915-add-missing-macbook-pro-models-with-dual-channel-lvds.patch @@ -0,0 +1,88 @@ +From 3916e3fd81021fb795bfbdb17f375b6b3685bced Mon Sep 17 00:00:00 2001 +From: Lukas Wunner +Date: Mon, 4 May 2015 15:06:49 +0200 +Subject: drm/i915: Add missing MacBook Pro models with dual channel LVDS + +From: Lukas Wunner + +commit 3916e3fd81021fb795bfbdb17f375b6b3685bced upstream. + +Single channel LVDS maxes out at 112 MHz. The 15" pre-retina models +shipped with 1440x900 (106 MHz) by default or 1680x1050 (119 MHz) +as a BTO option, both versions used dual channel LVDS even though +the smaller one would have fit into a single channel. + +Notes: + Bug report showing that the MacBookPro8,2 with 1440x900 uses dual + channel LVDS (this lead to it being hardcoded in intel_lvds.c by + Daniel Vetter with commit 618563e3945b9d0864154bab3c607865b557cecc): + https://bugzilla.kernel.org/show_bug.cgi?id=42842 + + If i915.lvds_channel_mode=2 is missing even though the machine needs + it, every other vertical line is white and consequently, only the left + half of the screen is visible (verified by myself on a MacBookPro9,1). + + Forum posting concerning a MacBookPro6,2 with 1440x900, author is + using i915.lvds_channel_mode=2 on the kernel command line, proving + that the machine uses dual channels: + https://bbs.archlinux.org/viewtopic.php?id=185770 + + Chi Mei N154C6-L04 with 1440x900 is a replacement panel for all + MacBook Pro "A1286" models, and that model number encompasses the + MacBookPro6,2 / 8,2 / 9,1. Page 17 of the panel's datasheet shows it's + driven with dual channel LVDS: + http://www.ebay.com/itm/-/400690878560 + http://www.everymac.com/ultimate-mac-lookup/?search_keywords=A1286 + http://www.taopanel.com/chimei/datasheet/N154C6-L04.pdf + + Those three 15" models, MacBookPro6,2 / 8,2 / 9,1, are the only ones + with i915 graphics and dual channel LVDS, so that list should be + complete. And the 8,2 is already in intel_lvds.c. + + Possible motivation to use dual channel LVDS even on the 1440x900 + models: Reduce the number of different parts, i.e. use identical logic + boards and display cabling on both versions and the only differing + component is the panel. + +Signed-off-by: Lukas Wunner +Acked-by: Jani Nikula +[Jani: included notes in the commit message for posterity] +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_lvds.c | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/intel_lvds.c ++++ b/drivers/gpu/drm/i915/intel_lvds.c +@@ -812,12 +812,28 @@ static int intel_dual_link_lvds_callback + static const struct dmi_system_id intel_dual_link_lvds[] = { + { + .callback = intel_dual_link_lvds_callback, +- .ident = "Apple MacBook Pro (Core i5/i7 Series)", ++ .ident = "Apple MacBook Pro 15\" (2010)", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro6,2"), ++ }, ++ }, ++ { ++ .callback = intel_dual_link_lvds_callback, ++ .ident = "Apple MacBook Pro 15\" (2011)", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro8,2"), + }, + }, ++ { ++ .callback = intel_dual_link_lvds_callback, ++ .ident = "Apple MacBook Pro 15\" (2012)", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."), ++ DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro9,1"), ++ }, ++ }, + { } /* terminating entry */ + }; + diff --git a/queue-4.0/drm-i915-assume-dual-channel-lvds-if-pixel-clock-necessitates-it.patch b/queue-4.0/drm-i915-assume-dual-channel-lvds-if-pixel-clock-necessitates-it.patch new file mode 100644 index 00000000000..874cf4f9443 --- /dev/null +++ b/queue-4.0/drm-i915-assume-dual-channel-lvds-if-pixel-clock-necessitates-it.patch @@ -0,0 +1,70 @@ +From 6f317cfe42c9d8a7c9c1a327d2f1bcc517a3cd91 Mon Sep 17 00:00:00 2001 +From: Lukas Wunner +Date: Sun, 12 Apr 2015 21:10:35 +0200 +Subject: drm/i915: Assume dual channel LVDS if pixel clock necessitates it +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Lukas Wunner + +commit 6f317cfe42c9d8a7c9c1a327d2f1bcc517a3cd91 upstream. + +Single channel LVDS maxes out at 112 MHz, anything above must be dual +channel. This avoids the need to specify i915.lvds_channel_mode=2 on +all 17" MacBook Pro models with i915 graphics since they had 1920x1200 +(193 MHz), plus those 15" pre-retina models which had a resolution +of 1680x1050 (119 MHz) as a BTO option. + +Source for 112 MHz limit of single channel LVDS is section 2.3 of: +https://01.org/linuxgraphics/sites/default/files/documentation/ivb_ihd_os_vol3_part4.pdf + +v2: Avoid hardcoding 17" models by assuming dual channel LVDS if the +resolution necessitates it, suggested by Jani Nikula. + +v3: Fix typo, thanks Joonas Lahtinen. + +v4: Split commit in two, suggested by Ville Syrjälä. + +Signed-off-by: Lukas Wunner +Tested-by: Lukas Wunner +Reviewed-by: Ville Syrjälä +[Jani: included spec reference into the commit message] +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_lvds.c | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/intel_lvds.c ++++ b/drivers/gpu/drm/i915/intel_lvds.c +@@ -847,6 +847,11 @@ static bool compute_is_dual_link_lvds(st + if (i915.lvds_channel_mode > 0) + return i915.lvds_channel_mode == 2; + ++ /* single channel LVDS is limited to 112 MHz */ ++ if (lvds_encoder->attached_connector->base.panel.fixed_mode->clock ++ > 112999) ++ return true; ++ + if (dmi_check_system(intel_dual_link_lvds)) + return true; + +@@ -1104,6 +1109,8 @@ void intel_lvds_init(struct drm_device * + out: + mutex_unlock(&dev->mode_config.mutex); + ++ intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode); ++ + lvds_encoder->is_dual_link = compute_is_dual_link_lvds(lvds_encoder); + DRM_DEBUG_KMS("detected %s-link lvds configuration\n", + lvds_encoder->is_dual_link ? "dual" : "single"); +@@ -1118,7 +1125,6 @@ out: + } + drm_connector_register(connector); + +- intel_panel_init(&intel_connector->panel, fixed_mode, downclock_mode); + intel_panel_setup_backlight(connector, INVALID_PIPE); + + return; diff --git a/queue-4.0/drm-i915-dp-there-is-no-audio-on-port-a.patch b/queue-4.0/drm-i915-dp-there-is-no-audio-on-port-a.patch new file mode 100644 index 00000000000..4d58f19e886 --- /dev/null +++ b/queue-4.0/drm-i915-dp-there-is-no-audio-on-port-a.patch @@ -0,0 +1,51 @@ +From 9fcb1704d1d51b12e2f03c78bca013d0cbbb7c98 Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Tue, 5 May 2015 16:32:12 +0300 +Subject: drm/i915/dp: there is no audio on port A + +From: Jani Nikula + +commit 9fcb1704d1d51b12e2f03c78bca013d0cbbb7c98 upstream. + +The eDP port A register on PCH split platforms has a slightly different +register layout from the other ports, with bit 6 being either alternate +scrambler reset or reserved, depending on the generation. Our +misinterpretation of the bit as audio has lead to warning. + +Fix this by not enabling audio on port A, since none of our platforms +support audio on port A anyway. + +v2: DDI doesn't have audio on port A either (Sivakumar Thulasimani) + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89958 +Reported-and-tested-by: Chris Bainbridge +Reviewed-by: Sivakumar Thulasimani +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_dp.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_dp.c ++++ b/drivers/gpu/drm/i915/intel_dp.c +@@ -1176,7 +1176,7 @@ intel_dp_compute_config(struct intel_enc + + pipe_config->has_dp_encoder = true; + pipe_config->has_drrs = false; +- pipe_config->has_audio = intel_dp->has_audio; ++ pipe_config->has_audio = intel_dp->has_audio && port != PORT_A; + + if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) { + intel_fixed_panel_mode(intel_connector->panel.fixed_mode, +@@ -2026,8 +2026,8 @@ static void intel_dp_get_config(struct i + int dotclock; + + tmp = I915_READ(intel_dp->output_reg); +- if (tmp & DP_AUDIO_OUTPUT_ENABLE) +- pipe_config->has_audio = true; ++ ++ pipe_config->has_audio = tmp & DP_AUDIO_OUTPUT_ENABLE && port != PORT_A; + + if ((port == PORT_A) || !HAS_PCH_CPT(dev)) { + if (tmp & DP_SYNC_HS_HIGH) diff --git a/queue-4.0/series b/queue-4.0/series index 3cf66c77129..94950d22c48 100644 --- a/queue-4.0/series +++ b/queue-4.0/series @@ -36,3 +36,8 @@ arm-ux500-move-gpio-regulator-for-sd-card-into-board-dtss.patch arm-ux500-enable-gpio-regulator-for-sd-card-for-href-boards.patch arm-ux500-enable-gpio-regulator-for-sd-card-for-snowball.patch drm-zero-out-invalid-vblank-timestamp-in-drm_update_vblank_count.patch +drm-i915-assume-dual-channel-lvds-if-pixel-clock-necessitates-it.patch +drm-i915-add-missing-macbook-pro-models-with-dual-channel-lvds.patch +drm-i915-dp-there-is-no-audio-on-port-a.patch +drm-amdkfd-allow-unregister-process-with-queues.patch +drm-amdkfd-initialize-sdma-vm-when-creating-sdma-queue.patch