summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/tegra/output.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-12-03 19:29:57 +0300
committerThierry Reding <treding@nvidia.com>2020-01-10 18:46:29 +0300
commit271502efbd3a9812f3d02230ff823b73141c6b39 (patch)
tree810b78bb104c04600144e943402e474b0e4a3765 /drivers/gpu/drm/tegra/output.c
parentf90965abc51d9a72cd6fa414e9480edff9ddaced (diff)
downloadlinux-271502efbd3a9812f3d02230ff823b73141c6b39.tar.xz
drm/tegra: output: Implement system suspend/resume
Implement generic system suspend/resume functions that can be used with any output type. Currently this only implements disabling and enabling of the IRQ functionality across system suspend/resume. This prevents an interrupt from happening before the display driver has fully resumed. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/drm/tegra/output.c')
-rw-r--r--drivers/gpu/drm/tegra/output.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index 34373734ff68..57203030dd02 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -250,3 +250,19 @@ void tegra_output_find_possible_crtcs(struct tegra_output *output,
output->encoder.possible_crtcs = mask;
}
+
+int tegra_output_suspend(struct tegra_output *output)
+{
+ if (output->hpd_irq)
+ disable_irq(output->hpd_irq);
+
+ return 0;
+}
+
+int tegra_output_resume(struct tegra_output *output)
+{
+ if (output->hpd_irq)
+ enable_irq(output->hpd_irq);
+
+ return 0;
+}