From 4763f030abaf1796fd3f58eda1c97757711b702f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 7 Jul 2014 11:45:27 -0700 Subject: [PATCH] 3.15-stable patches added patches: alsa-hda-restore-bclk-m-n-value-as-per-cdclk-for-hsw-bdw-display-hda-controller.patch bluetooth-fix-check-for-connection-encryption.patch bluetooth-fix-incorrectly-overriding-conn-src_type.patch bluetooth-fix-indicating-discovery-state-when-canceling-inquiry.patch bluetooth-fix-ssp-acceptor-just-works-confirmation-without-mitm.patch drm-fix-null-pointer-access-by-wrong-ioctl.patch drm-i2c-tda998x-move-drm_i2c_encoder_destroy-call.patch drm-i915-provide-interface-for-audio-driver-to-query-cdclk.patch drm-i95-initialize-active-ring-pid-to-1.patch drm-vmwgfx-fix-incorrect-write-to-read-only-register-v2.patch --- ...k-for-hsw-bdw-display-hda-controller.patch | 244 ++++++++++++++++++ ...-fix-check-for-connection-encryption.patch | 43 +++ ...incorrectly-overriding-conn-src_type.patch | 40 +++ ...scovery-state-when-canceling-inquiry.patch | 37 +++ ...just-works-confirmation-without-mitm.patch | 47 ++++ ...x-null-pointer-access-by-wrong-ioctl.patch | 35 +++ ...8x-move-drm_i2c_encoder_destroy-call.patch | 46 ++++ ...face-for-audio-driver-to-query-cdclk.patch | 68 +++++ ...-i95-initialize-active-ring-pid-to-1.patch | 40 +++ ...rrect-write-to-read-only-register-v2.patch | 39 +++ queue-3.15/series | 10 + 11 files changed, 649 insertions(+) create mode 100644 queue-3.15/alsa-hda-restore-bclk-m-n-value-as-per-cdclk-for-hsw-bdw-display-hda-controller.patch create mode 100644 queue-3.15/bluetooth-fix-check-for-connection-encryption.patch create mode 100644 queue-3.15/bluetooth-fix-incorrectly-overriding-conn-src_type.patch create mode 100644 queue-3.15/bluetooth-fix-indicating-discovery-state-when-canceling-inquiry.patch create mode 100644 queue-3.15/bluetooth-fix-ssp-acceptor-just-works-confirmation-without-mitm.patch create mode 100644 queue-3.15/drm-fix-null-pointer-access-by-wrong-ioctl.patch create mode 100644 queue-3.15/drm-i2c-tda998x-move-drm_i2c_encoder_destroy-call.patch create mode 100644 queue-3.15/drm-i915-provide-interface-for-audio-driver-to-query-cdclk.patch create mode 100644 queue-3.15/drm-i95-initialize-active-ring-pid-to-1.patch create mode 100644 queue-3.15/drm-vmwgfx-fix-incorrect-write-to-read-only-register-v2.patch diff --git a/queue-3.15/alsa-hda-restore-bclk-m-n-value-as-per-cdclk-for-hsw-bdw-display-hda-controller.patch b/queue-3.15/alsa-hda-restore-bclk-m-n-value-as-per-cdclk-for-hsw-bdw-display-hda-controller.patch new file mode 100644 index 00000000000..b6760f71c7e --- /dev/null +++ b/queue-3.15/alsa-hda-restore-bclk-m-n-value-as-per-cdclk-for-hsw-bdw-display-hda-controller.patch @@ -0,0 +1,244 @@ +From e4d9e513dedb5ac4e166c1053314fa935ddecc8c Mon Sep 17 00:00:00 2001 +From: Mengdong Lin +Date: Thu, 3 Jul 2014 17:02:23 +0800 +Subject: ALSA: hda - restore BCLK M/N value as per CDCLK for HSW/BDW display HDA controller + +From: Mengdong Lin + +commit e4d9e513dedb5ac4e166c1053314fa935ddecc8c upstream. + +For HSW/BDW display HD-A controller, hda_set_bclk() is defined to set BCLK +by programming the M/N values as per the core display clock (CDCLK) queried from +i915 display driver. + +And the audio driver will also set BCLK in azx_first_init() since the display +driver can turn off the shared power in boot phase if only eDP is connected +and M/N values will be lost and must be reprogrammed. + +Signed-off-by: Mengdong Lin +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + sound/pci/hda/hda_i915.c | 55 ++++++++++++++++++++++++++++++++++++++++++++++ + sound/pci/hda/hda_i915.h | 2 + + sound/pci/hda/hda_intel.c | 50 +++++++---------------------------------- + 3 files changed, 66 insertions(+), 41 deletions(-) + +--- a/sound/pci/hda/hda_i915.c ++++ b/sound/pci/hda/hda_i915.c +@@ -20,10 +20,20 @@ + #include + #include + #include ++#include "hda_priv.h" + #include "hda_i915.h" + ++/* Intel HSW/BDW display HDA controller Extended Mode registers. ++ * EM4 (M value) and EM5 (N Value) are used to convert CDClk (Core Display ++ * Clock) to 24MHz BCLK: BCLK = CDCLK * M / N ++ * The values will be lost when the display power well is disabled. ++ */ ++#define ICH6_REG_EM4 0x100c ++#define ICH6_REG_EM5 0x1010 ++ + static int (*get_power)(void); + static int (*put_power)(void); ++static int (*get_cdclk)(void); + + int hda_display_power(bool enable) + { +@@ -38,6 +48,43 @@ int hda_display_power(bool enable) + return put_power(); + } + ++void haswell_set_bclk(struct azx *chip) ++{ ++ int cdclk_freq; ++ unsigned int bclk_m, bclk_n; ++ ++ if (!get_cdclk) ++ return; ++ ++ cdclk_freq = get_cdclk(); ++ switch (cdclk_freq) { ++ case 337500: ++ bclk_m = 16; ++ bclk_n = 225; ++ break; ++ ++ case 450000: ++ default: /* default CDCLK 450MHz */ ++ bclk_m = 4; ++ bclk_n = 75; ++ break; ++ ++ case 540000: ++ bclk_m = 4; ++ bclk_n = 90; ++ break; ++ ++ case 675000: ++ bclk_m = 8; ++ bclk_n = 225; ++ break; ++ } ++ ++ azx_writew(chip, EM4, bclk_m); ++ azx_writew(chip, EM5, bclk_n); ++} ++ ++ + int hda_i915_init(void) + { + int err = 0; +@@ -55,6 +102,10 @@ int hda_i915_init(void) + return -ENODEV; + } + ++ get_cdclk = symbol_request(i915_get_cdclk_freq); ++ if (!get_cdclk) /* may have abnormal BCLK and audio playback rate */ ++ pr_warn("hda-i915: get_cdclk symbol get fail\n"); ++ + pr_debug("HDA driver get symbol successfully from i915 module\n"); + + return err; +@@ -70,6 +121,10 @@ int hda_i915_exit(void) + symbol_put(i915_release_power_well); + put_power = NULL; + } ++ if (get_cdclk) { ++ symbol_put(i915_get_cdclk_freq); ++ get_cdclk = NULL; ++ } + + return 0; + } +--- a/sound/pci/hda/hda_i915.h ++++ b/sound/pci/hda/hda_i915.h +@@ -18,10 +18,12 @@ + + #ifdef CONFIG_SND_HDA_I915 + int hda_display_power(bool enable); ++void haswell_set_bclk(struct azx *chip); + int hda_i915_init(void); + int hda_i915_exit(void); + #else + static inline int hda_display_power(bool enable) { return 0; } ++static inline void haswell_set_bclk(struct azx *chip) { return; } + static inline int hda_i915_init(void) + { + return -ENODEV; +--- a/sound/pci/hda/hda_intel.c ++++ b/sound/pci/hda/hda_intel.c +@@ -62,9 +62,9 @@ + #include + #include + #include "hda_codec.h" +-#include "hda_i915.h" + #include "hda_controller.h" + #include "hda_priv.h" ++#include "hda_i915.h" + + + static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; +@@ -282,21 +282,8 @@ static char *driver_short_names[] = { + [AZX_DRIVER_GENERIC] = "HD-Audio Generic", + }; + +- +-/* Intel HSW/BDW display HDA controller Extended Mode registers. +- * EM4 (M value) and EM5 (N Value) are used to convert CDClk (Core Display +- * Clock) to 24MHz BCLK: BCLK = CDCLK * M / N +- * The values will be lost when the display power well is disabled. +- */ +-#define ICH6_REG_EM4 0x100c +-#define ICH6_REG_EM5 0x1010 +- + struct hda_intel { + struct azx chip; +- +- /* HSW/BDW display HDA controller to restore BCLK from CDCLK */ +- unsigned int bclk_m; +- unsigned int bclk_n; + }; + + +@@ -592,22 +579,6 @@ static int param_set_xint(const char *va + #define azx_del_card_list(chip) /* NOP */ + #endif /* CONFIG_PM */ + +-static void haswell_save_bclk(struct azx *chip) +-{ +- struct hda_intel *hda = container_of(chip, struct hda_intel, chip); +- +- hda->bclk_m = azx_readw(chip, EM4); +- hda->bclk_n = azx_readw(chip, EM5); +-} +- +-static void haswell_restore_bclk(struct azx *chip) +-{ +- struct hda_intel *hda = container_of(chip, struct hda_intel, chip); +- +- azx_writew(chip, EM4, hda->bclk_m); +- azx_writew(chip, EM5, hda->bclk_n); +-} +- + #if defined(CONFIG_PM_SLEEP) || defined(SUPPORT_VGA_SWITCHEROO) + /* + * power management +@@ -635,12 +606,6 @@ static int azx_suspend(struct device *de + chip->irq = -1; + } + +- /* Save BCLK M/N values before they become invalid in D3. +- * Will test if display power well can be released now. +- */ +- if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) +- haswell_save_bclk(chip); +- + if (chip->msi) + pci_disable_msi(chip->pci); + pci_disable_device(pci); +@@ -662,7 +627,7 @@ static int azx_resume(struct device *dev + + if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { + hda_display_power(true); +- haswell_restore_bclk(chip); ++ haswell_set_bclk(chip); + } + pci_set_power_state(pci, PCI_D0); + pci_restore_state(pci); +@@ -707,10 +672,9 @@ static int azx_runtime_suspend(struct de + azx_stop_chip(chip); + azx_enter_link_reset(chip); + azx_clear_irq_pending(chip); +- if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { +- haswell_save_bclk(chip); ++ if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) + hda_display_power(false); +- } ++ + return 0; + } + +@@ -730,7 +694,7 @@ static int azx_runtime_resume(struct dev + + if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) { + hda_display_power(true); +- haswell_restore_bclk(chip); ++ haswell_set_bclk(chip); + } + + /* Read STATESTS before controller reset */ +@@ -1426,6 +1390,10 @@ static int azx_first_init(struct azx *ch + + /* initialize chip */ + azx_init_pci(chip); ++ ++ if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) ++ haswell_set_bclk(chip); ++ + azx_init_chip(chip, (probe_only[dev] & 2) == 0); + + /* codec detection */ diff --git a/queue-3.15/bluetooth-fix-check-for-connection-encryption.patch b/queue-3.15/bluetooth-fix-check-for-connection-encryption.patch new file mode 100644 index 00000000000..63c9e492518 --- /dev/null +++ b/queue-3.15/bluetooth-fix-check-for-connection-encryption.patch @@ -0,0 +1,43 @@ +From e694788d73efe139b24f78b036deb97fe57fa8cb Mon Sep 17 00:00:00 2001 +From: Johan Hedberg +Date: Tue, 10 Jun 2014 09:54:24 +0300 +Subject: Bluetooth: Fix check for connection encryption + +From: Johan Hedberg + +commit e694788d73efe139b24f78b036deb97fe57fa8cb upstream. + +The conn->link_key variable tracks the type of link key in use. It is +set whenever we respond to a link key request as well as when we get a +link key notification event. + +These two events do not however always guarantee that encryption is +enabled: getting a link key request and responding to it may only mean +that the remote side has requested authentication but not encryption. On +the other hand, the encrypt change event is a certain guarantee that +encryption is enabled. The real encryption state is already tracked in +the conn->link_mode variable through the HCI_LM_ENCRYPT bit. + +This patch fixes a check for encryption in the hci_conn_auth function to +use the proper conn->link_mode value and thereby eliminates the chance +of a false positive result. + +Signed-off-by: Johan Hedberg +Signed-off-by: Marcel Holtmann +Signed-off-by: Greg Kroah-Hartman + +--- + net/bluetooth/hci_conn.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/bluetooth/hci_conn.c ++++ b/net/bluetooth/hci_conn.c +@@ -821,7 +821,7 @@ static int hci_conn_auth(struct hci_conn + /* If we're already encrypted set the REAUTH_PEND flag, + * otherwise set the ENCRYPT_PEND. + */ +- if (conn->key_type != 0xff) ++ if (conn->link_mode & HCI_LM_ENCRYPT) + set_bit(HCI_CONN_REAUTH_PEND, &conn->flags); + else + set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags); diff --git a/queue-3.15/bluetooth-fix-incorrectly-overriding-conn-src_type.patch b/queue-3.15/bluetooth-fix-incorrectly-overriding-conn-src_type.patch new file mode 100644 index 00000000000..affaddd615b --- /dev/null +++ b/queue-3.15/bluetooth-fix-incorrectly-overriding-conn-src_type.patch @@ -0,0 +1,40 @@ +From b62b65055bcc5372d5c3f4103629176cb8db3678 Mon Sep 17 00:00:00 2001 +From: Johan Hedberg +Date: Thu, 5 Jun 2014 12:19:54 +0300 +Subject: Bluetooth: Fix incorrectly overriding conn->src_type + +From: Johan Hedberg + +commit b62b65055bcc5372d5c3f4103629176cb8db3678 upstream. + +The src_type member of struct hci_conn should always reflect the address +type of the src_member. It should never be overridden. There is already +code in place in the command status handler of HCI_LE_Create_Connection +to copy the right initiator address into conn->init_addr_type. + +Without this patch, if privacy is enabled, we will send the wrong +address type in the SMP identity address information PDU (it'll e.g. +contain our public address but a random address type). + +Signed-off-by: Johan Hedberg +Signed-off-by: Marcel Holtmann +Signed-off-by: Greg Kroah-Hartman + +--- + net/bluetooth/hci_conn.c | 5 ----- + 1 file changed, 5 deletions(-) + +--- a/net/bluetooth/hci_conn.c ++++ b/net/bluetooth/hci_conn.c +@@ -584,11 +584,6 @@ static void hci_req_add_le_create_conn(s + if (hci_update_random_address(req, false, &own_addr_type)) + return; + +- /* Save the address type used for this connnection attempt so we able +- * to retrieve this information if we need it. +- */ +- conn->src_type = own_addr_type; +- + cp.scan_interval = cpu_to_le16(hdev->le_scan_interval); + cp.scan_window = cpu_to_le16(hdev->le_scan_window); + bacpy(&cp.peer_addr, &conn->dst); diff --git a/queue-3.15/bluetooth-fix-indicating-discovery-state-when-canceling-inquiry.patch b/queue-3.15/bluetooth-fix-indicating-discovery-state-when-canceling-inquiry.patch new file mode 100644 index 00000000000..98fa0abf95a --- /dev/null +++ b/queue-3.15/bluetooth-fix-indicating-discovery-state-when-canceling-inquiry.patch @@ -0,0 +1,37 @@ +From 50143a433b70e3145bcf8a4a4e54f0c11bdee32b Mon Sep 17 00:00:00 2001 +From: Johan Hedberg +Date: Tue, 10 Jun 2014 14:05:57 +0300 +Subject: Bluetooth: Fix indicating discovery state when canceling inquiry + +From: Johan Hedberg + +commit 50143a433b70e3145bcf8a4a4e54f0c11bdee32b upstream. + +When inquiry is canceled through the HCI_Cancel_Inquiry command there is +no Inquiry Complete event generated. Instead, all we get is the command +complete for the HCI_Inquiry_Cancel command. This means that we must +call the hci_discovery_set_state() function from the respective command +complete handler in order to ensure that user space knows the correct +discovery state. + +Signed-off-by: Johan Hedberg +Signed-off-by: Marcel Holtmann +Signed-off-by: Greg Kroah-Hartman + +--- + net/bluetooth/hci_event.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/net/bluetooth/hci_event.c ++++ b/net/bluetooth/hci_event.c +@@ -48,6 +48,10 @@ static void hci_cc_inquiry_cancel(struct + smp_mb__after_clear_bit(); /* wake_up_bit advises about this barrier */ + wake_up_bit(&hdev->flags, HCI_INQUIRY); + ++ hci_dev_lock(hdev); ++ hci_discovery_set_state(hdev, DISCOVERY_STOPPED); ++ hci_dev_unlock(hdev); ++ + hci_conn_check_pending(hdev); + } + diff --git a/queue-3.15/bluetooth-fix-ssp-acceptor-just-works-confirmation-without-mitm.patch b/queue-3.15/bluetooth-fix-ssp-acceptor-just-works-confirmation-without-mitm.patch new file mode 100644 index 00000000000..3aaa8803644 --- /dev/null +++ b/queue-3.15/bluetooth-fix-ssp-acceptor-just-works-confirmation-without-mitm.patch @@ -0,0 +1,47 @@ +From ba15a58b179ed76a7e887177f2b06de12c58ec8f Mon Sep 17 00:00:00 2001 +From: Johan Hedberg +Date: Mon, 9 Jun 2014 13:58:14 +0300 +Subject: Bluetooth: Fix SSP acceptor just-works confirmation without MITM + +From: Johan Hedberg + +commit ba15a58b179ed76a7e887177f2b06de12c58ec8f upstream. + +From the Bluetooth Core Specification 4.1 page 1958: + +"if both devices have set the Authentication_Requirements parameter to +one of the MITM Protection Not Required options, authentication stage 1 +shall function as if both devices set their IO capabilities to +DisplayOnly (e.g., Numeric comparison with automatic confirmation on +both devices)" + +So far our implementation has done user confirmation for all just-works +cases regardless of the MITM requirements, however following the +specification to the word means that we should not be doing confirmation +when neither side has the MITM flag set. + +Signed-off-by: Johan Hedberg +Tested-by: Szymon Janc +Signed-off-by: Marcel Holtmann +Signed-off-by: Greg Kroah-Hartman + +--- + net/bluetooth/hci_event.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/net/bluetooth/hci_event.c ++++ b/net/bluetooth/hci_event.c +@@ -3503,8 +3503,11 @@ static void hci_user_confirm_request_evt + + /* If we're not the initiators request authorization to + * proceed from user space (mgmt_user_confirm with +- * confirm_hint set to 1). */ +- if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags)) { ++ * confirm_hint set to 1). The exception is if neither ++ * side had MITM in which case we do auto-accept. ++ */ ++ if (!test_bit(HCI_CONN_AUTH_PEND, &conn->flags) && ++ (loc_mitm || rem_mitm)) { + BT_DBG("Confirming auto-accept as acceptor"); + confirm_hint = 1; + goto confirm; diff --git a/queue-3.15/drm-fix-null-pointer-access-by-wrong-ioctl.patch b/queue-3.15/drm-fix-null-pointer-access-by-wrong-ioctl.patch new file mode 100644 index 00000000000..f8a72184a60 --- /dev/null +++ b/queue-3.15/drm-fix-null-pointer-access-by-wrong-ioctl.patch @@ -0,0 +1,35 @@ +From 1539fb9bd405ee32282ea0a38404f9e008ac5b7a Mon Sep 17 00:00:00 2001 +From: Zhaowei Yuan +Date: Wed, 18 Jun 2014 14:33:59 +0800 +Subject: drm: fix NULL pointer access by wrong ioctl + +From: Zhaowei Yuan + +commit 1539fb9bd405ee32282ea0a38404f9e008ac5b7a upstream. + +If user uses wrong ioctl command with _IOC_NONE and argument size +greater than 0, it can cause NULL pointer access from memset of line +463. If _IOC_NONE, don't memset to 0 for kdata. + +Signed-off-by: Zhaowei Yuan +Reviewed-by: David Herrmann +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/drm_drv.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/drm_drv.c ++++ b/drivers/gpu/drm/drm_drv.c +@@ -419,8 +419,9 @@ long drm_ioctl(struct file *filp, + retcode = -EFAULT; + goto err_i1; + } +- } else ++ } else if (cmd & IOC_OUT) { + memset(kdata, 0, usize); ++ } + + if (ioctl->flags & DRM_UNLOCKED) + retcode = func(dev, kdata, file_priv); diff --git a/queue-3.15/drm-i2c-tda998x-move-drm_i2c_encoder_destroy-call.patch b/queue-3.15/drm-i2c-tda998x-move-drm_i2c_encoder_destroy-call.patch new file mode 100644 index 00000000000..63b9b381df2 --- /dev/null +++ b/queue-3.15/drm-i2c-tda998x-move-drm_i2c_encoder_destroy-call.patch @@ -0,0 +1,46 @@ +From 2e48cecb55435e10c93c6aface1a1c7ef32f4e71 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= +Date: Tue, 17 Jun 2014 11:17:03 -0300 +Subject: drm/i2c: tda998x: move drm_i2c_encoder_destroy call +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: =?UTF-8?q?Guido=20Mart=C3=ADnez?= + +commit 2e48cecb55435e10c93c6aface1a1c7ef32f4e71 upstream. + +Currently tda998x_encoder_destroy() calls cec_write() and reg_clear(), +as part of the release procedure. Such calls need to access the I2C bus +and therefore, we need to call them before drm_i2c_encoder_destroy() +which unregisters the I2C device. + +This commit moves the latter so it's done afterwards. + +Signed-off-by: Guido Martínez +Signed-off-by: Ezequiel García +Signed-off-by: Russell King +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i2c/tda998x_drv.c ++++ b/drivers/gpu/drm/i2c/tda998x_drv.c +@@ -1183,7 +1183,6 @@ static void + tda998x_encoder_destroy(struct drm_encoder *encoder) + { + struct tda998x_priv *priv = to_tda998x_priv(encoder); +- drm_i2c_encoder_destroy(encoder); + + /* disable all IRQs and free the IRQ handler */ + cec_write(priv, REG_CEC_RXSHPDINTENA, 0); +@@ -1193,6 +1192,7 @@ tda998x_encoder_destroy(struct drm_encod + + if (priv->cec) + i2c_unregister_device(priv->cec); ++ drm_i2c_encoder_destroy(encoder); + kfree(priv); + } + diff --git a/queue-3.15/drm-i915-provide-interface-for-audio-driver-to-query-cdclk.patch b/queue-3.15/drm-i915-provide-interface-for-audio-driver-to-query-cdclk.patch new file mode 100644 index 00000000000..c7ad11e8e01 --- /dev/null +++ b/queue-3.15/drm-i915-provide-interface-for-audio-driver-to-query-cdclk.patch @@ -0,0 +1,68 @@ +From c149dcb5c60bfea8871f16dfcc0690255eeb825f Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Fri, 4 Jul 2014 10:00:37 +0800 +Subject: drm/i915: provide interface for audio driver to query cdclk + +From: Jani Nikula + +commit c149dcb5c60bfea8871f16dfcc0690255eeb825f upstream. + +For Haswell and Broadwell, if the display power well has been disabled, +the display audio controller divider values EM4 M VALUE and EM5 N VALUE +will have been lost. The CDCLK frequency is required for reprogramming them +to generate 24MHz HD-A link BCLK. So provide a private interface for the +audio driver to query CDCLK. + +This is a stopgap solution until a more generic interface between audio +and display drivers has been implemented. + +Signed-off-by: Jani Nikula +Reviewed-by: Damien Lespiau +Signed-off-by: Mengdong Lin +Signed-off-by: Takashi Iwai +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/intel_pm.c | 21 +++++++++++++++++++++ + include/drm/i915_powerwell.h | 1 + + 2 files changed, 22 insertions(+) + +--- a/drivers/gpu/drm/i915/intel_pm.c ++++ b/drivers/gpu/drm/i915/intel_pm.c +@@ -5734,6 +5734,27 @@ int i915_release_power_well(void) + } + EXPORT_SYMBOL_GPL(i915_release_power_well); + ++/* ++ * Private interface for the audio driver to get CDCLK in kHz. ++ * ++ * Caller must request power well using i915_request_power_well() prior to ++ * making the call. ++ */ ++int i915_get_cdclk_freq(void) ++{ ++ struct drm_i915_private *dev_priv; ++ ++ if (!hsw_pwr) ++ return -ENODEV; ++ ++ dev_priv = container_of(hsw_pwr, struct drm_i915_private, ++ power_domains); ++ ++ return intel_ddi_get_cdclk_freq(dev_priv); ++} ++EXPORT_SYMBOL_GPL(i915_get_cdclk_freq); ++ ++ + #define POWER_DOMAIN_MASK (BIT(POWER_DOMAIN_NUM) - 1) + + #define HSW_ALWAYS_ON_POWER_DOMAINS ( \ +--- a/include/drm/i915_powerwell.h ++++ b/include/drm/i915_powerwell.h +@@ -32,5 +32,6 @@ + /* For use by hda_i915 driver */ + extern int i915_request_power_well(void); + extern int i915_release_power_well(void); ++extern int i915_get_cdclk_freq(void); + + #endif /* _I915_POWERWELL_H_ */ diff --git a/queue-3.15/drm-i95-initialize-active-ring-pid-to-1.patch b/queue-3.15/drm-i95-initialize-active-ring-pid-to-1.patch new file mode 100644 index 00000000000..b4cd9ffdc30 --- /dev/null +++ b/queue-3.15/drm-i95-initialize-active-ring-pid-to-1.patch @@ -0,0 +1,40 @@ +From eee73b46261325eb140d899b5371f49b02d88f63 Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Tue, 10 Jun 2014 12:09:29 +0100 +Subject: drm/i95: Initialize active ring->pid to -1 + +From: Chris Wilson + +commit eee73b46261325eb140d899b5371f49b02d88f63 upstream. + +Otherwise we print out spurious processes on unused rings in the error +state. + +Signed-off-by: Chris Wilson +Reviewed-by: Daniel Vetter +Signed-off-by: Jani Nikula +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/i915/i915_gpu_error.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/i915/i915_gpu_error.c ++++ b/drivers/gpu/drm/i915/i915_gpu_error.c +@@ -894,6 +894,8 @@ static void i915_gem_record_rings(struct + for (i = 0; i < I915_NUM_RINGS; i++) { + struct intel_ring_buffer *ring = &dev_priv->ring[i]; + ++ error->ring[i].pid = -1; ++ + if (ring->dev == NULL) + continue; + +@@ -901,7 +903,6 @@ static void i915_gem_record_rings(struct + + i915_record_ring_state(dev, ring, &error->ring[i]); + +- error->ring[i].pid = -1; + request = i915_gem_find_active_request(ring); + if (request) { + /* We need to copy these to an anonymous buffer diff --git a/queue-3.15/drm-vmwgfx-fix-incorrect-write-to-read-only-register-v2.patch b/queue-3.15/drm-vmwgfx-fix-incorrect-write-to-read-only-register-v2.patch new file mode 100644 index 00000000000..d15275bd05f --- /dev/null +++ b/queue-3.15/drm-vmwgfx-fix-incorrect-write-to-read-only-register-v2.patch @@ -0,0 +1,39 @@ +From 4e578080ed3262ed2c3985868539bc66218d25c0 Mon Sep 17 00:00:00 2001 +From: Thomas Hellstrom +Date: Wed, 2 Jul 2014 15:47:04 +0200 +Subject: drm/vmwgfx: Fix incorrect write to read-only register v2: + +From: Thomas Hellstrom + +commit 4e578080ed3262ed2c3985868539bc66218d25c0 upstream. + +Commit "drm/vmwgfx: correct fb_fix_screeninfo.line_length", while fixing a +vmwgfx fbdev bug, also writes the pitch to a supposedly read-only register: +SVGA_REG_BYTES_PER_LINE, while it should be (and also in fact is) written to +SVGA_REG_PITCHLOCK. + +This patch is Cc'd stable because of the unknown effects writing to this +register might have, particularly on older device versions. + +v2: Updated log message. + +Cc: Christopher Friedt +Tested-by: Christopher Friedt +Signed-off-by: Thomas Hellstrom +Reviewed-by: Jakob Bornecrantz +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c ++++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c +@@ -179,7 +179,6 @@ static int vmw_fb_set_par(struct fb_info + vmw_write(vmw_priv, SVGA_REG_DISPLAY_POSITION_Y, info->var.yoffset); + vmw_write(vmw_priv, SVGA_REG_DISPLAY_WIDTH, info->var.xres); + vmw_write(vmw_priv, SVGA_REG_DISPLAY_HEIGHT, info->var.yres); +- vmw_write(vmw_priv, SVGA_REG_BYTES_PER_LINE, info->fix.line_length); + vmw_write(vmw_priv, SVGA_REG_DISPLAY_ID, SVGA_ID_INVALID); + } + diff --git a/queue-3.15/series b/queue-3.15/series index 00f308c424f..adbbf274d34 100644 --- a/queue-3.15/series +++ b/queue-3.15/series @@ -44,3 +44,13 @@ 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 +drm-i95-initialize-active-ring-pid-to-1.patch +drm-fix-null-pointer-access-by-wrong-ioctl.patch +drm-i915-provide-interface-for-audio-driver-to-query-cdclk.patch +alsa-hda-restore-bclk-m-n-value-as-per-cdclk-for-hsw-bdw-display-hda-controller.patch +drm-vmwgfx-fix-incorrect-write-to-read-only-register-v2.patch +drm-i2c-tda998x-move-drm_i2c_encoder_destroy-call.patch +bluetooth-fix-incorrectly-overriding-conn-src_type.patch +bluetooth-fix-ssp-acceptor-just-works-confirmation-without-mitm.patch +bluetooth-fix-check-for-connection-encryption.patch +bluetooth-fix-indicating-discovery-state-when-canceling-inquiry.patch -- 2.47.3