--- /dev/null
+From 1e5ec956a057585adaa1365615c82810b2f5356f Mon Sep 17 00:00:00 2001
+From: Oded Gabbay <oded.gabbay@gmail.com>
+Date: Tue, 14 Apr 2015 14:13:18 +0300
+Subject: drm/amdkfd: allow unregister process with queues
+
+From: Oded Gabbay <oded.gabbay@gmail.com>
+
+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 <ben.goz@amd.com>
+Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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);
--- /dev/null
+From 79b066bd76d501cfe8328142153da301f5ca11d1 Mon Sep 17 00:00:00 2001
+From: Xihan Zhang <xihan.zhang@amd.com>
+Date: Tue, 28 Apr 2015 23:48:40 +0800
+Subject: drm/amdkfd: Initialize sdma vm when creating sdma queue
+
+From: Xihan Zhang <xihan.zhang@amd.com>
+
+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 <xihan.zhang@amd.com>
+Reviewed-by: Ben Goz <ben.goz@amd.comt>
+Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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)
--- /dev/null
+From 3916e3fd81021fb795bfbdb17f375b6b3685bced Mon Sep 17 00:00:00 2001
+From: Lukas Wunner <lukas@wunner.de>
+Date: Mon, 4 May 2015 15:06:49 +0200
+Subject: drm/i915: Add missing MacBook Pro models with dual channel LVDS
+
+From: Lukas Wunner <lukas@wunner.de>
+
+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 <lukas@wunner.de>
+Acked-by: Jani Nikula <jani.nikula@intel.com>
+[Jani: included notes in the commit message for posterity]
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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 */
+ };
+
--- /dev/null
+From 6f317cfe42c9d8a7c9c1a327d2f1bcc517a3cd91 Mon Sep 17 00:00:00 2001
+From: Lukas Wunner <lukas@wunner.de>
+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 <lukas@wunner.de>
+
+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 <lukas@wunner.de>
+Tested-by: Lukas Wunner <lukas@wunner.de>
+Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
+[Jani: included spec reference into the commit message]
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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;
--- /dev/null
+From 9fcb1704d1d51b12e2f03c78bca013d0cbbb7c98 Mon Sep 17 00:00:00 2001
+From: Jani Nikula <jani.nikula@intel.com>
+Date: Tue, 5 May 2015 16:32:12 +0300
+Subject: drm/i915/dp: there is no audio on port A
+
+From: Jani Nikula <jani.nikula@intel.com>
+
+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 <chris.bainbridge@gmail.com>
+Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
+Signed-off-by: Jani Nikula <jani.nikula@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ 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)
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