media fixes for v4.12-rc4

-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZNnBiAAoJEAhfPr2O5OEV9bwP/1bus9tAw3AT+HxRSIaFFX8+
 DMDmJ6nZ4WQJ4fI04tKkUjpl+G2ImDGshdGgLht/YpaJRd6KgPqV+zWrAVX5/0e1
 mLyhjaALuk5M//JbkxEP95SWBOZ6SCIWlV/5oQRTNI86kO0gISxoCAsbumKlSSUC
 qTFmbmPp9siFpS43eZjVcgYIbwFx75qvLTc1+JRvxa2VhtMB5d4xYnXSpxlCvduj
 NN14KiphBgCOvyMQsi4q3H6ma8EL0sEtaukqPzXOnz6GGAIUUbDA23APM5H0LIIZ
 kYhO9ooez4dz1094ex1zSS/uQq2ogCTv7ShQseddNbHhOFG7Aq30AXLMEWeHaNp1
 fFb28CY3CBpNaYfjePbqIs8KKg3JxmJGmCGgW65p40UGUo1Itbpci5MqN8BjQAI8
 Ks1rf+V4iYQTr4QmQJQqCyJCljrsQbGMKZ9I67pmqfbqDunlH43Zr88DEWPv3rbW
 qac6U1vh108UHE/1KRZFjzvo31ToP+f+AwyVTXVeIi6vba2gvC8ASCJnZ/nGtO74
 Eb/GR0DtqvYGE6sXohbMywZ+8wRR6CdRVDC4YotQwaoghwnH10WPLg3JahECVMu7
 MbDtVvUHjbJ18cqwCW+J01gcuQxH/8Lx07T9T+pUFFanPBT7phPiQ/UAEPL1e3XO
 e4nFwX9h78wISBdy8Yx7
 =+jBV
 -----END PGP SIGNATURE-----

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
This commit is contained in:
Linus Torvalds 2017-06-06 09:37:44 -07:00
commit 84c6c3035b
19 changed files with 45 additions and 48 deletions

View File

@ -2,6 +2,12 @@
# Multimedia device configuration
#
config CEC_CORE
tristate
config CEC_NOTIFIER
bool
menuconfig MEDIA_SUPPORT
tristate "Multimedia support"
depends on HAS_IOMEM

View File

@ -4,8 +4,6 @@
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
# when compiled as builtin drivers
@ -26,6 +24,8 @@ obj-$(CONFIG_DVB_CORE) += dvb-core/
# There are both core and drivers at RC subtree - merge before drivers
obj-y += rc/
obj-$(CONFIG_CEC_CORE) += cec/
#
# Finally, merge the drivers that require the core
#

View File

@ -1,19 +1,5 @@
config CEC_CORE
tristate
depends on MEDIA_CEC_SUPPORT
default y
config MEDIA_CEC_NOTIFIER
bool
config MEDIA_CEC_RC
bool "HDMI CEC RC integration"
depends on CEC_CORE && RC_CORE
---help---
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.

View File

@ -1,6 +1,6 @@
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
endif

View File

@ -1864,7 +1864,7 @@ void cec_monitor_all_cnt_dec(struct cec_adapter *adap)
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.
* Very useful for debugging.

View File

