All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment.
@ 2021-09-18  3:50 Yunlongli
  2021-09-20  9:47   ` Robert Foss
  0 siblings, 1 reply; 8+ messages in thread
From: Yunlongli @ 2021-09-18  3:50 UTC (permalink / raw)
  To: ple, narmstrong, a.hajda, robert.foss, airlied, daniel
  Cc: Laurent.pinchart, jonas, jernej.skrabec, dri-devel, linux-kernel,
	liyunlonga

fix: Add further confirm if external screens are involved.

log: In the actual tests,  the IT66121 chip sometimes misjudged whether
     it had an external screen, so, reference the it66121_user_guid.pdf
     about Audio/Video data is stable or not A typical initialization
     of HDMI link should be based on interrupt signal and appropriate
     register probing. Recommended flow is detailed in IT66121
     Programming Guide. Simply put, the microcontroller should monitor
     the HPD status first. Upon valid HPD event, move on to check
     RxSENDetect register to see if the receiver chip is ready for
     further handshaking. When RxSENDetect is asserted, start reading EDID
     data through DDC channels and carry on the rest of the handshaking
     subsequently.If the micro-controller makes no use of the interrupt
     signal as well as the above-mentioned status  registers, the link
     establishment might fail. Please do follow the suggested
     initialization flow recommended in IT66121 Programming Guide.
     So, I add the IT66121_SYS_STATUS_SENDECTECT register status detection.

Signed-off-by: Yunlongli <liyunlonga@uniontech.com>
---
 drivers/gpu/drm/bridge/ite-it66121.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index 2f2a09adb4bc..9ed4fa298d11 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -523,7 +523,7 @@ static bool it66121_is_hpd_detect(struct it66121_ctx *ctx)
 	if (regmap_read(ctx->regmap, IT66121_SYS_STATUS_REG, &val))
 		return false;
 
-	return val & IT66121_SYS_STATUS_HPDETECT;
+	return ((val & IT66121_SYS_STATUS_HPDETECT) && (val & IT66121_SYS_STATUS_SENDECTECT));
 }
 
 static int it66121_bridge_attach(struct drm_bridge *bridge,
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment.
@ 2021-09-18  3:55 Yunlongli
  0 siblings, 0 replies; 8+ messages in thread
From: Yunlongli @ 2021-09-18  3:55 UTC (permalink / raw)
  To: ple, narmstrong, a.hajda, robert.foss, airlied, daniel
  Cc: Laurent.pinchart, jonas, jernej.skrabec, dri-devel, linux-kernel,
	liyunlonga

fix: Add further confirm if external screens are involved.

log: In the actual tests,  the IT66121 chip sometimes misjudged whether
     it had an external screen, so, reference the it66121_user_guid.pdf
     about Audio/Video data is stable or not A typical initialization
     of HDMI link should be based on interrupt signal and appropriate
     register probing. Recommended flow is detailed in IT66121
     Programming Guide. Simply put, the microcontroller should monitor
     the HPD status first. Upon valid HPD event, move on to check
     RxSENDetect register to see if the receiver chip is ready for
     further handshaking. When RxSENDetect is asserted, start reading EDID
     data through DDC channels and carry on the rest of the handshaking
     subsequently.If the micro-controller makes no use of the interrupt
     signal as well as the above-mentioned status  registers, the link
     establishment might fail. Please do follow the suggested
     initialization flow recommended in IT66121 Programming Guide.
     So, I add the IT66121_SYS_STATUS_SENDECTECT register status detection.

Signed-off-by: Yunlongli <liyunlonga@uniontech.com>
---
 drivers/gpu/drm/bridge/ite-it66121.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index 2f2a09adb4bc..9ed4fa298d11 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -523,7 +523,7 @@ static bool it66121_is_hpd_detect(struct it66121_ctx *ctx)
 	if (regmap_read(ctx->regmap, IT66121_SYS_STATUS_REG, &val))
 		return false;
 
-	return val & IT66121_SYS_STATUS_HPDETECT;
+	return ((val & IT66121_SYS_STATUS_HPDETECT) && (val & IT66121_SYS_STATUS_SENDECTECT));
 }
 
 static int it66121_bridge_attach(struct drm_bridge *bridge,
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment
@ 2021-09-21  7:54 Yunlongli
  2021-09-21  8:27 ` Neil Armstrong
  0 siblings, 1 reply; 8+ messages in thread
From: Yunlongli @ 2021-09-21  7:54 UTC (permalink / raw)
  To: ple, narmstrong, a.hajda, robert.foss, airlied, daniel
  Cc: Laurent.pinchart, jonas, jernej.skrabec, dri-devel, linux-kernel,
	liyunlonga

In the actual tests,  the IT66121 chip sometimes misjudged whether
it had an external screen, so, reference the it66121_user_guid.pdf
about Audio/Video data is stable or not A typical initialization
of HDMI link should be based on interrupt signal and appropriate
register probing. Recommended flow is detailed in IT66121
Programming Guide. Simply put, the microcontroller should monitor
the HPD status first. Upon valid HPD event, move on to check
RxSENDetect register to see if the receiver chip is ready for
further handshaking. When RxSENDetect is asserted, start reading EDID
data through DDC channels and carry on the rest of the handshaking
subsequently.If the micro-controller makes no use of the interrupt
signal as well as the above-mentioned status  registers, the link
establishment might fail. Please do follow the suggested
initialization flow recommended in IT66121 Programming Guide.
So, I add the IT66121_SYS_STATUS_SENDECTECT register status detection.

Signed-off-by: Yunlongli <liyunlonga@uniontech.com>
---
 drivers/gpu/drm/bridge/ite-it66121.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index 2f2a09adb4bc..9ed4fa298d11 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -523,7 +523,7 @@ static bool it66121_is_hpd_detect(struct it66121_ctx *ctx)
 	if (regmap_read(ctx->regmap, IT66121_SYS_STATUS_REG, &val))
 		return false;
 
-	return val & IT66121_SYS_STATUS_HPDETECT;
+	return ((val & IT66121_SYS_STATUS_HPDETECT) && (val & IT66121_SYS_STATUS_SENDECTECT));
 }
 
 static int it66121_bridge_attach(struct drm_bridge *bridge,
-- 
2.20.1




^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-03-10  8:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-18  3:50 [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment Yunlongli
2021-09-20  9:47 ` Robert Foss
2021-09-20  9:47   ` Robert Foss
2021-09-20 11:06   ` =?gb18030?B?u9i4tKO6W1BBVENIXSBkcm06IGJyaWRnZTogaXQ2NjEyMTogQWRkZWQgaXQ2NjEyMSBjaGlwIGV4dGVybmFsIHNjcmVlbiBzdGF0dXMganVkZ21lbnQu?= =?gb18030?B?wO7UxsH6?=
2021-09-18  3:55 [PATCH] drm: bridge: it66121: Added it66121 chip external screen status judgment Yunlongli
2021-09-21  7:54 Yunlongli
2021-09-21  8:27 ` Neil Armstrong
2022-03-10  8:37   ` 李云龙

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.