mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
ODROID-COMMON: display: Support hdmi phy control using osd blank ioctl
1. control with env 'monitor_onoff' in boot.ini 2. blank_mode - FB_BLANK_POWERDOWN - hdmi phy off - FB_BLANK_UNBLANK - hdmi phy on Change-Id: I00411be529fe80f19d9a1e4b17eed3583934ff4a Signed-off-by: Dongjin Kim <tobetter@gmail.com>
This commit is contained in:
@@ -1878,9 +1878,46 @@ done:
|
||||
return err;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
|
||||
extern void control_hdmiphy(bool on);
|
||||
|
||||
static bool monitor_onoff_action;
|
||||
|
||||
static int __init osd_setup_monitor_onoff(char *str)
|
||||
{
|
||||
if (!strcmp(str, "true") || !strcmp(str, "1"))
|
||||
monitor_onoff_action = true;
|
||||
else
|
||||
monitor_onoff_action = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
__setup("monitor_onoff=", osd_setup_monitor_onoff);
|
||||
#endif
|
||||
|
||||
int osd_blank(int blank_mode, struct fb_info *info)
|
||||
{
|
||||
osd_enable_hw(info->node, (blank_mode != 0) ? 0 : 1);
|
||||
|
||||
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
|
||||
if (!monitor_onoff_action)
|
||||
return 0;
|
||||
|
||||
switch (blank_mode) {
|
||||
case FB_BLANK_UNBLANK:
|
||||
control_hdmiphy(true);
|
||||
break;
|
||||
case FB_BLANK_POWERDOWN:
|
||||
control_hdmiphy(false);
|
||||
break;
|
||||
case FB_BLANK_NORMAL:
|
||||
case FB_BLANK_HSYNC_SUSPEND:
|
||||
case FB_BLANK_VSYNC_SUSPEND:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -5392,3 +5392,10 @@ static int __init hdmitx_boot_hdr_priority(char *str)
|
||||
|
||||
__setup("hdr_priority=", hdmitx_boot_hdr_priority);
|
||||
|
||||
#if defined(CONFIG_ARCH_MESON64_ODROID_COMMON)
|
||||
void control_hdmiphy(bool on)
|
||||
{
|
||||
hdmitx_device.hwop.cntlmisc(&hdmitx_device, MISC_TMDS_PHY_OP,
|
||||
on ? TMDS_PHY_ENABLE : TMDS_PHY_DISABLE);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user