Commit 28806e4d authored by Linus Torvalds's avatar Linus Torvalds

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

Pull media fixes from Mauro Carvalho Chehab:
 "A couple of fixes:

   - fix a build issue with CEC

   - fix a deadlock at usbtv driver

   - fix some null pointer address issues at vsp1 driver

   - fix a wrong bitmap setting at rkisp1 driver"

* tag 'media/v5.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  media: rkisp1: params: fix wrong bits settings
  media: v4l: vsp1: Fix uif null pointer access
  media: v4l: vsp1: Fix bru null pointer access
  media: usbtv: Fix deadlock on suspend
  media: rc: compile rc-cec.c into rc-core
parents a74e6a01 2025a48c
...@@ -1288,7 +1288,6 @@ static void rkisp1_params_config_parameter(struct rkisp1_params *params) ...@@ -1288,7 +1288,6 @@ static void rkisp1_params_config_parameter(struct rkisp1_params *params)
memset(hst.hist_weight, 0x01, sizeof(hst.hist_weight)); memset(hst.hist_weight, 0x01, sizeof(hst.hist_weight));
rkisp1_hst_config(params, &hst); rkisp1_hst_config(params, &hst);
rkisp1_param_set_bits(params, RKISP1_CIF_ISP_HIST_PROP, rkisp1_param_set_bits(params, RKISP1_CIF_ISP_HIST_PROP,
~RKISP1_CIF_ISP_HIST_PROP_MODE_MASK |
rkisp1_hst_params_default_config.mode); rkisp1_hst_params_default_config.mode);
/* set the range */ /* set the range */
......
...@@ -245,7 +245,7 @@ static int vsp1_du_pipeline_setup_brx(struct vsp1_device *vsp1, ...@@ -245,7 +245,7 @@ static int vsp1_du_pipeline_setup_brx(struct vsp1_device *vsp1,
brx = &vsp1->bru->entity; brx = &vsp1->bru->entity;
else if (pipe->brx && !drm_pipe->force_brx_release) else if (pipe->brx && !drm_pipe->force_brx_release)
brx = pipe->brx; brx = pipe->brx;
else if (!vsp1->bru->entity.pipe) else if (vsp1_feature(vsp1, VSP1_HAS_BRU) && !vsp1->bru->entity.pipe)
brx = &vsp1->bru->entity; brx = &vsp1->bru->entity;
else else
brx = &vsp1->brs->entity; brx = &vsp1->brs->entity;
...@@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs(struct vsp1_device *vsp1, ...@@ -462,9 +462,9 @@ static int vsp1_du_pipeline_setup_inputs(struct vsp1_device *vsp1,
* make sure it is present in the pipeline's list of entities if it * make sure it is present in the pipeline's list of entities if it
* wasn't already. * wasn't already.
*/ */
if (!use_uif) { if (drm_pipe->uif && !use_uif) {
drm_pipe->uif->pipe = NULL; drm_pipe->uif->pipe = NULL;
} else if (!drm_pipe->uif->pipe) { } else if (drm_pipe->uif && !drm_pipe->uif->pipe) {
drm_pipe->uif->pipe = pipe; drm_pipe->uif->pipe = pipe;
list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities); list_add_tail(&drm_pipe->uif->list_pipe, &pipe->entities);
} }
......
...@@ -5,6 +5,7 @@ obj-y += keymaps/ ...@@ -5,6 +5,7 @@ obj-y += keymaps/
obj-$(CONFIG_RC_CORE) += rc-core.o obj-$(CONFIG_RC_CORE) += rc-core.o
rc-core-y := rc-main.o rc-ir-raw.o rc-core-y := rc-main.o rc-ir-raw.o
rc-core-$(CONFIG_LIRC) += lirc_dev.o rc-core-$(CONFIG_LIRC) += lirc_dev.o
rc-core-$(CONFIG_MEDIA_CEC_RC) += keymaps/rc-cec.o
rc-core-$(CONFIG_BPF_LIRC_MODE2) += bpf-lirc.o rc-core-$(CONFIG_BPF_LIRC_MODE2) += bpf-lirc.o
obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
......
...@@ -21,7 +21,6 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ ...@@ -21,7 +21,6 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
rc-behold.o \ rc-behold.o \
rc-behold-columbus.o \ rc-behold-columbus.o \
rc-budget-ci-old.o \ rc-budget-ci-old.o \
rc-cec.o \
rc-cinergy-1400.o \ rc-cinergy-1400.o \
rc-cinergy.o \ rc-cinergy.o \
rc-d680-dmb.o \ rc-d680-dmb.o \
......
// SPDX-License-Identifier: GPL-2.0-or-later // SPDX-License-Identifier: GPL-2.0-or-later
/* Keytable for the CEC remote control /* Keytable for the CEC remote control
*
* This keymap is unusual in that it can't be built as a module,
* instead it is registered directly in rc-main.c if CONFIG_MEDIA_CEC_RC
* is set. This is because it can be called from drm_dp_cec_set_edid() via
* cec_register_adapter() in an asynchronous context, and it is not
* allowed to use request_module() to load rc-cec.ko in that case.
*
* Since this keymap is only used if CONFIG_MEDIA_CEC_RC is set, we
* just compile this keymap into the rc-core module and never as a
* separate module.
* *
* Copyright (c) 2015 by Kamil Debski * Copyright (c) 2015 by Kamil Debski
*/ */
...@@ -152,7 +162,7 @@ static struct rc_map_table cec[] = { ...@@ -152,7 +162,7 @@ static struct rc_map_table cec[] = {
/* 0x77-0xff: Reserved */ /* 0x77-0xff: Reserved */
}; };
static struct rc_map_list cec_map = { struct rc_map_list cec_map = {
.map = { .map = {
.scan = cec, .scan = cec,
.size = ARRAY_SIZE(cec), .size = ARRAY_SIZE(cec),
...@@ -160,19 +170,3 @@ static struct rc_map_list cec_map = { ...@@ -160,19 +170,3 @@ static struct rc_map_list cec_map = {
.name = RC_MAP_CEC, .name = RC_MAP_CEC,
} }
}; };
static int __init init_rc_map_cec(void)
{
return rc_map_register(&cec_map);
}
static void __exit exit_rc_map_cec(void)
{
rc_map_unregister(&cec_map);
}
module_init(init_rc_map_cec);
module_exit(exit_rc_map_cec);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Kamil Debski");
...@@ -2069,6 +2069,9 @@ static int __init rc_core_init(void) ...@@ -2069,6 +2069,9 @@ static int __init rc_core_init(void)
led_trigger_register_simple("rc-feedback", &led_feedback); led_trigger_register_simple("rc-feedback", &led_feedback);
rc_map_register(&empty_map); rc_map_register(&empty_map);
#ifdef CONFIG_MEDIA_CEC_RC
rc_map_register(&cec_map);
#endif
return 0; return 0;
} }
...@@ -2078,6 +2081,9 @@ static void __exit rc_core_exit(void) ...@@ -2078,6 +2081,9 @@ static void __exit rc_core_exit(void)
lirc_dev_exit(); lirc_dev_exit();
class_unregister(&rc_class); class_unregister(&rc_class);
led_trigger_unregister_simple(led_feedback); led_trigger_unregister_simple(led_feedback);
#ifdef CONFIG_MEDIA_CEC_RC
rc_map_unregister(&cec_map);
#endif
rc_map_unregister(&empty_map); rc_map_unregister(&empty_map);
} }
......
...@@ -371,7 +371,7 @@ void usbtv_audio_free(struct usbtv *usbtv) ...@@ -371,7 +371,7 @@ void usbtv_audio_free(struct usbtv *usbtv)
cancel_work_sync(&usbtv->snd_trigger); cancel_work_sync(&usbtv->snd_trigger);
if (usbtv->snd && usbtv->udev) { if (usbtv->snd && usbtv->udev) {
snd_card_free(usbtv->snd); snd_card_free_when_closed(usbtv->snd);
usbtv->snd = NULL; usbtv->snd = NULL;
} }
} }
...@@ -175,6 +175,13 @@ struct rc_map_list { ...@@ -175,6 +175,13 @@ struct rc_map_list {
struct rc_map map; struct rc_map map;
}; };
#ifdef CONFIG_MEDIA_CEC_RC
/*
* rc_map_list from rc-cec.c
*/
extern struct rc_map_list cec_map;
#endif
/* Routines from rc-map.c */ /* Routines from rc-map.c */
/** /**
......
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