diff options
Diffstat (limited to 'drivers/gpu/drm/sti/sti_mixer.c')
-rw-r--r-- | drivers/gpu/drm/sti/sti_mixer.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sti/sti_mixer.c b/drivers/gpu/drm/sti/sti_mixer.c index 79f369db9fb6..13a4b84deab6 100644 --- a/drivers/gpu/drm/sti/sti_mixer.c +++ b/drivers/gpu/drm/sti/sti_mixer.c | |||
@@ -45,6 +45,7 @@ static const u32 mixerColorSpaceMatIdentity[] = { | |||
45 | #define GAM_CTL_GDP1_MASK BIT(4) | 45 | #define GAM_CTL_GDP1_MASK BIT(4) |
46 | #define GAM_CTL_GDP2_MASK BIT(5) | 46 | #define GAM_CTL_GDP2_MASK BIT(5) |
47 | #define GAM_CTL_GDP3_MASK BIT(6) | 47 | #define GAM_CTL_GDP3_MASK BIT(6) |
48 | #define GAM_CTL_CURSOR_MASK BIT(9) | ||
48 | 49 | ||
49 | const char *sti_mixer_to_str(struct sti_mixer *mixer) | 50 | const char *sti_mixer_to_str(struct sti_mixer *mixer) |
50 | { | 51 | { |
@@ -122,11 +123,15 @@ int sti_mixer_set_layer_depth(struct sti_mixer *mixer, struct sti_layer *layer) | |||
122 | layer_id = GAM_DEPTH_GDP3_ID; | 123 | layer_id = GAM_DEPTH_GDP3_ID; |
123 | break; | 124 | break; |
124 | case STI_VID_0: | 125 | case STI_VID_0: |
126 | case STI_HQVDP_0: | ||
125 | layer_id = GAM_DEPTH_VID0_ID; | 127 | layer_id = GAM_DEPTH_VID0_ID; |
126 | break; | 128 | break; |
127 | case STI_VID_1: | 129 | case STI_VID_1: |
128 | layer_id = GAM_DEPTH_VID1_ID; | 130 | layer_id = GAM_DEPTH_VID1_ID; |
129 | break; | 131 | break; |
132 | case STI_CURSOR: | ||
133 | /* no need to set depth for cursor */ | ||
134 | return 0; | ||
130 | default: | 135 | default: |
131 | DRM_ERROR("Unknown layer %d\n", layer->desc); | 136 | DRM_ERROR("Unknown layer %d\n", layer->desc); |
132 | return 1; | 137 | return 1; |
@@ -185,9 +190,12 @@ static u32 sti_mixer_get_layer_mask(struct sti_layer *layer) | |||
185 | case STI_GDP_3: | 190 | case STI_GDP_3: |
186 | return GAM_CTL_GDP3_MASK; | 191 | return GAM_CTL_GDP3_MASK; |
187 | case STI_VID_0: | 192 | case STI_VID_0: |
193 | case STI_HQVDP_0: | ||
188 | return GAM_CTL_VID0_MASK; | 194 | return GAM_CTL_VID0_MASK; |
189 | case STI_VID_1: | 195 | case STI_VID_1: |
190 | return GAM_CTL_VID1_MASK; | 196 | return GAM_CTL_VID1_MASK; |
197 | case STI_CURSOR: | ||
198 | return GAM_CTL_CURSOR_MASK; | ||
191 | default: | 199 | default: |
192 | return 0; | 200 | return 0; |
193 | } | 201 | } |
@@ -215,6 +223,15 @@ int sti_mixer_set_layer_status(struct sti_mixer *mixer, | |||
215 | return 0; | 223 | return 0; |
216 | } | 224 | } |
217 | 225 | ||
226 | void sti_mixer_clear_all_layers(struct sti_mixer *mixer) | ||
227 | { | ||
228 | u32 val; | ||
229 | |||
230 | DRM_DEBUG_DRIVER("%s clear all layer\n", sti_mixer_to_str(mixer)); | ||
231 | val = sti_mixer_reg_read(mixer, GAM_MIXER_CTL) & 0xFFFF0000; | ||
232 | sti_mixer_reg_write(mixer, GAM_MIXER_CTL, val); | ||
233 | } | ||
234 | |||
218 | void sti_mixer_set_matrix(struct sti_mixer *mixer) | 235 | void sti_mixer_set_matrix(struct sti_mixer *mixer) |
219 | { | 236 | { |
220 | unsigned int i; | 237 | unsigned int i; |