[PATCH v4 09/11] drm/bridge: analogix_dp: fix no drm hpd event when panel plug in

Yakir Yang ykk at rock-chips.com
Wed Jun 29 02:15:47 PDT 2016


The enum value of DP_IRQ_TYPE_HP_CABLE_IN is zero, but driver only
send drm hp event when the irq_type and the enum value is true.

if (irq_type & DP_IRQ_TYPE_HP_CABLE_IN || ...)
	drm_helper_hpd_irq_event(dp->drm_dev);

So there would no drm hpd event when cable plug in, to fix that
just need to assign all hotplug enum with no-zero values.

Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
Signed-off-by: Yakir Yang <ykk at rock-chips.com>
Reviewed-by: Sean Paul <seanpaul at chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu at chromium.org>
Reviewed-by: Tomasz Figa <tomasz.figa at chromium.com>
Tested-by: Javier Martinez Canillas <javier at osg.samsung.com>
---
Changes in v4:
- Add reviewed flag from Sean.
- Add reviewed flag from Tomasz.

Changes in v3:
- Add reviewed flag from Stéphane.
    [https://chromium-review.googlesource.com/#/c/346319/15]
- Add tested flag from Javier

 drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
index f09275d..b456380 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
+++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h
@@ -127,10 +127,10 @@ enum analog_power_block {
 };
 
 enum dp_irq_type {
-	DP_IRQ_TYPE_HP_CABLE_IN,
-	DP_IRQ_TYPE_HP_CABLE_OUT,
-	DP_IRQ_TYPE_HP_CHANGE,
-	DP_IRQ_TYPE_UNKNOWN,
+	DP_IRQ_TYPE_HP_CABLE_IN  = BIT(0),
+	DP_IRQ_TYPE_HP_CABLE_OUT = BIT(1),
+	DP_IRQ_TYPE_HP_CHANGE    = BIT(2),
+	DP_IRQ_TYPE_UNKNOWN      = BIT(3),
 };
 
 struct video_info {
-- 
1.9.1





More information about the Linux-rockchip mailing list