@ -187,7 +187,7 @@ static void cec_devnode_unregister(struct cec_devnode *devnode)
put_device(&devnode->dev);
}
#ifdef CONFIG_MEDIA_CEC_NOTIFIER
#ifdef CONFIG_CEC_NOTIFIER
static void cec_cec_notify(struct cec_adapter *adap, u16 pa)
{
cec_s_phys_addr(adap, pa, false);
@ -323,7 +323,7 @@ int cec_register_adapter(struct cec_adapter *adap,
}
dev_set_drvdata(&adap->devnode.dev, adap);
#ifdef CONFIG_MEDIA_CEC_DEBUG
#ifdef CONFIG_DEBUG_FS
if (!top_cec_dir)
return 0;
@ -355,7 +355,7 @@ void cec_unregister_adapter(struct cec_adapter *adap)
adap->rc = NULL;
#endif
debugfs_remove_recursive(adap->cec_dir);
#ifdef CONFIG_MEDIA_CEC_NOTIFIER
#ifdef CONFIG_CEC_NOTIFIER
if (adap->notifier)
cec_notifier_unregister(adap->notifier);
#endif
@ -395,7 +395,7 @@ static int __init cec_devnode_init(void)
return ret;
}
#ifdef CONFIG_MEDIA_CEC_DEBUG
#ifdef CONFIG_DEBUG_FS
top_cec_dir = debugfs_create_dir("cec", NULL);
if (IS_ERR_OR_NULL(top_cec_dir)) {
pr_warn("cec: Failed to create debugfs cec dir\n");

View File

@ -220,7 +220,8 @@ config VIDEO_ADV7604
config VIDEO_ADV7604_CEC
bool "Enable Analog Devices ADV7604 CEC support"
depends on VIDEO_ADV7604 && CEC_CORE
depends on VIDEO_ADV7604
select CEC_CORE
---help---
When selected the adv7604 will support the optional
HDMI CEC feature.
@ -240,7 +241,8 @@ config VIDEO_ADV7842
config VIDEO_ADV7842_CEC
bool "Enable Analog Devices ADV7842 CEC support"
depends on VIDEO_ADV7842 && CEC_CORE
depends on VIDEO_ADV7842
select CEC_CORE
---help---
When selected the adv7842 will support the optional
HDMI CEC feature.
@ -478,7 +480,8 @@ config VIDEO_ADV7511
config VIDEO_ADV7511_CEC
bool "Enable Analog Devices ADV7511 CEC support"
depends on VIDEO_ADV7511 && CEC_CORE
depends on VIDEO_ADV7511
select CEC_CORE
---help---
When selected the adv7511 will support the optional
HDMI CEC feature.

View File

@ -501,8 +501,9 @@ if CEC_PLATFORM_DRIVERS
config VIDEO_SAMSUNG_S5P_CEC
tristate "Samsung S5P CEC driver"
depends on CEC_CORE && (PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST)
select MEDIA_CEC_NOTIFIER
depends on PLAT_S5P || ARCH_EXYNOS || COMPILE_TEST
select CEC_CORE
select CEC_NOTIFIER
---help---
This is a driver for Samsung S5P HDMI CEC interface. It uses the
generic CEC framework interface.
@ -511,8 +512,9 @@ config VIDEO_SAMSUNG_S5P_CEC
config VIDEO_STI_HDMI_CEC
tristate "STMicroelectronics STiH4xx HDMI CEC driver"
depends on CEC_CORE && (ARCH_STI || COMPILE_TEST)
select MEDIA_CEC_NOTIFIER
depends on ARCH_STI || COMPILE_TEST
select CEC_CORE
select CEC_NOTIFIER
---help---
This is a driver for STIH4xx HDMI CEC interface. It uses the
generic CEC framework interface.

View File

@ -26,7 +26,8 @@ config VIDEO_VIVID
config VIDEO_VIVID_CEC
bool "Enable CEC emulation support"
depends on VIDEO_VIVID && CEC_CORE
depends on VIDEO_VIVID
select CEC_CORE
---help---
When selected the vivid module will emulate the optional
HDMI CEC feature.

View File

@ -211,7 +211,7 @@ EXPORT_SYMBOL_GPL(ir_raw_event_set_idle);
*/
void ir_raw_event_handle(struct rc_dev *dev)
{
if (!dev->raw)
if (!dev->raw || !dev->raw->thread)
return;
wake_up_process(dev->raw->thread);
@ -490,6 +490,7 @@ int ir_raw_event_register(struct rc_dev *dev)
{
int rc;
struct ir_raw_handler *handler;
struct task_struct *thread;
if (!dev)
return -EINVAL;
@ -507,13 +508,15 @@ int ir_raw_event_register(struct rc_dev *dev)
* because the event is coming from userspace
*/
if (dev->driver_type != RC_DRIVER_IR_RAW_TX) {
dev->raw->thread = kthread_run(ir_raw_event_thread, dev->raw,
"rc%u", dev->minor);
thread = kthread_run(ir_raw_event_thread, dev->raw, "rc%u",
dev->minor);
if (IS_ERR(dev->raw->thread)) {
rc = PTR_ERR(dev->raw->thread);
if (IS_ERR(thread)) {
rc = PTR_ERR(thread);
goto out;
}
dev->raw->thread = thread;
}
mutex_lock(&ir_raw_handler_lock);

View File

@ -1,6 +1,7 @@
config USB_PULSE8_CEC
tristate "Pulse Eight HDMI CEC"
depends on USB_ACM && CEC_CORE
depends on USB_ACM
select CEC_CORE
select SERIO
select SERIO_SERPORT
---help---

View File

@ -1,6 +1,7 @@
config USB_RAINSHADOW_CEC
tristate "RainShadow Tech HDMI CEC"
depends on USB_ACM && CEC_CORE
depends on USB_ACM
select CEC_CORE
select SERIO
select SERIO_SERPORT
---help---

View File

@ -119,7 +119,7 @@ static void rain_irq_work_handler(struct work_struct *work)
while (true) {
unsigned long flags;
bool exit_loop;
bool exit_loop = false;
char data;
spin_lock_irqsave(&rain->buf_lock, flags);

View File

@ -19,5 +19,3 @@ obj-$(CONFIG_VIDEO_AP1302) += ap1302.o
obj-$(CONFIG_VIDEO_LM3554) += lm3554.o
ccflags-y += -Werror

View File

@ -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
obj-$(CONFIG_VIDEO_OV8858) += ov8858_driver.o
ccflags-y += -Werror

View File

@ -1,3 +1 @@
obj-$(CONFIG_VIDEO_OV5693) += ov5693.o
ccflags-y += -Werror

View File

@ -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 += -DSYSTEM_hive_isp_css_2400_system -DISP2400
ccflags-y += $(INCLUDES) $(DEFINES) -fno-common -Werror
ccflags-y += $(INCLUDES) $(DEFINES) -fno-common

View File

@ -29,7 +29,7 @@ struct edid;
struct cec_adapter;
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.

View File

@ -173,7 +173,7 @@ struct cec_adapter {
bool passthrough;
struct cec_log_addrs log_addrs;
#ifdef CONFIG_MEDIA_CEC_NOTIFIER
#ifdef CONFIG_CEC_NOTIFIER
struct cec_notifier *notifier;
#endif
@ -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);
#ifdef CONFIG_MEDIA_CEC_NOTIFIER
#ifdef CONFIG_CEC_NOTIFIER
void cec_register_cec_notifier(struct cec_adapter *adap,
struct cec_notifier *notifier);
#endif