From 632f3ab95fe2ffebf09969a57ab21be409ed7dcc Mon Sep 17 00:00:00 2001 From: "Lu, Han" Date: Tue, 5 May 2015 09:05:47 +0800 Subject: drm/i915/audio: add codec wakeup override enabled/disable callback Add support for enabling codec wakeup override signal to allow re-enumeration of the controller on SKL after resume from low power state. In SKL, HDMI/DP codec and PCH HD Audio Controller are in different power wells, so it's necessary to reset display audio codecs when power well on, otherwise display audio codecs will disappear when resume from low power state. Reset steps when power on: enable codec wakeup -> azx_init_chip() -> disable codec wakeup v3 by Jani: Simplify to only support toggling the appropriate chicken bit. v4 by Han: add explanation and specify the hw swquence. Signed-off-by: Lu, Han Signed-off-by: Jani Nikula Acked-by: Daniel Vetter Signed-off-by: Takashi Iwai --- include/drm/i915_component.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/drm') diff --git a/include/drm/i915_component.h b/include/drm/i915_component.h index 3e2f22e5bf3c..c9a8b64aa33b 100644 --- a/include/drm/i915_component.h +++ b/include/drm/i915_component.h @@ -31,6 +31,7 @@ struct i915_audio_component { struct module *owner; void (*get_power)(struct device *); void (*put_power)(struct device *); + void (*codec_wake_override)(struct device *, bool enable); int (*get_cdclk_freq)(struct device *); } *ops; }; -- cgit v1.2.3 From 6b8eeca65b18ae77e175cc2b6571731f0ee413bf Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 15 Jun 2015 10:34:28 +1000 Subject: drm/dp/mst: close deadlock in connector destruction. I've only seen this once, and I failed to capture the lockdep backtrace, but I did some investigations. If we are calling into the MST layer from EDID probing, we have the mode_config mutex held, if during that EDID probing, the MST hub goes away, then we can get a deadlock where the connector destruction function in the driver tries to retake the mode config mutex. This offloads connector destruction to a workqueue, and avoid the subsequenct lock ordering issue. Acked-by: Daniel Vetter Cc: stable@vger.kernel.org Signed-off-by: Dave Airlie --- include/drm/drm_crtc.h | 2 ++ include/drm/drm_dp_mst_helper.h | 4 ++++ 2 files changed, 6 insertions(+) (limited to 'include/drm') diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 3b4d8a4a23fb..57ca8cc383a6 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -743,6 +743,8 @@ struct drm_connector { uint8_t num_h_tile, num_v_tile; uint8_t tile_h_loc, tile_v_loc; uint16_t tile_h_size, tile_v_size; + + struct list_head destroy_list; }; /** diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index a2507817be41..86d0b25ed054 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -463,6 +463,10 @@ struct drm_dp_mst_topology_mgr { struct work_struct work; struct work_struct tx_work; + + struct list_head destroy_connector_list; + struct mutex destroy_connector_lock; + struct work_struct destroy_connector_work; }; int drm_dp_mst_topology_mgr_init(struct drm_dp_mst_topology_mgr *mgr, struct device *dev, struct drm_dp_aux *aux, int max_dpcd_transaction_bytes, int max_payloads, int conn_base_id); -- cgit v1.2.3 From 15e21cd1631e0eca16af545bbdf89e2ffa4cdaee Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Tue, 30 Jun 2015 14:59:15 -0700 Subject: drm: use kvfree() in drm_free_large() Use kvfree() instead of open-coding it. Signed-off-by: Pekka Enberg Cc: David Airlie Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/drm/drm_mem_util.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'include/drm') diff --git a/include/drm/drm_mem_util.h b/include/drm/drm_mem_util.h index 19a240446fca..e42495ad8136 100644 --- a/include/drm/drm_mem_util.h +++ b/include/drm/drm_mem_util.h @@ -56,10 +56,7 @@ static __inline__ void *drm_malloc_ab(size_t nmemb, size_t size) static __inline void drm_free_large(void *ptr) { - if (!is_vmalloc_addr(ptr)) - return kfree(ptr); - - vfree(ptr); + kvfree(ptr); } #endif -- cgit v1.2.3