From: Tomi Valkeinen <tomi.valkeinen@ti.com> To: Sebastian Reichel <sre@kernel.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Nikhil Devshatwar <nikhil.nd@ti.com>, <dri-devel@lists.freedesktop.org> Cc: <linux-omap@vger.kernel.org>, Sekhar Nori <nsekhar@ti.com>, Tony Lindgren <tony@atomide.com>, <hns@goldelico.com>, Sam Ravnborg <sam@ravnborg.org>, Tomi Valkeinen <tomi.valkeinen@ti.com> Subject: [PATCH v5 26/29] drm/omap: dsi: fix and cleanup ddr_clk_always_on Date: Tue, 8 Dec 2020 14:28:52 +0200 [thread overview] Message-ID: <20201208122855.254819-27-tomi.valkeinen@ti.com> (raw) In-Reply-To: <20201208122855.254819-1-tomi.valkeinen@ti.com> The driver ignores MIPI_DSI_CLOCK_NON_CONTINUOUS, and always uses non-continuous clock. Fix this by using MIPI_DSI_CLOCK_NON_CONTINUOUS and at the same time, drop ddr_clk_always_on field which seems pretty useless. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- drivers/gpu/drm/omapdrm/dss/dsi.c | 12 +++++------- drivers/gpu/drm/omapdrm/dss/dsi.h | 2 -- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 71de6119d2de..cc8b169b2223 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -1734,11 +1734,10 @@ static int dsi_cio_init(struct dsi_data *dsi) dsi_cio_timings(dsi); - if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { - /* DDR_CLK_ALWAYS_ON */ - REG_FLD_MOD(dsi, DSI_CLK_CTRL, - dsi->vm_timings.ddr_clk_always_on, 13, 13); - } + /* DDR_CLK_ALWAYS_ON */ + REG_FLD_MOD(dsi, DSI_CLK_CTRL, + !(dsi->dsidev->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS), + 13, 13); dsi->ulps_enabled = false; @@ -3646,7 +3645,7 @@ static void dsi_setup_dsi_vcs(struct dsi_data *dsi) dsi_force_tx_stop_mode_io(dsi); /* start the DDR clock by sending a NULL packet */ - if (dsi->vm_timings.ddr_clk_always_on) + if (!(dsi->dsidev->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)) dsi_vc_send_null(dsi, VC_CMD, dsi->dsidev->channel); } @@ -4155,7 +4154,6 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx) dsi_vm->hfp_blanking_mode = 1; dsi_vm->hbp_blanking_mode = 1; - dsi_vm->ddr_clk_always_on = cfg->ddr_clk_always_on; dsi_vm->window_sync = 4; /* setup DISPC videomode */ diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.h b/drivers/gpu/drm/omapdrm/dss/dsi.h index 478fc10bd18d..476069fda082 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.h +++ b/drivers/gpu/drm/omapdrm/dss/dsi.h @@ -212,7 +212,6 @@ struct omap_dss_dsi_videomode_timings { enum omap_dss_dsi_trans_mode trans_mode; - bool ddr_clk_always_on; int window_sync; }; @@ -224,7 +223,6 @@ struct omap_dss_dsi_config { unsigned long hs_clk_min, hs_clk_max; unsigned long lp_clk_min, lp_clk_max; - bool ddr_clk_always_on; enum omap_dss_dsi_trans_mode trans_mode; }; -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com> To: Sebastian Reichel <sre@kernel.org>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Nikhil Devshatwar <nikhil.nd@ti.com>, <dri-devel@lists.freedesktop.org> Cc: Tony Lindgren <tony@atomide.com>, hns@goldelico.com, Sekhar Nori <nsekhar@ti.com>, Tomi Valkeinen <tomi.valkeinen@ti.com>, linux-omap@vger.kernel.org, Sam Ravnborg <sam@ravnborg.org> Subject: [PATCH v5 26/29] drm/omap: dsi: fix and cleanup ddr_clk_always_on Date: Tue, 8 Dec 2020 14:28:52 +0200 [thread overview] Message-ID: <20201208122855.254819-27-tomi.valkeinen@ti.com> (raw) In-Reply-To: <20201208122855.254819-1-tomi.valkeinen@ti.com> The driver ignores MIPI_DSI_CLOCK_NON_CONTINUOUS, and always uses non-continuous clock. Fix this by using MIPI_DSI_CLOCK_NON_CONTINUOUS and at the same time, drop ddr_clk_always_on field which seems pretty useless. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- drivers/gpu/drm/omapdrm/dss/dsi.c | 12 +++++------- drivers/gpu/drm/omapdrm/dss/dsi.h | 2 -- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 71de6119d2de..cc8b169b2223 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -1734,11 +1734,10 @@ static int dsi_cio_init(struct dsi_data *dsi) dsi_cio_timings(dsi); - if (dsi->mode == OMAP_DSS_DSI_VIDEO_MODE) { - /* DDR_CLK_ALWAYS_ON */ - REG_FLD_MOD(dsi, DSI_CLK_CTRL, - dsi->vm_timings.ddr_clk_always_on, 13, 13); - } + /* DDR_CLK_ALWAYS_ON */ + REG_FLD_MOD(dsi, DSI_CLK_CTRL, + !(dsi->dsidev->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS), + 13, 13); dsi->ulps_enabled = false; @@ -3646,7 +3645,7 @@ static void dsi_setup_dsi_vcs(struct dsi_data *dsi) dsi_force_tx_stop_mode_io(dsi); /* start the DDR clock by sending a NULL packet */ - if (dsi->vm_timings.ddr_clk_always_on) + if (!(dsi->dsidev->mode_flags & MIPI_DSI_CLOCK_NON_CONTINUOUS)) dsi_vc_send_null(dsi, VC_CMD, dsi->dsidev->channel); } @@ -4155,7 +4154,6 @@ static bool dsi_vm_calc_blanking(struct dsi_clk_calc_ctx *ctx) dsi_vm->hfp_blanking_mode = 1; dsi_vm->hbp_blanking_mode = 1; - dsi_vm->ddr_clk_always_on = cfg->ddr_clk_always_on; dsi_vm->window_sync = 4; /* setup DISPC videomode */ diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.h b/drivers/gpu/drm/omapdrm/dss/dsi.h index 478fc10bd18d..476069fda082 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.h +++ b/drivers/gpu/drm/omapdrm/dss/dsi.h @@ -212,7 +212,6 @@ struct omap_dss_dsi_videomode_timings { enum omap_dss_dsi_trans_mode trans_mode; - bool ddr_clk_always_on; int window_sync; }; @@ -224,7 +223,6 @@ struct omap_dss_dsi_config { unsigned long hs_clk_min, hs_clk_max; unsigned long lp_clk_min, lp_clk_max; - bool ddr_clk_always_on; enum omap_dss_dsi_trans_mode trans_mode; }; -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2020-12-08 12:31 UTC|newest] Thread overview: 144+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-12-08 12:28 [PATCH v5 00/29] Convert DSI code to use drm_mipi_dsi and drm_panel (second half) Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-08 12:28 ` [PATCH v5 01/29] drm/panel: panel-dsi-cm: cleanup tear enable Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 13:09 ` Sebastian Reichel 2020-12-14 13:09 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 02/29] ARM: dts: omap5: add address-cells & size-cells to dsi Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 13:09 ` Sebastian Reichel 2020-12-14 13:09 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 03/29] drm/omap: pll: fix iteration loop check Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 13:10 ` Sebastian Reichel 2020-12-14 13:10 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 04/29] drm/omap: dsi: set trans_mode according to client mode_flags Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 13:10 ` Sebastian Reichel 2020-12-14 13:10 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 05/29] drm/panel: panel-dsi-cm: set column & page at setup Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 13:10 ` Sebastian Reichel 2020-12-14 13:10 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 06/29] drm/omap: dsi: send nop instead of page & column Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 14:22 ` Sebastian Reichel 2020-12-14 14:22 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 07/29] drm/omap: dsi: simplify VC handling Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 14:31 ` Sebastian Reichel 2020-12-14 14:31 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 08/29] drm/omap: dsi: drop useless channel checks Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 14:32 ` Sebastian Reichel 2020-12-14 14:32 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 09/29] drm/omap: dsi: cleanup dispc channel usage Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-08 15:17 ` Laurent Pinchart 2020-12-08 15:17 ` Laurent Pinchart 2020-12-14 14:35 ` Sebastian Reichel 2020-12-14 14:35 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 10/29] drm/omap: dsi: rename 'channel' to 'vc' Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-08 15:22 ` Laurent Pinchart 2020-12-08 15:22 ` Laurent Pinchart 2020-12-14 15:18 ` Sebastian Reichel 2020-12-14 15:18 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 11/29] drm/omap: dsi: pass vc to various functions Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-08 15:38 ` Laurent Pinchart 2020-12-08 15:38 ` Laurent Pinchart 2020-12-08 15:45 ` Tomi Valkeinen 2020-12-08 15:45 ` Tomi Valkeinen 2020-12-14 15:37 ` Sebastian Reichel 2020-12-14 15:37 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 12/29] drm/omap: dsi: untangle vc & channel Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-08 15:41 ` Laurent Pinchart 2020-12-08 15:41 ` Laurent Pinchart 2020-12-14 15:47 ` Sebastian Reichel 2020-12-14 15:47 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 13/29] drm/omap: dsi: skip dsi_vc_enable_hs when already in correct mode Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 15:50 ` Sebastian Reichel 2020-12-14 15:50 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 14/29] drm/omap: dsi: enable HS before sending the frame Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-08 15:42 ` Laurent Pinchart 2020-12-08 15:42 ` Laurent Pinchart 2020-12-14 15:51 ` Sebastian Reichel 2020-12-14 15:51 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 15/29] drm/omap: dsi: use separate VCs for cmd and video Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 15:54 ` Sebastian Reichel 2020-12-14 15:54 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 16/29] drm/panel: panel-dsi-cm: remove extra 'if' Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-08 15:42 ` Laurent Pinchart 2020-12-08 15:42 ` Laurent Pinchart 2020-12-14 15:55 ` Sebastian Reichel 2020-12-14 15:55 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 17/29] drm/panel: panel-dsi-cm: add panel database to driver Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:04 ` Sebastian Reichel 2020-12-14 16:04 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 18/29] drm/panel: panel-dsi-cm: drop unneeded includes Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:06 ` Sebastian Reichel 2020-12-14 16:06 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 19/29] drm/omap: dsi: move structs & defines to dsi.h Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:14 ` Sebastian Reichel 2020-12-14 16:14 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 20/29] drm/omap: dsi: move enable/disable to bridge enable/disable Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:16 ` Sebastian Reichel 2020-12-14 16:16 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 21/29] drm/omap: dsi: display_enable cleanup Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:17 ` Sebastian Reichel 2020-12-14 16:17 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 22/29] drm/omap: dsi: display_disable cleanup Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:20 ` Sebastian Reichel 2020-12-14 16:20 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 23/29] drm/omap: dsi: rename dsi_display_* functions Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:22 ` Sebastian Reichel 2020-12-14 16:22 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 24/29] drm/omap: dsi: cleanup initial vc setup Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:34 ` Sebastian Reichel 2020-12-14 16:34 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 25/29] drm/omap: dsi: split video mode enable/disable into separate func Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:38 ` Sebastian Reichel 2020-12-14 16:38 ` Sebastian Reichel 2020-12-08 12:28 ` Tomi Valkeinen [this message] 2020-12-08 12:28 ` [PATCH v5 26/29] drm/omap: dsi: fix and cleanup ddr_clk_always_on Tomi Valkeinen 2020-12-14 16:39 ` Sebastian Reichel 2020-12-14 16:39 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 27/29] drm/omap: dsi: remove ulps support Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 17:39 ` Sebastian Reichel 2020-12-14 17:39 ` Sebastian Reichel 2020-12-14 18:55 ` Tomi Valkeinen 2020-12-14 18:55 ` Tomi Valkeinen 2020-12-14 22:08 ` Sebastian Reichel 2020-12-14 22:08 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 28/29] drm/omap: dsi: fix DCS_CMD_ENABLE Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-14 16:48 ` Sebastian Reichel 2020-12-14 16:48 ` Sebastian Reichel 2020-12-08 12:28 ` [PATCH v5 29/29] drm/omap: dsi: allow DSI commands to be sent early Tomi Valkeinen 2020-12-08 12:28 ` Tomi Valkeinen 2020-12-08 15:48 ` Laurent Pinchart 2020-12-08 15:48 ` Laurent Pinchart 2020-12-10 7:34 ` Tomi Valkeinen 2020-12-10 7:34 ` Tomi Valkeinen 2020-12-10 8:17 ` Tomi Valkeinen 2020-12-10 8:17 ` Tomi Valkeinen 2020-12-14 17:17 ` Sebastian Reichel 2020-12-14 17:17 ` Sebastian Reichel 2020-12-15 10:05 ` Tomi Valkeinen 2020-12-15 10:05 ` Tomi Valkeinen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201208122855.254819-27-tomi.valkeinen@ti.com \ --to=tomi.valkeinen@ti.com \ --cc=dri-devel@lists.freedesktop.org \ --cc=hns@goldelico.com \ --cc=laurent.pinchart@ideasonboard.com \ --cc=linux-omap@vger.kernel.org \ --cc=nikhil.nd@ti.com \ --cc=nsekhar@ti.com \ --cc=sam@ravnborg.org \ --cc=sre@kernel.org \ --cc=tony@atomide.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.