1. 30 1月, 2015 1 次提交
  2. 24 12月, 2014 6 次提交
  3. 05 12月, 2014 6 次提交
    • J
      [media] img-ir: Don't set driver's module owner · 64b989e1
      James Hogan 提交于
      Don't bother setting .owner = THIS_MODULE, since it's already handled by
      the platform_driver_register macro.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      64b989e1
    • J
      [media] img-ir: Depend on METAG or MIPS or COMPILE_TEST · 6010d2c1
      James Hogan 提交于
      The ImgTec Infrared decoder block which img-ir drives is only used in
      IMGWorks SoCs so far, such as the TZ1090 (Meta based) and the upcoming
      Pistachio (MIPS based). Therefore make the driver depend on METAG (for
      TZ1090) or MIPS (for Pistachio) or COMPILE_TEST (so that it is included
      in x86 allmodconfig builds), to avoid cluttering the Kconfig menu with
      drivers for hardware that isn't yet available on other platforms.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      6010d2c1
    • J
      [media] img-ir/hw: Drop [un]register_decoder declarations · ce5db293
      James Hogan 提交于
      The img_ir_register_decoder() and img_ir_unregister_decoder() functions
      were dropped prior to the img-ir driver being applied to simplify the
      protocol decoder setup. However the declarations of these functions in
      img-ir-hw.h were still included. Delete them since they're completely
      unused.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      ce5db293
    • J
      [media] img-ir/hw: Fix potential deadlock stopping timer · ac030860
      James Hogan 提交于
      The end timer is used for switching back from repeat code timings when
      no repeat codes have been received for a certain amount of time. When
      the protocol is changed, the end timer is deleted synchronously with
      del_timer_sync(), however this takes place while holding the main spin
      lock, and the timer handler also needs to acquire the spin lock.
      
      This opens the possibility of a deadlock on an SMP system if the
      protocol is changed just as the repeat timer is expiring. One CPU could
      end up in img_ir_set_decoder() holding the lock and waiting for the end
      timer to complete, while the other CPU is stuck in the timer handler
      spinning on the lock held by the first CPU.
      
      Lockdep also spots a possible lock inversion in the same code, since
      img_ir_set_decoder() acquires the img-ir lock before the timer lock, but
      the timer handler will try and acquire them the other way around:
      
      =========================================================
      [ INFO: possible irq lock inversion dependency detected ]
      3.18.0-rc5+ #957 Not tainted
      ---------------------------------------------------------
      swapper/0/0 just changed the state of lock:
       (((&hw->end_timer))){+.-...}, at: [<4006ae5c>] _call_timer_fn+0x0/0xfc
      but this lock was taken by another, HARDIRQ-safe lock in the past:
       (&(&priv->lock)->rlock#2){-.....}
      
      and interrupts could create inverse lock ordering between them.
      
      other info that might help us debug this:
       Possible interrupt unsafe locking scenario:
      
             CPU0                    CPU1
             ----                    ----
        lock(((&hw->end_timer)));
                                     local_irq_disable();
                                     lock(&(&priv->lock)->rlock#2);
                                     lock(((&hw->end_timer)));
        <Interrupt>
          lock(&(&priv->lock)->rlock#2);
      
       *** DEADLOCK ***
      
      This is fixed by releasing the main spin lock while performing the
      del_timer_sync() call. The timer is prevented from restarting before the
      lock is reacquired by a new "stopping" flag which img_ir_handle_data()
      checks before updating the timer.
      
      ---------------------------------------------------------
      swapper/0/0 just changed the state of lock:
       (((&hw->end_timer))){+.-...}, at: [<4006ae5c>] _call_timer_fn+0x0/0xfc
      but this lock was taken by another, HARDIRQ-safe lock in the past:
       (&(&priv->lock)->rlock#2){-.....}
      and interrupts could create inverse lock ordering between them.
      other info that might help us debug this:
       Possible interrupt unsafe locking scenario:
             CPU0                    CPU1
             ----                    ----
        lock(((&hw->end_timer)));
                                     local_irq_disable();
                                     lock(&(&priv->lock)->rlock#2);
                                     lock(((&hw->end_timer)));
        <Interrupt>
          lock(&(&priv->lock)->rlock#2);
       *** DEADLOCK ***
      This is fixed by releasing the main spin lock while performing the
      del_timer_sync() call. The timer is prevented from restarting before the
      lock is reacquired by a new "stopping" flag which img_ir_handle_data()
      checks before updating the timer.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Sifan Naeem <sifan.naeem@imgtec.com>
      Cc: <stable@vger.kernel.org> # v3.15+
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      ac030860
    • D
      [media] img-ir/hw: Always read data to clear buffer · ea0de4ec
      Dylan Rajaratnam 提交于
      A problem was found on Polaris where if the unit it booted via the power
      button on the infrared remote then the next button press on the remote
      would return the key code used to power on the unit.
      
      The sequence is:
       - The polaris powered off but with the powerdown controller (PDC) block
         still powered.
       - Press power key on remote, IR block receives the key.
       - Kernel starts, IR code is in IMG_IR_DATA_x but neither IMG_IR_RXDVAL
         or IMG_IR_RXDVALD2 are set.
       - Wait any amount of time.
       - Press any key.
       - IMG_IR_RXDVAL or IMG_IR_RXDVALD2 is set but IMG_IR_DATA_x is
         unchanged since the powerup key data was never read.
      
      This is worked around by always reading the IMG_IR_DATA_x in
      img_ir_set_decoder(), rather than only when the IMG_IR_RXDVAL or
      IMG_IR_RXDVALD2 bit is set.
      Signed-off-by: NDylan Rajaratnam <dylan.rajaratnam@imgtec.com>
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: <stable@vger.kernel.org> # v3.15+
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      ea0de4ec
    • S
      [media] redrat3: ensure dma is setup properly · d0a0a65e
      Sean Young 提交于
      This fixes the driver on arm.
      Reported-by: NSteven Guitton <keltiek@gmail.com>
      Tested-by: NSteven Guitton <keltiek@gmail.com>
      Signed-off-by: NSean Young <sean@mess.org>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      d0a0a65e
  4. 26 11月, 2014 1 次提交
  5. 25 11月, 2014 1 次提交
  6. 22 11月, 2014 1 次提交
  7. 05 11月, 2014 2 次提交
  8. 03 11月, 2014 3 次提交
  9. 31 10月, 2014 1 次提交
    • T
      [media] rc-main: fix lockdep splash for rc-main · 37fa8716
      Tomas Melin 提交于
      lockdep reports a potential circular dependecy deadlock when registering input device.
      
      Unlock mutex rc_dev->lock prior to calling ir_raw_event_register to avoid the circular
      dependency since that function also calls input_register_device and rc_open.
      
       ======================================================
       [ INFO: possible circular locking dependency detected ]
       3.17.0-rc7+ #24 Not tainted
       -------------------------------------------------------
       modprobe/647 is trying to acquire lock:
        (input_mutex){+.+.+.}, at: [<ffffffff812ed81c>] input_register_device+0x2ba/0x381
      
       but task is already holding lock:
        (ir_raw_handler_lock){+.+.+.}, at: [<ffffffff813186ed>] ir_raw_event_register+0x102/0x190
      
       which lock already depends on the new lock.
      
      [cut text]
      
       other info that might help us debug this:
      
       Chain exists of:
         input_mutex --> &dev->lock --> ir_raw_handler_lock
      
        Possible unsafe locking scenario:
      
              CPU0                    CPU1
              ----                    ----
         lock(ir_raw_handler_lock);
                                      lock(&dev->lock);
                                      lock(ir_raw_handler_lock);
         lock(input_mutex);
      
        *** DEADLOCK ***
      
       4 locks held by modprobe/647:
        #0:  (&dev->mutex){......}, at: [<ffffffff812d19f3>] device_lock+0xf/0x11
        #1:  (&dev->mutex){......}, at: [<ffffffff812d19f3>] device_lock+0xf/0x11
        #2:  (&dev->lock){+.+.+.}, at: [<ffffffff81317fff>] rc_register_device+0x55d/0x58a
        #3:  (ir_raw_handler_lock){+.+.+.}, at: [<ffffffff813186ed>] ir_raw_event_register+0x102/0x190
      
       stack backtrace:
       CPU: 0 PID: 647 Comm: modprobe Not tainted 3.17.0-rc7+ #24
      
       Call Trace:
        [<ffffffff81489d6a>] dump_stack+0x46/0x58
        [<ffffffff81487699>] print_circular_bug+0x1f8/0x209
        [<ffffffff81074353>] __lock_acquire+0xb54/0xeda
        [<ffffffff81080f17>] ? console_unlock+0x34d/0x399
        [<ffffffff81074c01>] lock_acquire+0xd9/0x111
        [<ffffffff812ed81c>] ? input_register_device+0x2ba/0x381
        [<ffffffff8148e650>] mutex_lock_interruptible_nested+0x57/0x381
        [<ffffffff812ed81c>] ? input_register_device+0x2ba/0x381
        [<ffffffff81124e03>] ? kfree+0x7c/0x96
        [<ffffffff812ed81c>] ? input_register_device+0x2ba/0x381
        [<ffffffff81072531>] ? trace_hardirqs_on+0xd/0xf
        [<ffffffff812ed81c>] input_register_device+0x2ba/0x381
        [<ffffffff8131a537>] ir_mce_kbd_register+0x109/0x139
        [<ffffffff81318728>] ir_raw_event_register+0x13d/0x190
        [<ffffffff81317e40>] rc_register_device+0x39e/0x58a
        [<ffffffff81072531>] ? trace_hardirqs_on+0xd/0xf
        [<ffffffffa00cf2e3>] nvt_probe+0x5ad/0xd52 [nuvoton_cir]
        [<ffffffffa00ced36>] ? nvt_resume+0x80/0x80 [nuvoton_cir]
        [<ffffffff81296003>] pnp_device_probe+0x8c/0xa9
        [<ffffffff812d1b94>] ? driver_sysfs_add+0x6e/0x93
        [<ffffffff812d203a>] driver_probe_device+0xa1/0x1e3
        [<ffffffff812d217c>] ? driver_probe_device+0x1e3/0x1e3
        [<ffffffff812d21ca>] __driver_attach+0x4e/0x6f
        [<ffffffff812d075b>] bus_for_each_dev+0x5a/0x8c
        [<ffffffff812d1b24>] driver_attach+0x19/0x1b
        [<ffffffff812d1879>] bus_add_driver+0xf1/0x1d6
        [<ffffffff812d2817>] driver_register+0x87/0xbe
        [<ffffffffa0120000>] ? 0xffffffffa0120000
        [<ffffffff81295da4>] pnp_register_driver+0x1c/0x1e
        [<ffffffffa0120010>] nvt_init+0x10/0x1000 [nuvoton_cir]
        [<ffffffff8100030e>] do_one_initcall+0xea/0x18c
        [<ffffffff8111497f>] ? __vunmap+0x9d/0xc7
        [<ffffffff810a3ca1>] load_module+0x1c21/0x1f2c
        [<ffffffff810a0bce>] ? show_initstate+0x44/0x44
        [<ffffffff810a404e>] SyS_init_module+0xa2/0xb1
        [<ffffffff81490ed2>] system_call_fastpath+0x16/0x1b
      Signed-off-by: NTomas Melin <tomas.melin@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      37fa8716
  10. 30 10月, 2014 2 次提交
  11. 20 10月, 2014 2 次提交
  12. 10 10月, 2014 1 次提交
  13. 03 10月, 2014 1 次提交
  14. 26 9月, 2014 2 次提交
    • M
      [media] st_rc: fix address space casting · 8f8218e8
      Mauro Carvalho Chehab 提交于
      drivers/media/rc/st_rc.c:107:38: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/st_rc.c:107:38:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:107:38:    got void *
      drivers/media/rc/st_rc.c:110:53: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/st_rc.c:110:53:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:110:53:    got void *
      drivers/media/rc/st_rc.c:116:54: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:116:54:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:116:54:    got void *
      drivers/media/rc/st_rc.c:120:45: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/st_rc.c:120:45:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:120:45:    got void *
      drivers/media/rc/st_rc.c:121:43: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/st_rc.c:121:43:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:121:43:    got void *
      drivers/media/rc/st_rc.c:150:46: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/st_rc.c:150:46:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:150:46:    got void *
      drivers/media/rc/st_rc.c:153:42: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:153:42:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:153:42:    got void *
      drivers/media/rc/st_rc.c:174:32: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:174:32:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:174:32:    got void *
      drivers/media/rc/st_rc.c:177:48: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:177:48:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:177:48:    got void *
      drivers/media/rc/st_rc.c:187:48: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:187:48:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:187:48:    got void *
      drivers/media/rc/st_rc.c:204:42: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:204:42:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:204:42:    got void *
      drivers/media/rc/st_rc.c:205:35: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:205:35:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:205:35:    got void *
      drivers/media/rc/st_rc.c:215:35: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:215:35:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:215:35:    got void *
      drivers/media/rc/st_rc.c:216:35: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:216:35:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:216:35:    got void *
      drivers/media/rc/st_rc.c:269:22: warning: incorrect type in assignment (different address spaces)
      drivers/media/rc/st_rc.c:269:22:    expected void *base
      drivers/media/rc/st_rc.c:269:22:    got void [noderef] <asn:2>*
      drivers/media/rc/st_rc.c:349:46: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:349:46:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:349:46:    got void *
      drivers/media/rc/st_rc.c:350:46: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:350:46:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:350:46:    got void *
      drivers/media/rc/st_rc.c:371:61: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:371:61:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:371:61:    got void *
      drivers/media/rc/st_rc.c:372:54: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/st_rc.c:372:54:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/st_rc.c:372:54:    got void *
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      8f8218e8
    • M
      [media] ir-hix5hd2: fix address space casting · 7f01308e
      Mauro Carvalho Chehab 提交于
      drivers/media/rc/ir-hix5hd2.c:99:41: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:99:41:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:99:41:    got void *
      drivers/media/rc/ir-hix5hd2.c:100:16: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:100:16:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:100:16:    got void *
      drivers/media/rc/ir-hix5hd2.c:117:40: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:117:40:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:117:40:    got void *
      drivers/media/rc/ir-hix5hd2.c:119:41: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:119:41:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:119:41:    got void *
      drivers/media/rc/ir-hix5hd2.c:121:41: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:121:41:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:121:41:    got void *
      drivers/media/rc/ir-hix5hd2.c:147:18: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:147:18:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:147:18:    got void *
      drivers/media/rc/ir-hix5hd2.c:155:28: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:155:28:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:155:28:    got void *
      drivers/media/rc/ir-hix5hd2.c:157:25: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:157:25:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:157:25:    got void *
      drivers/media/rc/ir-hix5hd2.c:159:61: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:159:61:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:159:61:    got void *
      drivers/media/rc/ir-hix5hd2.c:167:28: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:167:28:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:167:28:    got void *
      drivers/media/rc/ir-hix5hd2.c:169:36: warning: incorrect type in argument 1 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:169:36:    expected void const volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:169:36:    got void *
      drivers/media/rc/ir-hix5hd2.c:188:64: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:188:64:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:188:64:    got void *
      drivers/media/rc/ir-hix5hd2.c:190:68: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:190:68:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:190:68:    got void *
      drivers/media/rc/ir-hix5hd2.c:220:20: warning: incorrect type in assignment (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:220:20:    expected void *base
      drivers/media/rc/ir-hix5hd2.c:220:20:    got void [noderef] <asn:2>*
      drivers/media/rc/ir-hix5hd2.c:315:41: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:315:41:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:315:41:    got void *
      drivers/media/rc/ir-hix5hd2.c:316:41: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:316:41:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:316:41:    got void *
      drivers/media/rc/ir-hix5hd2.c:317:41: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:317:41:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:317:41:    got void *
      drivers/media/rc/ir-hix5hd2.c:318:41: warning: incorrect type in argument 2 (different address spaces)
      drivers/media/rc/ir-hix5hd2.c:318:41:    expected void volatile [noderef] <asn:2>*addr
      drivers/media/rc/ir-hix5hd2.c:318:41:    got void *
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      7f01308e
  15. 24 9月, 2014 8 次提交
  16. 23 9月, 2014 2 次提交