From: John Barberiz <jbarb...@amd.com>

Add HPD delay timer support to
1. Single/dual link DVI.
2. DP to HDMI passive dongle
3. DP to DVI passive dongle.

Signed-off-by: John Barberiz <jbarb...@amd.com>
Reviewed-by: Tony Cheng <tony.ch...@amd.com>
Acked-by: Harry Wentland <harry.wentl...@amd.com>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 7 +++++--
 drivers/gpu/drm/amd/display/dc/dc_link.h      | 2 +-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index f40c9c7aa733..556b155ba5af 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -2358,11 +2358,14 @@ void core_link_set_avmute(struct pipe_ctx *pipe_ctx, 
bool enable)
        core_dc->hwss.set_avmute(pipe_ctx, enable);
 }
 
-void dc_link_disable_hpd_filter(struct dc_link *link)
+void dc_link_enable_hpd_filter(struct dc_link *link, bool enable)
 {
        struct gpio *hpd;
 
-       if (!link->is_hpd_filter_disabled) {
+       if (enable) {
+               link->is_hpd_filter_disabled = false;
+               program_hpd_filter(link);
+       } else {
                link->is_hpd_filter_disabled = true;
                /* Obtain HPD handle */
                hpd = get_hpd_gpio(link->ctx->dc_bios, link->link_id, 
link->ctx->gpio_service);
diff --git a/drivers/gpu/drm/amd/display/dc/dc_link.h 
b/drivers/gpu/drm/amd/display/dc/dc_link.h
index ac0f617b43c9..fb4d9eafdc6e 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_link.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_link.h
@@ -197,7 +197,7 @@ bool dc_link_dp_set_test_pattern(
        const unsigned char *p_custom_pattern,
        unsigned int cust_pattern_size);
 
-void dc_link_disable_hpd_filter(struct dc_link *link);
+void dc_link_enable_hpd_filter(struct dc_link *link, bool enable);
 
 /*
  * DPCD access interfaces
-- 
2.14.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to