summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/rockchip
diff options
context:
space:
mode:
authorChris Zhong <zyw@rock-chips.com>2017-02-05 10:54:59 +0300
committerMark Yao <mark.yao@rock-chips.com>2017-02-05 11:29:52 +0300
commit81632df69772efaacc6218281f58d5ed19d5c97e (patch)
treece50cb3c674a5ee0b72fc1cbbc7ad739544dacc7 /drivers/gpu/drm/rockchip
parent5eb2e6ee97b5e9a8587143db339bc71b28a3e1ca (diff)
downloadlinux-81632df69772efaacc6218281f58d5ed19d5c97e.tar.xz
drm/rockchip: cdn-dp: do not use drm_helper_hpd_irq_event
The cdn_dp_pd_event_work is using drm_helper_hpd_irq_event to update the connector status, this function is used to update all connectors of drm_device. Therefore, the detect of other connector will be call, when cdn_dp_pd_event_work is triggered, every time. It is not necessary, and it may cause system crash. replace drm_helper_hpd_irq_event with drm_kms_helper_hotplug_event, only update cdn-dp status. Signed-off-by: Chris Zhong <zyw@rock-chips.com> Tested-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/rockchip')
-rw-r--r--drivers/gpu/drm/rockchip/cdn-dp-core.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
index a70eedc88e1a..62e02a48ebea 100644
--- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
+++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
@@ -935,6 +935,9 @@ static void cdn_dp_pd_event_work(struct work_struct *work)
{
struct cdn_dp_device *dp = container_of(work, struct cdn_dp_device,
event_work);
+ struct drm_connector *connector = &dp->connector;
+ enum drm_connector_status old_status;
+
int ret;
u8 sink_count;
@@ -997,7 +1000,11 @@ static void cdn_dp_pd_event_work(struct work_struct *work)
out:
mutex_unlock(&dp->lock);
- drm_helper_hpd_irq_event(dp->drm_dev);
+
+ old_status = connector->status;
+ connector->status = connector->funcs->detect(connector, false);
+ if (old_status != connector->status)
+ drm_kms_helper_hotplug_event(dp->drm_dev);
}
static int cdn_dp_pd_event(struct notifier_block *nb,