From: Jagan Teki <jagan@amarulasolutions.com> To: Maxime Ripard <maxime.ripard@bootlin.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com> Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, Michael Trimarchi <michael@amarulasolutions.com>, linux-amarula@amarulasolutions.com, linux-sunxi@googlegroups.com, Jagan Teki <jagan@amarulasolutions.com> Subject: [PATCH v7 09/23] drm/sun4i: sun6i_mipi_dsi: Enable HBP, HSA_HSE for burst mode Date: Fri, 1 Feb 2019 21:12:18 +0530 [thread overview] Message-ID: <20190201154232.10505-10-jagan@amarulasolutions.com> (raw) In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> Horizontal back porch, sync active and sync end bits are needed to disable for burst mode panel operations. So, disable them via dsi base control register. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Merlijn Wajer <merlijn@wizzup.org> --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index a2ad9fa7f8d5..3d7c03161954 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -549,12 +549,17 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, u16 hbp, hfp, hsa, hblk, vblk; size_t bytes; u8 *buffer; + u32 val = 0; /* Do all timing calculations up front to allocate buffer space */ if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) { hbp = hfp = hsa = vblk = 0; hblk = (mode->hdisplay * Bpp); + + regmap_read(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, &val); + val |= SUN6I_DSI_BASIC_CTL_HBP_DIS; + val |= SUN6I_DSI_BASIC_CTL_HSA_HSE_DIS; goto alloc_buf; } @@ -603,7 +608,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, if (WARN_ON(!buffer)) return; - regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, 0); + regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, val); regmap_write(dsi->regs, SUN6I_DSI_SYNC_HSS_REG, sun6i_dsi_build_sync_pkt(MIPI_DSI_H_SYNC_START, -- 2.18.0.321.gffc6fa0e3
WARNING: multiple messages have this Message-ID (diff)
From: Jagan Teki <jagan@amarulasolutions.com> To: Maxime Ripard <maxime.ripard@bootlin.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Chen-Yu Tsai <wens@csie.org>, Michael Turquette <mturquette@baylibre.com>, Rob Herring <robh+dt@kernel.org>, Mark Rutland <mark.rutland@arm.com> Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com, Jagan Teki <jagan@amarulasolutions.com>, Michael Trimarchi <michael@amarulasolutions.com>, linux-amarula@amarulasolutions.com, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v7 09/23] drm/sun4i: sun6i_mipi_dsi: Enable HBP, HSA_HSE for burst mode Date: Fri, 1 Feb 2019 21:12:18 +0530 [thread overview] Message-ID: <20190201154232.10505-10-jagan@amarulasolutions.com> (raw) In-Reply-To: <20190201154232.10505-1-jagan@amarulasolutions.com> Horizontal back porch, sync active and sync end bits are needed to disable for burst mode panel operations. So, disable them via dsi base control register. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Merlijn Wajer <merlijn@wizzup.org> --- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index a2ad9fa7f8d5..3d7c03161954 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -549,12 +549,17 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, u16 hbp, hfp, hsa, hblk, vblk; size_t bytes; u8 *buffer; + u32 val = 0; /* Do all timing calculations up front to allocate buffer space */ if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) { hbp = hfp = hsa = vblk = 0; hblk = (mode->hdisplay * Bpp); + + regmap_read(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, &val); + val |= SUN6I_DSI_BASIC_CTL_HBP_DIS; + val |= SUN6I_DSI_BASIC_CTL_HSA_HSE_DIS; goto alloc_buf; } @@ -603,7 +608,7 @@ static void sun6i_dsi_setup_timings(struct sun6i_dsi *dsi, if (WARN_ON(!buffer)) return; - regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, 0); + regmap_write(dsi->regs, SUN6I_DSI_BASIC_CTL_REG, val); regmap_write(dsi->regs, SUN6I_DSI_SYNC_HSS_REG, sun6i_dsi_build_sync_pkt(MIPI_DSI_H_SYNC_START, -- 2.18.0.321.gffc6fa0e3 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-02-01 15:43 UTC|newest] Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-01 15:42 [PATCH v7 00/23] drm/sun4i: Allwinner A64 MIPI-DSI support Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 01/23] drm/sun4i: sun6i_mipi_dsi: Compute burst mode loop N1 instruction delay Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 02/23] drm/sun4i: sun6i_mipi_dsi: Support instruction loop selection Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 03/23] drm/sun4i: sun6i_mipi_dsi: Setup burst mode timings Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 04/23] drm/sun4i: sun6i_mipi_dsi: Simplify drq to support all modes Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 05/23] drm/sun4i: tcon: Export get tcon0 routine Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 06/23] drm/sun4i: sun6i_mipi_dsi: Probe tcon0 during dsi_bind Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 07/23] drm/sun4i: sun6i_mipi_dsi: Setup burst mode Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 08/23] drm/sun4i: sun6i_mipi_dsi: Enable trail_inv and trail_fill controls Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki [this message] 2019-02-01 15:42 ` [PATCH v7 09/23] drm/sun4i: sun6i_mipi_dsi: Enable HBP, HSA_HSE for burst mode Jagan Teki 2019-02-01 15:42 ` [PATCH v7 10/23] drm/sun4i: tcon: Compute DCLK dividers based on format, lanes Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 11/23] dt-bindings: sun6i-dsi: Add VCC-DSI supply property Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 12/23] drm/sun4i: sun6i_mipi_dsi: Add support for VCC-DSI voltage regulator Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 13/23] dt-bindings: sun6i-dsi: Add A64 MIPI-DSI compatible Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 14/23] dt-bindings: sun6i-dsi: Add A64 DPHY compatible (w/ A31 fallback) Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 15/23] drm/sun4i: sun6i_mipi_dsi: Add has_mod_clk quirk Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 16/23] drm/sun4i: sun6i_mipi_dsi: Add Allwinner A64 MIPI DSI support Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 17/23] arm64: dts: allwinner: a64: Add MIPI DSI pipeline Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [DO NOT MERGE][PATCH v7 18/23] arm64: allwinner: a64: pine64-lts: Enable Feiyang FY07024DI26A30-D DSI panel Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 19/23] drm/sun4i: sun6i_mipi_dsi: Add DSI Generic short write 2 param transfer Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [DO NOT MERGE][PATCH v7 20/23] arm64: dts: allwinner: bananapi-m64: Bananapi S070WV20-CT16 DSI panel Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 21/23] drm/sun4i: sun6i_mipi_dsi: Fix DSI hbp timing value Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 22/23] drm/sun4i: sun6i_mipi_dsi: Fix DSI hfp " Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` [PATCH v7 23/23] arm64: dts: allwinner: a64-amarula-relic: Add Techstar TS8550B MIPI-DSI panel Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:42 ` Jagan Teki 2019-02-01 15:48 ` [PATCH v7 00/23] drm/sun4i: Allwinner A64 MIPI-DSI support Maxime Ripard 2019-02-01 15:48 ` Maxime Ripard 2019-02-01 15:48 ` Maxime Ripard 2019-02-01 15:51 ` Jagan Teki 2019-02-01 15:51 ` Jagan Teki 2019-02-01 15:51 ` Jagan Teki 2019-02-12 9:46 ` Jagan Teki 2019-02-12 9:46 ` Jagan Teki 2019-02-12 9:46 ` Jagan Teki 2019-02-13 9:03 ` Maxime Ripard 2019-02-13 9:03 ` Maxime Ripard 2019-02-13 9:03 ` Maxime Ripard 2019-02-13 9:19 ` Jagan Teki 2019-02-13 9:19 ` Jagan Teki 2019-02-13 9:19 ` Jagan Teki 2019-02-14 16:41 ` Jagan Teki 2019-02-14 16:41 ` Jagan Teki
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=20190201154232.10505-10-jagan@amarulasolutions.com \ --to=jagan@amarulasolutions.com \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=devicetree@vger.kernel.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-amarula@amarulasolutions.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-clk@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-sunxi@googlegroups.com \ --cc=mark.rutland@arm.com \ --cc=maxime.ripard@bootlin.com \ --cc=michael@amarulasolutions.com \ --cc=mturquette@baylibre.com \ --cc=robh+dt@kernel.org \ --cc=wens@csie.org \ /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.