mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 03:40:35 +09:00
UPSTREAM: drm: bridge: dw-hdmi: Don't forward HPD events to DRM core before attach
Hotplug events should only be forwarded to the DRM core by the interrupt
handler when the bridge has been attached, otherwise the DRM device
pointer will be NULL, resulting in a crash.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170117082910.27023-7-laurent.pinchart+renesas@ideasonboard.com
Change-Id: Ic1387b5253d4586774cdb82e089effdd4104e380
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry pick from ba5d7e6160)
This commit is contained in:
committed by
Zheng Yang
parent
6c0f053621
commit
f3bb4cdf7b
@@ -291,7 +291,8 @@ static void repo_hpd_event(struct work_struct *p_work)
|
||||
{
|
||||
struct dw_hdmi *hdmi = container_of(p_work, struct dw_hdmi, work.work);
|
||||
|
||||
drm_helper_hpd_irq_event(hdmi->bridge.dev);
|
||||
if (hdmi->bridge.dev)
|
||||
drm_helper_hpd_irq_event(hdmi->bridge.dev);
|
||||
#ifdef CONFIG_SWITCH
|
||||
if (hdmi->hpd_state)
|
||||
switch_set_state(&hdmi->switchdev, 1);
|
||||
|
||||
Reference in New Issue
Block a user