From 208bdd0ad0f2a18f024f4a6744c6a801e3854c82 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 7 Jul 2014 11:06:45 -0700 Subject: [PATCH] 3.15-stable patches added patches: drm-i915-avoid-div-by-zero-when-pixel_multiplier-is-zero.patch drm-i915-default-to-having-backlight-if-vbt-not-available.patch drm-i915-disable-fbc-by-default-also-on-haswell-and-later.patch drm-i915-hd-audio-don-t-continue-probing-when-nomodeset-is-given.patch drm-i915-hold-the-table-lock-whilst-walking-the-file-s-idr-and-counting-the-objects-in-debugfs.patch drm-i915-reorder-semaphore-deadlock-check.patch drm-i915-set-backlight-duty-cycle-after-backlight-enable-for-gen4.patch --- ...y-zero-when-pixel_multiplier-is-zero.patch | 59 +++++++ ...aving-backlight-if-vbt-not-available.patch | 52 +++++++ ...by-default-also-on-haswell-and-later.patch | 40 +++++ ...inue-probing-when-nomodeset-is-given.patch | 147 ++++++++++++++++++ ...-and-counting-the-objects-in-debugfs.patch | 70 +++++++++ ...915-reorder-semaphore-deadlock-check.patch | 84 ++++++++++ ...ycle-after-backlight-enable-for-gen4.patch | 54 +++++++ queue-3.15/series | 7 + 8 files changed, 513 insertions(+) create mode 100644 queue-3.15/drm-i915-avoid-div-by-zero-when-pixel_multiplier-is-zero.patch create mode 100644 queue-3.15/drm-i915-default-to-having-backlight-if-vbt-not-available.patch create mode 100644 queue-3.15/drm-i915-disable-fbc-by-default-also-on-haswell-and-later.patch create mode 100644 queue-3.15/drm-i915-hd-audio-don-t-continue-probing-when-nomodeset-is-given.patch create mode 100644 queue-3.15/drm-i915-hold-the-table-lock-whilst-walking-the-file-s-idr-and-counting-the-objects-in-debugfs.patch create mode 100644 queue-3.15/drm-i915-reorder-semaphore-deadlock-check.patch create mode 100644 queue-3.15/drm-i915-set-backlight-duty-cycle-after-backlight-enable-for-gen4.patch diff --git a/queue-3.15/drm-i915-avoid-div-by-zero-when-pixel_multiplier-is-zero.patch b/queue-3.15/drm-i915-avoid-div-by-zero-when-pixel_multiplier-is-zero.patch new file mode 100644 index 00000000000..f689d95dd05 --- /dev/null +++ b/queue-3.15/drm-i915-avoid-div-by-zero-when-pixel_multiplier-is-zero.patch @@ -0,0 +1,59 @@ +From 2b85886a5457f5c5dbcd32edbd4e6bba0f4e8678 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= +Date: Mon, 9 Jun 2014 16:20:46 +0300 +Subject: drm/i915: Avoid div-by-zero when pixel_multiplier is zero +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Ville Syrjälä + +commit 2b85886a5457f5c5dbcd32edbd4e6bba0f4e8678 upstream. + +On certain platforms pixel_multiplier is read out in +.get_pipe_config(), but it also gets used to calculate the +pixel clock in intel_sdvo_get_config(). If the pipe is disable +but some SDVO outputs are active, we may end up dividing by zero +in intel_sdvo_get_config(). + +To avoid the problem simply check for zero pixel_multiplier and skip +the division. Another attempt at fixing this involved populating +pixel_multiplier to 1 even for disabled pipes, but that triggered a +WARN because SDVO_CMD_GET_CLOCK_RATE_MULT command failed and thus +encoder_pixel_multiplier was left at zero and didn't match +pipe_config->pixel_multiplier. + +The "divide by pixel_multiplier" operation got introduced here: + commit 18442d08786472c63a0a80c27f92b033dffc26de + Author: Ville Syrjälä + Date: Fri Sep 13 16:00:08 2013 +0300 + + drm/i915: Fix port_clock and adjusted_mode.clock readout all over + +and it has caused a regression on certain machines since they would +hit the div-by-zero during resume. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76520 +Tested-by: Tim Richardson +Reviewed-by: Daniel Vetter +Signed-off-by: Ville Syrjälä +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_sdvo.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/intel_sdvo.c ++++ b/drivers/gpu/drm/i915/intel_sdvo.c +@@ -1383,7 +1383,9 @@ static void intel_sdvo_get_config(struct + >> SDVO_PORT_MULTIPLY_SHIFT) + 1; + } + +- dotclock = pipe_config->port_clock / pipe_config->pixel_multiplier; ++ dotclock = pipe_config->port_clock; ++ if (pipe_config->pixel_multiplier) ++ dotclock /= pipe_config->pixel_multiplier; + + if (HAS_PCH_SPLIT(dev)) + ironlake_check_encoder_dotclock(pipe_config, dotclock); diff --git a/queue-3.15/drm-i915-default-to-having-backlight-if-vbt-not-available.patch b/queue-3.15/drm-i915-default-to-having-backlight-if-vbt-not-available.patch new file mode 100644 index 00000000000..e4a4ea44ac4 --- /dev/null +++ b/queue-3.15/drm-i915-default-to-having-backlight-if-vbt-not-available.patch @@ -0,0 +1,52 @@ +From 56c4b63aaf4c2cd91966b2a5e69e5367bea60bbe Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Tue, 17 Jun 2014 15:47:05 +0300 +Subject: drm/i915: default to having backlight if VBT not available + +From: Jani Nikula + +commit 56c4b63aaf4c2cd91966b2a5e69e5367bea60bbe upstream. + +Apparently there are Apple laptops with magic smoke for a VBIOS, which +we fail to find and use. Default to having and setting up backlight in +this case. + +This fixes a regression introduced by +commit c675949ec58ca50d5a3ae3c757892f1560f6e896 +Author: Jani Nikula +Date: Wed Apr 9 11:31:37 2014 +0300 + + drm/i915: do not setup backlight if not available according to VBT + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=77831 +Reported-and-tested-by: Matteo Cypriani +Reviewed-by: Imre Deak +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_bios.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_bios.c ++++ b/drivers/gpu/drm/i915/intel_bios.c +@@ -287,9 +287,6 @@ parse_lfp_backlight(struct drm_i915_priv + const struct bdb_lfp_backlight_data *backlight_data; + const struct bdb_lfp_backlight_data_entry *entry; + +- /* Err to enabling backlight if no backlight block. */ +- dev_priv->vbt.backlight.present = true; +- + backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT); + if (!backlight_data) + return; +@@ -839,6 +836,9 @@ init_vbt_defaults(struct drm_i915_privat + + dev_priv->vbt.crt_ddc_pin = GMBUS_PORT_VGADDC; + ++ /* Default to having backlight */ ++ dev_priv->vbt.backlight.present = true; ++ + /* LFP panel data */ + dev_priv->vbt.lvds_dither = 1; + dev_priv->vbt.lvds_vbt = 0; diff --git a/queue-3.15/drm-i915-disable-fbc-by-default-also-on-haswell-and-later.patch b/queue-3.15/drm-i915-disable-fbc-by-default-also-on-haswell-and-later.patch new file mode 100644 index 00000000000..7086c0dd233 --- /dev/null +++ b/queue-3.15/drm-i915-disable-fbc-by-default-also-on-haswell-and-later.patch @@ -0,0 +1,40 @@ +From 0368920e51ae0cded0eb518c340a4dd17764d461 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Fri, 6 Jun 2014 10:37:11 +0100 +Subject: drm/i915: Disable FBC by default also on Haswell and later + +From: Chris Wilson + +commit 0368920e51ae0cded0eb518c340a4dd17764d461 upstream. + +It causes black screen on bootup and is approximately 100x slower than +running with FBC disabled, so the GPU runs at a high frequency for much +longer - completely contrary to the power saving claims. It also still +has mutex deadlocks in multi-head scenarios, which can lead to a +system/X lockup. These bugs were known before FBC was enabled by default +on Haswell and still have not been fixed. + +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79716 +Reported-and-tested-by: Jon Kristensen +Signed-off-by: Chris Wilson +Reviewed-by: Daniel Vetter +[Jani: update subject to reflect the actual change] +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_pm.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_pm.c ++++ b/drivers/gpu/drm/i915/intel_pm.c +@@ -511,8 +511,7 @@ void intel_update_fbc(struct drm_device + obj = intel_fb->obj; + adjusted_mode = &intel_crtc->config.adjusted_mode; + +- if (i915.enable_fbc < 0 && +- INTEL_INFO(dev)->gen <= 7 && !IS_HASWELL(dev)) { ++ if (i915.enable_fbc < 0) { + if (set_no_fbc_reason(dev_priv, FBC_CHIP_DEFAULT)) + DRM_DEBUG_KMS("disabled per chip default\n"); + goto out_disable; diff --git a/queue-3.15/drm-i915-hd-audio-don-t-continue-probing-when-nomodeset-is-given.patch b/queue-3.15/drm-i915-hd-audio-don-t-continue-probing-when-nomodeset-is-given.patch new file mode 100644 index 00000000000..143bea30425 --- /dev/null +++ b/queue-3.15/drm-i915-hd-audio-don-t-continue-probing-when-nomodeset-is-given.patch @@ -0,0 +1,147 @@ +From 74b0c2d75fb4cc89173944e6d8f9eb47aca0c343 Mon Sep 17 00:00:00 2001 +From: Takashi Iwai +Date: Fri, 13 Jun 2014 15:14:34 +0200 +Subject: drm/i915, HD-audio: Don't continue probing when nomodeset is given + +From: Takashi Iwai + +commit 74b0c2d75fb4cc89173944e6d8f9eb47aca0c343 upstream. + +When a machine is booted with nomodeset option, i915 driver skips the +whole initialization. Meanwhile, HD-audio tries to bind wth i915 just +by request_symbol() without knowing that the initialization was +skipped, and eventually it hits WARN_ON() in i915_request_power_well() +and i915_release_power_well() wrongly but still continues probing, +even though it doesn't work at all. + +In this patch, both functions are changed to return an error in case +of uninitialized state instead of WARN_ON(), so that HD-audio driver +can give up HDMI controller initialization at the right time. + +Acked-by: Daniel Vetter +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_pm.c | 14 ++++++++------ + include/drm/i915_powerwell.h | 4 ++-- + sound/pci/hda/hda_i915.c | 12 ++++++------ + sound/pci/hda/hda_i915.h | 4 ++-- + sound/pci/hda/hda_intel.c | 7 ++++++- + 5 files changed, 24 insertions(+), 17 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_pm.c ++++ b/drivers/gpu/drm/i915/intel_pm.c +@@ -5705,30 +5705,32 @@ void intel_display_power_put(struct drm_ + static struct i915_power_domains *hsw_pwr; + + /* Display audio driver power well request */ +-void i915_request_power_well(void) ++int i915_request_power_well(void) + { + struct drm_i915_private *dev_priv; + +- if (WARN_ON(!hsw_pwr)) +- return; ++ if (!hsw_pwr) ++ return -ENODEV; + + dev_priv = container_of(hsw_pwr, struct drm_i915_private, + power_domains); + intel_display_power_get(dev_priv, POWER_DOMAIN_AUDIO); ++ return 0; + } + EXPORT_SYMBOL_GPL(i915_request_power_well); + + /* Display audio driver power well release */ +-void i915_release_power_well(void) ++int i915_release_power_well(void) + { + struct drm_i915_private *dev_priv; + +- if (WARN_ON(!hsw_pwr)) +- return; ++ if (!hsw_pwr) ++ return -ENODEV; + + dev_priv = container_of(hsw_pwr, struct drm_i915_private, + power_domains); + intel_display_power_put(dev_priv, POWER_DOMAIN_AUDIO); ++ return 0; + } + EXPORT_SYMBOL_GPL(i915_release_power_well); + +--- a/include/drm/i915_powerwell.h ++++ b/include/drm/i915_powerwell.h +@@ -30,7 +30,7 @@ + #define _I915_POWERWELL_H_ + + /* For use by hda_i915 driver */ +-extern void i915_request_power_well(void); +-extern void i915_release_power_well(void); ++extern int i915_request_power_well(void); ++extern int i915_release_power_well(void); + + #endif /* _I915_POWERWELL_H_ */ +--- a/sound/pci/hda/hda_i915.c ++++ b/sound/pci/hda/hda_i915.c +@@ -22,20 +22,20 @@ + #include + #include "hda_i915.h" + +-static void (*get_power)(void); +-static void (*put_power)(void); ++static int (*get_power)(void); ++static int (*put_power)(void); + +-void hda_display_power(bool enable) ++int hda_display_power(bool enable) + { + if (!get_power || !put_power) +- return; ++ return -ENODEV; + + pr_debug("HDA display power %s \n", + enable ? "Enable" : "Disable"); + if (enable) +- get_power(); ++ return get_power(); + else +- put_power(); ++ return put_power(); + } + + int hda_i915_init(void) +--- a/sound/pci/hda/hda_i915.h ++++ b/sound/pci/hda/hda_i915.h +@@ -17,11 +17,11 @@ + #define __SOUND_HDA_I915_H + + #ifdef CONFIG_SND_HDA_I915 +-void hda_display_power(bool enable); ++int hda_display_power(bool enable); + int hda_i915_init(void); + int hda_i915_exit(void); + #else +-static inline void hda_display_power(bool enable) {} ++static inline int hda_display_power(bool enable) { return 0; } + static inline int hda_i915_init(void) + { + return -ENODEV; +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -1707,8 +1707,13 @@ static int azx_probe_continue(struct azx + "Error request power-well from i915\n"); + goto out_free; + } ++ err = hda_display_power(true); ++ if (err < 0) { ++ dev_err(chip->card->dev, ++ "Cannot turn on display power on i915\n"); ++ goto out_free; ++ } + #endif +- hda_display_power(true); + } + + err = azx_first_init(chip); diff --git a/queue-3.15/drm-i915-hold-the-table-lock-whilst-walking-the-file-s-idr-and-counting-the-objects-in-debugfs.patch b/queue-3.15/drm-i915-hold-the-table-lock-whilst-walking-the-file-s-idr-and-counting-the-objects-in-debugfs.patch new file mode 100644 index 00000000000..d8a41e2276e --- /dev/null +++ b/queue-3.15/drm-i915-hold-the-table-lock-whilst-walking-the-file-s-idr-and-counting-the-objects-in-debugfs.patch @@ -0,0 +1,70 @@ +From 5b5ffff0d25060ab0e21fa0f6cd16428e87bf1ea Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 17 Jun 2014 09:56:24 +0100 +Subject: drm/i915: Hold the table lock whilst walking the file's idr and counting the objects in debugfs + +From: Chris Wilson + +commit 5b5ffff0d25060ab0e21fa0f6cd16428e87bf1ea upstream. + +Fixes an issue whereby we may race with the table updates (before the +core takes the struct_mutex) and so risk dereferencing a stale pointer in +the iterator for /debugfs/.../i915_gem_objects. For example, + +[ 1524.757545] BUG: unable to handle kernel paging request at f53af748 +[ 1524.757572] IP: [] per_file_stats+0x12/0x100 +[ 1524.757599] *pdpt = 0000000001b13001 *pde = 00000000379fb067 *pte = 80000000353af060 +[ 1524.757621] Oops: 0000 [#1] SMP DEBUG_PAGEALLOC +[ 1524.757637] Modules linked in: ctr ccm arc4 ath9k ath9k_common ath9k_hw ath snd_hda_codec_conexant mac80211 snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec bnep snd_hwdep rfcomm snd_pcm gpio_ich dell_wmi sparse_keymap snd_seq_midi hid_multitouch uvcvideo snd_seq_midi_event dell_laptop snd_rawmidi dcdbas snd_seq videobuf2_vmalloc videobuf2_memops videobuf2_core usbhid videodev snd_seq_device coretemp snd_timer hid joydev kvm_intel cfg80211 ath3k kvm btusb bluetooth serio_raw snd microcode soundcore lpc_ich wmi mac_hid parport_pc ppdev lp parport psmouse ahci libahci +[ 1524.757825] CPU: 3 PID: 1911 Comm: intel-gpu-overl Tainted: G W OE 3.15.0-rc3+ #96 +[ 1524.757840] Hardware name: Dell Inc. Inspiron 1090/Inspiron 1090, BIOS A06 08/23/2011 +[ 1524.757855] task: f52f36c0 ti: f4cbc000 task.ti: f4cbc000 +[ 1524.757869] EIP: 0060:[] EFLAGS: 00210202 CPU: 3 +[ 1524.757884] EIP is at per_file_stats+0x12/0x100 +[ 1524.757896] EAX: 0000002d EBX: 00000000 ECX: f4cbdefc EDX: f53af700 +[ 1524.757909] ESI: c1406970 EDI: f53af700 EBP: f4cbde6c ESP: f4cbde5c +[ 1524.757922] DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068 +[ 1524.757934] CR0: 80050033 CR2: f53af748 CR3: 356af000 CR4: 000007f0 +[ 1524.757945] Stack: +[ 1524.757957] f4cbdefc 00000000 c1406970 f53af700 f4cbdea8 c12e5f15 f4cbdefc c1406970 +[ 1524.757993] 0000ffff f4cbde90 0000002d f5dc5cd0 e4e80438 c1181d59 f4cbded8 f4d89900 +[ 1524.758027] f5631b40 e5131074 c1903f37 f4cbdf28 c14068e6 f52648a0 c1927748 c1903f37 +[ 1524.758062] Call Trace: +[ 1524.758084] [] ? i915_gem_object_info+0x510/0x510 +[ 1524.758106] [] idr_for_each+0xa5/0x100 +[ 1524.758126] [] ? i915_gem_object_info+0x510/0x510 +[ 1524.758148] [] ? seq_vprintf+0x29/0x50 +[ 1524.758168] [] i915_gem_object_info+0x486/0x510 +[ 1524.758189] [] seq_read+0xd6/0x380 +[ 1524.758208] [] ? final_putname+0x1d/0x40 +[ 1524.758227] [] ? seq_hlist_next_percpu+0x90/0x90 +[ 1524.758246] [] vfs_read+0x82/0x150 +[ 1524.758265] [] SyS_read+0x46/0x90 +[ 1524.758285] [] sysenter_do_call+0x12/0x22 +[ 1524.758298] Code: f5 8f 2a 00 83 c4 6c 31 c0 5b 5e 5f 5d c3 8d 74 26 00 8d bc 27 00 00 00 00 55 89 e5 57 56 53 83 ec 04 3e 8d 74 26 00 83 41 04 01 <8b> 42 48 01 41 08 8b 42 4c 89 d7 85 c0 75 07 8b 42 60 85 c0 74 +[ 1524.758461] EIP: [] per_file_stats+0x12/0x100 SS:ESP 0068:f4cbde5c +[ 1524.758485] CR2: 00000000f53af748 + +Reported-by: Sam Jansen +Signed-off-by: Chris Wilson +Cc: Sam Jansen +Reviewed-by: Daniel Vetter +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_debugfs.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/gpu/drm/i915/i915_debugfs.c ++++ b/drivers/gpu/drm/i915/i915_debugfs.c +@@ -446,7 +446,9 @@ static int i915_gem_object_info(struct s + + memset(&stats, 0, sizeof(stats)); + stats.file_priv = file->driver_priv; ++ spin_lock(&file->table_lock); + idr_for_each(&file->object_idr, per_file_stats, &stats); ++ spin_unlock(&file->table_lock); + /* + * Although we have a valid reference on file->pid, that does + * not guarantee that the task_struct who called get_pid() is diff --git a/queue-3.15/drm-i915-reorder-semaphore-deadlock-check.patch b/queue-3.15/drm-i915-reorder-semaphore-deadlock-check.patch new file mode 100644 index 00000000000..d0fa50f9261 --- /dev/null +++ b/queue-3.15/drm-i915-reorder-semaphore-deadlock-check.patch @@ -0,0 +1,84 @@ +From 4be173813e57c7298103a83155c2391b5b167b4c Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Fri, 6 Jun 2014 10:22:29 +0100 +Subject: drm/i915: Reorder semaphore deadlock check + +From: Chris Wilson + +commit 4be173813e57c7298103a83155c2391b5b167b4c upstream. + +If a semaphore is waiting on another ring, which in turn happens to be +waiting on the first ring, but that second semaphore has been signalled, +we will be able to kick the second ring and so can treat the first ring +as a valid WAIT and not as HUNG. + +v2: Be paranoid and cap the potential recursion depth whilst visiting +the semaphore signallers. (Mika) + +References: https://bugs.freedesktop.org/show_bug.cgi?id=54226 +References: https://bugs.freedesktop.org/show_bug.cgi?id=75502 +Signed-off-by: Chris Wilson +Cc: Mika Kuoppala +Reviewed-by: Mika Kuoppala +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_irq.c | 18 ++++++++++++++---- + drivers/gpu/drm/i915/intel_ringbuffer.h | 2 +- + 2 files changed, 15 insertions(+), 5 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_irq.c ++++ b/drivers/gpu/drm/i915/i915_irq.c +@@ -2561,10 +2561,14 @@ static int semaphore_passed(struct intel + struct intel_ring_buffer *signaller; + u32 seqno, ctl; + +- ring->hangcheck.deadlock = true; ++ ring->hangcheck.deadlock++; + + signaller = semaphore_waits_for(ring, &seqno); +- if (signaller == NULL || signaller->hangcheck.deadlock) ++ if (signaller == NULL) ++ return -1; ++ ++ /* Prevent pathological recursion due to driver bugs */ ++ if (signaller->hangcheck.deadlock >= I915_NUM_RINGS) + return -1; + + /* cursory check for an unkickable deadlock */ +@@ -2572,7 +2576,13 @@ static int semaphore_passed(struct intel + if (ctl & RING_WAIT_SEMAPHORE && semaphore_passed(signaller) < 0) + return -1; + +- return i915_seqno_passed(signaller->get_seqno(signaller, false), seqno); ++ if (i915_seqno_passed(signaller->get_seqno(signaller, false), seqno)) ++ return 1; ++ ++ if (signaller->hangcheck.deadlock) ++ return -1; ++ ++ return 0; + } + + static void semaphore_clear_deadlocks(struct drm_i915_private *dev_priv) +@@ -2581,7 +2591,7 @@ static void semaphore_clear_deadlocks(st + int i; + + for_each_ring(ring, dev_priv, i) +- ring->hangcheck.deadlock = false; ++ ring->hangcheck.deadlock = 0; + } + + static enum intel_ring_hangcheck_action +--- a/drivers/gpu/drm/i915/intel_ringbuffer.h ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.h +@@ -51,7 +51,7 @@ struct intel_ring_hangcheck { + u32 seqno; + int score; + enum intel_ring_hangcheck_action action; +- bool deadlock; ++ int deadlock; + }; + + struct intel_ring_buffer { diff --git a/queue-3.15/drm-i915-set-backlight-duty-cycle-after-backlight-enable-for-gen4.patch b/queue-3.15/drm-i915-set-backlight-duty-cycle-after-backlight-enable-for-gen4.patch new file mode 100644 index 00000000000..8962fffb673 --- /dev/null +++ b/queue-3.15/drm-i915-set-backlight-duty-cycle-after-backlight-enable-for-gen4.patch @@ -0,0 +1,54 @@ +From 2e7eeeb59a92d09144fdb7d2dc1af77a10a7945b Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Mon, 9 Jun 2014 18:24:34 +0300 +Subject: drm/i915: set backlight duty cycle after backlight enable for gen4 + +From: Jani Nikula + +commit 2e7eeeb59a92d09144fdb7d2dc1af77a10a7945b upstream. + +For reasons I can't claim to fully understand gen4 seems to require +backlight duty cycle setting after the backlight has been enabled, or +else black screen follows. I don't have documentation for the correct +sequence on gen4 either. Confirmed on Dell Latitude D630 and MacBook4,1. + +This fixes a regression introduced by +commit b35684b8fa94e04f55fd38bf672b737741d2f9e2 +Author: Jani Nikula +Date: Thu Nov 14 12:13:41 2013 +0200 + + drm/i915: do full backlight setup at enable time + +Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=75791 +Reported-and-tested-by: mcy@lm7.fr +Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79423 +Reported-and-tested-by: Marc Milgram +Acked-by: Daniel Vetter +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_panel.c | 5 ++--- + 1 file changed, 2 insertions(+), 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_panel.c ++++ b/drivers/gpu/drm/i915/intel_panel.c +@@ -723,9 +723,6 @@ static void i965_enable_backlight(struct + ctl = freq << 16; + I915_WRITE(BLC_PWM_CTL, ctl); + +- /* XXX: combine this into above write? */ +- intel_panel_actually_set_backlight(connector, panel->backlight.level); +- + ctl2 = BLM_PIPE(pipe); + if (panel->backlight.combination_mode) + ctl2 |= BLM_COMBINATION_MODE; +@@ -734,6 +731,8 @@ static void i965_enable_backlight(struct + I915_WRITE(BLC_PWM_CTL2, ctl2); + POSTING_READ(BLC_PWM_CTL2); + I915_WRITE(BLC_PWM_CTL2, ctl2 | BLM_PWM_ENABLE); ++ ++ intel_panel_actually_set_backlight(connector, panel->backlight.level); + } + + static void vlv_enable_backlight(struct intel_connector *connector) diff --git a/queue-3.15/series b/queue-3.15/series index a3c441162fc..00f308c424f 100644 --- a/queue-3.15/series +++ b/queue-3.15/series @@ -37,3 +37,10 @@ drm-radeon-cik-fix-typo-in-eop-packet.patch drm-nv50-mc-fix-kms-pageflip-events-by-reordering-irq-handling-order.patch drm-gk208-gr-add-missing-registers-to-grctx-init.patch drm-i915-bdw-only-use-2g-ggtt-for-32b-platforms.patch +drm-i915-reorder-semaphore-deadlock-check.patch +drm-i915-disable-fbc-by-default-also-on-haswell-and-later.patch +drm-i915-avoid-div-by-zero-when-pixel_multiplier-is-zero.patch +drm-i915-set-backlight-duty-cycle-after-backlight-enable-for-gen4.patch +drm-i915-hd-audio-don-t-continue-probing-when-nomodeset-is-given.patch +drm-i915-hold-the-table-lock-whilst-walking-the-file-s-idr-and-counting-the-objects-in-debugfs.patch +drm-i915-default-to-having-backlight-if-vbt-not-available.patch -- 2.47.3