[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <djnuoqr5mj576xzbhs72vuz6ji4ayluinb4fr257okik2l762x@ocd4cm7f65pl>
Date: Fri, 22 Nov 2024 01:53:45 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: keith zhao <keith.zhao@...rfivetech.com>
Cc: devicetree@...r.kernel.org, dri-devel@...ts.freedesktop.org,
andrzej.hajda@...el.com, neil.armstrong@...aro.org, rfoss@...nel.org,
Laurent.pinchart@...asonboard.com, jonas@...boo.se, jernej.skrabec@...il.com,
maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de, airlied@...il.com,
simona@...ll.ch, robh@...nel.org, krzk+dt@...nel.org, conor+dt@...nel.org,
hjc@...k-chips.com, heiko@...ech.de, andy.yan@...k-chips.com,
william.qiu@...rfivetech.com, xingyu.wu@...rfivetech.com, kernel@...il.dk,
paul.walmsley@...ive.com, palmer@...belt.com, aou@...s.berkeley.edu,
p.zabel@...gutronix.de, changhuang.liang@...rfivetech.com, jack.zhu@...rfivetech.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v5 3/9] drm: bridge: inno-hdmi: add inno bridge driver.
On Wed, Nov 20, 2024 at 02:18:42PM +0800, keith zhao wrote:
> move rochchip inno hdmi connector to a newly created directory named
> inno-hdmi.c, and rename rockchip/inno_hdmi.c to
> rockchip/inno_hdmi-rockchip.c
>
> This patch refines the Innosilicon HDMI architecture by abstracting
> the existing connector into a bridge architecture.
> The drm_bridge_connector_init function is used to create the connector.
>
> Signed-off-by: keith zhao <keith.zhao@...rfivetech.com>
> ---
> MAINTAINERS | 2 +
> drivers/gpu/drm/bridge/Kconfig | 2 +
> drivers/gpu/drm/bridge/Makefile | 1 +
> drivers/gpu/drm/bridge/innosilicon/Kconfig | 6 +
> drivers/gpu/drm/bridge/innosilicon/Makefile | 2 +
> .../gpu/drm/bridge/innosilicon/inno-hdmi.c | 376 ++++++
> .../gpu/drm/bridge/innosilicon/inno-hdmi.h | 34 +
> drivers/gpu/drm/rockchip/Kconfig | 1 +
> drivers/gpu/drm/rockchip/Makefile | 2 +-
> drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c | 690 +++++++++++
> .../{inno_hdmi.h => inno_hdmi-rockchip.h} | 0
> drivers/gpu/drm/rockchip/inno_hdmi.c | 1025 -----------------
> include/drm/bridge/inno_hdmi.h | 56 +
> 13 files changed, 1171 insertions(+), 1026 deletions(-)
> create mode 100644 drivers/gpu/drm/bridge/innosilicon/Kconfig
> create mode 100644 drivers/gpu/drm/bridge/innosilicon/Makefile
> create mode 100644 drivers/gpu/drm/bridge/innosilicon/inno-hdmi.c
> create mode 100644 drivers/gpu/drm/bridge/innosilicon/inno-hdmi.h
> create mode 100644 drivers/gpu/drm/rockchip/inno_hdmi-rockchip.c
> rename drivers/gpu/drm/rockchip/{inno_hdmi.h => inno_hdmi-rockchip.h} (100%)
> delete mode 100644 drivers/gpu/drm/rockchip/inno_hdmi.c
> create mode 100644 include/drm/bridge/inno_hdmi.h
>
> diff --git a/MAINTAINERS b/MAINTAINERS
> index f787dd625497..7766ee0bdd74 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -7439,6 +7439,8 @@ S: Maintained
> T: git https://gitlab.freedesktop.org/drm/misc/kernel.git
> F: Documentation/devicetree/bindings/display/bridge/innosilicon,inno-hdmi.yaml
> F: Documentation/devicetree/bindings/display/starfive/
> +F: drivers/gpu/drm/bridge/innosilicon/
> +F: include/drm/bridge/inno_hdmi.h
>
> DRM DRIVER FOR SYNAPTICS R63353 PANELS
> M: Michael Trimarchi <michael@...rulasolutions.com>
> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
> index 683cb33805b2..37be5dd5213f 100644
> --- a/drivers/gpu/drm/bridge/Kconfig
> +++ b/drivers/gpu/drm/bridge/Kconfig
> @@ -423,6 +423,8 @@ source "drivers/gpu/drm/bridge/cadence/Kconfig"
>
> source "drivers/gpu/drm/bridge/imx/Kconfig"
>
> +source "drivers/gpu/drm/bridge/innosilicon/Kconfig"
> +
> source "drivers/gpu/drm/bridge/synopsys/Kconfig"
>
> endmenu
> diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
> index 3daf803ce80b..866d1e0fd8aa 100644
> --- a/drivers/gpu/drm/bridge/Makefile
> +++ b/drivers/gpu/drm/bridge/Makefile
> @@ -41,4 +41,5 @@ obj-$(CONFIG_DRM_ITE_IT66121) += ite-it66121.o
> obj-y += analogix/
> obj-y += cadence/
> obj-y += imx/
> +obj-y += innosilicon/
> obj-y += synopsys/
> diff --git a/drivers/gpu/drm/bridge/innosilicon/Kconfig b/drivers/gpu/drm/bridge/innosilicon/Kconfig
> new file mode 100644
> index 000000000000..73dbed3b1c4d
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/innosilicon/Kconfig
> @@ -0,0 +1,6 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +config DRM_INNO_HDMI
> + tristate
> + help
> + Support the common interface which is part of the INNO
> + Designware HDMI block.
> diff --git a/drivers/gpu/drm/bridge/innosilicon/Makefile b/drivers/gpu/drm/bridge/innosilicon/Makefile
> new file mode 100644
> index 000000000000..3b3a961ab9fb
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/innosilicon/Makefile
> @@ -0,0 +1,2 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +obj-$(CONFIG_DRM_INNO_HDMI) += inno-hdmi.o
> diff --git a/drivers/gpu/drm/bridge/innosilicon/inno-hdmi.c b/drivers/gpu/drm/bridge/innosilicon/inno-hdmi.c
> new file mode 100644
> index 000000000000..c26132b41bdf
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/innosilicon/inno-hdmi.c
> @@ -0,0 +1,376 @@
> +// SPDX-License-Identifier: GPL-2.0-only
> +/*
> + * Copyright (C) Fuzhou Rockchip Electronics Co.Ltd
> + * Zheng Yang <zhengyang@...k-chips.com>
> + * Yakir Yang <ykk@...k-chips.com>
> + * Copyright (C) StarFive Technology Co., Ltd.
> + */
> +
> +#include <linux/irq.h>
> +#include <linux/clk.h>
> +#include <linux/delay.h>
> +#include <linux/err.h>
> +#include <linux/i2c.h>
> +#include <linux/mutex.h>
> +#include <linux/platform_device.h>
> +
> +#include <drm/bridge/inno_hdmi.h>
> +#include <drm/display/drm_hdmi_state_helper.h>
> +#include <drm/drm_atomic.h>
> +#include <drm/drm_atomic_helper.h>
> +#include <drm/drm_edid.h>
> +#include <drm/drm_of.h>
> +#include <drm/drm_print.h>
> +#include <drm/drm_probe_helper.h>
> +#include <drm/drm_bridge.h>
> +#include <drm/drm_bridge_connector.h>
> +
> +#include "inno-hdmi.h"
> +
> +u8 hdmi_readb(struct inno_hdmi *hdmi, u16 offset)
> +{
> + return readl_relaxed(hdmi->regs + (offset) * 0x04);
> +}
> +EXPORT_SYMBOL_GPL(hdmi_readb);
Not to mention that hdmi_foo() is too generic. Please use some common
prefix through the file. At least inno_hdmi_foo() will be much better.
--
With best wishes
Dmitry
Powered by blists - more mailing lists