From: Thierry Reding Date: Tue, 29 Oct 2013 15:03:03 +0000 (+0100) Subject: drm/tegra: Disable outputs for power-saving X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b5190022f77a41465c2202f621a5fa07c9aabb7b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/tegra: Disable outputs for power-saving When an output is disabled, its DPMS mode is usually set to off. Instead of only disabling the panel (if one is attached), turn the output off entirely to save more power. HDMI doesn't have any panels attached, so it previously didn't save any power at all. With this commit, however, the complete HDMI interface will be turned off, therefore allowing an attached monitor to go into a standby mode. Signed-off-by: Thierry Reding --- diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c index 5dc4d1a9cad8..581dc5d37bed 100644 --- a/drivers/gpu/drm/tegra/output.c +++ b/drivers/gpu/drm/tegra/output.c @@ -130,11 +130,12 @@ static void tegra_encoder_dpms(struct drm_encoder *encoder, int mode) struct tegra_output *output = encoder_to_output(encoder); struct drm_panel *panel = output->panel; - if (panel && panel->funcs) { - if (mode != DRM_MODE_DPMS_ON) - drm_panel_disable(panel); - else - drm_panel_enable(panel); + if (mode != DRM_MODE_DPMS_ON) { + drm_panel_disable(panel); + tegra_output_disable(output); + } else { + tegra_output_enable(output); + drm_panel_enable(panel); } }