Re: [PATCH v6 2/4] [media] platform: Add Synopsys Designware HDMI RX Controller Driver
On 07/07/17 11:34, Jose Abreu wrote: > On 06-07-2017 21:52, kbuild test robot wrote: >>drivers/media//platform/dwc/dw-hdmi-rx.c: In function >> 'dw_hdmi_registered': drivers/media//platform/dwc/dw-hdmi-rx.c:1452:9: error: implicit declaration of function 'v4l2_async_subnotifier_register' [-Werror=implicit-function-declaration] >> return v4l2_async_subnotifier_register(&dw_dev->sd, >> ^~~ >>drivers/media//platform/dwc/dw-hdmi-rx.c: In function >> 'dw_hdmi_unregistered': drivers/media//platform/dwc/dw-hdmi-rx.c:1462:2: error: implicit declaration of function 'v4l2_async_subnotifier_unregister' [-Werror=implicit-function-declaration] >> v4l2_async_subnotifier_unregister(&dw_dev->v4l2_notifier); > > This one is expected. Required patch was not merged yet. > >> ^ >>drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_parse_dt': >>drivers/media//platform/dwc/dw-hdmi-rx.c:1555:22: warning: unused >> variable 'notifier' [-Wunused-variable] >> struct device_node *notifier, *phy_node, *np = dw_dev->of_node; >> ^~~~ >>drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_rx_probe': >>drivers/media//platform/dwc/dw-hdmi-rx.c:1765:1: warning: label 'err_phy' >> defined but not used [-Wunused-label] >> err_phy: >> ^~~ >>cc1: some warnings being treated as errors >> >> > > These two is due to cec not being enabled. I hate to wrap this > around a #ifdef but is either this or extract cec to a separate > file, which I don't think is the best solution because the cec > code is quite small. The notifier functions can also be used if CEC_NOTIFIER isn't set. See cec-notifier.h for the stub functions. That will help somewhat. Regards, Hans
Re: [PATCH v6 2/4] [media] platform: Add Synopsys Designware HDMI RX Controller Driver
On 06-07-2017 21:52, kbuild test robot wrote: >drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_registered': >>> drivers/media//platform/dwc/dw-hdmi-rx.c:1452:9: error: implicit >>> declaration of function 'v4l2_async_subnotifier_register' >>> [-Werror=implicit-function-declaration] > return v4l2_async_subnotifier_register(&dw_dev->sd, > ^~~ >drivers/media//platform/dwc/dw-hdmi-rx.c: In function > 'dw_hdmi_unregistered': >>> drivers/media//platform/dwc/dw-hdmi-rx.c:1462:2: error: implicit >>> declaration of function 'v4l2_async_subnotifier_unregister' >>> [-Werror=implicit-function-declaration] > v4l2_async_subnotifier_unregister(&dw_dev->v4l2_notifier); This one is expected. Required patch was not merged yet. > ^ >drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_parse_dt': >drivers/media//platform/dwc/dw-hdmi-rx.c:1555:22: warning: unused variable > 'notifier' [-Wunused-variable] > struct device_node *notifier, *phy_node, *np = dw_dev->of_node; > ^~~~ >drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_rx_probe': >drivers/media//platform/dwc/dw-hdmi-rx.c:1765:1: warning: label 'err_phy' > defined but not used [-Wunused-label] > err_phy: > ^~~ >cc1: some warnings being treated as errors > > These two is due to cec not being enabled. I hate to wrap this around a #ifdef but is either this or extract cec to a separate file, which I don't think is the best solution because the cec code is quite small. Best regards, Jose Miguel Abreu
Re: [PATCH v6 2/4] [media] platform: Add Synopsys Designware HDMI RX Controller Driver
Hi Jose, [auto build test ERROR on linuxtv-media/master] [also build test ERROR on next-20170706] [cannot apply to v4.12] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Jose-Abreu/Synopsys-Designware-HDMI-Video-Capture-Controller-PHY/20170707-041312 base: git://linuxtv.org/media_tree.git master config: blackfin-allyesconfig (attached as .config) compiler: bfin-uclinux-gcc (GCC) 6.2.0 reproduce: wget https://raw.githubusercontent.com/01org/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=blackfin All errors (new ones prefixed by >>): drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_registered': >> drivers/media//platform/dwc/dw-hdmi-rx.c:1452:9: error: implicit declaration >> of function 'v4l2_async_subnotifier_register' >> [-Werror=implicit-function-declaration] return v4l2_async_subnotifier_register(&dw_dev->sd, ^~~ drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_unregistered': >> drivers/media//platform/dwc/dw-hdmi-rx.c:1462:2: error: implicit declaration >> of function 'v4l2_async_subnotifier_unregister' >> [-Werror=implicit-function-declaration] v4l2_async_subnotifier_unregister(&dw_dev->v4l2_notifier); ^ drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_parse_dt': drivers/media//platform/dwc/dw-hdmi-rx.c:1555:22: warning: unused variable 'notifier' [-Wunused-variable] struct device_node *notifier, *phy_node, *np = dw_dev->of_node; ^~~~ drivers/media//platform/dwc/dw-hdmi-rx.c: In function 'dw_hdmi_rx_probe': drivers/media//platform/dwc/dw-hdmi-rx.c:1765:1: warning: label 'err_phy' defined but not used [-Wunused-label] err_phy: ^~~ cc1: some warnings being treated as errors vim +/v4l2_async_subnotifier_register +1452 drivers/media//platform/dwc/dw-hdmi-rx.c 1446 return ret; 1447 } 1448 1449 cec_register_cec_notifier(dw_dev->cec_adap, dw_dev->cec_notifier); 1450 dw_dev->registered = true; 1451 > 1452 return v4l2_async_subnotifier_register(&dw_dev->sd, 1453 &dw_dev->v4l2_notifier); 1454 } 1455 1456 static void dw_hdmi_unregistered(struct v4l2_subdev *sd) 1457 { 1458 struct dw_hdmi_dev *dw_dev = to_dw_dev(sd); 1459 1460 cec_unregister_adapter(dw_dev->cec_adap); 1461 cec_notifier_put(dw_dev->cec_notifier); > 1462 v4l2_async_subnotifier_unregister(&dw_dev->v4l2_notifier); 1463 } 1464 1465 static const struct v4l2_subdev_core_ops dw_hdmi_sd_core_ops = { --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation .config.gz Description: application/gzip
[PATCH v6 2/4] [media] platform: Add Synopsys Designware HDMI RX Controller Driver
This is an initial submission for the Synopsys Designware HDMI RX Controller Driver. This driver interacts with a phy driver so that a communication between them is created and a video pipeline is configured. The controller + phy pipeline can then be integrated into a fully featured system that can be able to receive video up to 4k@60Hz with deep color 48bit RGB, depending on the platform. Although, this initial version does not yet handle deep color modes. This driver was implemented as a standard V4L2 subdevice and its main features are: - Internal state machine that reconfigures phy until the video is not stable - JTAG communication with phy - Inter-module communication with phy driver - Debug write/read ioctls Some notes: - RX sense controller (cable connection/disconnection) must be handled by the platform wrapper as this is not integrated into the controller RTL - The same goes for EDID ROM's - ZCAL calibration is needed only in FPGA platforms, in ASIC this is not needed - The state machine is not an ideal solution as it creates a kthread but it is needed because some sources might not be very stable at sending the video (i.e. we must react accordingly). Signed-off-by: Jose Abreu Cc: Carlos Palminha Cc: Mauro Carvalho Chehab Cc: Hans Verkuil Cc: Sylwester Nawrocki Changes from v5: - Removed HDCP 1.4 support (Hans) - Removed some CEC debug messages (Hans) - Add s_dv_timings callback (Hans) - Add V4L2_CID_DV_RX_POWER_PRESENT ctrl (Hans) Changes from v4: - Add flag V4L2_SUBDEV_FL_HAS_DEVNODE (Sylwester) - Remove some comments and change some messages to dev_dbg (Sylwester) - Use v4l2_async_subnotifier_register() (Sylwester) Changes from v3: - Use v4l2 async API (Sylwester) - Do not block waiting for phy - Do not use busy waiting delays (Sylwester) - Simplify dw_hdmi_power_on (Sylwester) - Use clock API (Sylwester) - Use compatible string (Sylwester) - Minor fixes (Sylwester) Changes from v2: - Address review comments from Hans regarding CEC - Use CEC notifier - Enable SCDC Changes from v1: - Add support for CEC - Correct typo errors - Correctly detect interlaced video modes - Correct VIC parsing Changes from RFC: - Add support for HDCP 1.4 - Fixup HDMI_VIC not being parsed (Hans) - Send source change signal when powering off (Hans) - Add a "wait stable delay" - Detect interlaced video modes (Hans) - Restrain g/s_register from reading/writing to HDCP regs (Hans) --- drivers/media/platform/dwc/Kconfig | 15 + drivers/media/platform/dwc/Makefile |1 + drivers/media/platform/dwc/dw-hdmi-rx.c | 1809 +++ drivers/media/platform/dwc/dw-hdmi-rx.h | 441 include/media/dwc/dw-hdmi-rx-pdata.h| 70 ++ 5 files changed, 2336 insertions(+) create mode 100644 drivers/media/platform/dwc/dw-hdmi-rx.c create mode 100644 drivers/media/platform/dwc/dw-hdmi-rx.h create mode 100644 include/media/dwc/dw-hdmi-rx-pdata.h diff --git a/drivers/media/platform/dwc/Kconfig b/drivers/media/platform/dwc/Kconfig index 361d38d..3ddccde 100644 --- a/drivers/media/platform/dwc/Kconfig +++ b/drivers/media/platform/dwc/Kconfig @@ -6,3 +6,18 @@ config VIDEO_DWC_HDMI_PHY_E405 To compile this driver as a module, choose M here. The module will be called dw-hdmi-phy-e405. + +config VIDEO_DWC_HDMI_RX + tristate "Synopsys Designware HDMI Receiver driver" + depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API + help + Support for Synopsys Designware HDMI RX controller. + + To compile this driver as a module, choose M here. The module + will be called dw-hdmi-rx. + +config VIDEO_DWC_HDMI_RX_CEC + bool + depends on VIDEO_DWC_HDMI_RX + select CEC_CORE + select CEC_NOTIFIER diff --git a/drivers/media/platform/dwc/Makefile b/drivers/media/platform/dwc/Makefile index fc3b62c..cd04ca9 100644 --- a/drivers/media/platform/dwc/Makefile +++ b/drivers/media/platform/dwc/Makefile @@ -1 +1,2 @@ obj-$(CONFIG_VIDEO_DWC_HDMI_PHY_E405) += dw-hdmi-phy-e405.o +obj-$(CONFIG_VIDEO_DWC_HDMI_RX) += dw-hdmi-rx.o diff --git a/drivers/media/platform/dwc/dw-hdmi-rx.c b/drivers/media/platform/dwc/dw-hdmi-rx.c new file mode 100644 index 000..a7ae5a3 --- /dev/null +++ b/drivers/media/platform/dwc/dw-hdmi-rx.c @@ -0,0 +1,1809 @@ +/* + * Synopsys Designware HDMI Receiver controller driver + * + * This Synopsys dw-hdmi-rx software and associated documentation + * (hereinafter the "Software") is an unsupported proprietary work of + * Synopsys, Inc. unless otherwise expressly agreed to in writing between + * Synopsys and you. The Software IS NOT an item of Licensed Software or a + * Licensed Pr