summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sti/sti_mixer.c
diff options
context:
space:
mode:
authorBenjamin Gaignard <benjamin.gaignard@linaro.org>2014-12-04 11:17:32 +0100
committerBenjamin Gaignard <benjamin.gaignard@linaro.org>2014-12-11 13:58:19 +0100
commit2f7d0e82ce9fdbb450613abe28c3bbe1bda069a6 (patch)
tree6a7bc50d4eda4dae8ce503f49222de63b471f5ff /drivers/gpu/drm/sti/sti_mixer.c
parent765692078f08d0229e545d3c1a50bddbc16c800c (diff)
drm: sti: clear all mixer control
Make sure that mixer control register is correctly reset before use it. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Diffstat (limited to 'drivers/gpu/drm/sti/sti_mixer.c')
-rw-r--r--drivers/gpu/drm/sti/sti_mixer.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c
index 79f369db9fb6..6bcdf3f86d22 100644
--- a/drivers/gpu/drm/sti/sti_mixer.c
+++ b/drivers/gpu/drm/sti/sti_mixer.c
@@ -215,6 +215,15 @@ int sti_mixer_set_layer_status(struct sti_mixer *mixer,
return 0;
}
+void sti_mixer_clear_all_layers(struct sti_mixer *mixer)
+{
+ u32 val;
+
+ DRM_DEBUG_DRIVER("%s clear all layer\n", sti_mixer_to_str(mixer));
+ val = sti_mixer_reg_read(mixer, GAM_MIXER_CTL) & 0xFFFF0000;
+ sti_mixer_reg_write(mixer, GAM_MIXER_CTL, val);
+}
+
void sti_mixer_set_matrix(struct sti_mixer *mixer)
{
unsigned int i;