aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/meson/meson_viu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/meson/meson_viu.c')
-rw-r--r--drivers/gpu/drm/meson/meson_viu.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/meson/meson_viu.c b/drivers/gpu/drm/meson/meson_viu.c
index 6bcfa527c180..26a0857878bf 100644
--- a/drivers/gpu/drm/meson/meson_viu.c
+++ b/drivers/gpu/drm/meson/meson_viu.c
@@ -184,18 +184,18 @@ void meson_viu_set_osd_lut(struct meson_drm *priv, enum viu_lut_sel_e lut_sel,
184 if (lut_sel == VIU_LUT_OSD_OETF) { 184 if (lut_sel == VIU_LUT_OSD_OETF) {
185 writel(0, priv->io_base + _REG(addr_port)); 185 writel(0, priv->io_base + _REG(addr_port));
186 186
187 for (i = 0; i < 20; i++) 187 for (i = 0; i < (OSD_OETF_LUT_SIZE / 2); i++)
188 writel(r_map[i * 2] | (r_map[i * 2 + 1] << 16), 188 writel(r_map[i * 2] | (r_map[i * 2 + 1] << 16),
189 priv->io_base + _REG(data_port)); 189 priv->io_base + _REG(data_port));
190 190
191 writel(r_map[OSD_OETF_LUT_SIZE - 1] | (g_map[0] << 16), 191 writel(r_map[OSD_OETF_LUT_SIZE - 1] | (g_map[0] << 16),
192 priv->io_base + _REG(data_port)); 192 priv->io_base + _REG(data_port));
193 193
194 for (i = 0; i < 20; i++) 194 for (i = 0; i < (OSD_OETF_LUT_SIZE / 2); i++)
195 writel(g_map[i * 2 + 1] | (g_map[i * 2 + 2] << 16), 195 writel(g_map[i * 2 + 1] | (g_map[i * 2 + 2] << 16),
196 priv->io_base + _REG(data_port)); 196 priv->io_base + _REG(data_port));
197 197
198 for (i = 0; i < 20; i++) 198 for (i = 0; i < (OSD_OETF_LUT_SIZE / 2); i++)
199 writel(b_map[i * 2] | (b_map[i * 2 + 1] << 16), 199 writel(b_map[i * 2] | (b_map[i * 2 + 1] << 16),
200 priv->io_base + _REG(data_port)); 200 priv->io_base + _REG(data_port));
201 201
@@ -211,18 +211,18 @@ void meson_viu_set_osd_lut(struct meson_drm *priv, enum viu_lut_sel_e lut_sel,
211 } else if (lut_sel == VIU_LUT_OSD_EOTF) { 211 } else if (lut_sel == VIU_LUT_OSD_EOTF) {
212 writel(0, priv->io_base + _REG(addr_port)); 212 writel(0, priv->io_base + _REG(addr_port));
213 213
214 for (i = 0; i < 20; i++) 214 for (i = 0; i < (OSD_EOTF_LUT_SIZE / 2); i++)
215 writel(r_map[i * 2] | (r_map[i * 2 + 1] << 16), 215 writel(r_map[i * 2] | (r_map[i * 2 + 1] << 16),
216 priv->io_base + _REG(data_port)); 216 priv->io_base + _REG(data_port));
217 217
218 writel(r_map[OSD_EOTF_LUT_SIZE - 1] | (g_map[0] << 16), 218 writel(r_map[OSD_EOTF_LUT_SIZE - 1] | (g_map[0] << 16),
219 priv->io_base + _REG(data_port)); 219 priv->io_base + _REG(data_port));
220 220
221 for (i = 0; i < 20; i++) 221 for (i = 0; i < (OSD_EOTF_LUT_SIZE / 2); i++)
222 writel(g_map[i * 2 + 1] | (g_map[i * 2 + 2] << 16), 222 writel(g_map[i * 2 + 1] | (g_map[i * 2 + 2] << 16),
223 priv->io_base + _REG(data_port)); 223 priv->io_base + _REG(data_port));
224 224
225 for (i = 0; i < 20; i++) 225 for (i = 0; i < (OSD_EOTF_LUT_SIZE / 2); i++)
226 writel(b_map[i * 2] | (b_map[i * 2 + 1] << 16), 226 writel(b_map[i * 2] | (b_map[i * 2 + 1] << 16),
227 priv->io_base + _REG(data_port)); 227 priv->io_base + _REG(data_port));
228 228