Support Nuvoton NPCM Video Capture/Encode Engine
Subsystems (4)
v3 cover Support Nuvoton NPCM Video Capture/Encode Engine
This patch series add DTS node, dt-bindings document and drivers for Video Capture/Differentiation Engine (VCD) and Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs.
VCD can capture/differentiate video data from digital or analog sources, then the ECE will compress the data into HEXTILE format.
HEXTILE compressed format is defined in Remote Framebuffer Protocol (RFC 6143) and is used by VNC features, so we also add a patch to support it.
Changes since v1:
- Add Hextile document and locate with vendor formats.
- Add video driver entry in MAINTAINERS
- Change config name to CONFIG_VIDEO_NPCM_VCD_ECE
- Reduce the waiting time after resetting the VCD/ECE module
- Correct data types of some variables
Marvin Lin (5):
arm: dts: Add node for NPCM Video Capture/Encode Engine
dt-bindings: media: Add dt-bindings for NPCM Video Capture/Encode
Engine
dt-bindings: arm/npcm: Add dt-bindings for Graphics Core Information
media: Add HEXTILE compressed format
drivers: media: platform: Add NPCM Video Capture/Encode Engine driver
.../bindings/arm/npcm/nuvoton,gfxi.yaml | 41 + .../bindings/media/nuvoton,npcm-video.yaml | 87 + .../media/v4l/pixfmt-reserved.rst | 7 + MAINTAINERS | 9 + arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 19 + drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 1 + drivers/media/platform/nuvoton/Kconfig | 12 + drivers/media/platform/nuvoton/Makefile | 2 + drivers/media/platform/nuvoton/npcm-video.c | 2064 +++++++++++++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 12 files changed, 2245 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/npcm/nuvoton,gfxi.yaml create mode 100644 Documentation/devicetree/bindings/media/nuvoton,npcm-video.yaml create mode 100644 drivers/media/platform/nuvoton/Kconfig create mode 100644 drivers/media/platform/nuvoton/Makefile create mode 100644 drivers/media/platform/nuvoton/npcm-video.c
Signature · 1 line
2.17.1
PATCH v3 1/5 arm: dts: Add node for NPCM Video Capture/Encode Engine
Add node for Video Capture/Differentiation Engine (VCD) and Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs. Tested with Nuvoton NPCM750 evaluation board.
--- arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
arch/arm/boot/dts/nuvoton-common-npcm7xx.dtsi +19 -0
@@ -178,6 +178,19 @@ status = "disabled"; }; + video: video@f0810000 { + compatible = "nuvoton,npcm750-video"; + reg = <0xf0810000 0x10000>, <0xf0820000 0x2000>; + reg-names = "vcd", "ece"; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; + resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_VCD>, + <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_ECE>; + reset-names = "vcd", "ece"; + nuvoton,syscon-gcr = <&gcr>; + nuvoton,syscon-gfxi = <&gfxi>; + status = "disabled"; + }; + apb { #address-cells = <1>; #size-cells = <1>;
@@ -553,6 +566,12 @@ pinctrl-0 = <&smb15_pins>; status = "disabled"; }; + + gfxi: gfxi@e000 { + compatible = "nuvoton,npcm750-gfxi", "syscon", + "simple-mfd"; + reg = <0xe000 0x100>; + }; }; };
Signature · 1 line
2.17.1
PATCH v3 2/5 dt-bindings: media: Add dt-bindings for NPCM Video Capture/Encode Engine
In reply to Marvin LinAdd dt-bindings document for NPCM Video Capture/Encode Engine.
--- .../bindings/media/nuvoton,npcm-video.yaml | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/nuvoton,npcm-video.yaml
Documentation/devicetree/bindings/media/nuvoton,npcm-video.yaml new file +87 -0
@@ -0,0 +1,87 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/media/nuvoton,npcm-video.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton NPCM Video Capture/Encode Engine Device Tree Bindings + +maintainers: + - Joseph Liu <[email protected]> + - Marvin Lin <[email protected]> + +description: | + Video Capture/Differentiation Engine (VCD) and Encoding Compression Engine + (ECE) present on Nuvoton NPCM SoCs. + +properties: + compatible: + enum: + - nuvoton,npcm750-video + - nuvoton,npcm845-video + + reg: + items: + - description: VCD registers + - description: ECE registers + + reg-names: + items: + - const: vcd + - const: ece + + interrupts: + maxItems: 1 + + resets: + items: + - description: VCD reset control + - description: ECE reset control + + reset-names: + items: + - const: vcd + - const: ece + + nuvoton,syscon-gcr: + $ref: /schemas/types.yaml#definitions/phandle + description: Phandle to the Global Control Register DT node + + nuvoton,syscon-gfxi: + $ref: /schemas/types.yaml#definitions/phandle + description: Phandle to the Graphics Core Information DT node + + memory-region: + description: + CMA pool to use for buffers allocation instead of the default CMA pool. + +required: + - compatible + - reg + - reg-names + - interrupts + - resets + - reset-names + - nuvoton,syscon-gcr + - nuvoton,syscon-gfxi + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + #include <dt-bindings/reset/nuvoton,npcm7xx-reset.h> + + video: video@f0810000 { + compatible = "nuvoton,npcm750-video"; + reg = <0xf0810000 0x10000>, + <0xf0820000 0x2000>; + reg-names = "vcd", "ece"; + interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>; + resets = <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_VCD>, + <&rstc NPCM7XX_RESET_IPSRST2 NPCM7XX_RESET_ECE>; + reset-names = "vcd", "ece"; + nuvoton,syscon-gcr = <&gcr>; + nuvoton,syscon-gfxi = <&gfxi>; + };
Signature · 1 line
2.17.1
PATCH v3 3/5 dt-bindings: arm/npcm: Add dt-bindings for Graphics Core Information
In reply to Marvin LinAdd dt-bindings document for Graphics Core Information (GFXI) node. It is necessary for the NPCM Video Capture/Encode Engine driver to retrieve Graphics core information.
--- .../bindings/arm/npcm/nuvoton,gfxi.yaml | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/npcm/nuvoton,gfxi.yaml
Documentation/devicetree/bindings/arm/npcm/nuvoton,gfxi.yaml new file +41 -0
@@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) + +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/arm/npcm/nuvoton,gfxi.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Graphics Core Information block in Nuvoton SoCs + +maintainers: + - Joseph Liu <[email protected]> + - Marvin Lin <[email protected]> + +description: + The Graphics Core Information (GFXI) are a block of registers in Nuvoton SoCs + that analyzes Graphics core behavior and provides inforomation in registers. + +properties: + compatible: + items: + - enum: + - nuvoton,npcm750-gfxi + - nuvoton,npcm845-gfxi + - const: syscon + - const: simple-mfd + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + gfxi: gfxi@e000 { + compatible = "nuvoton,npcm750-gfxi", "syscon", "simple-mfd"; + reg = <0xe000 0x100>; + };
Signature · 1 line
2.17.1
PATCH v3 4/5 media: Add HEXTILE compressed format
In reply to Marvin LinAdd HEXTILE compressed format. This format is defined in Remote Framebuffer Protocol (RFC 6143) and is used by Encoding Compression Engine present on Nuvoton NPCM SoCs.
--- Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 7 +++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 9 insertions(+)
Documentation/userspace-api/media/v4l/pixfmt-reserved.rst +7 -0
@@ -239,6 +239,13 @@ please make a proposal on the linux-media mailing list. It remains an opaque intermediate format and the MDP hardware must be used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``, ``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``. + * .. _V4L2-PIX-FMT-HEXTILE: + + - ``V4L2_PIX_FMT_HEXTILE`` + - 'HXTL' + - Compressed format used by Nuvoton NPCM video driver. This format is + defined in Remote Framebuffer Protocol (RFC 6143, chapter 7.7.4 Hextile + Encoding). .. raw:: latex \normalsize
drivers/media/v4l2-core/v4l2-ioctl.c +1 -0
@@ -1441,6 +1441,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SE401 : descr ="GSPCA SE401" ;break ;case V4L2_PIX_FMT_S5C_UYVY_JPG : descr ="S5C73MX interleaved UYVY/JPEG" ;break ;case V4L2_PIX_FMT_MT21C : descr ="Mediatek Compressed Format" ;break ; +case V4L2_PIX_FMT_HEXTILE : descr ="Hextile Compressed Format" ;break ;default :if (fmt->description[0 ])return ;
include/uapi/linux/videodev2.h +1 -0
@@ -746,6 +746,7 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I')/* Intel Planar Greyscale 10-bit and Depth 16-bit */ #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4')/* Intel 4-bit packed depth confidence information */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4')/* BTTV 8-bit dithered RGB */ +#define V4L2_PIX_FMT_HEXTILE v4l2_fourcc('H', 'X', 'T', 'L')/* Hextile compression */ /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ #define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b')/* IPU3 packed 10-bit BGGR bayer */
Signature · 1 line
2.17.1
Re: [PATCH v3 4/5] media: Add HEXTILE compressed format
Le vendredi 20 mai 2022 à 10:47 +0800, Marvin Lin a écrit :
Quoted 3 lines
Add HEXTILE compressed format. This format is defined in Remote Framebuffer Protocol (RFC 6143) and is used by Encoding Compression Engine present on Nuvoton NPCM SoCs.
Ah, ancient RFB compression. I also found that there is encoder/decoders part of FFMPEG and GStreamer VMNC (VMWare CODECs) and also a decoder in GStreamer RFB plugin. It is though an obsolete format for all of these technology, thanks for identifying clearly.
Quoted 50 lines
Signed-off-by Marvin Lin <[email protected]>--- Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 7 +++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 9 insertions(+)Documentation/userspace-api/media/v4l/pixfmt-reserved.rst +7
-0@@ -239,6 +239,13 @@ please make a proposal on the linux-media mailing list. It remains an opaque intermediate format and the MDP hardware must be used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``, ``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``. + * .. _V4L2-PIX-FMT-HEXTILE: + + - ``V4L2_PIX_FMT_HEXTILE`` + - 'HXTL' + - Compressed format used by Nuvoton NPCM video driver. This format is + defined in Remote Framebuffer Protocol (RFC 6143, chapter 7.7.4 Hextile + Encoding). .. raw:: latex \normalsizedrivers/media/v4l2-core/v4l2-ioctl.c +1
-0@@ -1441,6 +1441,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SE401 : descr ="GSPCA SE401" ;break ;case V4L2_PIX_FMT_S5C_UYVY_JPG : descr ="S5C73MX interleaved UYVY/JPEG" ;break ;case V4L2_PIX_FMT_MT21C : descr ="Mediatek Compressed Format" ;break ; +case V4L2_PIX_FMT_HEXTILE : descr ="Hextile Compressed Format" ;break ;default :if (fmt->description[0 ])return ;include/uapi/linux/videodev2.h +1
-0@@ -746,6 +746,7 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I')/* Intel Planar Greyscale 10-bit and Depth 16-bit */ #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4')/* Intel 4-bit packed depth confidence information */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4')/* BTTV 8-bit dithered RGB */ +#define V4L2_PIX_FMT_HEXTILE v4l2_fourcc('H', 'X', 'T', 'L')/* Hextile compression */ /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ #define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b')/* IPU3 packed 10-bit BGGR bayer */
Re: [PATCH v3 4/5] media: Add HEXTILE compressed format
Hi Nicolas,
Thanks for your review!
Regards,
Marvin
Nicolas Dufresne <[email protected]> 於 2022年5月21日 週六 上午2:43寫道:
Quoted 64 lines · Marvin Lin
Quoted 3 lines
Add HEXTILE compressed format. This format is defined in Remote Framebuffer Protocol (RFC 6143) and is used by Encoding Compression Engine present on Nuvoton NPCM SoCs.
Ah, ancient RFB compression. I also found that there is encoder/decoders part of FFMPEG and GStreamer VMNC (VMWare CODECs) and also a decoder in GStreamer RFB plugin. It is though an obsolete format for all of these technology, thanks for identifying clearly.
Reviewed-by Nicolas Dufresne <[email protected]>Quoted 50 lines
Signed-off-by Marvin Lin <[email protected]>--- Documentation/userspace-api/media/v4l/pixfmt-reserved.rst | 7 +++++++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h | 1 + 3 files changed, 9 insertions(+)Documentation/userspace-api/media/v4l/pixfmt-reserved.rst +7
-0@@ -239,6 +239,13 @@ please make a proposal on the linux-media mailing list. It remains an opaque intermediate format and the MDP hardware must be used to convert ``V4L2_PIX_FMT_MT21C`` to ``V4L2_PIX_FMT_NV12M``, ``V4L2_PIX_FMT_YUV420M`` or ``V4L2_PIX_FMT_YVU420``. + * .. _V4L2-PIX-FMT-HEXTILE: + + - ``V4L2_PIX_FMT_HEXTILE`` + - 'HXTL' + - Compressed format used by Nuvoton NPCM video driver. This format is + defined in Remote Framebuffer Protocol (RFC 6143, chapter 7.7.4 Hextile + Encoding). .. raw:: latex \normalsizedrivers/media/v4l2-core/v4l2-ioctl.c +1
-0@@ -1441,6 +1441,7 @@ static void v4l_fill_fmtdesc(struct v4l2_fmtdesc *fmt)case V4L2_PIX_FMT_SE401 : descr ="GSPCA SE401" ;break ;case V4L2_PIX_FMT_S5C_UYVY_JPG : descr ="S5C73MX interleaved UYVY/JPEG" ;break ;case V4L2_PIX_FMT_MT21C : descr ="Mediatek Compressed Format" ;break ; +case V4L2_PIX_FMT_HEXTILE : descr ="Hextile Compressed Format" ;break ;default :if (fmt->description[0 ])return ;include/uapi/linux/videodev2.h +1
-0@@ -746,6 +746,7 @@ struct v4l2_pix_format {#define V4L2_PIX_FMT_INZI v4l2_fourcc('I', 'N', 'Z', 'I')/* Intel Planar Greyscale 10-bit and Depth 16-bit */ #define V4L2_PIX_FMT_CNF4 v4l2_fourcc('C', 'N', 'F', '4')/* Intel 4-bit packed depth confidence information */ #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H', 'I', '2', '4')/* BTTV 8-bit dithered RGB */ +#define V4L2_PIX_FMT_HEXTILE v4l2_fourcc('H', 'X', 'T', 'L')/* Hextile compression */ /* 10bit raw bayer packed, 32 bytes for every 25 pixels, last LSB 6 bits unused */ #define V4L2_PIX_FMT_IPU3_SBGGR10 v4l2_fourcc('i', 'p', '3', 'b')/* IPU3 packed 10-bit BGGR bayer */
PATCH v3 5/5 drivers: media: platform: Add NPCM Video Capture/Encode Engine driver
In reply to Marvin LinAdd driver for Video Capture/Differentiation Engine (VCD) and Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs. The VCD can capture and differentiate video data from digital or analog sources, then the ECE will compress the data into HEXTILE format. This driver implements V4L2 interfaces to support OpenBMC KVM feature, also tested with VNC Viewer and openbmc/obmc-ikvm to verify the video output result.
--- MAINTAINERS | 9 + drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 1 + drivers/media/platform/nuvoton/Kconfig | 12 + drivers/media/platform/nuvoton/Makefile | 2 + drivers/media/platform/nuvoton/npcm-video.c | 2064 +++++++++++++++++++ 6 files changed, 2089 insertions(+) create mode 100644 drivers/media/platform/nuvoton/Kconfig create mode 100644 drivers/media/platform/nuvoton/Makefile create mode 100644 drivers/media/platform/nuvoton/npcm-video.c
MAINTAINERS +9 -0
@@ -2435,6 +2435,15 @@ F: drivers/*/*npcm* F: drivers/*/*/*npcm* F: include/dt-bindings/clock/nuvoton,npcm7xx-clock.h +ARM/NUVOTON NPCM VIDEO ENGINE DRIVER +M: Joseph Liu <[email protected]> +M: Marvin Lin <[email protected]> +L: [email protected] +L: [email protected] (moderated for non-subscribers) +S: Maintained +F: Documentation/devicetree/bindings/media/nuvoton,npcm-video.yaml +F: drivers/media/platform/nuvoton/ + ARM/NUVOTON WPCM450 ARCHITECTURE M: Jonathan Neuschäfer <[email protected]> L: [email protected] (moderated for non-subscribers)
drivers/media/platform/Kconfig +1 -0
@@ -72,6 +72,7 @@ source "drivers/media/platform/chips-media/Kconfig" source "drivers/media/platform/intel/Kconfig" source "drivers/media/platform/marvell/Kconfig" source "drivers/media/platform/mediatek/Kconfig" +source "drivers/media/platform/nuvoton/Kconfig" source "drivers/media/platform/nvidia/Kconfig" source "drivers/media/platform/nxp/Kconfig" source "drivers/media/platform/qcom/Kconfig"
drivers/media/platform/Makefile +1 -0
@@ -15,6 +15,7 @@ obj-y += chips-media/ obj-y += intel/ obj-y += marvell/ obj-y += mediatek/ +obj-y += nuvoton/ obj-y += nvidia/ obj-y += nxp/ obj-y += qcom/
drivers/media/platform/nuvoton/Kconfig new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0-only + +comment "Nuvoton media platform drivers" + +config VIDEO_NUVOTON_NPCM_VCD_ECE + tristate "Nuvoton NPCM Video Capture/Encode Engine driver" + depends on V4L_PLATFORM_DRIVERS + depends on VIDEO_DEV + select VIDEOBUF2_DMA_CONTIG + help + Support for the Video Capture/Differentiation Engine (VCD) and + Encoding Compression Engine (ECE) present on Nuvoton NPCM SoCs.
drivers/media/platform/nuvoton/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0-only +obj-$(CONFIG_VIDEO_NUVOTON_NPCM_VCD_ECE) += npcm-video.o
drivers/media/platform/nuvoton/npcm-video.c new file +2064 -0
2,064 lines not on this page · raw message
Signature · 1 line
2.17.1
kernel test robot
build botRe: [PATCH v3 5/5] drivers: media: platform: Add NPCM Video Capture/Encode Engine driver
I love your patch! Yet something to improve:
Hi Marvin,
I love your patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linux/master linus/master v5.18-rc7] [cannot apply to media-tree/master next-20220519]
[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]
url: https://github.com/intel-lab-lkp/linux/commits/Marvin-Lin/Support-Nuvoton-NPCM-Video-Capture-Encode-Engine/20220520-104901 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: x86_64-allmodconfig (https://download.01.org/0day-ci/archive/20220520/[email protected]/config) compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project e00cbbec06c08dc616a0d52a20f678b8fbd4e304)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/56e41b3b4b1a54f2096e810eda12259da495c686
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Marvin-Lin/Support-Nuvoton-NPCM-Video-Capture-Encode-Engine/20220520-104901 git checkout 56e41b3b4b1a54f2096e810eda12259da495c686
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/media/platform/nuvoton/
If you fix the issue, kindly add following tag where applicable
All errors (new ones prefixed by >>):
>> drivers/media/platform/nuvoton/npcm-video.c:2048:45: error: expected ';' after top level declarator
MODULE_DEVICE_TABLE(of, nuvoton_video_match)
^
;1 error generated.
vim +2048 drivers/media/platform/nuvoton/npcm-video.c
2047
> 2048 MODULE_DEVICE_TABLE(of, nuvoton_video_match)
2049
Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp
kernel test robot
build botRe: [PATCH v3 5/5] drivers: media: platform: Add NPCM Video Capture/Encode Engine driver
In reply to Marvin LinI love your patch! Yet something to improve:
Hi Marvin,
I love your patch! Yet something to improve:
[auto build test ERROR on robh/for-next]
[also build test ERROR on linux/master linus/master v5.18-rc7] [cannot apply to media-tree/master next-20220520]
[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]
url: https://github.com/intel-lab-lkp/linux/commits/Marvin-Lin/Support-Nuvoton-NPCM-Video-Capture-Encode-Engine/20220520-104901 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: ia64-allmodconfig (https://download.01.org/0day-ci/archive/20220521/[email protected]/config) compiler: ia64-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/intel-lab-lkp/linux/commit/56e41b3b4b1a54f2096e810eda12259da495c686
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Marvin-Lin/Support-Nuvoton-NPCM-Video-Capture-Encode-Engine/20220520-104901
git checkout 56e41b3b4b1a54f2096e810eda12259da495c686
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=ia64 SHELL=/bin/bash drivers/media/platform/nuvoton/
If you fix the issue, kindly add following tag where applicable
All errors (new ones prefixed by >>):
>> drivers/media/platform/nuvoton/npcm-video.c:2050:1: error: expected ',' or ';' before 'static'
2050 | static struct platform_driver nuvoton_video_driver = {
| ^~~~~~
In file included from drivers/media/platform/nuvoton/npcm-video.c:24:
drivers/media/platform/nuvoton/npcm-video.c: In function 'nuvoton_video_driver_init':
>> drivers/media/platform/nuvoton/npcm-video.c:2059:24: error: 'nuvoton_video_driver' undeclared (first use in this function); did you mean 'nuvoton_video_probe'?
2059 | module_platform_driver(nuvoton_video_driver);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:222:36: note: in definition of macro 'platform_driver_register'
222 | __platform_driver_register(drv, THIS_MODULE)
| ^~~
include/linux/platform_device.h:252:9: note: in expansion of macro 'module_driver'
252 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/media/platform/nuvoton/npcm-video.c:2059:1: note: in expansion of macro 'module_platform_driver'
2059 | module_platform_driver(nuvoton_video_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nuvoton/npcm-video.c:2059:24: note: each undeclared identifier is reported only once for each function it appears in
2059 | module_platform_driver(nuvoton_video_driver);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/platform_device.h:222:36: note: in definition of macro 'platform_driver_register'
222 | __platform_driver_register(drv, THIS_MODULE)
| ^~~
include/linux/platform_device.h:252:9: note: in expansion of macro 'module_driver'
252 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/media/platform/nuvoton/npcm-video.c:2059:1: note: in expansion of macro 'module_platform_driver'
2059 | module_platform_driver(nuvoton_video_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/device.h:32,
from drivers/media/platform/nuvoton/npcm-video.c:14:
drivers/media/platform/nuvoton/npcm-video.c: In function 'nuvoton_video_driver_exit':
>> drivers/media/platform/nuvoton/npcm-video.c:2059:24: error: 'nuvoton_video_driver' undeclared (first use in this function); did you mean 'nuvoton_video_probe'?
2059 | module_platform_driver(nuvoton_video_driver);
| ^~~~~~~~~~~~~~~~~~~~
include/linux/device/driver.h:267:24: note: in definition of macro 'module_driver'
267 | __unregister(&(__driver) , ##__VA_ARGS__); \
| ^~~~~~~~
drivers/media/platform/nuvoton/npcm-video.c:2059:1: note: in expansion of macro 'module_platform_driver'
2059 | module_platform_driver(nuvoton_video_driver);
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nuvoton/npcm-video.c: In function 'nuvoton_video_driver_init':
include/linux/device/driver.h:263:1: error: control reaches end of non-void function [-Werror=return-type]
263 | } \
| ^
include/linux/platform_device.h:252:9: note: in expansion of macro 'module_driver'
252 | module_driver(__platform_driver, platform_driver_register, \
| ^~~~~~~~~~~~~
drivers/media/platform/nuvoton/npcm-video.c:2059:1: note: in expansion of macro 'module_platform_driver'
2059 | module_platform_driver(nuvoton_video_driver);
| ^~~~~~~~~~~~~~~~~~~~~~ At top level:
drivers/media/platform/nuvoton/npcm-video.c:2020:12: warning: 'nuvoton_video_remove' defined but not used [-Wunused-function]
2020 | static int nuvoton_video_remove(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/media/platform/nuvoton/npcm-video.c:1944:12: warning: 'nuvoton_video_probe' defined but not used [-Wunused-function]
1944 | static int nuvoton_video_probe(struct platform_device *pdev)
| ^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +2050 drivers/media/platform/nuvoton/npcm-video.c
2049
> 2050 static struct platform_driver nuvoton_video_driver = {
2051 .driver = {
2052 .name = DEVICE_NAME,
2053 .of_match_table = nuvoton_video_match,
2054 },
2055 .probe = nuvoton_video_probe,
2056 .remove = nuvoton_video_remove,
2057 };
2058
> 2059 module_platform_driver(nuvoton_video_driver);2060
Signature · 2 lines
0-DAY CI Kernel Test Service https://01.org/lkp