diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2019-04-03 05:15:02 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2019-04-03 05:15:01 -0700 |
commit | 4594ebbba3cc0e7d9619e16f2bb504328af8ec8c (patch) | |
tree | 8bcd497c4b62b3310d7c053b39bfcef5e008b534 | |
parent | e124f48789191eb18ad99fb035e8598a93809a35 (diff) | |
parent | 1b1e63b1a7664689886f941baba0fe477db01a0e (diff) |
Merge "drm/msm: adjust HDMI DDC speed configuration"
-rw-r--r-- | drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/msm/hdmi/hdmi_util.c | 12 |
2 files changed, 16 insertions, 5 deletions
diff --git a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c index 30d262f2b0d4..2928e2ec5b83 100644 --- a/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c +++ b/drivers/gpu/drm/msm/hdmi-staging/sde_hdmi_util.c @@ -874,14 +874,19 @@ void sde_hdmi_ddc_config(void *hdmi_display) { struct sde_hdmi *display = (struct sde_hdmi *)hdmi_display; struct hdmi *hdmi = display->ctrl.ctrl; + uint32_t ddc_speed; if (!hdmi) { pr_err("Invalid parameters\n"); return; } + + ddc_speed = hdmi_read(hdmi, REG_HDMI_DDC_SPEED); + ddc_speed |= HDMI_DDC_SPEED_THRESHOLD(2); + ddc_speed |= HDMI_DDC_SPEED_PRESCALE(12); + hdmi_write(hdmi, REG_HDMI_DDC_SPEED, - HDMI_DDC_SPEED_THRESHOLD(2) | - HDMI_DDC_SPEED_PRESCALE(10)); + ddc_speed); hdmi_write(hdmi, REG_HDMI_DDC_SETUP, HDMI_DDC_SETUP_TIMEOUT(0xff)); diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_util.c b/drivers/gpu/drm/msm/hdmi/hdmi_util.c index c7cfa38ed3ad..a8142e5c0fbb 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_util.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_util.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by @@ -19,14 +19,20 @@ void init_ddc(struct hdmi *hdmi) { + + uint32_t ddc_speed; + hdmi_write(hdmi, REG_HDMI_DDC_CTRL, HDMI_DDC_CTRL_SW_STATUS_RESET); hdmi_write(hdmi, REG_HDMI_DDC_CTRL, HDMI_DDC_CTRL_SOFT_RESET); + ddc_speed = hdmi_read(hdmi, REG_HDMI_DDC_SPEED); + ddc_speed |= HDMI_DDC_SPEED_THRESHOLD(2); + ddc_speed |= HDMI_DDC_SPEED_PRESCALE(12); + hdmi_write(hdmi, REG_HDMI_DDC_SPEED, - HDMI_DDC_SPEED_THRESHOLD(2) | - HDMI_DDC_SPEED_PRESCALE(10)); + ddc_speed); hdmi_write(hdmi, REG_HDMI_DDC_SETUP, HDMI_DDC_SETUP_TIMEOUT(0xff)); |