Skip to content

Commit 2dcf852

Browse files
committed
video: mxcfb: blank/unblank to save power
This patch does two things. 1) It makes sure the display is unblanked when first connected. This gives us a good user experience where if the framebuffer is blanked and then a device is plugged in nothing turns on. 2) After the hdmi device is registered we tell the IPU to blank the display, then on subsequent connect/disconnect events we unblank/blank the screens as needed. This makes sure that the ipu is always disabled if we aren't using it and if you don't have a monitor attached saves about 80mA's of constant power usage. Overall this provides a significant power savings for headless systems, and also doesn't block the bus-frequency driver from kicking in if no display is attached. Signed-off-by: Jon Nettleton <jon@solid-run.com>
1 parent 093ee08 commit 2dcf852

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

drivers/video/fbdev/mxc/mxc_hdmi.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,6 +2063,10 @@ static void mxc_hdmi_cable_connected(struct mxc_hdmi *hdmi)
20632063
mxc_hdmi_set_mode(hdmi,
20642064
memcmp(&modelist, &hdmi->fbi->modelist, sizeof(modelist)) != 0);
20652065

2066+
console_lock();
2067+
fb_blank(hdmi->fbi, FB_BLANK_UNBLANK);
2068+
console_unlock();
2069+
20662070
dev_dbg(&hdmi->pdev->dev, "%s exit\n", __func__);
20672071
}
20682072

@@ -2088,6 +2092,10 @@ static void mxc_hdmi_cable_disconnected(struct mxc_hdmi *hdmi)
20882092

20892093
dev_dbg(&hdmi->pdev->dev, "%s\n", __func__);
20902094

2095+
console_lock();
2096+
fb_blank(hdmi->fbi, FB_BLANK_POWERDOWN);
2097+
console_unlock();
2098+
20912099
/* Save CEC clock */
20922100
clkdis = hdmi_readb(HDMI_MC_CLKDIS) & HDMI_MC_CLKDIS_CECCLK_DISABLE;
20932101
clkdis |= ~HDMI_MC_CLKDIS_CECCLK_DISABLE;
@@ -2373,6 +2381,8 @@ static void mxc_hdmi_fb_registered(struct mxc_hdmi *hdmi)
23732381
if (hdmi->fb_reg)
23742382
return;
23752383

2384+
fb_blank(hdmi->fbi, FB_BLANK_POWERDOWN);
2385+
23762386
spin_lock_irqsave(&hdmi->irq_lock, flags);
23772387

23782388
dev_dbg(&hdmi->pdev->dev, "%s\n", __func__);

0 commit comments

Comments
 (0)