From: Jagan Teki <jagan@amarulasolutions.com>
To: Andrzej Hajda <andrzej.hajda@intel.com>,
Inki Dae <inki.dae@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Tim Harvey <tharvey@gateworks.com>,
Adam Ford <aford173@gmail.com>,
Robert Foss <robert.foss@linaro.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Marek Vasut <marex@denx.de>
Cc: Matteo Lisi <matteo.lisi@engicam.com>,
dri-devel@lists.freedesktop.org,
linux-samsung-soc@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
NXP Linux Team <linux-imx@nxp.com>,
linux-amarula <linux-amarula@amarulasolutions.com>,
Jagan Teki <jagan@amarulasolutions.com>
Subject: [PATCH v12 13/18] drm: exynos: dsi: Add host helper for te_irq_handler
Date: Thu, 26 Jan 2023 20:14:22 +0530 [thread overview]
Message-ID: <20230126144427.607098-14-jagan@amarulasolutions.com> (raw)
In-Reply-To: <20230126144427.607098-1-jagan@amarulasolutions.com>
IRQ handler for te-gpio seems to be common across DSIM host.
However, Exynos is handling this via CRTC drivers but there is no clear
evidence on how the same has been handled in i.MX8MM. Keeping the handler
as-it-is can be a viable option but adding DSIM bridge core in upcoming
patches is not possible to call Exynos CRTC handler as DSIM bridge has
to be common across DRM bridge core instead of platform specific DRM
drivers like Exynos here.
So, this patch handles the handler via platform host helper, so-that
handling platform specific hook across Exynos and generic can be
reasonable till it makes it generic across all platforms.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v12:
- updated patch
- suggested by Marek V
Changes for v11:
- none
Changes for v10:
- split from previous series patch
"drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge"
drivers/gpu/drm/exynos/exynos_drm_dsi.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 488fae218205..1d95909391e2 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -325,6 +325,7 @@ struct exynos_dsim_host_ops {
void (*unregister_host)(struct exynos_dsi *dsim);
int (*attach)(struct exynos_dsi *dsim, struct mipi_dsi_device *device);
int (*detach)(struct exynos_dsi *dsim, struct mipi_dsi_device *device);
+ irqreturn_t (*te_irq_handler)(struct exynos_dsi *dsim);
};
struct exynos_dsi_enc {
@@ -1333,11 +1334,10 @@ static irqreturn_t exynos_dsi_irq(int irq, void *dev_id)
static irqreturn_t exynos_dsi_te_irq_handler(int irq, void *dev_id)
{
struct exynos_dsi *dsi = (struct exynos_dsi *)dev_id;
- struct exynos_dsi_enc *dsi_enc = dsi->priv;
- struct drm_encoder *encoder = &dsi_enc->encoder;
+ const struct exynos_dsi_plat_data *pdata = dsi->plat_data;
- if (dsi->state & DSIM_STATE_VIDOUT_AVAILABLE)
- exynos_drm_crtc_te_handler(encoder->crtc);
+ if (pdata->host_ops && pdata->host_ops->te_irq_handler)
+ return pdata->host_ops->te_irq_handler(dsi);
return IRQ_HANDLED;
}
@@ -1716,6 +1716,17 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
return 0;
}
+static irqreturn_t _exynos_dsi_te_irq_handler(struct exynos_dsi *dsim)
+{
+ struct exynos_dsi_enc *dsi_enc = dsim->priv;
+ struct drm_encoder *encoder = &dsi_enc->encoder;
+
+ if (dsim->state & DSIM_STATE_VIDOUT_AVAILABLE)
+ exynos_drm_crtc_te_handler(encoder->crtc);
+
+ return IRQ_HANDLED;
+}
+
static int _exynos_dsi_host_attach(struct exynos_dsi *dsim,
struct mipi_dsi_device *device)
{
@@ -2030,6 +2041,7 @@ static const struct exynos_dsim_host_ops exynos_dsi_host_ops = {
.unregister_host = exynos_dsi_unregister_host,
.attach = _exynos_dsi_host_attach,
.detach = _exynos_dsi_host_detach,
+ .te_irq_handler = _exynos_dsi_te_irq_handler,
};
static const struct exynos_dsi_plat_data exynos3250_dsi_pdata = {
--
2.25.1
_______________________________________________
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:[~2023-01-26 14:53 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-26 14:44 [PATCH v12 00/18] drm: Add Samsung MIPI DSIM bridge Jagan Teki
2023-01-26 14:44 ` [PATCH v12 01/18] drm: of: Lookup if child node has DSI panel or bridge Jagan Teki
2023-01-26 14:44 ` [PATCH v12 02/18] drm: bridge: panel: Add devm_drm_of_dsi_get_bridge helper Jagan Teki
2023-01-26 14:47 ` Maxime Ripard
2023-01-26 14:58 ` Jagan Teki
2023-01-26 14:44 ` [PATCH v12 03/18] drm: exynos: dsi: Drop explicit call to bridge detach Jagan Teki
2023-01-26 14:44 ` [PATCH v12 04/18] drm: exynos: dsi: Switch to devm_drm_of_dsi_get_bridge Jagan Teki
2023-01-26 14:44 ` [PATCH v12 05/18] drm: exynos: dsi: Mark PHY as optional Jagan Teki
2023-01-26 14:44 ` [PATCH v12 06/18] drm: exynos: dsi: Add platform PLL_P (PMS_P) offset Jagan Teki
2023-01-26 14:44 ` [PATCH v12 07/18] drm: exynos: dsi: Introduce hw_type platform data Jagan Teki
2023-01-26 14:44 ` [PATCH v12 08/18] drm: exynos: dsi: Handle proper host initialization Jagan Teki
2023-01-26 14:44 ` [PATCH v12 09/18] drm: exynos: dsi: Add atomic check Jagan Teki
2023-01-26 14:44 ` [PATCH v12 10/18] drm: exynos: dsi: Add input_bus_flags Jagan Teki
2023-01-26 14:44 ` [PATCH v12 11/18] drm: exynos: dsi: Add atomic_get_input_bus_fmts Jagan Teki
2023-01-26 15:29 ` Marek Vasut
2023-01-26 14:44 ` [PATCH v12 12/18] drm: exynos: dsi: Consolidate component and bridge Jagan Teki
2023-01-26 14:44 ` Jagan Teki [this message]
2023-01-26 14:44 ` [PATCH v12 15/18] dt-bindings: display: exynos: dsim: Add NXP i.MX8M Mini/Nano support Jagan Teki
2023-01-26 14:44 ` [PATCH v12 16/18] drm: bridge: samsung-dsim: Add " Jagan Teki
2023-01-26 14:44 ` [PATCH v12 17/18] dt-bindings: display: exynos: dsim: Add NXP i.MX8M Plus support Jagan Teki
2023-01-26 14:44 ` [PATCH v12 18/18] drm: bridge: samsung-dsim: Add " Jagan Teki
2023-01-27 10:33 ` [PATCH v12 00/18] drm: Add Samsung MIPI DSIM bridge Rasmus Villemoes
2023-01-27 10:39 ` Jagan Teki
2023-01-27 10:56 ` Rasmus Villemoes
2023-01-27 11:04 ` Jagan Teki
2023-01-27 11:30 ` Marek Vasut
2023-01-30 12:45 ` Rasmus Villemoes
2023-01-31 7:27 ` Alexander Stein
2023-02-01 22:00 ` Marek Vasut
2023-02-03 12:29 ` Rasmus Villemoes
2023-02-06 8:11 ` Frieder Schrempf
2023-02-07 9:09 ` Rasmus Villemoes
2023-02-07 9:23 ` Marek Vasut
2023-02-14 10:55 ` Rasmus Villemoes
2023-02-14 11:08 ` Rasmus Villemoes
2023-02-14 11:09 ` Fabio Estevam
2023-02-14 11:11 ` Fabio Estevam
2023-02-17 8:55 ` Rasmus Villemoes
2023-02-17 10:05 ` Alexander Stein
2023-02-17 18:22 ` Rasmus Villemoes
2023-02-22 10:05 ` Frieder Schrempf
2023-02-24 14:08 ` Rasmus Villemoes
2023-02-24 15:00 ` Adam Ford
2023-02-01 8:37 ` Frieder Schrempf
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=20230126144427.607098-14-jagan@amarulasolutions.com \
--to=jagan@amarulasolutions.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=aford173@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=frieder.schrempf@kontron.de \
--cc=inki.dae@samsung.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-amarula@amarulasolutions.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
--cc=marex@denx.de \
--cc=matteo.lisi@engicam.com \
--cc=robert.foss@linaro.org \
--cc=sw0312.kim@samsung.com \
--cc=tharvey@gateworks.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox