From: Chris Zhong Date: Thu, 24 Nov 2016 06:22:51 +0000 (+0800) Subject: drm/rockchip: cdn-dp: add hdmi-codec jack event X-Git-Tag: firefly_0821_release~1033 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=5da8af22eb17f09f7873857ae14006316966639b;p=firefly-linux-kernel-4.4.55.git drm/rockchip: cdn-dp: add hdmi-codec jack event Use HDMI connection / disconnection notifications to update an ALSA jack object. Change-Id: Ia18537be1ddb899b7ac490560bf91d7de83eae02 Signed-off-by: Chris Zhong --- diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index 316a7ca26b0a..32a4e5f2cafa 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -653,6 +654,8 @@ static void cdn_dp_encoder_enable(struct drm_encoder *encoder) } out: mutex_unlock(&dp->lock); + if (!ret) + hdmi_event_connect(dp->dev); } static void cdn_dp_encoder_disable(struct drm_encoder *encoder) @@ -669,6 +672,7 @@ static void cdn_dp_encoder_disable(struct drm_encoder *encoder) } } mutex_unlock(&dp->lock); + hdmi_event_disconnect(dp->dev); /* * In the following 2 cases, we need to run the event_work to re-enable