aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-06-08 08:59:31 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2018-09-03 09:13:30 -0400
commit7d39e59be51bddbd5cd487274d48969a39a3bcd1 (patch)
tree49c41de9facec3a778db9b33f13d86d979971bbb /drivers/gpu/drm/omapdrm
parentf79fa7da6a2953c9964f285dfddc61f92ced0a5a (diff)
drm/omap: dsi: Fixup video mode in .set_config() operation
The DSI encoder modifies the passed videomode to take the requirements of the internal DISPC-DSI bus into account in the .enable_video_output() operation. This should be performed in the .check_timings() operation instead. There is however no .check_timings() operation as the DSI encoder uses a custom API, so move it to the closest match which is the .set_config() operation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dsi.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
index 280f63081224..d1734ea2534a 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -3265,7 +3265,7 @@ static void dsi_config_vp_num_line_buffers(struct dsi_data *dsi)
3265 3265
3266 if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { 3266 if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) {
3267 int bpp = dsi_get_pixel_size(dsi->pix_fmt); 3267 int bpp = dsi_get_pixel_size(dsi->pix_fmt);
3268 struct videomode *vm = &dsi->vm; 3268 const struct videomode *vm = &dsi->vm;
3269 /* 3269 /*
3270 * Don't use line buffers if width is greater than the video 3270 * Don't use line buffers if width is greater than the video
3271 * port's line buffer size 3271 * port's line buffer size
@@ -3394,7 +3394,7 @@ static void dsi_config_cmd_mode_interleaving(struct dsi_data *dsi)
3394 int ddr_clk_pre, ddr_clk_post, enter_hs_mode_lat, exit_hs_mode_lat; 3394 int ddr_clk_pre, ddr_clk_post, enter_hs_mode_lat, exit_hs_mode_lat;
3395 int tclk_trail, ths_exit, exiths_clk; 3395 int tclk_trail, ths_exit, exiths_clk;
3396 bool ddr_alwon; 3396 bool ddr_alwon;
3397 struct videomode *vm = &dsi->vm; 3397 const struct videomode *vm = &dsi->vm;
3398 int bpp = dsi_get_pixel_size(dsi->pix_fmt); 3398 int bpp = dsi_get_pixel_size(dsi->pix_fmt);
3399 int ndl = dsi->num_lanes_used - 1; 3399 int ndl = dsi->num_lanes_used - 1;
3400 int dsi_fclk_hsdiv = dsi->user_dsi_cinfo.mX[HSDIV_DSI] + 1; 3400 int dsi_fclk_hsdiv = dsi->user_dsi_cinfo.mX[HSDIV_DSI] + 1;
@@ -3644,7 +3644,7 @@ static void dsi_proto_timings(struct dsi_data *dsi)
3644 int vbp = dsi->vm_timings.vbp; 3644 int vbp = dsi->vm_timings.vbp;
3645 int window_sync = dsi->vm_timings.window_sync; 3645 int window_sync = dsi->vm_timings.window_sync;
3646 bool hsync_end; 3646 bool hsync_end;
3647 struct videomode *vm = &dsi->vm; 3647 const struct videomode *vm = &dsi->vm;
3648 int bpp = dsi_get_pixel_size(dsi->pix_fmt); 3648 int bpp = dsi_get_pixel_size(dsi->pix_fmt);
3649 int tl, t_he, width_bytes; 3649 int tl, t_he, width_bytes;
3650 3650
@@ -4044,16 +4044,6 @@ static int dsi_display_init_dispc(struct dsi_data *dsi)
4044 dsi->mgr_config.fifohandcheck = false; 4044 dsi->mgr_config.fifohandcheck = false;
4045 } 4045 }
4046 4046
4047 /*
4048 * override interlace, logic level and edge related parameters in
4049 * videomode with default values
4050 */
4051 dsi->vm.flags &= ~DISPLAY_FLAGS_INTERLACED;
4052 dsi->vm.flags &= ~DISPLAY_FLAGS_HSYNC_LOW;
4053 dsi->vm.flags |= DISPLAY_FLAGS_HSYNC_HIGH;
4054 dsi->vm.flags &= ~DISPLAY_FLAGS_VSYNC_LOW;
4055 dsi->vm.flags |= DISPLAY_FLAGS_VSYNC_HIGH;
4056
4057 dss_mgr_set_timings(&dsi->output, &dsi->vm); 4047 dss_mgr_set_timings(&dsi->output, &dsi->vm);
4058 4048
4059 r = dsi_configure_dispc_clocks(dsi); 4049 r = dsi_configure_dispc_clocks(dsi);
@@ -4755,6 +4745,17 @@ static int dsi_set_config(struct omap_dss_device *dssdev,
4755 dsi->user_dispc_cinfo = ctx.dispc_cinfo; 4745 dsi->user_dispc_cinfo = ctx.dispc_cinfo;
4756 4746
4757 dsi->vm = ctx.vm; 4747 dsi->vm = ctx.vm;
4748
4749 /*
4750 * override interlace, logic level and edge related parameters in
4751 * videomode with default values
4752 */
4753 dsi->vm.flags &= ~DISPLAY_FLAGS_INTERLACED;
4754 dsi->vm.flags &= ~DISPLAY_FLAGS_HSYNC_LOW;
4755 dsi->vm.flags |= DISPLAY_FLAGS_HSYNC_HIGH;
4756 dsi->vm.flags &= ~DISPLAY_FLAGS_VSYNC_LOW;
4757 dsi->vm.flags |= DISPLAY_FLAGS_VSYNC_HIGH;
4758
4758 dsi->vm_timings = ctx.dsi_vm; 4759 dsi->vm_timings = ctx.dsi_vm;
4759 4760
4760 mutex_unlock(&dsi->lock); 4761 mutex_unlock(&dsi->lock);