RE: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.

2024-06-25 Thread Keith Zhao


> -Original Message-
> From: Dmitry Baryshkov 
> Sent: 2024年6月24日 4:51
> To: Keith Zhao 
> Cc: andrzej.ha...@intel.com; neil.armstr...@linaro.org; rf...@kernel.org;
> laurent.pinch...@ideasonboard.com; jo...@kwiboo.se;
> jernej.skra...@gmail.com; maarten.lankho...@linux.intel.com;
> mrip...@kernel.org; tzimmerm...@suse.de; airl...@gmail.com;
> dan...@ffwll.ch; r...@kernel.org; krzk...@kernel.org; conor...@kernel.org;
> h...@rock-chips.com; he...@sntech.de; andy@rock-chips.com; Xingyu Wu
> ; p.za...@pengutronix.de; Jack Zhu
> ; Shengyang Chen
> ; dri-devel@lists.freedesktop.org;
> devicet...@vger.kernel.org; linux-ker...@vger.kernel.org;
> linux-arm-ker...@lists.infradead.org
> Subject: Re: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.
> 
> Hi Keith,
> 
> On Sun, Jun 23, 2024 at 07:16:47AM GMT, Keith Zhao wrote:
> > > On Tue, May 21, 2024 at 06:58:11PM +0800, keith wrote:
> > > > +}
> > > > +
> > > > +static inline void dc_set_clear(struct dc_hw *hw, u32 reg, u32
> > > > +set, u32 clear) {
> > > > +   u32 value = dc_read(hw, reg);
> > > > +
> > > > +   value &= ~clear;
> > > > +   value |= set;
> > > > +   dc_write(hw, reg, value);
> > >
> > > regmap_update_bits?
> >
> > regmap_update_bits follows 4 steps:
> >
> > 1、ret = _regmap_read(map, reg, ); .
> >
> > 2、tmp = orig & ~mask;
> > 3、tmp |= val & mask;
> > ..
> > 4、ret = _regmap_write(map, reg, tmp);
> > If the value out of mask range
> > It will just clear the mask bir
> >
> > dc_set_clear will do clear and set without limit.
> >
> > Maybe the name should be dc_clear_set
> 
> This is not really better. regmap_update_bits() has clear semantics of 
> updating a
> value in the field that is defined by a mask. You function is just clearing 
> some bits
> and setting other bits. It's not obvious whether it is a mask and value, 
> several
> concurrent flags or something else.
> 
> Even if you are not going to switch to regmaps (you don't have to), please use
> mask & value instead.
> 
Ok got it
> > }
> > > > +static void load_rgb_to_yuv(struct dc_hw *hw, u32 offset, s16
> > > > +*table)
> > >
> > > Is there any reason why load_rgb_to_yuv differs from two other
> > > functions?
> > >
> > load_rgb_to_yuv matches crtcs
> >
> > load_yuv_to_rgb matches planes
> > load_rgb_to_rgb matches planes
> 
> Then these functins should have that reflected in their names (and also
> documented, why). If the CSC programming interface is similar, please split 
> the
> implementation to have common code and different data to be used for
> programming.
> 
Ok got it

> > the coefficient(table) is diff between load_rgb_to_yuv and
> > load_yuv_to_rgb
> 
> > > > +void plane_hw_update_scale(struct vs_dc *dc, struct drm_rect
> > > > +*src, struct
> > > drm_rect *dst,
> > > > +  u8 id, u8 display_id, unsigned int 
> > > > rotation); void
> > > > +plane_hw_update_blend(struct vs_dc *dc, u16 alpha, u16
> > > pixel_blend_mode,
> > > > +  u8 id, u8 display_id);
> > >
> > > Could you please settle on a single prefix for all your function names?
> > > Ideally it should be close to the driver name. It's hard to
> > > understand that the function comes from the verisilicon driver if
> > > its name starts from dc_ or especially with plane_.
> > Yes  starting with plane_ is not a good idea ,i will add vs_ _ ,
> > thanks
> > >
> > > I'd strongly suggest to stop defining anything outside of the
> > > selected
> > I don't quite understand what "the selected" means, I hope you can
> > fill in some specific details about it Thanks
> 
> "the selected vs_ namespace". So prefix all function names and all structures
> with vs_
Ok, got it.
> 
> 
> --
> With best wishes
> Dmitry


Re: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.

2024-06-23 Thread Dmitry Baryshkov
Hi Keith,

On Sun, Jun 23, 2024 at 07:16:47AM GMT, Keith Zhao wrote:
> > On Tue, May 21, 2024 at 06:58:11PM +0800, keith wrote:
> > > +}
> > > +
> > > +static inline void dc_set_clear(struct dc_hw *hw, u32 reg, u32 set, u32 
> > > clear)
> > > +{
> > > + u32 value = dc_read(hw, reg);
> > > +
> > > + value &= ~clear;
> > > + value |= set;
> > > + dc_write(hw, reg, value);
> > 
> > regmap_update_bits?
> 
> regmap_update_bits follows 4 steps:
> 
> 1、ret = _regmap_read(map, reg, );
> .
> 
> 2、tmp = orig & ~mask;
> 3、tmp |= val & mask;
> ..
> 4、ret = _regmap_write(map, reg, tmp);
> If the value out of mask range
> It will just clear the mask bir
> 
> dc_set_clear will do clear and set without limit.
> 
> Maybe the name should be dc_clear_set

This is not really better. regmap_update_bits() has clear semantics of
updating a value in the field that is defined by a mask. You function is
just clearing some bits and setting other bits. It's not obvious whether
it is a mask and value, several concurrent flags or something else.

Even if you are not going to switch to regmaps (you don't have to),
please use mask & value instead.

>   }
> > > +static void load_rgb_to_yuv(struct dc_hw *hw, u32 offset, s16 *table)
> > 
> > Is there any reason why load_rgb_to_yuv differs from two other
> > functions?
> > 
> load_rgb_to_yuv matches crtcs
> 
> load_yuv_to_rgb matches planes
> load_rgb_to_rgb matches planes

Then these functins should have that reflected in their names (and also
documented, why). If the CSC programming interface is similar, please
split the implementation to have common code and different data to be
used for programming.

> the coefficient(table) is diff between load_rgb_to_yuv and load_yuv_to_rgb

> > > +void plane_hw_update_scale(struct vs_dc *dc, struct drm_rect *src, struct
> > drm_rect *dst,
> > > +u8 id, u8 display_id, unsigned int rotation);
> > > +void plane_hw_update_blend(struct vs_dc *dc, u16 alpha, u16
> > pixel_blend_mode,
> > > +u8 id, u8 display_id);
> > 
> > Could you please settle on a single prefix for all your function names?
> > Ideally it should be close to the driver name. It's hard to understand
> > that the function comes from the verisilicon driver if its name starts
> > from dc_ or especially with plane_.
> Yes  starting with plane_ is not a good idea ,i will add vs_
> _ , thanks  
> > 
> > I'd strongly suggest to stop defining anything outside of the selected
> I don't quite understand what "the selected" means, 
> I hope you can fill in some specific details about it
> Thanks

"the selected vs_ namespace". So prefix all function names and all
structures with vs_


-- 
With best wishes
Dmitry


RE: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.

2024-06-23 Thread Keith Zhao
Hi Dmitry:

> -Original Message-
> From: Dmitry Baryshkov 
> Sent: 2024年5月22日 4:51
> To: Keith Zhao 
> Cc: andrzej.ha...@intel.com; neil.armstr...@linaro.org; rf...@kernel.org;
> laurent.pinch...@ideasonboard.com; jo...@kwiboo.se;
> jernej.skra...@gmail.com; maarten.lankho...@linux.intel.com;
> mrip...@kernel.org; tzimmerm...@suse.de; airl...@gmail.com;
> dan...@ffwll.ch; r...@kernel.org; krzk...@kernel.org; conor...@kernel.org;
> h...@rock-chips.com; he...@sntech.de; andy@rock-chips.com; Xingyu Wu
> ; p.za...@pengutronix.de; Jack Zhu
> ; Shengyang Chen
> ; dri-devel@lists.freedesktop.org;
> devicet...@vger.kernel.org; linux-ker...@vger.kernel.org;
> linux-arm-ker...@lists.infradead.org
> Subject: Re: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.
> 
> On Tue, May 21, 2024 at 06:58:11PM +0800, keith wrote:
> > add hardware base api for vs drm
> 
> 
> Commit message is nearly missing. Please describe your hardware.
Ok it will be modified next
> 
> >
> > Signed-off-by: keith 
> 
> Full name please
> 
Ok it will be modified next
> > ---
> >  MAINTAINERS|1 +
> >  drivers/gpu/drm/Kconfig|2 +
> >  drivers/gpu/drm/Makefile   |1 +
> >  drivers/gpu/drm/verisilicon/Kconfig|   13 +
> >  drivers/gpu/drm/verisilicon/Makefile   |5 +
> >  drivers/gpu/drm/verisilicon/vs_dc_hw.c | 1060
> 
> >  drivers/gpu/drm/verisilicon/vs_dc_hw.h |  493 +++
> >  drivers/gpu/drm/verisilicon/vs_type.h  |   84 ++
> >  8 files changed, 1659 insertions(+)
> >  create mode 100644 drivers/gpu/drm/verisilicon/Kconfig
> >  create mode 100644 drivers/gpu/drm/verisilicon/Makefile
> >  create mode 100644 drivers/gpu/drm/verisilicon/vs_dc_hw.c
> >  create mode 100644 drivers/gpu/drm/verisilicon/vs_dc_hw.h
> >  create mode 100644 drivers/gpu/drm/verisilicon/vs_type.h
> >
> > diff --git a/MAINTAINERS b/MAINTAINERS
> > index cf2d66f88a83..9cb376f76f74 100644
> > --- a/MAINTAINERS
> > +++ b/MAINTAINERS
> > @@ -7156,6 +7156,7 @@ T:git
> https://gitlab.freedesktop.org/drm/misc/kernel.git
> >  F:
>   Documentation/devicetree/bindings/display/bridge/innosilicon,inno-hdmi.y
> aml
> >  F: Documentation/devicetree/bindings/display/starfive/
> >  F: drivers/gpu/drm/bridge/innosilicon/
> > +F: drivers/gpu/drm/verisilicon
> >  F: include/drm/bridge/inno_hdmi.h
> >
> >  DRM DRIVER FOR SYNAPTICS R63353 PANELS
> > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> > index 026444eeb5c6..5413d87ef1d6 100644
> > --- a/drivers/gpu/drm/Kconfig
> > +++ b/drivers/gpu/drm/Kconfig
> > @@ -423,6 +423,8 @@ source "drivers/gpu/drm/sprd/Kconfig"
> >
> >  source "drivers/gpu/drm/imagination/Kconfig"
> >
> > +source "drivers/gpu/drm/verisilicon/Kconfig"
> > +
> >  config DRM_HYPERV
> > tristate "DRM Support for Hyper-V synthetic video device"
> > depends on DRM && PCI && MMU && HYPERV
> > diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> > index f9ca4f8fa6c5..cb27092b1672 100644
> > --- a/drivers/gpu/drm/Makefile
> > +++ b/drivers/gpu/drm/Makefile
> > @@ -219,3 +219,4 @@ obj-y   += solomon/
> >  obj-$(CONFIG_DRM_SPRD) += sprd/
> >  obj-$(CONFIG_DRM_LOONGSON) += loongson/
> >  obj-$(CONFIG_DRM_POWERVR) += imagination/
> > +obj-$(CONFIG_DRM_VERISILICON_DC8200) += verisilicon/
> > diff --git a/drivers/gpu/drm/verisilicon/Kconfig
> b/drivers/gpu/drm/verisilicon/Kconfig
> > new file mode 100644
> > index ..2d733f93439e
> > --- /dev/null
> > +++ b/drivers/gpu/drm/verisilicon/Kconfig
> > @@ -0,0 +1,13 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +config DRM_VERISILICON_DC8200
> > +   tristate "DRM Support for VeriSilicon DC8200"
> > +   depends on DRM
> > +   select DRM_KMS_HELPER
> > +   select DRM_GEM_DMA_HELPER
> > +   select CMA
> > +   select DMA_CMA
> > +   help
> > + Choose this option if you have a VeriSilicon DC8200 chipset.
> > + This driver provides VeriSilicon kernel mode
> > + setting and buffer management. It does not
> > + provide 2D or 3D acceleration.
> > diff --git a/drivers/gpu/drm/verisilicon/Makefile
> b/drivers/gpu/drm/verisilicon/Makefile
> > new file mode 100644
> > index ..7da54b259940
> > --- /dev/null
> > +++ b/drivers/gpu/drm/verisilicon/Makefile
> > @@ -0,0 +1,5 @@
> > +# SPDX-License-Iden

Re: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.

2024-05-21 Thread kernel test robot
Hi keith,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master next-20240521]
[cannot apply to robh/for-next rockchip/for-next v6.9]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/keith/dt-bindings-display-Add-YAML-schema-for-JH7110-display-pipeline/20240521-110316
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:
https://lore.kernel.org/r/20240521105817.3301-5-keith.zhao%40starfivetech.com
patch subject: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.
config: arm-kismet-CONFIG_CMA-CONFIG_DRM_VERISILICON_DC8200-0-0 
(https://download.01.org/0day-ci/archive/20240522/202405220946.u4oq9bg2-...@intel.com/config)
reproduce: 
(https://download.01.org/0day-ci/archive/20240522/202405220946.u4oq9bg2-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202405220946.u4oq9bg2-...@intel.com/

kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for CMA when selected by 
>> DRM_VERISILICON_DC8200
   WARNING: unmet direct dependencies detected for CMA
 Depends on [n]: MMU [=n]
 Selected by [y]:
 - DRM_VERISILICON_DC8200 [=y] && HAS_IOMEM [=y] && DRM [=y]
   
   WARNING: unmet direct dependencies detected for DMA_CMA
 Depends on [n]: HAVE_DMA_CONTIGUOUS [=n] && CMA [=y]
 Selected by [y]:
 - DRM_VERISILICON_DC8200 [=y] && HAS_IOMEM [=y] && DRM [=y]

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


Re: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.

2024-05-21 Thread kernel test robot
Hi keith,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master next-20240521]
[cannot apply to robh/for-next rockchip/for-next v6.9]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/keith/dt-bindings-display-Add-YAML-schema-for-JH7110-display-pipeline/20240521-110316
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:
https://lore.kernel.org/r/20240521105817.3301-5-keith.zhao%40starfivetech.com
patch subject: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.
config: arc-randconfig-r123-20240522 
(https://download.01.org/0day-ci/archive/20240522/202405220449.sjkbwf6f-...@intel.com/config)
compiler: arc-elf-gcc (GCC) 13.2.0
reproduce: 
(https://download.01.org/0day-ci/archive/20240522/202405220449.sjkbwf6f-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202405220449.sjkbwf6f-...@intel.com/

sparse warnings: (new ones prefixed by >>)
   drivers/gpu/drm/verisilicon/vs_dc_hw.c: note: in included file (through 
include/linux/mmzone.h, include/linux/gfp.h, include/linux/stackdepot.h, ...):
   include/linux/page-flags.h:241:46: sparse: sparse: self-comparison always 
evaluates to false
   include/linux/page-flags.h:241:46: sparse: sparse: self-comparison always 
evaluates to false
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ got void * @@
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: expected void 
volatile [noderef] __iomem *addr
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: got void *
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ got void * @@
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: expected void 
volatile [noderef] __iomem *addr
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: got void *
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ got void * @@
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: expected void 
volatile [noderef] __iomem *addr
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: got void *
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ got void * @@
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: expected void 
volatile [noderef] __iomem *addr
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: got void *
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ got void * @@
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: expected void 
volatile [noderef] __iomem *addr
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: got void *
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ got void * @@
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: expected void 
volatile [noderef] __iomem *addr
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: got void *
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ got void * @@
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: expected void 
volatile [noderef] __iomem *addr
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: got void *
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ got void * @@
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: expected void 
volatile [noderef] __iomem *addr
   drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: got void *
>> drivers/gpu/drm/verisilicon/vs_dc_hw.c:266:9: sparse: sparse: incorrect type 
>> in argument 2 (different address spaces) @@ expected void volatile 
>> [noderef] __iomem *addr @@ 

Re: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.

2024-05-21 Thread kernel test robot
Hi keith,

kernel test robot noticed the following build warnings:

[auto build test WARNING on drm-misc/drm-misc-next]
[also build test WARNING on linus/master next-20240521]
[cannot apply to robh/for-next rockchip/for-next v6.9]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:
https://github.com/intel-lab-lkp/linux/commits/keith/dt-bindings-display-Add-YAML-schema-for-JH7110-display-pipeline/20240521-110316
base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
patch link:
https://lore.kernel.org/r/20240521105817.3301-5-keith.zhao%40starfivetech.com
patch subject: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.
config: arc-kismet-CONFIG_DMA_CMA-CONFIG_DRM_VERISILICON_DC8200-0-0 
(https://download.01.org/0day-ci/archive/20240522/202405220427.lohtdi8t-...@intel.com/config)
reproduce: 
(https://download.01.org/0day-ci/archive/20240522/202405220427.lohtdi8t-...@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot 
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202405220427.lohtdi8t-...@intel.com/

kismet warnings: (new ones prefixed by >>)
>> kismet: WARNING: unmet direct dependencies detected for DMA_CMA when 
>> selected by DRM_VERISILICON_DC8200
   WARNING: unmet direct dependencies detected for DMA_CMA
 Depends on [n]: HAVE_DMA_CONTIGUOUS [=n] && CMA [=y]
 Selected by [y]:
 - DRM_VERISILICON_DC8200 [=y] && HAS_IOMEM [=y] && DRM [=y]

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


Re: [PATCH v4 04/10] drm/vs: Add hardware funcs for vs.

2024-05-21 Thread Dmitry Baryshkov
On Tue, May 21, 2024 at 06:58:11PM +0800, keith wrote:
> add hardware base api for vs drm


Commit message is nearly missing. Please describe your hardware.

> 
> Signed-off-by: keith 

Full name please

> ---
>  MAINTAINERS|1 +
>  drivers/gpu/drm/Kconfig|2 +
>  drivers/gpu/drm/Makefile   |1 +
>  drivers/gpu/drm/verisilicon/Kconfig|   13 +
>  drivers/gpu/drm/verisilicon/Makefile   |5 +
>  drivers/gpu/drm/verisilicon/vs_dc_hw.c | 1060 
>  drivers/gpu/drm/verisilicon/vs_dc_hw.h |  493 +++
>  drivers/gpu/drm/verisilicon/vs_type.h  |   84 ++
>  8 files changed, 1659 insertions(+)
>  create mode 100644 drivers/gpu/drm/verisilicon/Kconfig
>  create mode 100644 drivers/gpu/drm/verisilicon/Makefile
>  create mode 100644 drivers/gpu/drm/verisilicon/vs_dc_hw.c
>  create mode 100644 drivers/gpu/drm/verisilicon/vs_dc_hw.h
>  create mode 100644 drivers/gpu/drm/verisilicon/vs_type.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index cf2d66f88a83..9cb376f76f74 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -7156,6 +7156,7 @@ 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:   drivers/gpu/drm/verisilicon
>  F:   include/drm/bridge/inno_hdmi.h
>  
>  DRM DRIVER FOR SYNAPTICS R63353 PANELS
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 026444eeb5c6..5413d87ef1d6 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -423,6 +423,8 @@ source "drivers/gpu/drm/sprd/Kconfig"
>  
>  source "drivers/gpu/drm/imagination/Kconfig"
>  
> +source "drivers/gpu/drm/verisilicon/Kconfig"
> +
>  config DRM_HYPERV
>   tristate "DRM Support for Hyper-V synthetic video device"
>   depends on DRM && PCI && MMU && HYPERV
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index f9ca4f8fa6c5..cb27092b1672 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -219,3 +219,4 @@ obj-y += solomon/
>  obj-$(CONFIG_DRM_SPRD) += sprd/
>  obj-$(CONFIG_DRM_LOONGSON) += loongson/
>  obj-$(CONFIG_DRM_POWERVR) += imagination/
> +obj-$(CONFIG_DRM_VERISILICON_DC8200) += verisilicon/
> diff --git a/drivers/gpu/drm/verisilicon/Kconfig 
> b/drivers/gpu/drm/verisilicon/Kconfig
> new file mode 100644
> index ..2d733f93439e
> --- /dev/null
> +++ b/drivers/gpu/drm/verisilicon/Kconfig
> @@ -0,0 +1,13 @@
> +# SPDX-License-Identifier: GPL-2.0
> +config DRM_VERISILICON_DC8200
> + tristate "DRM Support for VeriSilicon DC8200"
> + depends on DRM
> + select DRM_KMS_HELPER
> + select DRM_GEM_DMA_HELPER
> + select CMA
> + select DMA_CMA
> + help
> +   Choose this option if you have a VeriSilicon DC8200 chipset.
> +   This driver provides VeriSilicon kernel mode
> +   setting and buffer management. It does not
> +   provide 2D or 3D acceleration.
> diff --git a/drivers/gpu/drm/verisilicon/Makefile 
> b/drivers/gpu/drm/verisilicon/Makefile
> new file mode 100644
> index ..7da54b259940
> --- /dev/null
> +++ b/drivers/gpu/drm/verisilicon/Makefile
> @@ -0,0 +1,5 @@
> +# SPDX-License-Identifier: GPL-2.0
> +
> +vs_drm-objs := vs_dc_hw.o
> +
> +obj-$(CONFIG_DRM_VERISILICON_DC8200) += vs_drm.o
> diff --git a/drivers/gpu/drm/verisilicon/vs_dc_hw.c 
> b/drivers/gpu/drm/verisilicon/vs_dc_hw.c
> new file mode 100644
> index ..69f020f8352f
> --- /dev/null
> +++ b/drivers/gpu/drm/verisilicon/vs_dc_hw.c
> @@ -0,0 +1,1060 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Copyright (C) 2023 VeriSilicon Holdings Co., Ltd.

No changes in 2024?

> + */
> +
> +#include 
> +#include 
> +#include 
> +//#include 

Either uncomment or drop.

> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "vs_dc_hw.h"
> +
> +static const u32 horkernel[] = {
> + 0x, 0x2000, 0x2000, 0x,
> + 0x, 0x, 0x23fd1c03, 0x,
> + 0x, 0x, 0x181f, 0x27e1,
> + 0x, 0x, 0x, 0x2b981468,
> + 0x, 0x, 0x, 0x10f0,
> + 0x2f10, 0x, 0x, 0x,
> + 0x32390dc7, 0x, 0x, 0x,
> + 0x0af5, 0x350b, 0x, 0x,
> + 0x, 0x3781087f, 0x, 0x,
> + 0x, 0x0666, 0x399a, 0x,
> + 0x, 0x, 0x3b5904a7, 0x,
> + 0x, 0x, 0x033c, 0x3cc4,
> + 0x, 0x, 0x, 0x3de1021f,
> + 0x, 0x, 0x, 0x0147,
> + 0x3eb9, 0x, 0x, 0x,
> + 0x3f5300ad, 0x, 0x, 0x,
> + 0x0048, 0x3fb8, 0x,