Commit 84c6c303 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'media/v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "Some bug fixes:

   - Don't fail build if atomisp has warnings

   - Some CEC Kconfig changes to allow it to be used by DRM without
     media dependencies

   - A race fix at RC initialization code

   - A driver fix at rainshadow-cec

  IMHO, the one that affects most people in this series is a build fix:
  if you try to build the Kernel with W=1 or using gcc7 and
  all[yes|mod]config, build will fail due to -Werror at atomisp
  makefiles"

* tag 'media/v4.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  [media] rc-core: race condition during ir_raw_event_register()
  [media] cec: drop MEDIA_CEC_DEBUG
  [media] cec: rename MEDIA_CEC_NOTIFIER to CEC_NOTIFIER
  [media] cec: select CEC_CORE instead of depend on it
  [media] rainshadow-cec: ensure exit_loop is intialized
  [media] atomisp: don't treat warnings as errors
parents ba7b2387 963761a0
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
# Multimedia device configuration # Multimedia device configuration
# #
config CEC_CORE
tristate
config CEC_NOTIFIER
bool
menuconfig MEDIA_SUPPORT menuconfig MEDIA_SUPPORT
tristate "Multimedia support" tristate "Multimedia support"
depends on HAS_IOMEM depends on HAS_IOMEM
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
media-objs := media-device.o media-devnode.o media-entity.o media-objs := media-device.o media-devnode.o media-entity.o
obj-$(CONFIG_CEC_CORE) += cec/
# #
# I2C drivers should come before other drivers, otherwise they'll fail # I2C drivers should come before other drivers, otherwise they'll fail
# when compiled as builtin drivers # when compiled as builtin drivers
...@@ -26,6 +24,8 @@ obj-$(CONFIG_DVB_CORE) += dvb-core/ ...@@ -26,6 +24,8 @@ obj-$(CONFIG_DVB_CORE) += dvb-core/
# There are both core and drivers at RC subtree - merge before drivers # There are both core and drivers at RC subtree - merge before drivers
obj-y += rc/ obj-y += rc/
obj-$(CONFIG_CEC_CORE) += cec/
# #
# Finally, merge the drivers that require the core # Finally, merge the drivers that require the core
# #
......
config CEC_CORE
tristate
depends on MEDIA_CEC_SUPPORT
default y
config MEDIA_CEC_NOTIFIER
bool
config MEDIA_CEC_RC config MEDIA_CEC_RC
bool "HDMI CEC RC integration" bool "HDMI CEC RC integration"
depends on CEC_CORE && RC_CORE depends on CEC_CORE && RC_CORE
---help--- ---help---
Pass on CEC remote control messages to the RC framework. Pass on CEC remote control messages to the RC framework.
config MEDIA_CEC_DEBUG
bool "HDMI CEC debugfs interface"
depends on CEC_CORE && DEBUG_FS
---help---
Turns on the DebugFS interface for CEC devices.
cec-objs := cec-core.o cec-adap.o cec-api.o cec-edid.o cec-objs := cec-core.o cec-adap.o cec-api.o cec-edid.o
ifeq ($(CONFIG_MEDIA_CEC_NOTIFIER),y) ifeq ($(CONFIG_CEC_NOTIFIER),y)
cec-objs += cec-notifier.o cec-objs += cec-notifier.o
endif endif
......
...@@ -1864,7 +1864,7 @@ void cec_monitor_all_cnt_dec(struct cec_adapter *adap) ...@@ -1864,7 +1864,7 @@ void cec_monitor_all_cnt_dec(struct cec_adapter *adap)
WARN_ON(call_op(adap, adap_monitor_all_enable, 0)); WARN_ON(call_op(adap, adap_monitor_all_enable, 0));
} }
#ifdef CONFIG_MEDIA_CEC_DEBUG #ifdef CONFIG_DEBUG_FS
/* /*
* Log the current state of the CEC adapter. * Log the current state of the CEC adapter.
* Very useful for debugging. * Very useful for debugging.
......
...@@ -187,7 +187,7 @@ static void cec_devnode_unregister(struct cec_devnode *devnode) ...@@ -187,7 +187,7 @@ static void cec_devnode_unregister(struct cec_devnode *devnode)
put_device(&devnode->dev); put_device(&devnode->dev);
} }
#ifdef CONFIG_MEDIA_CEC_NOTIFIER #ifdef CONFIG_CEC_NOTIFIER
static void cec_cec_notify(struct cec_adapter *adap, u16 pa) static void cec_cec_notify(struct cec_adapter *adap, u16 pa)
{ {
cec_s_phys_addr(adap, pa, false); cec_s_phys_addr(adap, pa, false);
...@@ -323,7 +323,7 @@ int cec_register_adapter(struct cec_adapter *adap, ...@@ -323,7 +323,7 @@ int cec_register_adapter(struct cec_adapter *adap,
} }
dev_set_drvdata(&adap->devnode.dev, adap); dev_set_drvdata(&adap->devnode.dev, adap);
#ifdef CONFIG_MEDIA_CEC_DEBUG #ifdef CONFIG_DEBUG_FS
if (!top_cec_dir) if (!top_cec_dir)
return 0; return 0;
...@@ -355,7 +355,7 @@ void cec_unregister_adapter(struct cec_adapter *adap) ...@@ -355,7 +355,7 @@ void cec_unregister_adapter(struct cec_adapter *adap)
adap->rc = NULL; adap->rc = NULL;
#endif #endif
debugfs_remove_recursive(adap->cec_dir); debugfs_remove_recursive(adap->cec_dir);
#ifdef CONFIG_MEDIA_CEC_NOTIFIER #ifdef CONFIG_CEC_NOTIFIER
if (adap->notifier) if (adap->notifier)
cec_notifier_unregister(adap->notifier); cec_notifier_unregister(adap->notifier);
#endif #endif
...@@ -395,7 +395,7 @@ static int __init cec_devnode_init(void) ...@@ -395,7 +395,7 @@ static int __init cec_devnode_init(void)
return ret; return ret;
} }
#ifdef CONFIG_MEDIA_CEC_DEBUG #ifdef CONFIG_DEBUG_FS
top_cec_dir = debugfs_create_dir("cec", NULL); top_cec_dir = debugfs_create_dir("cec", NULL);
if (IS_ERR_OR_NULL(top_cec_dir)) { if (IS_ERR_OR_NULL(top_cec_dir)) {
pr_warn("cec: Failed to create debugfs cec dir\n"); pr_warn("cec: Failed to create debugfs cec dir\n");
......
...@@ -220,7 +220,8 @@ config VIDEO_ADV7604 ...@@ -220,7 +220,8 @@ config VIDEO_ADV7604
config VIDEO_ADV7604_CEC config VIDEO_ADV7604_CEC
bool "Enable Analog Devices ADV7604 CEC support" bool "Enable Analog Devices ADV7604 CEC support"
depends on VIDEO_ADV7604 && CEC_CORE depends on VIDEO_ADV7604
select CEC_CORE
---help--- ---help---
When selected the adv7604 will support the optional When selected the adv7604 will support the optional
HDMI CEC feature. HDMI CEC feature.
...@@ -240,7 +241,8 @@ config VIDEO_ADV7842 ...@@ -240,7 +241,8 @@ config VIDEO_ADV7842
config VIDEO_ADV7842_CEC config VIDEO_ADV7842_CEC
bool "Enable Analog Devices ADV7842 CEC support" bool "Enable Analog Devices ADV7842 CEC support"
depends on VIDEO_ADV7842 && CEC_CORE depends on VIDEO_ADV7842
select CEC_CORE
---help--- ---help---
When selected the adv7842 will support the optional When selected the adv7842 will support the optional
HDMI CEC feature. HDMI CEC feature.
...@@ -478,7 +480,8 @@ config VIDEO_ADV7511 ...@@ -478,7 +480,8 @@ config VIDEO_ADV7511
config VIDEO_ADV7511_CEC config VIDEO_ADV7511_CEC
bool "Enable Analog Devices ADV7511 CEC support" bool "Enable Analog Devices ADV7511 CEC support"
depends on VIDEO_ADV7511 && CEC_CORE depends on VIDEO_ADV7511
select CEC_CORE
---help--- ---help---
When selected the adv7511 will support the optional When selected the adv7511 will support the optional
HDMI CEC feature. HDMI CEC feature.
......
...@@ -501,8 +501,9 @@ if CEC_PLATFORM_DRIVERS ...@@ -501,8 +501,9 @@ if CEC_PLATFORM_DRIVERS
config VIDEO_SAMSUNG_S5P_CEC config VIDEO_SAMSUNG_S5P_CEC
tristate "Samsung S5P CEC driver" tristate "Samsung S5P CEC driver"
depends on CEC_CORE && (PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST) depends on PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST
select MEDIA_CEC_NOTIFIER select CEC_CORE
select CEC_NOTIFIER
---help--- ---help---
This is a driver for Samsung S5P HDMI CEC interface. It uses the This is a driver for Samsung S5P HDMI CEC interface. It uses the
generic CEC framework interface. generic CEC framework interface.
...@@ -511,8 +512,9 @@ config VIDEO_SAMSUNG_S5P_CEC ...@@ -511,8 +512,9 @@ config VIDEO_SAMSUNG_S5P_CEC
config VIDEO_STI_HDMI_CEC config VIDEO_STI_HDMI_CEC
tristate "STMicroelectronics STiH4xx HDMI CEC driver" tristate "STMicroelectronics STiH4xx HDMI CEC driver"
depends on CEC_CORE && (ARCH_STI || COMPILE_TEST) depends on ARCH_STI || COMPILE_TEST
select MEDIA_CEC_NOTIFIER select CEC_CORE
select CEC_NOTIFIER
---help--- ---help---
This is a driver for STIH4xx HDMI CEC interface. It uses the This is a driver for STIH4xx HDMI CEC interface. It uses the
generic CEC framework interface. generic CEC framework interface.
......
...@@ -26,7 +26,8 @@ config VIDEO_VIVID ...@@ -26,7 +26,8 @@ config VIDEO_VIVID
config VIDEO_VIVID_CEC config VIDEO_VIVID_CEC
bool "Enable CEC emulation support" bool "Enable CEC emulation support"
depends on VIDEO_VIVID && CEC_CORE depends on VIDEO_VIVID
select CEC_CORE
---help--- ---help---
When selected the vivid module will emulate the optional When selected the vivid module will emulate the optional
HDMI CEC feature. HDMI CEC feature.
......
...@@ -211,7 +211,7 @@ EXPORT_SYMBOL_GPL(ir_raw_event_set_idle); ...@@ -211,7 +211,7 @@ EXPORT_SYMBOL_GPL(ir_raw_event_set_idle);
*/ */
void ir_raw_event_handle(struct rc_dev *dev) void ir_raw_event_handle(struct rc_dev *dev)
{ {
if (!dev->raw) if (!dev->raw || !dev->raw->thread)
return; return;
wake_up_process(dev->raw->thread); wake_up_process(dev->raw->thread);
...@@ -490,6 +490,7 @@ int ir_raw_event_register(struct rc_dev *dev) ...@@ -490,6 +490,7 @@ int ir_raw_event_register(struct rc_dev *dev)
{ {
int rc; int rc;
struct ir_raw_handler *handler; struct ir_raw_handler *handler;
struct task_struct *thread;
if (!dev) if (!dev)
return -EINVAL; return -EINVAL;
...@@ -507,13 +508,15 @@ int ir_raw_event_register(struct rc_dev *dev) ...@@ -507,13 +508,15 @@ int ir_raw_event_register(struct rc_dev *dev)
* because the event is coming from userspace * because the event is coming from userspace
*/ */
if (dev->driver_type != RC_DRIVER_IR_RAW_TX) { if (dev->driver_type != RC_DRIVER_IR_RAW_TX) {
dev->raw->thread = kthread_run(ir_raw_event_thread, dev->raw, thread = kthread_run(ir_raw_event_thread, dev->raw, "rc%u",
"rc%u", dev->minor); dev->minor);
if (IS_ERR(dev->raw->thread)) { if (IS_ERR(thread)) {
rc = PTR_ERR(dev->raw->thread); rc = PTR_ERR(thread);
goto out; goto out;
} }
dev->raw->thread = thread;
} }
mutex_lock(&ir_raw_handler_lock); mutex_lock(&ir_raw_handler_lock);
......
config USB_PULSE8_CEC config USB_PULSE8_CEC
tristate "Pulse Eight HDMI CEC" tristate "Pulse Eight HDMI CEC"
depends on USB_ACM && CEC_CORE depends on USB_ACM
select CEC_CORE
select SERIO select SERIO
select SERIO_SERPORT select SERIO_SERPORT
---help--- ---help---
......
config USB_RAINSHADOW_CEC config USB_RAINSHADOW_CEC
tristate "RainShadow Tech HDMI CEC" tristate "RainShadow Tech HDMI CEC"
depends on USB_ACM && CEC_CORE depends on USB_ACM
select CEC_CORE
select SERIO select SERIO
select SERIO_SERPORT select SERIO_SERPORT
---help--- ---help---
......
...@@ -119,7 +119,7 @@ static void rain_irq_work_handler(struct work_struct *work) ...@@ -119,7 +119,7 @@ static void rain_irq_work_handler(struct work_struct *work)
while (true) { while (true) {
unsigned long flags; unsigned long flags;
bool exit_loop; bool exit_loop = false;
char data; char data;
spin_lock_irqsave(&rain->buf_lock, flags); spin_lock_irqsave(&rain->buf_lock, flags);
......
...@@ -19,5 +19,3 @@ obj-$(CONFIG_VIDEO_AP1302) += ap1302.o ...@@ -19,5 +19,3 @@ obj-$(CONFIG_VIDEO_AP1302) += ap1302.o
obj-$(CONFIG_VIDEO_LM3554) += lm3554.o obj-$(CONFIG_VIDEO_LM3554) += lm3554.o
ccflags-y += -Werror
...@@ -4,5 +4,3 @@ imx1x5-objs := imx.o drv201.o ad5816g.o dw9714.o dw9719.o dw9718.o vcm.o otp.o o ...@@ -4,5 +4,3 @@ imx1x5-objs := imx.o drv201.o ad5816g.o dw9714.o dw9719.o dw9718.o vcm.o otp.o o
ov8858_driver-objs := ../ov8858.o dw9718.o vcm.o ov8858_driver-objs := ../ov8858.o dw9718.o vcm.o
obj-$(CONFIG_VIDEO_OV8858) += ov8858_driver.o obj-$(CONFIG_VIDEO_OV8858) += ov8858_driver.o
ccflags-y += -Werror
obj-$(CONFIG_VIDEO_OV5693) += ov5693.o obj-$(CONFIG_VIDEO_OV5693) += ov5693.o
ccflags-y += -Werror
...@@ -351,5 +351,5 @@ DEFINES := -DHRT_HW -DHRT_ISP_CSS_CUSTOM_HOST -DHRT_USE_VIR_ADDRS -D__HOST__ ...@@ -351,5 +351,5 @@ DEFINES := -DHRT_HW -DHRT_ISP_CSS_CUSTOM_HOST -DHRT_USE_VIR_ADDRS -D__HOST__
DEFINES += -DATOMISP_POSTFIX=\"css2400b0_v21\" -DISP2400B0 DEFINES += -DATOMISP_POSTFIX=\"css2400b0_v21\" -DISP2400B0
DEFINES += -DSYSTEM_hive_isp_css_2400_system -DISP2400 DEFINES += -DSYSTEM_hive_isp_css_2400_system -DISP2400
ccflags-y += $(INCLUDES) $(DEFINES) -fno-common -Werror ccflags-y += $(INCLUDES) $(DEFINES) -fno-common
...@@ -29,7 +29,7 @@ struct edid; ...@@ -29,7 +29,7 @@ struct edid;
struct cec_adapter; struct cec_adapter;
struct cec_notifier; struct cec_notifier;
#ifdef CONFIG_MEDIA_CEC_NOTIFIER #if IS_REACHABLE(CONFIG_CEC_CORE) && IS_ENABLED(CONFIG_CEC_NOTIFIER)
/** /**
* cec_notifier_get - find or create a new cec_notifier for the given device. * cec_notifier_get - find or create a new cec_notifier for the given device.
......
...@@ -173,7 +173,7 @@ struct cec_adapter { ...@@ -173,7 +173,7 @@ struct cec_adapter {
bool passthrough; bool passthrough;
struct cec_log_addrs log_addrs; struct cec_log_addrs log_addrs;
#ifdef CONFIG_MEDIA_CEC_NOTIFIER #ifdef CONFIG_CEC_NOTIFIER
struct cec_notifier *notifier; struct cec_notifier *notifier;
#endif #endif
...@@ -300,7 +300,7 @@ u16 cec_phys_addr_for_input(u16 phys_addr, u8 input); ...@@ -300,7 +300,7 @@ u16 cec_phys_addr_for_input(u16 phys_addr, u8 input);
*/ */
int cec_phys_addr_validate(u16 phys_addr, u16 *parent, u16 *port); int cec_phys_addr_validate(u16 phys_addr, u16 *parent, u16 *port);
#ifdef CONFIG_MEDIA_CEC_NOTIFIER #ifdef CONFIG_CEC_NOTIFIER
void cec_register_cec_notifier(struct cec_adapter *adap, void cec_register_cec_notifier(struct cec_adapter *adap,
struct cec_notifier *notifier); struct cec_notifier *notifier);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment