aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>2018-11-23 04:24:48 -0500
committerMaxime Ripard <maxime.ripard@bootlin.com>2018-11-27 03:53:01 -0500
commit01260ffad2a8eff7f43218bdc93072fd068036f6 (patch)
treef1ec54e0f74f67ebca882520e739112f8bc035ce
parent1c29d263f6243e0007f0c61a82d1e1261efc5395 (diff)
drm/sun4i: frontend: Move CSC bypass setup to format update routine
In order to support YUV to RGB conversion with the frontend (which is generally used for connecting with the backend), the CSC block must not be bypassed. As a result, the bit to enable CSC bypass is moved from the runtime resume routine to the format update routine, so that it can disabled when introducing support for YUV formats later. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181123092515.2511-17-paul.kocialkowski@bootlin.com
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_frontend.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_frontend.c b/drivers/gpu/drm/sun4i/sun4i_frontend.c
index 0f7f8c7b3402..f54b1c4a9264 100644
--- a/drivers/gpu/drm/sun4i/sun4i_frontend.c
+++ b/drivers/gpu/drm/sun4i/sun4i_frontend.c
@@ -177,6 +177,10 @@ int sun4i_frontend_update_formats(struct sun4i_frontend *frontend,
177 regmap_write(frontend->regs, SUN4I_FRONTEND_CH0_VERTPHASE1_REG, 0x400); 177 regmap_write(frontend->regs, SUN4I_FRONTEND_CH0_VERTPHASE1_REG, 0x400);
178 regmap_write(frontend->regs, SUN4I_FRONTEND_CH1_VERTPHASE1_REG, 0x400); 178 regmap_write(frontend->regs, SUN4I_FRONTEND_CH1_VERTPHASE1_REG, 0x400);
179 179
180 regmap_update_bits(frontend->regs, SUN4I_FRONTEND_BYPASS_REG,
181 SUN4I_FRONTEND_BYPASS_CSC_EN,
182 SUN4I_FRONTEND_BYPASS_CSC_EN);
183
180 regmap_write(frontend->regs, SUN4I_FRONTEND_INPUT_FMT_REG, 184 regmap_write(frontend->regs, SUN4I_FRONTEND_INPUT_FMT_REG,
181 SUN4I_FRONTEND_INPUT_FMT_DATA_MOD(1) | 185 SUN4I_FRONTEND_INPUT_FMT_DATA_MOD(1) |
182 SUN4I_FRONTEND_INPUT_FMT_DATA_FMT(in_fmt_val) | 186 SUN4I_FRONTEND_INPUT_FMT_DATA_FMT(in_fmt_val) |
@@ -354,10 +358,6 @@ static int sun4i_frontend_runtime_resume(struct device *dev)
354 SUN4I_FRONTEND_EN_EN, 358 SUN4I_FRONTEND_EN_EN,
355 SUN4I_FRONTEND_EN_EN); 359 SUN4I_FRONTEND_EN_EN);
356 360
357 regmap_update_bits(frontend->regs, SUN4I_FRONTEND_BYPASS_REG,
358 SUN4I_FRONTEND_BYPASS_CSC_EN,
359 SUN4I_FRONTEND_BYPASS_CSC_EN);
360
361 sun4i_frontend_scaler_init(frontend); 361 sun4i_frontend_scaler_init(frontend);
362 362
363 return 0; 363 return 0;