[PATCH v2 01/12] drm: bridge: Add Samsung DSIM bridge driver

Marek Szyprowski m.szyprowski at samsung.com
Mon May 9 05:44:06 PDT 2022


On 04.05.2022 13:40, Jagan Teki wrote:
> Samsung MIPI DSIM controller is common DSI IP that can be used in various
> SoCs like Exynos, i.MX8M Mini/Nano.
>
> In order to access this DSI controller between various platform SoCs,
> the ideal way to incorporate this in the drm stack is via the drm bridge
> driver.
>
> This patch is trying to differentiate platform-specific and bridge driver
> code and keep maintaining the exynos_drm_dsi.c code as platform-specific
> glue code and samsung-dsim.c as a common bridge driver code.
>
> - Exynos specific glue code is exynos specific te_irq, host_attach, and
>    detach code along with conventional component_ops.
>
> - Samsung DSIM is a bridge driver which is common across all platforms and
>    the respective platform-specific glue will initialize at the end of the
>    probe. The platform-specific operations and other glue calls will invoke
>    on associate code areas.
>
> v2:
> * fixed exynos dsi driver conversion (Marek Szyprowski)
> * updated commit message
> * updated MAINTAINERS file
>
> v1:
> * Don't maintain component_ops in bridge driver
> * Don't maintain platform glue code in bridge driver
> * Add platform-specific glue code and make a common bridge
>
> Signed-off-by: Marek Szyprowski <m.szyprowski at samsung.com>
> Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
> ---
>   MAINTAINERS                             |    8 +
>   drivers/gpu/drm/bridge/Kconfig          |   12 +
>   drivers/gpu/drm/bridge/Makefile         |    1 +
>   drivers/gpu/drm/bridge/samsung-dsim.c   | 1687 ++++++++++++++++++++++
>   drivers/gpu/drm/exynos/Kconfig          |    1 +
>   drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1724 +----------------------
>   include/drm/bridge/samsung-dsim.h       |   97 ++
>   7 files changed, 1869 insertions(+), 1661 deletions(-)
>   create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c
>   create mode 100644 include/drm/bridge/samsung-dsim.h

> ...

> -static int exynos_dsi_register_te_irq(struct exynos_dsi *dsi,
> -				      struct device *panel)
> +static int exynos_dsi_register_te_irq(struct exynos_dsi *dsi, struct device *panel)
>   {
> -	int ret;
> +	struct samsung_dsim *priv = dsi->priv;
>   	int te_gpio_irq;
> +	int ret;
> -	dsi->te_gpio = gpiod_get_optional(panel, "te", GPIOD_IN);
> -	if (!dsi->te_gpio) {
> -		return 0;
> -	} else if (IS_ERR(dsi->te_gpio)) {
> -		dev_err(dsi->dev, "gpio request failed with %ld\n",
> +	dsi->te_gpio = devm_gpiod_get_optional(priv->dev, "te", GPIOD_IN);
> +	if (IS_ERR(dsi->te_gpio)) {

The above change is basically a revert to the old broken code, which has 
been fixed by the following commits:

fedc89821990 drm/exynos: Search for TE-gpio in DSI panel's node
8e3fa9d841db drm/exynos: Don't fail if no TE-gpio is defined for DSI driver

Please update it to the current mainline state by removing the above change.

 > ...

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland




More information about the linux-arm-kernel mailing list