1. 26 3月, 2013 1 次提交
    • H
      [media] [REGRESSION] bt8xx: Fix too large height in cropcap · 35ccecef
      Hans de Goede 提交于
      Since commit a1fd2877:
      "[media] bttv-driver: fix two warnings"
      cropcap.defrect.height and cropcap.bounds.height for the PAL entry are 32
      resp 30 pixels too large, if a userspace app (ie xawtv) actually tries to use
      the full advertised height, the resulting image is broken in ways only a
      screenshot can describe.
      The cause of this is the fix for this warning:
      drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: initialized field overwritten [-Woverride-init]
      In this chunk of the commit:
      @@ -301,11 +301,10 @@ const struct bttv_tvnorm bttv_tvnorms[] = {
                              /* totalwidth */ 1135,
                              /* sqwidth */ 944,
                              /* vdelay */ 0x20,
      -                       /* sheight */ 576,
      -                       /* videostart0 */ 23)
                      /* bt878 (and bt848?) can capture another
                         line below active video. */
      -               .cropcap.bounds.height = (576 + 2) + 0x20 - 2,
      +                       /* sheight */ (576 + 2) + 0x20 - 2,
      +                       /* videostart0 */ 23)
              },{
                      .v4l2_id        = V4L2_STD_NTSC_M | V4L2_STD_NTSC_M_KR,
                      .name           = "NTSC",
      Which replaces the overriding of cropcap.bounds.height initialization outside
      of the CROPCAP macro (which also initializes it), with passing a
      different sheight value to the CROPCAP macro.
      There are 2 problems with this warning fix:
      1) The sheight value is used twice in the CROPCAP macro, and the old code
         only changed one resulting value.
      2) The old code increased the .cropcap.bounds.height value (and did not
         touch the .cropcap.defrect.height value at all) by 2, where as the fixed
         code increases it by 32, as the fixed code passes (576 + 2) + 0x20 - 2
         to the CROPCAP macro, but the + 0x20 - 2 is already done by the macro so
         now is done twice for .cropcap.bounds.height, and also is applied to
         .cropcap.defrect.height where it should not be applied at all.
      This patch fixes this by adding an extraheight parameter to the CROPCAP entry
      and using it for the PAL entry.
      
      Cc: stable@kernel.org	# For Kernel 3.8
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      35ccecef
  2. 04 1月, 2013 1 次提交
    • G
      Drivers: media: remove __dev* attributes. · 4c62e976
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      __devinitconst, and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4c62e976
  3. 21 12月, 2012 1 次提交
  4. 28 10月, 2012 1 次提交
    • M
      [media] bttv-driver: fix two warnings · a1fd2877
      Mauro Carvalho Chehab 提交于
      drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: initialized field overwritten [-Woverride-init]
      drivers/media/pci/bt8xx/bttv-driver.c:308:3: warning: (near initialization for 'bttv_tvnorms[0].cropcap.bounds.height') [-Woverride-init]
      drivers/media/pci/bt8xx/bttv-driver.c: In function 'bttv_remove':
      drivers/media/pci/bt8xx/bttv-driver.c:4467:29: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      a1fd2877
  5. 06 10月, 2012 1 次提交
  6. 26 9月, 2012 3 次提交
  7. 16 8月, 2012 1 次提交
  8. 19 6月, 2012 1 次提交
  9. 12 6月, 2012 1 次提交
  10. 11 4月, 2012 1 次提交
    • A
      [media] Default bt878 contrast value · 961e668b
      Alan McIvor 提交于
      The default_value for the Bt878 V4L2_CID_CONTRAST control is currently
      set to 32768. Internally this gets translated to an analog input
      circuit gain of 1.19. However, the default gain should be 1.0. This
      patch alters the default value to 27648 which corresponds to a gain of
      1.0. It also alters the probe routine so that the correct value is
      written on board initialisation.
      
      [mchehab@redhat.com: behavior confirmed via Fusion 878a datasheet]
      Signed-off-by: NAlan McIvor <alan.mcivor@reveal.co.nz>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      961e668b
  11. 15 2月, 2012 1 次提交
    • H
      [media] v4l2: standardize log start/end message · e2ecb257
      Hans Verkuil 提交于
      For drivers that properly use the v4l2 framework (i.e. set v4l2_dev in the
      video_device struct), the start and end messages of VIDIOC_LOG_STATUS are
      now generated automatically. People tended to forget these, but the v4l2-ctl
      tool scans for these messages, and it also makes it easier to read the status
      output in the kernel log.
      
      The cx18, ivtv and bttv drivers were changed since they no longer need to
      log these start/end messages.
      
      In saa7164 two empty log_status functions were removed.
      
      Also added a helper function to v4l2-ctrl.c that can be used as the
      vidioc_log_status callback if all you need to do is to log the current control
      values. This is now used by pwc and vivi.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Cc: Steven Toth <stoth@kernellabs.com>
      Cc: Andy Walls <awalls@md.metrocast.net>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      e2ecb257
  12. 08 11月, 2011 1 次提交
  13. 04 9月, 2011 1 次提交
    • J
      [media] bt8xx: Use current logging styles · 8af443e5
      Joe Perches 提交于
      This converts some messages that were emitted at
      KERN_INFO to KERN_DEBUG.  All of these messages
      were guarded by bttv_debug tests.
      
      Add pr_fmt.
      Convert printks to pr_<level>
      Convert printks without KERN_<level> to appropriate pr_<level>.
      Removed embedded prefixes when pr_fmt was added.
      Whitespace cleanups when around other conversions.
      Macros coded with if statements should be do { if... } while (0)
      so the macros can be used in other if tests.
      Use ##__VA_ARGS__ for variadic macro as well.
      Coalesce format strings.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      8af443e5
  14. 28 7月, 2011 1 次提交
    • M
      [media] Stop using linux/version.h on most video drivers · 1990d50b
      Mauro Carvalho Chehab 提交于
      All the modified drivers didn't have any version increment since
      Jan, 1 2011. Several of them didn't have any version increment
      for a long time, even having new features and important bug fixes
      happening.
      
      As we're now filling the QUERYCAP version with the current Kernel
      Release, we don't need to maintain a per-driver version control
      anymore. So, let's just use the default.
      
      In order to preserve the Kernel module version history, a
      KERNEL_VERSION() macro were added to all modified drivers, and
      the extraver number were incremented.
      
      I opted to preserve the per-driver version control to a few
      pwc, pvrusb2, s2255, s5p-fimc and sh_vou.
      
      A few drivers are still using the legacy way to handle ioctl's.
      So, we can't do such change on them, otherwise, they'll break.
      Those are: uvc, et61x251 and sn9c102.
      
      The rationale is that the per-driver version control seems to be
      actively maintained on those.
      
      Yet, I think that the better for them would be to just use the
      default version numbering, instead of doing that by themselves.
      
      While here, removed a few uneeded include linux/version.h
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      1990d50b
  15. 08 7月, 2011 1 次提交
  16. 20 5月, 2011 1 次提交
  17. 29 12月, 2010 3 次提交
  18. 24 12月, 2010 1 次提交
    • T
      media/video: explicitly flush request_module work · 707bcf32
      Tejun Heo 提交于
      Video drivers request submodules using a work during probe and calls
      flush_scheduled_work() on exit to make sure the work is complete
      before being unloaded.  This patch makes these drivers flush the work
      directly instead of using flush_scheduled_work().
      
      While at it, relocate request_submodules() call in saa7134_initdev()
      right right before successful return as in other drivers to avoid
      failing after the work is scheduled and returning failure without the
      work still active.
      
      This is in preparation for the deprecation of flush_scheduled_work().
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
      707bcf32
  19. 18 12月, 2010 2 次提交
  20. 18 11月, 2010 1 次提交
  21. 21 10月, 2010 5 次提交
  22. 19 5月, 2010 3 次提交
  23. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  24. 27 2月, 2010 1 次提交
  25. 19 2月, 2010 1 次提交
  26. 16 12月, 2009 4 次提交