From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Yan Subject: Re: [PATCH v7 4/7] staging: imx-drm: imx-hdmi: move imx-hdmi to bridge/dw-hdmi Date: Tue, 11 Nov 2014 22:41:50 +0800 Message-ID: <5462202E.2080809@rock-chips.com> References: <1415710229-11935-1-git-send-email-andy.yan@rock-chips.com> <1415710398-12120-1-git-send-email-andy.yan@rock-chips.com> <54621A3D.9090406@imgtec.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <54621A3D.9090406-1AXoQHu6uovQT0dZR+AlfA@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Zubair Lutfullah Kakakhel , airlied-cv59FeDIM0c@public.gmane.org, heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org, fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org, rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org Cc: devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Arnd Bergmann , Josh Boyer , Greg Kroah-Hartman , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Inki Dae , linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Rob Herring , Sean Paul , djkurtz-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, Philipp Zabel , ykk-TNX95d0MmH7DzftRWevZcw@public.gmane.org, Grant Likely , Dave Airlie , Shawn Guo , jay.xu-TNX95d0MmH7DzftRWevZcw@public.gmane.org, Lucas Stach List-Id: devicetree@vger.kernel.org On 2014=E5=B9=B411=E6=9C=8811=E6=97=A5 22:16, Zubair Lutfullah Kakakhel= wrote: > Hi Andy, > > On 11/11/14 12:53, Andy Yan wrote: >> the original imx hdmi driver is under staging/imx-drm, >> which depends on imx-drm, so move the imx hdmi drvier out > Spelling mistake. ^'driver' > >> to drm/bridge and rename imx-hdmi to dw-hdmi > ^dw_hdmi thanks , these will be fixed in v8 >> Signed-off-by: Andy Yan >> >> --- >> >> Changes in v7: None >> Changes in v6: None >> Changes in v5: None >> Changes in v4: None >> Changes in v3: None >> Changes in v2: >> - use git format -M to generate these patch >> >> drivers/gpu/drm/bridge/Kconfig | 5 + >> drivers/gpu/drm/bridge/Makefile | 1 + >> .../imx-hdmi.c =3D> gpu/drm/bridge/dw_hdmi.c} | 281 +++++++= ++++---------- >> .../imx-hdmi.h =3D> gpu/drm/bridge/dw_hdmi.h} | 46 +--- >> drivers/staging/imx-drm/Kconfig | 1 + >> drivers/staging/imx-drm/Makefile | 2 +- >> drivers/staging/imx-drm/dw_hdmi-imx.c | 70 ++--- >> include/drm/bridge/dw_hdmi.h | 57 +++++ >> 8 files changed, 243 insertions(+), 220 deletions(-) >> rename drivers/{staging/imx-drm/imx-hdmi.c =3D> gpu/drm/bridge/dw_= hdmi.c} (83%) >> rename drivers/{staging/imx-drm/imx-hdmi.h =3D> gpu/drm/bridge/dw_= hdmi.h} (97%) >> create mode 100644 include/drm/bridge/dw_hdmi.h >> >> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge= /Kconfig >> index 884923f..26162ef 100644 >> --- a/drivers/gpu/drm/bridge/Kconfig >> +++ b/drivers/gpu/drm/bridge/Kconfig >> @@ -3,3 +3,8 @@ config DRM_PTN3460 >> depends on DRM >> select DRM_KMS_HELPER >> ---help--- >> + >> +config DRM_DW_HDMI >> + bool "Synopsys DesignWare High-Definition Multimedia Interface" >> + depends on DRM >> + select DRM_KMS_HELPER >> diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridg= e/Makefile >> index b4733e1..d8a8cfd 100644 >> --- a/drivers/gpu/drm/bridge/Makefile >> +++ b/drivers/gpu/drm/bridge/Makefile >> @@ -1,3 +1,4 @@ >> ccflags-y :=3D -Iinclude/drm >> =20 >> obj-$(CONFIG_DRM_PTN3460) +=3D ptn3460.o >> +obj-$(CONFIG_DRM_DW_HDMI) +=3D dw_hdmi.o >> diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/gpu/drm/br= idge/dw_hdmi.c >> similarity index 83% >> rename from drivers/staging/imx-drm/imx-hdmi.c >> rename to drivers/gpu/drm/bridge/dw_hdmi.c >> index c7e5f12..e9f0dfe 100644 >> --- a/drivers/staging/imx-drm/imx-hdmi.c >> +++ b/drivers/gpu/drm/bridge/dw_hdmi.c >> @@ -6,8 +6,7 @@ >> * the Free Software Foundation; either version 2 of the License, = or >> * (at your option) any later version. >> * >> - * SH-Mobile High-Definition Multimedia Interface (HDMI) driver >> - * for SLISHDMI13T and SLIPHDMIT IP cores > ... > >> diff --git a/drivers/staging/imx-drm/imx-hdmi.h b/drivers/gpu/drm/br= idge/dw_hdmi.h >> similarity index 97% >> rename from drivers/staging/imx-drm/imx-hdmi.h >> rename to drivers/gpu/drm/bridge/dw_hdmi.h >> index e67d60d..b8412a9 100644 >> --- a/drivers/staging/imx-drm/imx-hdmi.h >> +++ b/drivers/gpu/drm/bridge/dw_hdmi.h >> @@ -7,8 +7,8 @@ >> * (at your option) any later version. >> */ >> =20 >> -#ifndef __IMX_HDMI_H__ >> -#define __IMX_HDMI_H__ >> +#ifndef __DW_HDMI__ >> +#define __DW_HDMI__ >> =20 >> /* Identification Registers */ >> #define HDMI_DESIGN_ID 0x0000 >> @@ -1030,46 +1030,4 @@ enum { >> HDMI_A_VIDPOLCFG_HSYNCPOL_ACTIVE_LOW =3D 0x0, >> }; >> =20 >> -enum { >> - RES_8, >> - RES_10, >> - RES_12, >> - RES_MAX, >> -}; >> - >> -enum imx_hdmi_devtype { >> - IMX6Q_HDMI, >> - IMX6DL_HDMI, >> -}; >> - >> -struct mpll_config { >> - unsigned long mpixelclock; >> - struct { >> - u16 cpce; >> - u16 gmp; >> - } res[RES_MAX]; >> -}; >> - >> -struct curr_ctrl { >> - unsigned long mpixelclock; >> - u16 curr[RES_MAX]; >> -}; >> - >> -struct imx_hdmi_plat_data { >> - void * (*setup)(struct platform_device *pdev); >> - void (*exit)(void *priv); >> - void (*encoder_commit)(void *priv, struct drm_encoder *encoder); >> - void (*encoder_prepare)(struct drm_connector *connector, >> - struct drm_encoder *encoder); >> - enum drm_mode_status (*mode_valid)(struct drm_connector *connector= , >> - struct drm_display_mode *mode); >> - const struct mpll_config *mpll_cfg; >> - const struct curr_ctrl *cur_ctr; >> - enum imx_hdmi_devtype dev_type; >> - >> -}; >> - >> -int imx_hdmi_platform_register(struct platform_device *pdev, >> - const struct imx_hdmi_plat_data *plat_data); >> -int imx_hdmi_platform_unregister(struct platform_device *pdev); > Doesn't this change belong in the previous splitting patch? in previous splitting patch we put these in staging/imx-drm/imx-hd= mi.h now we move these common struct to include/drm/bridge/dw-hdmi.h > >> #endif /* __IMX_HDMI_H__ */ >> diff --git a/drivers/staging/imx-drm/Kconfig b/drivers/staging/imx-d= rm/Kconfig >> index ab31848..560e1d3 100644 >> --- a/drivers/staging/imx-drm/Kconfig >> +++ b/drivers/staging/imx-drm/Kconfig >> @@ -50,5 +50,6 @@ config DRM_IMX_IPUV3 >> config DRM_IMX_HDMI >> tristate "Freescale i.MX DRM HDMI" >> depends on DRM_IMX >> + select DRM_DW_HDMI >> help >> Choose this if you want to use HDMI on i.MX6. >> diff --git a/drivers/staging/imx-drm/Makefile b/drivers/staging/imx-= drm/Makefile >> index 809027d..f3ecd89 100644 >> --- a/drivers/staging/imx-drm/Makefile >> +++ b/drivers/staging/imx-drm/Makefile >> @@ -9,4 +9,4 @@ obj-$(CONFIG_DRM_IMX_LDB) +=3D imx-ldb.o >> =20 >> imx-ipuv3-crtc-objs :=3D ipuv3-crtc.o ipuv3-plane.o >> obj-$(CONFIG_DRM_IMX_IPUV3) +=3D imx-ipuv3-crtc.o >> -obj-$(CONFIG_DRM_IMX_HDMI) +=3D imx-hdmi.o dw_hdmi-imx.o >> +obj-$(CONFIG_DRM_IMX_HDMI) +=3D dw_hdmi-imx.o >> diff --git a/drivers/staging/imx-drm/dw_hdmi-imx.c b/drivers/staging= /imx-drm/dw_hdmi-imx.c >> index 0db978e..4b48ea6 100644 >> --- a/drivers/staging/imx-drm/dw_hdmi-imx.c >> +++ b/drivers/staging/imx-drm/dw_hdmi-imx.c > All other files in imx-drm/ are named imx-xyz. > > no underscore either. > > I wonder if they are ok with dw_hdmi-imx.c > > How about imx-dw-hdmi.c > and imx-dw-hdmi.h ? I see some dw ip drivers like dw-mmc and dwmac have name style like dw_xxx.c for core driver, dw_xx_yy.c for platform driver, so I keep the same with it. >> @@ -10,14 +10,14 @@ >> #include >> #include >> #include >> +#include >> #include