1. 22 1月, 2015 1 次提交
  2. 17 12月, 2014 7 次提交
  3. 12 12月, 2014 5 次提交
  4. 05 12月, 2014 14 次提交
    • 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
    • M
      [media] ddbridge: remove unneeded check before dvb_unregister_device() · ddc0085e
      Markus Elfring 提交于
      The dvb_unregister_device() function tests whether its argument is NULL
      and then returns immediately. Thus the test around the call is not needed.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      ddc0085e
    • M
      [media] si2157: One function call less in si2157_init() after error · e358c8a6
      Markus Elfring 提交于
      The release_firmware() function was called in some cases by the si2157_init()
      function during error handling even if the passed variable contained still
      a null pointer. This implementation detail could be improved
      by the introduction of another jump label.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      e358c8a6
    • M
      [media] tuners: remove uneeded checks before release_firmware() · dc89cfcf
      Markus Elfring 提交于
      The release_firmware() function tests whether its argument is NULL
      and then returns immediately. Thus the test around the call is not needed.
      
      This issue was detected by using the Coccinelle software.
      Signed-off-by: NMarkus Elfring <elfring@users.sourceforge.net>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      dc89cfcf
    • M
      [media] stv090x: add an extra protetion against buffer overflow · ffe30010
      Mauro Carvalho Chehab 提交于
      As pointed by smatch:
      	drivers/media/dvb-frontends/stv090x.c:2787 stv090x_optimize_carloop() error: buffer overflow 'car_loop_apsk_low' 11 <= 13
      	drivers/media/dvb-frontends/stv090x.c:2789 stv090x_optimize_carloop() error: buffer overflow 'car_loop_apsk_low' 11 <= 13
      	drivers/media/dvb-frontends/stv090x.c:2791 stv090x_optimize_carloop() error: buffer overflow 'car_loop_apsk_low' 11 <= 13
      	drivers/media/dvb-frontends/stv090x.c:2793 stv090x_optimize_carloop() error: buffer overflow 'car_loop_apsk_low' 11 <= 13
      	drivers/media/dvb-frontends/stv090x.c:2795 stv090x_optimize_carloop() error: buffer overflow 'car_loop_apsk_low' 11 <= 13
      
      The situation of a buffer overflow won't happen, in practice,
      with the current values of car_loop table. Yet, the entire logic
      that checks for those registration values is too complex. So,
      better to add an explicit check, just in case someone changes
      the car_loop tables causing a buffer overflow by mistake.
      
      This also helps to remove several smatch warnings, with is good.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      ffe30010
    • M
      [media] stv090x: Remove an unreachable code · b769ef69
      Mauro Carvalho Chehab 提交于
      if STV090x_RANGEOK is not returned, then STV090x_OUTOFRANGE
      is returned. However, that part of the code is never reached,
      as pointed by smatch:
      
      	drivers/media/dvb-frontends/stv090x.c:2673 stv090x_get_sig_params() info: ignoring unreachable code.
      
      So, remove the two uneeded elses, with makes the code a little bit
      cleaner.
      
      No functional changes, and one less smatch warning.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      b769ef69
    • M
      [media] stv090x: Some whitespace cleanups · 09e59098
      Mauro Carvalho Chehab 提交于
      While writing changeset fdf1bc9f, I noticed some checkpatch
      complains about the CodingStyle for function parameters. So,
      clean them.
      
      While here, also removes uneeded "extern" from function prototype.
      
      No functional changes.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      09e59098
    • M
      [media] em28xx: checkpatch cleanup: whitespaces/new lines cleanups · fdf1bc9f
      Mauro Carvalho Chehab 提交于
      This patch is basically produced while testing a tool that
      Joe Perches sent upstream sometime ago:
      	https://lkml.org/lkml/2014/7/11/794
      
      I used it with those arguments:
      	$ reformat_with_checkpatch.sh drivers/media/usb/em28xx/em28xx*.[ch]
      
      It actually produced 24 patches, with is too much, and showed
      interesting things: gcc produced different codes on most of the
      patches, even with just linespace changes. The total code data
      remained the same on all cases I checked though.
      
      Anyway, provided that we fold the resulting patches, this tool
      seems useful.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      fdf1bc9f
    • O
      [media] si2168: add support for firmware files in new format · 1b97dc98
      Olli Salonen 提交于
      This patch adds support for new type of firmware versions of Si2168 chip.
      
      Old type: n x 8 bytes (all data, first byte seems to be 04 or 05)
      New type: n x 17 bytes (1 byte indicates len and max 16 bytes data)
      
      New version of TechnoTrend CT2-4400 drivers
      (http://www.tt-downloads.de/bda-treiber_4.3.0.0.zip) contains newer
      firmware for Si2168-B40 that is in the new format. It can be extracted
      with the following command:
      
      dd if=ttTVStick4400_64.sys ibs=1 skip=323872 count=6919 of=dvb-demod-si2168-b40-01.fw
      Signed-off-by: NOlli Salonen <olli.salonen@iki.fi>
      Reviewed-by: NAntti Palosaari <crope@iki.fi>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      1b97dc98
  5. 04 12月, 2014 13 次提交