From: cdu13a Date: Thu, 11 Apr 2019 03:58:08 +0000 (-0400) Subject: hdmitx: add "now" to attr to trigger set_disp_mode_auto() X-Git-Tag: khadas-vims-v0.9.6-release~578 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1c086e342de0c591a6fd8f5d919a81ac00c6053;p=platform%2Fkernel%2Flinux-amlogic.git hdmitx: add "now" to attr to trigger set_disp_mode_auto() Useful for testing. Adding "now" to attr is a one shot way to force changes to current hdmi settings to take effect imediatly instead of waiting for a mode change. --- diff --git a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c index 40fc184..81153ab 100644 --- a/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c +++ b/drivers/amlogic/media/vout/hdmitx/hdmi_tx_20/hdmi_tx_main.c @@ -529,7 +529,7 @@ static int set_disp_mode_auto(void) else { /* nothing */ } - if ((vic_ready != HDMI_Unknown) && (vic_ready == vic)) { + if ((vic_ready != HDMI_Unknown) && (vic_ready == vic) && (strstr(hdmitx_device.fmt_attr,"now") == NULL)) { pr_info(SYS "[%s] ALREADY init VIC = %d\n", __func__, vic); if (hdev->RXCap.ieeeoui == 0) { @@ -554,6 +554,10 @@ static int set_disp_mode_auto(void) hdmitx_pre_display_init(); + + if (strstr(hdmitx_device.fmt_attr,"now") != NULL){ + memcpy(strstr(hdmitx_device.fmt_attr,"now"), " ", 3); + } hdev->cur_VIC = HDMI_Unknown; /* if vic is HDMI_Unknown, hdmitx_set_display will disable HDMI */ ret = hdmitx_set_display(hdev, vic); @@ -616,6 +620,10 @@ ssize_t store_attr(struct device *dev, { strncpy(hdmitx_device.fmt_attr, buf, sizeof(hdmitx_device.fmt_attr)); hdmitx_device.fmt_attr[15] = '\0'; + if (strstr(hdmitx_device.fmt_attr,"now")){ + set_disp_mode_auto(); + } +return count; return count; } /*aud_mode attr*/