Commit be26296a authored by Maxime Ripard's avatar Maxime Ripard

drm/vc4: crtc: Move PV dump to config_pv

Now that we only configure the PixelValve in vc4_crtc_config_pv, it doesn't
really make much sense to dump its register content in its caller.
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Tested-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
Tested-by: default avatarHoegeun Kwon <hoegeun.kwon@samsung.com>
Tested-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Reviewed-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://patchwork.freedesktop.org/patch/msgid/c195af7d9e140a2a6db32992ee7e54071c6f94ba.1599120059.git-series.maxime@cerno.tech
parent 5ffabf50
...@@ -290,6 +290,14 @@ static void vc4_crtc_config_pv(struct drm_crtc *crtc) ...@@ -290,6 +290,14 @@ static void vc4_crtc_config_pv(struct drm_crtc *crtc)
vc4_encoder->type == VC4_ENCODER_TYPE_DSI1); vc4_encoder->type == VC4_ENCODER_TYPE_DSI1);
u32 format = is_dsi ? PV_CONTROL_FORMAT_DSIV_24 : PV_CONTROL_FORMAT_24; u32 format = is_dsi ? PV_CONTROL_FORMAT_DSIV_24 : PV_CONTROL_FORMAT_24;
u8 ppc = pv_data->pixels_per_clock; u8 ppc = pv_data->pixels_per_clock;
bool debug_dump_regs = false;
if (debug_dump_regs) {
struct drm_printer p = drm_info_printer(&vc4_crtc->pdev->dev);
dev_info(&vc4_crtc->pdev->dev, "CRTC %d regs before:\n",
drm_crtc_index(crtc));
drm_print_regset32(&p, &vc4_crtc->regset);
}
vc4_crtc_pixelvalve_reset(crtc); vc4_crtc_pixelvalve_reset(crtc);
...@@ -359,30 +367,20 @@ static void vc4_crtc_config_pv(struct drm_crtc *crtc) ...@@ -359,30 +367,20 @@ static void vc4_crtc_config_pv(struct drm_crtc *crtc)
PV_CONTROL_WAIT_HSTART | PV_CONTROL_WAIT_HSTART |
VC4_SET_FIELD(vc4_encoder->clock_select, VC4_SET_FIELD(vc4_encoder->clock_select,
PV_CONTROL_CLK_SELECT)); PV_CONTROL_CLK_SELECT));
}
static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc)
{
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
bool debug_dump_regs = false;
if (debug_dump_regs) { if (debug_dump_regs) {
struct drm_printer p = drm_info_printer(&vc4_crtc->pdev->dev); struct drm_printer p = drm_info_printer(&vc4_crtc->pdev->dev);
dev_info(&vc4_crtc->pdev->dev, "CRTC %d regs before:\n", dev_info(&vc4_crtc->pdev->dev, "CRTC %d regs after:\n",
drm_crtc_index(crtc)); drm_crtc_index(crtc));
drm_print_regset32(&p, &vc4_crtc->regset); drm_print_regset32(&p, &vc4_crtc->regset);
} }
}
static void vc4_crtc_mode_set_nofb(struct drm_crtc *crtc)
{
vc4_crtc_config_pv(crtc); vc4_crtc_config_pv(crtc);
vc4_hvs_mode_set_nofb(crtc); vc4_hvs_mode_set_nofb(crtc);
if (debug_dump_regs) {
struct drm_printer p = drm_info_printer(&vc4_crtc->pdev->dev);
dev_info(&vc4_crtc->pdev->dev, "CRTC %d regs after:\n",
drm_crtc_index(crtc));
drm_print_regset32(&p, &vc4_crtc->regset);
}
} }
static void require_hvs_enabled(struct drm_device *dev) static void require_hvs_enabled(struct drm_device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment