mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
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.
This commit is contained in:
@@ -548,7 +548,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 defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
|
||||
@@ -585,6 +585,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);
|
||||
@@ -647,6 +651,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*/
|
||||
|
||||
Reference in New Issue
Block a user