diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2021-07-09 02:03:29 +0300 |
---|---|---|
committer | Robert Foss <robert.foss@linaro.org> | 2021-10-06 13:59:08 +0200 |
commit | 15184965783aab3ca7ee4f939e2598943b3f40f9 (patch) | |
tree | 217aebef77ff8eda1ef2afcfe31cbcb5ac9f9568 /drivers/gpu/drm/bridge/lontium-lt9611uxc.c | |
parent | 9962601ca5719050906915c3c33a63744ac7b15c (diff) | |
download | linux-15184965783aab3ca7ee4f939e2598943b3f40f9.tar.gz linux-15184965783aab3ca7ee4f939e2598943b3f40f9.tar.bz2 linux-15184965783aab3ca7ee4f939e2598943b3f40f9.zip |
drm/bridge/lontium-lt9611uxc: fix provided connector suport
- set DRM_CONNECTOR_POLL_HPD as the connector will generate hotplug
events on its own
- do not call drm_kms_helper_hotplug_event() unless mode_config.funcs
pointer is not NULL to remove possible kernel oops.
Fixes: bc6fa8676ebb ("drm/bridge/lontium-lt9611uxc: move HPD notification out of IRQ handler")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Robert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210708230329.395976-1-dmitry.baryshkov@linaro.org
Diffstat (limited to 'drivers/gpu/drm/bridge/lontium-lt9611uxc.c')
-rw-r--r-- | drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c index 3cac16db970f..010657ea7af7 100644 --- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c @@ -167,9 +167,10 @@ static void lt9611uxc_hpd_work(struct work_struct *work) struct lt9611uxc *lt9611uxc = container_of(work, struct lt9611uxc, work); bool connected; - if (lt9611uxc->connector.dev) - drm_kms_helper_hotplug_event(lt9611uxc->connector.dev); - else { + if (lt9611uxc->connector.dev) { + if (lt9611uxc->connector.dev->mode_config.funcs) + drm_kms_helper_hotplug_event(lt9611uxc->connector.dev); + } else { mutex_lock(<9611uxc->ocm_lock); connected = lt9611uxc->hdmi_connected; @@ -339,6 +340,8 @@ static int lt9611uxc_connector_init(struct drm_bridge *bridge, struct lt9611uxc return -ENODEV; } + lt9611uxc->connector.polled = DRM_CONNECTOR_POLL_HPD; + drm_connector_helper_add(<9611uxc->connector, <9611uxc_bridge_connector_helper_funcs); ret = drm_connector_init(bridge->dev, <9611uxc->connector, |