mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-05 10:04:12 +08:00
media fixes for v4.18-rc8
-----BEGIN PGP SIGNATURE----- iQIcBAABAgAGBQJbY5PfAAoJEAhfPr2O5OEVCTsP/2d8kSVYtdMbdqwvgNX/Tvnb xaEnQiZWirS5E8v1t+M6qB5L/EvOGbGf0O+6Fvzg1lUoHu/Ni4v3b/7CauRCD4ct XSR6tQXJ9ySglr5TfY+p2JZvls6R1sDRpOTnWtrllJ4KPALrB4ogavPD8gHV11Ut Eza4eARzPrPl0HTFLbUwijiAN+HBFndx8GQIZ8pc/4lVWS4bMQKae+Ev7Crj2rNZ hx84QGzTcYmzfqrXJJWOgBtuEg1sN7zuoVtytarGLTxQL97I7761pS1cP57P2wL1 TQKsK95k1yENBOA2bGg3OGWxMtlhDsCUs2vIpqh1fh/5WXkwJfu6k93E9SosV5YG yfTvRbhfqFuLfOvQEz2CdYjKWjXhF+6If1bV35jNFvmGZrA1dtm2hEtVEUe4SOjk Xm8a/zwV1u1w8axH89KNQUMpiW6Ad6w/VkZKgsBYzf1vbR5TDHSPnnriZ9EKLVvC XOPYLbxlxSxaJF3xwtexH9pI4Ah9RlrmzwXIxHCRH2kzz0sPRVAPPq8EmQhIdZZ5 COKmNoYE3hKjEMdp6obOTyJOEuhoH8Y/rQF6uSOt2VM6ug1UkAJ7kGeAaNWBzA94 9IPlAL+W0xpviRc3G5q3FP/06Ok0HHrPlHPFV06/n/fRrcX15tPseCqOzCsiOtcv vvIDjdyJQcrzB0Tq8eBk =TwSI -----END PGP SIGNATURE----- Merge tag 'media/v4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media Pull media fixes from Mauro Carvalho Chehab: - a deadlock regression at vsp1 driver - some Remote Controller fixes related to the new BPF filter logic added on it for Kernel 4.18. * tag 'media/v4.18-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: media: v4l: vsp1: Fix deadlock in VSPDL DRM pipelines media: rc: read out of bounds if bpf reports high protocol number media: bpf: ensure bpf program is freed on detach media: rc: be less noisy when driver misbehaves
This commit is contained in:
commit
0585df468e
@ -728,9 +728,6 @@ EXPORT_SYMBOL_GPL(vsp1_du_setup_lif);
|
||||
*/
|
||||
void vsp1_du_atomic_begin(struct device *dev, unsigned int pipe_index)
|
||||
{
|
||||
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
|
||||
|
||||
mutex_lock(&vsp1->drm->lock);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(vsp1_du_atomic_begin);
|
||||
|
||||
@ -846,6 +843,7 @@ void vsp1_du_atomic_flush(struct device *dev, unsigned int pipe_index,
|
||||
|
||||
drm_pipe->crc = cfg->crc;
|
||||
|
||||
mutex_lock(&vsp1->drm->lock);
|
||||
vsp1_du_pipeline_setup_inputs(vsp1, pipe);
|
||||
vsp1_du_pipeline_configure(pipe);
|
||||
mutex_unlock(&vsp1->drm->lock);
|
||||
|
@ -174,6 +174,7 @@ static int lirc_bpf_detach(struct rc_dev *rcdev, struct bpf_prog *prog)
|
||||
|
||||
rcu_assign_pointer(raw->progs, new_array);
|
||||
bpf_prog_array_free(old_array);
|
||||
bpf_prog_put(prog);
|
||||
unlock:
|
||||
mutex_unlock(&ir_raw_handler_lock);
|
||||
return ret;
|
||||
|
@ -30,13 +30,13 @@ static int ir_raw_event_thread(void *data)
|
||||
while (kfifo_out(&raw->kfifo, &ev, 1)) {
|
||||
if (is_timing_event(ev)) {
|
||||
if (ev.duration == 0)
|
||||
dev_err(&dev->dev, "nonsensical timing event of duration 0");
|
||||
dev_warn_once(&dev->dev, "nonsensical timing event of duration 0");
|
||||
if (is_timing_event(raw->prev_ev) &&
|
||||
!is_transition(&ev, &raw->prev_ev))
|
||||
dev_err(&dev->dev, "two consecutive events of type %s",
|
||||
TO_STR(ev.pulse));
|
||||
dev_warn_once(&dev->dev, "two consecutive events of type %s",
|
||||
TO_STR(ev.pulse));
|
||||
if (raw->prev_ev.reset && ev.pulse == 0)
|
||||
dev_err(&dev->dev, "timing event after reset should be pulse");
|
||||
dev_warn_once(&dev->dev, "timing event after reset should be pulse");
|
||||
}
|
||||
list_for_each_entry(handler, &ir_raw_handler_list, list)
|
||||
if (dev->enabled_protocols &
|
||||
|
@ -679,6 +679,14 @@ static void ir_timer_repeat(struct timer_list *t)
|
||||
spin_unlock_irqrestore(&dev->keylock, flags);
|
||||
}
|
||||
|
||||
static unsigned int repeat_period(int protocol)
|
||||
{
|
||||
if (protocol >= ARRAY_SIZE(protocols))
|
||||
return 100;
|
||||
|
||||
return protocols[protocol].repeat_period;
|
||||
}
|
||||
|
||||
/**
|
||||
* rc_repeat() - signals that a key is still pressed
|
||||
* @dev: the struct rc_dev descriptor of the device
|
||||
@ -691,7 +699,7 @@ void rc_repeat(struct rc_dev *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned int timeout = nsecs_to_jiffies(dev->timeout) +
|
||||
msecs_to_jiffies(protocols[dev->last_protocol].repeat_period);
|
||||
msecs_to_jiffies(repeat_period(dev->last_protocol));
|
||||
struct lirc_scancode sc = {
|
||||
.scancode = dev->last_scancode, .rc_proto = dev->last_protocol,
|
||||
.keycode = dev->keypressed ? dev->last_keycode : KEY_RESERVED,
|
||||
@ -803,7 +811,7 @@ void rc_keydown(struct rc_dev *dev, enum rc_proto protocol, u32 scancode,
|
||||
|
||||
if (dev->keypressed) {
|
||||
dev->keyup_jiffies = jiffies + nsecs_to_jiffies(dev->timeout) +
|
||||
msecs_to_jiffies(protocols[protocol].repeat_period);
|
||||
msecs_to_jiffies(repeat_period(protocol));
|
||||
mod_timer(&dev->timer_keyup, dev->keyup_jiffies);
|
||||
}
|
||||
spin_unlock_irqrestore(&dev->keylock, flags);
|
||||
|
Loading…
Reference in New Issue
Block a user