Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53058299 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Tomi Valkeinen
Browse files

drm/omap: omap_display_timings: Use display_flags for interlace mode



Remove the interlace member and add display_flags to omap_video_timings to
configure the interlace mode.

Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent fe70cd76
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ static const struct omap_video_timings tvc_pal_timings = {
	.vfront_porch	= 5,
	.vback_porch	= 41,

	.interlace	= true,
	.flags		= DISPLAY_FLAGS_INTERLACED,
};

static const struct of_device_id tvc_of_match[];
+0 −2
Original line number Diff line number Diff line
@@ -34,8 +34,6 @@ static const struct omap_video_timings hdmic_default_timings = {

	.vsync_level	= OMAPDSS_SIG_ACTIVE_LOW,
	.hsync_level	= OMAPDSS_SIG_ACTIVE_LOW,

	.interlace	= false,
};

struct panel_drv_data {
+3 −4
Original line number Diff line number Diff line
@@ -2607,7 +2607,7 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
	u16 in_height = height;
	u16 in_width = width;
	int x_predecim = 1, y_predecim = 1;
	bool ilace = mgr_timings->interlace;
	bool ilace = !!(mgr_timings->flags & DISPLAY_FLAGS_INTERLACED);
	unsigned long pclk = dispc_plane_pclk_rate(plane);
	unsigned long lclk = dispc_plane_lclk_rate(plane);

@@ -3128,7 +3128,7 @@ bool dispc_mgr_timings_ok(enum omap_channel channel,

	if (dss_mgr_is_lcd(channel)) {
		/* TODO: OMAP4+ supports interlace for LCD outputs */
		if (timings->interlace)
		if (timings->flags & DISPLAY_FLAGS_INTERLACED)
			return false;

		if (!_dispc_lcd_timings_ok(timings->hsync_len,
@@ -3292,7 +3292,7 @@ void dispc_mgr_set_timings(enum omap_channel channel,

		DSSDBG("hsync %luHz, vsync %luHz\n", ht, vt);
	} else {
		if (t.interlace)
		if (t.flags & DISPLAY_FLAGS_INTERLACED)
			t.vactive /= 2;

		if (dispc.feat->supports_double_pixel)
@@ -4232,7 +4232,6 @@ static const struct dispc_errata_i734_data {
		.vsync_len = 1, .vfront_porch = 1, .vback_porch = 1,
		.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
		.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
		.interlace = false,
		.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
		.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
		.sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
+1 −1
Original line number Diff line number Diff line
@@ -4122,7 +4122,7 @@ static int dsi_display_init_dispc(struct platform_device *dsidev,
	 * override interlace, logic level and edge related parameters in
	 * omap_video_timings with default values
	 */
	dsi->timings.interlace = false;
	dsi->timings.flags &= ~DISPLAY_FLAGS_INTERLACED;
	dsi->timings.hsync_level = OMAPDSS_SIG_ACTIVE_HIGH;
	dsi->timings.vsync_level = OMAPDSS_SIG_ACTIVE_HIGH;
	dsi->timings.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE;
+2 −2
Original line number Diff line number Diff line
@@ -303,7 +303,7 @@ static void hdmi_core_init(struct hdmi_core_vid_config *video_cfg,
			    cfg->timings.vback_porch;
	video_cfg->v_fc_config.hdmi_dvi_mode = cfg->hdmi_dvi_mode;

	if (cfg->timings.interlace) {
	if (cfg->timings.flags & DISPLAY_FLAGS_INTERLACED) {
		/* set vblank_osc if vblank is fractional */
		if (video_cfg->vblank % 2 != 0)
			video_cfg->vblank_osc = 1;
@@ -342,7 +342,7 @@ static void hdmi_core_video_config(struct hdmi_core_data *core,
	r = FLD_MOD(r, hsync_pol, 5, 5);
	r = FLD_MOD(r, cfg->data_enable_pol, 4, 4);
	r = FLD_MOD(r, cfg->vblank_osc, 1, 1);
	r = FLD_MOD(r, ovt->interlace, 0, 0);
	r = FLD_MOD(r, !!(ovt->flags & DISPLAY_FLAGS_INTERLACED), 0, 0);
	hdmi_write_reg(base, HDMI_CORE_FC_INVIDCONF, r);

	/* set x resolution */
Loading