Re: Unable to compile v4l-dvb in ubuntu 14.04

2015-06-09 Thread Olli Salonen
Hi,

Do you have a specific reason for not using the media_build? You're
getting the following warning:

WARNING: You're using an obsolete driver! You shouldn't be using it!
 If you want anything new, you can use:
http://git.linuxtv.org/media_build.git.
 The tree is still here just to preserve the development history.
 You've been warned.

Also, check the kernel and linux-header versions you have installed.
Is it 3.16 or 3.6?

Cheers,
-olli

On 8 June 2015 at 18:06, CIJOML CIJOMLovic cij...@gmail.com wrote:
 Hello,

 I am trying to compile v4l git with no success. I have kernel and
 headers installed.
 Is problem at my side or in source?

 Thank you for help or solving the problem:

 root@Latitude-E5550:/usr/src/v4l-dvb-3724e93f7af5# make
 make -C /usr/src/v4l-dvb-3724e93f7af5/v4l
 make[1]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 No version yet, using 3.16.0-38-generic
 make[1]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 make[1]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 scripts/make_makefile.pl
 Updating/Creating .config
 Preparing to compile for kernel version 3.6.0

 ***WARNING:*** You do not have the full kernel sources installed.
 This does not prevent you from building the v4l-dvb tree if you have the
 kernel headers, but the full kernel source may be required in order to use
 make menuconfig / xconfig / qconfig.

 If you are experiencing problems building the v4l-dvb tree, please try
 building against a vanilla kernel before reporting a bug.

 Vanilla kernels are available at http://kernel.org.
 On most distros, this will compile a newly downloaded kernel:

 cp /boot/config-`uname -r` your kernel dir/.config
 cd your kernel dir
 make all modules_install install

 Please see your distro's web site for instructions to build a new kernel.

 WARNING: You're using an obsolete driver! You shouldn't be using it!
  If you want anything new, you can use:
 http://git.linuxtv.org/media_build.git.
  The tree is still here just to preserve the development history.
  You've been warned.
 Created default (all yes) .config file
 ./scripts/make_myconfig.pl
 make[1]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 make[1]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 perl scripts/make_config_compat.pl /lib/modules/3.6.0-38-generic/build
 ./.myconfig ./config-compat.h
 creating symbolic links...
 ln -sf . oss
 make -C firmware prep
 make[2]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l/firmware'
 make[2]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l/firmware'
 make -C firmware
 make[2]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l/firmware'
   CC  ihex2fw
 Generating vicam/firmware.fw
 Generating dabusb/firmware.fw
 Generating dabusb/bitstream.bin
 Generating ttusb-budget/dspbootcode.bin
 Generating cpia2/stv0672_vp4.bin
 Generating av7110/bootcode.bin
 make[2]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l/firmware'
 Kernel build directory is /lib/modules/3.6.0-38-generic/build
 make -C /lib/modules/3.6.0-38-generic/build
 SUBDIRS=/usr/src/v4l-dvb-3724e93f7af5/v4l CFLAGS=-I../linux/include
 -D__KERNEL__ -I/include -DEXPORT_SYMTAB modules
 make[2]: Entering directory `/usr/src/linux-headers-3.16.0-38-generic'
   CC [M]  /usr/src/v4l-dvb-3724e93f7af5/v4l/tuner-xc2028.o
 In file included from command-line:0:0:
 /usr/src/v4l-dvb-3724e93f7af5/v4l/config-compat.h:1235:1: fatal error:
 include/linux/version.h: No such file or directory
  #endif
  ^
 compilation terminated.
 make[3]: *** [/usr/src/v4l-dvb-3724e93f7af5/v4l/tuner-xc2028.o] Error 1
 make[2]: *** [_module_/usr/src/v4l-dvb-3724e93f7af5/v4l] Error 2
 make[2]: Leaving directory `/usr/src/linux-headers-3.16.0-38-generic'
 make[1]: *** [default] Error 2
 make[1]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 make: *** [all] Error 2


 Best regards

 Michal
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v10 0/8] LED / flash API integration

2015-06-09 Thread Sakari Ailus
Thanks, Jacek!!

On Mon, Jun 08, 2015 at 11:02:17AM +0200, Jacek Anaszewski wrote:
 This is tenth non-RFC version of LED / flash API integration
 series [1]. It is based on linux_next-20150605 with patch [2].

For the set:

Acked-by: Sakari Ailus sakari.ai...@linux.intel.com

-- 
Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v1.1 1/5] v4l: async: Add a pointer to of_node to struct v4l2_subdev, match it

2015-06-09 Thread Sakari Ailus
Hi Laurent,

On Tue, Jun 02, 2015 at 05:47:12AM +0300, Laurent Pinchart wrote:
 Hi Sakari,
 
 Thank you for the patch. Please see below for one small comment.
 
 On Monday 01 June 2015 01:24:39 Sakari Ailus wrote:
  V4L2 async sub-devices are currently matched (OF case) based on the struct
  device_node pointer in struct device. LED devices may have more than one
  LED, and in that case the OF node to match is not directly the device's
  node, but a LED's node.
  
  Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
  Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
  ---
  since v1:
  
  - Move conditional setting of struct v4l2_subdev.of_node from
v4l2_device_register_subdev() to v4l2_async_register_subdev.
  
  - Remove the check for NULL struct v4l2_subdev.of_node from match_of() as
it's no longer needed.
  
  - Unconditionally state in the struct v4l2_subdev.of_node field comment that
  the field contains (a pointer to) the sub-device's of_node.
  
   drivers/media/v4l2-core/v4l2-async.c | 34 +
   include/media/v4l2-subdev.h  |  2 ++
   2 files changed, 24 insertions(+), 12 deletions(-)
  
  diff --git a/drivers/media/v4l2-core/v4l2-async.c
  b/drivers/media/v4l2-core/v4l2-async.c index 85a6a34..b0badac 100644
  --- a/drivers/media/v4l2-core/v4l2-async.c
  +++ b/drivers/media/v4l2-core/v4l2-async.c
 
 [snip]
 
  @@ -266,6 +273,9 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd)
   {
  struct v4l2_async_notifier *notifier;
  
  +   if (!sd-of_node  sd-dev)
  +   sd-of_node = sd-dev-of_node;
  +
 
 I think we don't need to take a reference to of_node here, as we assume 
 there's a reference to dev through the whole life of the subdev, and dev 
 should have a reference to of_node, but could you double-check ?
 
 If that's indeed not a problem,
 
 Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

Good question.

I don't think a reference would be needed also because we are only
interested in the pointer value itself, the memory the pointer is pointing
to is never accessed.

As far as I can tell, there's no reference through the device.

I can add a comment on this if you like. Perhaps it'd be a good idea
actually, as you usually do take a reference in such cases.

-- 
Regards,

Sakari Ailus
e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Unable to compile v4l-dvb in ubuntu 14.04

2015-06-09 Thread CIJOML CIJOMLovic
Hello Olli,

I think tar.bz2 generated fromhttp://linuxtv.org/hg/v4l-dvb are
current snaphots from git. Or Am I wrong?
But back to my problem YES I have kernel 3.16.0-38 and also headers
3.16.0-38. I also realized that compiler claims 3.6.0, but it is
wrong. I don't have such kernel.

Thank you for fix

Michal

2015-06-09 12:08 GMT+02:00 Olli Salonen olli.salo...@iki.fi:
 Hi,

 Do you have a specific reason for not using the media_build? You're
 getting the following warning:

 WARNING: You're using an obsolete driver! You shouldn't be using it!
  If you want anything new, you can use:
 http://git.linuxtv.org/media_build.git.
  The tree is still here just to preserve the development history.
  You've been warned.

 Also, check the kernel and linux-header versions you have installed.
 Is it 3.16 or 3.6?

 Cheers,
 -olli

 On 8 June 2015 at 18:06, CIJOML CIJOMLovic cij...@gmail.com wrote:
 Hello,

 I am trying to compile v4l git with no success. I have kernel and
 headers installed.
 Is problem at my side or in source?

 Thank you for help or solving the problem:

 root@Latitude-E5550:/usr/src/v4l-dvb-3724e93f7af5# make
 make -C /usr/src/v4l-dvb-3724e93f7af5/v4l
 make[1]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 No version yet, using 3.16.0-38-generic
 make[1]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 make[1]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 scripts/make_makefile.pl
 Updating/Creating .config
 Preparing to compile for kernel version 3.6.0

 ***WARNING:*** You do not have the full kernel sources installed.
 This does not prevent you from building the v4l-dvb tree if you have the
 kernel headers, but the full kernel source may be required in order to use
 make menuconfig / xconfig / qconfig.

 If you are experiencing problems building the v4l-dvb tree, please try
 building against a vanilla kernel before reporting a bug.

 Vanilla kernels are available at http://kernel.org.
 On most distros, this will compile a newly downloaded kernel:

 cp /boot/config-`uname -r` your kernel dir/.config
 cd your kernel dir
 make all modules_install install

 Please see your distro's web site for instructions to build a new kernel.

 WARNING: You're using an obsolete driver! You shouldn't be using it!
  If you want anything new, you can use:
 http://git.linuxtv.org/media_build.git.
  The tree is still here just to preserve the development history.
  You've been warned.
 Created default (all yes) .config file
 ./scripts/make_myconfig.pl
 make[1]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 make[1]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 perl scripts/make_config_compat.pl /lib/modules/3.6.0-38-generic/build
 ./.myconfig ./config-compat.h
 creating symbolic links...
 ln -sf . oss
 make -C firmware prep
 make[2]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l/firmware'
 make[2]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l/firmware'
 make -C firmware
 make[2]: Entering directory `/usr/src/v4l-dvb-3724e93f7af5/v4l/firmware'
   CC  ihex2fw
 Generating vicam/firmware.fw
 Generating dabusb/firmware.fw
 Generating dabusb/bitstream.bin
 Generating ttusb-budget/dspbootcode.bin
 Generating cpia2/stv0672_vp4.bin
 Generating av7110/bootcode.bin
 make[2]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l/firmware'
 Kernel build directory is /lib/modules/3.6.0-38-generic/build
 make -C /lib/modules/3.6.0-38-generic/build
 SUBDIRS=/usr/src/v4l-dvb-3724e93f7af5/v4l CFLAGS=-I../linux/include
 -D__KERNEL__ -I/include -DEXPORT_SYMTAB modules
 make[2]: Entering directory `/usr/src/linux-headers-3.16.0-38-generic'
   CC [M]  /usr/src/v4l-dvb-3724e93f7af5/v4l/tuner-xc2028.o
 In file included from command-line:0:0:
 /usr/src/v4l-dvb-3724e93f7af5/v4l/config-compat.h:1235:1: fatal error:
 include/linux/version.h: No such file or directory
  #endif
  ^
 compilation terminated.
 make[3]: *** [/usr/src/v4l-dvb-3724e93f7af5/v4l/tuner-xc2028.o] Error 1
 make[2]: *** [_module_/usr/src/v4l-dvb-3724e93f7af5/v4l] Error 2
 make[2]: Leaving directory `/usr/src/linux-headers-3.16.0-38-generic'
 make[1]: *** [default] Error 2
 make[1]: Leaving directory `/usr/src/v4l-dvb-3724e93f7af5/v4l'
 make: *** [all] Error 2


 Best regards

 Michal
 --
 To unsubscribe from this list: send the line unsubscribe linux-media in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v2] radio-bcm2048: Fix region selection

2015-06-09 Thread Pali Rohár
From: Jan Roemisch m...@spaceboyz.net

This patch fixes region selection for lower bottom_frequency in BCM2048 FM
receiver. It also removes Japan wide band region since this is impossible
to do just like that.

Signed-off-by: Jan Roemisch m...@spaceboyz.net
Acked-by: Pali Rohár pali.ro...@gmail.com
---
 drivers/staging/media/bcm2048/radio-bcm2048.c |   20 
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c 
b/drivers/staging/media/bcm2048/radio-bcm2048.c
index e9d0691..134e2af 100644
--- a/drivers/staging/media/bcm2048/radio-bcm2048.c
+++ b/drivers/staging/media/bcm2048/radio-bcm2048.c
@@ -342,14 +342,6 @@ static struct region_info region_configs[] = {
.deemphasis = 50,
.region = 3,
},
-   /* Japan wide band */
-   {
-   .channel_spacing= 10,
-   .bottom_frequency   = 76000,
-   .top_frequency  = 108000,
-   .deemphasis = 50,
-   .region = 4,
-   },
 };
 
 /*
@@ -741,6 +733,18 @@ static int bcm2048_set_region(struct bcm2048_device *bdev, 
u8 region)
 
mutex_lock(bdev-mutex);
bdev-region_info = region_configs[region];
+
+   if (region_configs[region].bottom_frequency  87500)
+   bdev-cache_fm_ctrl |= BCM2048_BAND_SELECT;
+   else
+   bdev-cache_fm_ctrl = ~BCM2048_BAND_SELECT;
+
+   err = bcm2048_send_command(bdev, BCM2048_I2C_FM_CTRL,
+   bdev-cache_fm_ctrl);
+   if (err) {
+   mutex_unlock(bdev-mutex);
+   goto done;
+   }
mutex_unlock(bdev-mutex);
 
if (bdev-frequency  region_configs[region].bottom_frequency ||
-- 
1.7.10.4

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v6 1/3] ivtv: use arch_phys_wc_add() and require PAT disabled

2015-06-09 Thread Hans Verkuil
On 06/09/2015 02:56 AM, Mauro Carvalho Chehab wrote:
 Em Mon, 08 Jun 2015 17:20:20 -0700
 Luis R. Rodriguez mcg...@do-not-panic.com escreveu:
 
 From: Luis R. Rodriguez mcg...@suse.com

 We are burrying direct access to MTRR code support on
 x86 in order to take advantage of PAT. In the future we
 also want to make the default behaviour of ioremap_nocache()
 to use strong UC, use of mtrr_add() on those systems
 would make write-combining void.

 In order to help both enable us to later make strong
 UC default and in order to phase out direct MTRR access
 code port the driver over to arch_phys_wc_add() and
 annotate that the device driver requires systems to
 boot with PAT disabled, with the nopat kernel parameter.

 This is a worthy comprmise given that the hardware is
 really rare these days, and perhaps only some lost souls
 in some third world country are expected to be using this
 feature of the device driver.

 Acked-by: Andy Walls awa...@md.metrocast.net
 Cc: Andy Walls awa...@md.metrocast.net
 Cc: Doug Ledford dledf...@redhat.com
 Cc: Mauro Carvalho Chehab mche...@osg.samsung.com
 
 Provided that you fix the issues below:
 Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com
 
 Cc: Andy Lutomirski l...@amacapital.net
 Cc: Suresh Siddha sbsid...@gmail.com
 Cc: Ingo Molnar mi...@elte.hu
 Cc: Thomas Gleixner t...@linutronix.de
 Cc: Juergen Gross jgr...@suse.com
 Cc: Daniel Vetter daniel.vet...@ffwll.ch
 Cc: Dave Airlie airl...@redhat.com
 Cc: Bjorn Helgaas bhelg...@google.com
 Cc: Antonino Daplas adap...@gmail.com
 Cc: Jean-Christophe Plagniol-Villard plagn...@jcrosoft.com
 Cc: Tomi Valkeinen tomi.valkei...@ti.com
 Cc: Dave Hansen dave.han...@linux.intel.com
 Cc: Arnd Bergmann a...@arndb.de
 Cc: Michael S. Tsirkin m...@redhat.com
 Cc: Stefan Bader stefan.ba...@canonical.com
 Cc: Ville Syrjälä syrj...@sci.fi
 Cc: Mel Gorman mgor...@suse.de
 Cc: Vlastimil Babka vba...@suse.cz
 Cc: Borislav Petkov b...@suse.de
 Cc: Davidlohr Bueso dbu...@suse.de
 Cc: konrad.w...@oracle.com
 Cc: ville.syrj...@linux.intel.com
 Cc: david.vra...@citrix.com
 Cc: jbeul...@suse.com
 Cc: toshi.k...@hp.com
 Cc: Roger Pau Monné roger@citrix.com
 Cc: linux-fb...@vger.kernel.org
 Cc: linux-ker...@vger.kernel.org
 Cc: ivtv-de...@ivtvdriver.org
 Cc: linux-media@vger.kernel.org
 Cc: xen-de...@lists.xensource.com
 Signed-off-by: Luis R. Rodriguez mcg...@suse.com
 ---
  drivers/media/pci/ivtv/Kconfig  |  3 +++
  drivers/media/pci/ivtv/ivtvfb.c | 58 
 -
  2 files changed, 26 insertions(+), 35 deletions(-)

 diff --git a/drivers/media/pci/ivtv/Kconfig b/drivers/media/pci/ivtv/Kconfig
 index dd6ee57e..b2a7f88 100644
 --- a/drivers/media/pci/ivtv/Kconfig
 +++ b/drivers/media/pci/ivtv/Kconfig
 @@ -57,5 +57,8 @@ config VIDEO_FB_IVTV
This is used in the Hauppauge PVR-350 card. There is a driver
homepage at http://www.ivtvdriver.org.
  
 +  If you have this hardware you will need to boot with PAT disabled
 +  on your x86 systems, use the nopat kernel parameter.
 +
 
 Hmm... FB_IVTV is not hardware... it is framebuffer support for IVTV.
 It is optional to use FB API for the video output port of this board,
 instead of using V4L2 API.

That's not true. It is hardware: it drives the video output OSD which overlays
the video output. The reason it is optional is that it is hard to unload a
framebuffer module and most people don't need it.

So V4L2 drives the video output and ivtvfb drives the OSD overlay. So it is
not a case of 'instead of'.

 
 I would say, instead, something like: 
 
   In order to use this module, you will need to boot with PAT disabled
 on x86 systems, using the nopat kernel parameter.

I do agree with this change, but that's because this module is optional and
not for the reasons you mentioned above.

Regards,

Hans

 
To compile this driver as a module, choose M here: the
module will be called ivtvfb.
 diff --git a/drivers/media/pci/ivtv/ivtvfb.c 
 b/drivers/media/pci/ivtv/ivtvfb.c
 index 9ff1230..7685ae3 100644
 --- a/drivers/media/pci/ivtv/ivtvfb.c
 +++ b/drivers/media/pci/ivtv/ivtvfb.c
 @@ -44,8 +44,8 @@
  #include linux/ivtvfb.h
  #include linux/slab.h
  
 -#ifdef CONFIG_MTRR
 -#include asm/mtrr.h
 +#ifdef CONFIG_X86_64
 +#include asm/pat.h
  #endif
  
  #include ivtv-driver.h
 @@ -155,12 +155,11 @@ struct osd_info {
  /* Buffer size */
  u32 video_buffer_size;
  
 -#ifdef CONFIG_MTRR
  /* video_base rounded down as required by hardware MTRRs */
  unsigned long fb_start_aligned_physaddr;
  /* video_base rounded up as required by hardware MTRRs */
  unsigned long fb_end_aligned_physaddr;
 -#endif
 +int wc_cookie;
  
  /* Store the buffer offset */
  int set_osd_coords_x;
 @@ -1099,6 +1098,8 @@ static int ivtvfb_init_vidmode(struct ivtv *itv)
  static int ivtvfb_init_io(struct ivtv *itv)
  {
  struct osd_info *oi = itv-osd_info;
 +/* Find the largest power of two that maps the 

Re: [PATCH 18/26] [media] dvb: Get rid of typedev usage for enums

2015-06-09 Thread Mauro Carvalho Chehab
Em Mon, 08 Jun 2015 13:03:03 -0700
Joe Perches j...@perches.com escreveu:

 On Mon, 2015-06-08 at 16:54 -0300, Mauro Carvalho Chehab wrote:
  The DVB API was originally defined using typedefs. This is against
  Kernel CodingStyle, and there's no good usage here. While we can't
  remove its usage on userspace, we can avoid its usage in Kernelspace.
  
  So, let's do it.
  
  This patch was generated by this shell script:
  
  for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 
  3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find 
  drivers/staging/media -name '*.[ch]' -type f); do sed s,${j}_t,enum $j, 
  $i a  mv a $i; done; done
 
 Seems sensible, thanks.
 
  While here, make CodingStyle fixes on the affected lines.
 
 Trivial note examples:
 
  diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c 
  b/drivers/media/common/b2c2/flexcop-fe-tuner.c
 []
  @@ -39,7 +39,8 @@ static int flexcop_fe_request_firmware(struct 
  dvb_frontend *fe,
   
   /* lnb control */
   #if FE_SUPPORTED(MT312) || FE_SUPPORTED(STV0299)
  -static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t 
  voltage)
  +static int flexcop_set_voltage(struct dvb_frontend *fe,
  +  enum fe_sec_voltage voltage)
 
 Aligned to open paren.
 
  @@ -157,7 +158,7 @@ static int flexcop_diseqc_send_master_cmd(struct 
  dvb_frontend *fe,
   }
   
   static int flexcop_diseqc_send_burst(struct dvb_frontend *fe,
  -   fe_sec_mini_cmd_t minicmd)
  +   enum fe_sec_mini_cmd minicmd)
 
 Not aligned to open paren.
 
 Why some and not all?

Because checkpatch.pl didn't complain ;)

Yet, I agree that it makes sense to do it too. See the enclosed diff.

Please notice that I left a few ones without aligning, because doing the
open parenthesis alignment would cause the 80-cols warning.

I also fixed a few other checkpatch warnings (to satisfy --strict).

Only whitespaces/line breaks were changed below.

 
  diff --git a/drivers/media/common/siano/smsdvb.h 
  b/drivers/media/common/siano/smsdvb.h
 []
  @@ -40,7 +40,7 @@ struct smsdvb_client_t {
  struct dmxdev   dmxdev;
  struct dvb_frontend frontend;
   
  -   fe_status_t fe_status;
  +   enum fe_status fe_status;
 
 Maybe realign these too.

Agreed.

Ok, did a patch fixing the miss-aligns I saw.

I'll fold this one together with patch 18/26.

Regards,
Mauro

diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c 
b/drivers/media/common/b2c2/flexcop-fe-tuner.c
index 45bfa2f243cd..5e5696729eca 100644
--- a/drivers/media/common/b2c2/flexcop-fe-tuner.c
+++ b/drivers/media/common/b2c2/flexcop-fe-tuner.c
@@ -158,7 +158,7 @@ static int flexcop_diseqc_send_master_cmd(struct 
dvb_frontend *fe,
 }
 
 static int flexcop_diseqc_send_burst(struct dvb_frontend *fe,
-   enum fe_sec_mini_cmd minicmd)
+enum fe_sec_mini_cmd minicmd)
 {
return flexcop_send_diseqc_msg(fe, 0, NULL, minicmd);
 }
diff --git a/drivers/media/common/siano/smsdvb.h 
b/drivers/media/common/siano/smsdvb.h
index 6390ec93ecdf..b15754d95ec0 100644
--- a/drivers/media/common/siano/smsdvb.h
+++ b/drivers/media/common/siano/smsdvb.h
@@ -40,7 +40,7 @@ struct smsdvb_client_t {
struct dmxdev   dmxdev;
struct dvb_frontend frontend;
 
-   enum fe_status fe_status;
+   enum fe_status  fe_status;
 
struct completion   tune_done;
struct completion   stats_done;
diff --git a/drivers/media/dvb-core/dvb_frontend.c 
b/drivers/media/dvb-core/dvb_frontend.c
index 59643ab9e89a..55a6b0500615 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -2413,7 +2413,7 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
case FE_DISEQC_SEND_BURST:
if (fe-ops.diseqc_send_burst) {
err = fe-ops.diseqc_send_burst(fe,
-   (enum fe_sec_mini_cmd) parg);
+   (enum fe_sec_mini_cmd)parg);
fepriv-state = FESTATE_DISEQC;
fepriv-status = 0;
}
@@ -2422,8 +2422,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
case FE_SET_TONE:
if (fe-ops.set_tone) {
err = fe-ops.set_tone(fe,
-  (enum fe_sec_tone_mode) parg);
-   fepriv-tone = (enum fe_sec_tone_mode) parg;
+  (enum fe_sec_tone_mode)parg);
+   fepriv-tone = (enum fe_sec_tone_mode)parg;
fepriv-state = FESTATE_DISEQC;
fepriv-status = 0;
}
@@ -2432,8 +2432,8 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
case FE_SET_VOLTAGE:
if (fe-ops.set_voltage) {
   

[PATCH] v4l2-ctl-modes: add support for reduced blanking v2

2015-06-09 Thread Prashant Laddha
Currently, if reduced blanking flag is set to true, cvt timings are
calculated for reduced blanking version 2.

To Do: extend the cvt options to inlcude rb v2.

Signed-off-by: Prashant Laddha prlad...@cisco.com
---
 utils/v4l2-ctl/v4l2-ctl-modes.cpp | 40 +++
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/utils/v4l2-ctl/v4l2-ctl-modes.cpp 
b/utils/v4l2-ctl/v4l2-ctl-modes.cpp
index 7422bc5..cfe4086 100644
--- a/utils/v4l2-ctl/v4l2-ctl-modes.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-modes.cpp
@@ -52,6 +52,7 @@ static bool valid_params(int width, int height, int 
refresh_rate)
  */
 
 #define CVT_PXL_CLK_GRAN(25)  /* pixel clock granularity */
+#define CVT_PXL_CLK_GRAN_RB_V2 (1000)  /* granularity for reduced blanking v2*/
 
 /* Normal blanking */
 #define CVT_MIN_V_BPORCH (7)  /* lines */
@@ -77,6 +78,12 @@ static bool valid_params(int width, int height, int 
refresh_rate)
 #define CVT_RB_H_BPORCH   (80)   /* pixels */
 #define CVT_RB_H_BLANK   (160)   /* pixels */
 
+/* Reduce blanking Version 2 */
+#define CVT_RB_V2_H_BLANK 80   /* pixels */
+#define CVT_RB_MIN_V_FPORCH3   /* lines  */
+#define CVT_RB_V2_MIN_V_FPORCH 1   /* lines  */
+#define CVT_RB_V_BPORCH6   /* lines  */
+
 static int v_sync_from_aspect_ratio(int width, int height)
 {
if (((height * 4 / 3) / CVT_CELL_GRAN) * CVT_CELL_GRAN == width)
@@ -148,6 +155,11 @@ bool calc_cvt_modeline(int image_width, int image_height,
int interlace;
int v_refresh;
int pixel_clock;
+   int clk_gran;
+   bool rb_v2 = false;
+
+   rb_v2 = reduced_blanking ? true : false;
+   clk_gran = rb_v2 ? CVT_PXL_CLK_GRAN_RB_V2 : CVT_PXL_CLK_GRAN;
 
if (!valid_params(image_width, image_height, refresh_rate))
return false;
@@ -186,7 +198,7 @@ bool calc_cvt_modeline(int image_width, int image_height,
active_h_pixel = h_pixel_rnd;
active_v_lines = v_lines_rnd;
 
-   v_sync = v_sync_from_aspect_ratio(h_pixel, v_lines);
+   v_sync = rb_v2 ? 8 : v_sync_from_aspect_ratio(h_pixel, v_lines);
 
if (!reduced_blanking) {
int tmp1, tmp2;
@@ -235,6 +247,8 @@ bool calc_cvt_modeline(int image_width, int image_height,
 
int vbi_lines;
int tmp1, tmp2;
+   int min_vbi_lines;
+   int h_blank;
 
/* estimate horizontal period. */
tmp1 = HV_FACTOR * 100 -
@@ -245,26 +259,36 @@ bool calc_cvt_modeline(int image_width, int image_height,
 
vbi_lines = CVT_RB_MIN_V_BLANK * HV_FACTOR / h_period + 1;
 
-   if (vbi_lines  (CVT_RB_V_FPORCH + v_sync + CVT_MIN_V_BPORCH))
-   vbi_lines = CVT_RB_V_FPORCH + v_sync + CVT_MIN_V_BPORCH;
+   if (rb_v2)
+   min_vbi_lines = CVT_RB_V2_MIN_V_FPORCH + v_sync + 
CVT_RB_V_BPORCH;
+   else
+   min_vbi_lines = CVT_RB_V_FPORCH + v_sync + 
CVT_MIN_V_BPORCH;
 
-   total_h_pixel = active_h_pixel + CVT_RB_H_BLANK;
+   if (vbi_lines  min_vbi_lines)
+   vbi_lines = min_vbi_lines;
 
-   h_blank = CVT_RB_H_BLANK;
+   h_blank = rb_v2 ? CVT_RB_V2_H_BLANK : CVT_RB_H_BLANK;
v_blank = vbi_lines;
 
+   total_h_pixel = active_h_pixel + h_blank;
+
h_sync = CVT_RB_H_SYNC;
 
h_bp = h_blank / 2;
h_fp = h_blank - h_bp - h_sync;
 
-   v_fp = CVT_RB_V_FPORCH;
-   v_bp = v_blank - v_fp - v_sync;
+   if (rb_v2) {
+   v_bp = CVT_RB_V_BPORCH;
+   v_fp = v_blank - v_bp - v_sync;
+   } else {
+   v_fp = CVT_RB_V_FPORCH;
+   v_bp = v_blank - v_fp - v_sync;
+   }
}
 
pixel_clock =  ((long long)total_h_pixel * HV_FACTOR * 100)
/ h_period;
-   pixel_clock -= pixel_clock  % CVT_PXL_CLK_GRAN;
+   pixel_clock -= pixel_clock  % clk_gran;
 
cvt-standards   = V4L2_DV_BT_STD_CVT;
 
-- 
1.9.1

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Y2038] [PATCH] Staging: media: lirc: Replace timeval with ktime_t

2015-06-09 Thread Dan Carpenter
On Tue, Jun 09, 2015 at 06:15:50PM +0200, Ksenija Stanojević wrote:
 On Mon, Jun 8, 2015 at 10:12 PM, Greg KH gre...@linuxfoundation.org wrote:
  On Mon, Jun 08, 2015 at 09:37:24PM +0200, Ksenija Stanojević wrote:
  Hi Greg,
 
  It's been over two weeks that I've sent this patch.  Have you missed it?
 
  Not at all, please look at the output of
  $ ./scripts/get_maintainer.pl --file 
  drivers/staging/media/lirc/lirc_sir.c
 
 
 Ok. I used:
  ./scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback
 --norolestats --file

That command works fine.

 
 I'll use instead ./scripts/get_maintainer.pl --file and send a v2.

No need.  You sent it to linux-media@vger.kernel.org and Mauro the first
time.  Just be patient.

regards,
dan carpenter

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [Y2038] [PATCH] Staging: media: lirc: Replace timeval with ktime_t

2015-06-09 Thread Ksenija Stanojević
On Mon, Jun 8, 2015 at 10:12 PM, Greg KH gre...@linuxfoundation.org wrote:
 On Mon, Jun 08, 2015 at 09:37:24PM +0200, Ksenija Stanojević wrote:
 Hi Greg,

 It's been over two weeks that I've sent this patch.  Have you missed it?

 Not at all, please look at the output of
 $ ./scripts/get_maintainer.pl --file 
 drivers/staging/media/lirc/lirc_sir.c


Ok. I used:
 ./scripts/get_maintainer.pl --nokeywords --nogit --nogit-fallback
--norolestats --file

I'll use instead ./scripts/get_maintainer.pl --file and send a v2.

 To see why I ignored this.

 greg k-h
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: Thanks for responding

2015-06-09 Thread aswamina
Hi,

I am diagnosed with laryngeal cancer, I' want to give my money to you  my body 
to science. Respond with this ref SvaSo so I know you got this.

Ruby
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] v4l2-ctl-modes: add support for reduced blanking v2

2015-06-09 Thread Prashant Laddha (prladdha)
This is still a work in progress. Please ignore this patch. This went out
by mistake. My apologies.

Regards,
Prashant

On 09/06/15 10:46 pm, Prashant Laddha (prladdha) prlad...@cisco.com
wrote:

Currently, if reduced blanking flag is set to true, cvt timings are
calculated for reduced blanking version 2.

To Do: extend the cvt options to inlcude rb v2.

Signed-off-by: Prashant Laddha prlad...@cisco.com
---
 utils/v4l2-ctl/v4l2-ctl-modes.cpp | 40
+++
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/utils/v4l2-ctl/v4l2-ctl-modes.cpp
b/utils/v4l2-ctl/v4l2-ctl-modes.cpp
index 7422bc5..cfe4086 100644
--- a/utils/v4l2-ctl/v4l2-ctl-modes.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-modes.cpp
@@ -52,6 +52,7 @@ static bool valid_params(int width, int height, int
refresh_rate)
  */
 
 #define CVT_PXL_CLK_GRAN(25)  /* pixel clock granularity */
+#define CVT_PXL_CLK_GRAN_RB_V2 (1000) /* granularity for reduced
blanking v2*/
 
 /* Normal blanking */
 #define CVT_MIN_V_BPORCH (7)  /* lines */
@@ -77,6 +78,12 @@ static bool valid_params(int width, int height, int
refresh_rate)
 #define CVT_RB_H_BPORCH   (80)   /* pixels */
 #define CVT_RB_H_BLANK   (160)   /* pixels */
 
+/* Reduce blanking Version 2 */
+#define CVT_RB_V2_H_BLANK 80   /* pixels */
+#define CVT_RB_MIN_V_FPORCH3   /* lines  */
+#define CVT_RB_V2_MIN_V_FPORCH 1   /* lines  */
+#define CVT_RB_V_BPORCH6   /* lines  */
+
 static int v_sync_from_aspect_ratio(int width, int height)
 {
   if (((height * 4 / 3) / CVT_CELL_GRAN) * CVT_CELL_GRAN == width)
@@ -148,6 +155,11 @@ bool calc_cvt_modeline(int image_width, int
image_height,
   int interlace;
   int v_refresh;
   int pixel_clock;
+  int clk_gran;
+  bool rb_v2 = false;
+
+  rb_v2 = reduced_blanking ? true : false;
+  clk_gran = rb_v2 ? CVT_PXL_CLK_GRAN_RB_V2 : CVT_PXL_CLK_GRAN;
 
   if (!valid_params(image_width, image_height, refresh_rate))
   return false;
@@ -186,7 +198,7 @@ bool calc_cvt_modeline(int image_width, int
image_height,
   active_h_pixel = h_pixel_rnd;
   active_v_lines = v_lines_rnd;
 
-  v_sync = v_sync_from_aspect_ratio(h_pixel, v_lines);
+  v_sync = rb_v2 ? 8 : v_sync_from_aspect_ratio(h_pixel, v_lines);
 
   if (!reduced_blanking) {
   int tmp1, tmp2;
@@ -235,6 +247,8 @@ bool calc_cvt_modeline(int image_width, int
image_height,
 
   int vbi_lines;
   int tmp1, tmp2;
+  int min_vbi_lines;
+  int h_blank;
 
   /* estimate horizontal period. */
   tmp1 = HV_FACTOR * 100 -
@@ -245,26 +259,36 @@ bool calc_cvt_modeline(int image_width, int
image_height,
 
   vbi_lines = CVT_RB_MIN_V_BLANK * HV_FACTOR / h_period + 1;
 
-  if (vbi_lines  (CVT_RB_V_FPORCH + v_sync + CVT_MIN_V_BPORCH))
-  vbi_lines = CVT_RB_V_FPORCH + v_sync + CVT_MIN_V_BPORCH;
+  if (rb_v2)
+  min_vbi_lines = CVT_RB_V2_MIN_V_FPORCH + v_sync + 
CVT_RB_V_BPORCH;
+  else
+  min_vbi_lines = CVT_RB_V_FPORCH + v_sync + 
CVT_MIN_V_BPORCH;
 
-  total_h_pixel = active_h_pixel + CVT_RB_H_BLANK;
+  if (vbi_lines  min_vbi_lines)
+  vbi_lines = min_vbi_lines;
 
-  h_blank = CVT_RB_H_BLANK;
+  h_blank = rb_v2 ? CVT_RB_V2_H_BLANK : CVT_RB_H_BLANK;
   v_blank = vbi_lines;
 
+  total_h_pixel = active_h_pixel + h_blank;
+
   h_sync = CVT_RB_H_SYNC;
 
   h_bp = h_blank / 2;
   h_fp = h_blank - h_bp - h_sync;
 
-  v_fp = CVT_RB_V_FPORCH;
-  v_bp = v_blank - v_fp - v_sync;
+  if (rb_v2) {
+  v_bp = CVT_RB_V_BPORCH;
+  v_fp = v_blank - v_bp - v_sync;
+  } else {
+  v_fp = CVT_RB_V_FPORCH;
+  v_bp = v_blank - v_fp - v_sync;
+  }
   }
 
   pixel_clock =  ((long long)total_h_pixel * HV_FACTOR * 100)
   / h_period;
-  pixel_clock -= pixel_clock  % CVT_PXL_CLK_GRAN;
+  pixel_clock -= pixel_clock  % clk_gran;
 
   cvt-standards   = V4L2_DV_BT_STD_CVT;
 
-- 
1.9.1


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] USB: uvc: add support for the Microsoft Surface Pro 3 Cameras

2015-06-09 Thread Dennis Chen

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 3/4] cx24120: Take control of b2c2 receive stream

2015-06-09 Thread Mauro Carvalho Chehab
Em Tue, 26 May 2015 10:21:11 +0100
Jemma Denson jden...@gmail.com escreveu:

 Hi Patrick,
 
 On 26/05/15 10:05, Patrick Boettcher wrote:
  Now that b2c2 has an option to allow us to do so, turn off the
  flexcop receive stream when we turn off mpeg output whilst tuning.
  Does this not fix (and your '[PATCH 2/4]') the problem of receiving
  PAT from the previously tuned transport-stream?
 
  Then patch 1 and 4 should not be necessary, should they?!
 
 Only patch 1 fixes that problem, so out of the 4 here that one is the 
 most necessary. Controlling the flexcop receive stream and/or stopping 
 the cx24120 from sending doesn't actually appear to do much of anything 
 - it doesn't seem any better or worse doing one or the other, both or 
 even neither! (Apart from Patch 4 breaking things, as mentioned).
 
 I'm including it though because I presume the reference driver advised 
 it was done, and it does tidy up the cx24120 codebase considerably by 
 being able to disable the whole turn off sending the stream whilst 
 tuning feature - I'm envisioning that in the future someone might want 
 to take on the task of merging cx24117  cx24120 as they're quite 
 similar, and allowing what seems to just be a flexcop oddity to be 
 turned off would make this possible.

Hmm... if patch 1 is enough to fix the issue, and patch 4 may break
things, I'll apply only patch 1/4 for now.

If Patrick agrees, and you find a way to avoid breakages, please
resubmit for me to apply the other ones.

Regards,
Mauro

 
 
 Jemma.
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] [media] lmedm04: Neaten logging

2015-06-09 Thread Joe Perches
On Tue, 2015-06-09 at 19:07 -0300, Mauro Carvalho Chehab wrote:
 Hi Joe,

Marhaba Mauro.

 Em Mon, 25 May 2015 01:29:07 -0700
 Joe Perches j...@perches.com escreveu:
 
  Use a more current logging style.
  
  o Use pr_fmt
  o Add missing newlines to formats
  o Remove used-once lme_debug macro incorporating it into dbg_info
  o Remove unnecessary allocation error messages
  o Remove unnecessary semicolons from #defines
  o Remove info macro and convert uses to pr_info
  o Fix spelling of snippet
  o Use %phN extension
 
 There are a few checkpatch warnings:

I hardly use checkpatch tbh

The long lines I don't care about, I presume all the others are
existing, but I'll run --fix on it and resubmit if you want.

  diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c 
  b/drivers/media/usb/dvb-usb-v2/lmedm04.c
[]
   /* debug */
   static int dvb_usb_lme2510_debug;
  -#define lme_debug(var, level, args...) do { \
  -   if ((var = level)) \
  -   pr_debug(DVB_USB_LOG_PREFIX:  args); \
  +#define deb_info(level, fmt, ...)  \
  +do {   
  \
  +   if (dvb_usb_lme2510_debug = level) \
  +   pr_debug(fmt, ##__VA_ARGS__);   \
   } while (0)
 
 
 The usage of both a debug level and pr_debug() is not nice, as,
 if CONFIG_DYNAMIC_DEBUG is enabled (with is the case on most distros),
 one needing to debug would need to both pass a debug level AND to enable
 the debug line via sysfs, with is not nice.

 We might of course remove debug levels as a hole and just use 
 pr_debug(), but the end result is generally worse (didn't chec
 the specifics on this file).
 
 So, the better here would be to use printk like:
 
 #define deb_info(level, fmt, ...)\
   do { if (dvb_usb_lme2510_debug = level)\
   printk(KERN_DEBUG pr_fmt(fmt), ## arg);\
   } while (0)
 
 Ok, this issue were already present on the old code, but IMHO the
 best is to either use the above definition of deb_info() or to just
 call pr_debug() and get rid of dvb_usb_lme2510_debug.

Alternately, you could #define DEBUG and these would be enabled
by default for CONFIG_DYNAMIC_DEBUG and act the same otherwise.


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] treewide: Fix typo compatability - compatibility

2015-06-09 Thread Mauro Carvalho Chehab
Em Wed, 27 May 2015 15:05:42 +0300
Laurent Pinchart laurent.pinch...@ideasonboard.com escreveu:

 Even though 'compatability' has a dedicated entry in the Wiktionary,
 it's listed as 'Mispelling of compatibility'. Fix it.
 
 Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com

 ---
  arch/metag/include/asm/elf.h | 2 +-
  arch/powerpc/kvm/book3s.c| 2 +-
  arch/sparc/include/uapi/asm/pstate.h | 2 +-
  drivers/gpu/drm/drm_atomic_helper.c  | 4 ++--
  drivers/media/dvb-frontends/au8522_dig.c | 2 +-
  drivers/net/wireless/ipw2x00/ipw2100.h   | 2 +-
  6 files changed, 7 insertions(+), 7 deletions(-)
 
 I can split this into one patch per subsystem, but that seems a bit overkill.
 Can someone take it ?

Who? That's the problem with treewide patches ;) 

Perhaps you should re-submit it with the acks you got to akpm.

Regards,
Mauro

 
 diff --git a/arch/metag/include/asm/elf.h b/arch/metag/include/asm/elf.h
 index d2baf6961794..87b0cf1e0acb 100644
 --- a/arch/metag/include/asm/elf.h
 +++ b/arch/metag/include/asm/elf.h
 @@ -11,7 +11,7 @@
  #define R_METAG_RELBRANCH4
  #define R_METAG_GETSETOFF5
  
 -/* Backward compatability */
 +/* Backward compatibility */
  #define R_METAG_REG32OP1 6
  #define R_METAG_REG32OP2 7
  #define R_METAG_REG32OP3 8
 diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c
 index 453a8a47a467..cb14dd78a2e7 100644
 --- a/arch/powerpc/kvm/book3s.c
 +++ b/arch/powerpc/kvm/book3s.c
 @@ -901,7 +901,7 @@ int kvmppc_core_check_processor_compat(void)
  {
   /*
* We always return 0 for book3s. We check
 -  * for compatability while loading the HV
 +  * for compatibility while loading the HV
* or PR module
*/
   return 0;
 diff --git a/arch/sparc/include/uapi/asm/pstate.h 
 b/arch/sparc/include/uapi/asm/pstate.h
 index 4b6b998afd99..cf832e14aa05 100644
 --- a/arch/sparc/include/uapi/asm/pstate.h
 +++ b/arch/sparc/include/uapi/asm/pstate.h
 @@ -88,7 +88,7 @@
  #define VERS_MAXTL   _AC(0xff00,UL) /* Max Trap Level.   */
  #define VERS_MAXWIN  _AC(0x001f,UL) /* Max RegWindow Idx.*/
  
 -/* Compatability Feature Register (%asr26), SPARC-T4 and later  */
 +/* Compatibility Feature Register (%asr26), SPARC-T4 and later  */
  #define CFR_AES  _AC(0x0001,UL) /* Supports AES 
 opcodes */
  #define CFR_DES  _AC(0x0002,UL) /* Supports DES 
 opcodes */
  #define CFR_KASUMI   _AC(0x0004,UL) /* Supports KASUMI opcodes  
 */
 diff --git a/drivers/gpu/drm/drm_atomic_helper.c 
 b/drivers/gpu/drm/drm_atomic_helper.c
 index b82ef6262469..12c5b79b0e8f 100644
 --- a/drivers/gpu/drm/drm_atomic_helper.c
 +++ b/drivers/gpu/drm/drm_atomic_helper.c
 @@ -751,7 +751,7 @@ crtc_set_mode(struct drm_device *dev, struct 
 drm_atomic_state *old_state)
   * This function shuts down all the outputs that need to be shut down and
   * prepares them (if required) with the new mode.
   *
 - * For compatability with legacy crtc helpers this should be called before
 + * For compatibility with legacy crtc helpers this should be called before
   * drm_atomic_helper_commit_planes(), which is what the default commit 
 function
   * does. But drivers with different needs can group the modeset commits 
 together
   * and do the plane commits at the end. This is useful for drivers doing 
 runtime
 @@ -776,7 +776,7 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_disables);
   * This function enables all the outputs with the new configuration which 
 had to
   * be turned off for the update.
   *
 - * For compatability with legacy crtc helpers this should be called after
 + * For compatibility with legacy crtc helpers this should be called after
   * drm_atomic_helper_commit_planes(), which is what the default commit 
 function
   * does. But drivers with different needs can group the modeset commits 
 together
   * and do the plane commits at the end. This is useful for drivers doing 
 runtime
 diff --git a/drivers/media/dvb-frontends/au8522_dig.c 
 b/drivers/media/dvb-frontends/au8522_dig.c
 index 5d06c99b0e97..edadcc7eea6c 100644
 --- a/drivers/media/dvb-frontends/au8522_dig.c
 +++ b/drivers/media/dvb-frontends/au8522_dig.c
 @@ -922,7 +922,7 @@ module_param(debug, int, 0644);
  MODULE_PARM_DESC(debug, Enable verbose debug messages);
  
  module_param(zv_mode, int, 0644);
 -MODULE_PARM_DESC(zv_mode, Turn on/off ZeeVee modulator compatability mode 
 (default:on).\n
 +MODULE_PARM_DESC(zv_mode, Turn on/off ZeeVee modulator compatibility mode 
 (default:on).\n
   \t\ton - modified AU8522 QAM256 initialization.\n
   \t\tProvides faster lock when using ZeeVee modulator based sources);
  
 diff --git a/drivers/net/wireless/ipw2x00/ipw2100.h 
 b/drivers/net/wireless/ipw2x00/ipw2100.h
 index c6d78790cb0d..193947865efd 

Re: [PATCH] [media] lmedm04: Neaten logging

2015-06-09 Thread Mauro Carvalho Chehab
Hi Joe,

Em Mon, 25 May 2015 01:29:07 -0700
Joe Perches j...@perches.com escreveu:

 Use a more current logging style.
 
 o Use pr_fmt
 o Add missing newlines to formats
 o Remove used-once lme_debug macro incorporating it into dbg_info
 o Remove unnecessary allocation error messages
 o Remove unnecessary semicolons from #defines
 o Remove info macro and convert uses to pr_info
 o Fix spelling of snippet
 o Use %phN extension

There are a few checkpatch warnings:

WARNING: line over 80 characters
#145: FILE: drivers/media/usb/dvb-usb-v2/lmedm04.c:337:
+   debug_data_snippet(5, INT Remote data snippet in, 
ibuf);

ERROR: space prohibited before that ',' (ctx:WxW)
#190: FILE: drivers/media/usb/dvb-usb-v2/lmedm04.c:452:
+   pr_info(Firmware Status: %x (%x)\n, ret , data[2]);
  ^

ERROR: space prohibited before that ',' (ctx:WxW)
#251: FILE: drivers/media/usb/dvb-usb-v2/lmedm04.c:630:
+   pr_info(FRM Firmware Download Failed (%04x)\n , ret);
^
and please see below:

 
 Signed-off-by: Joe Perches j...@perches.com
 ---
  drivers/media/usb/dvb-usb-v2/lmedm04.c | 105 
 +++--
  1 file changed, 49 insertions(+), 56 deletions(-)
 
 diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c 
 b/drivers/media/usb/dvb-usb-v2/lmedm04.c
 index 5de6f7c..7e8e58b 100644
 --- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
 +++ b/drivers/media/usb/dvb-usb-v2/lmedm04.c
 @@ -67,6 +67,8 @@
   * M88RS2000 suffers from loss of lock.
   */
  #define DVB_USB_LOG_PREFIX LME2510(C)
 +#define pr_fmt(fmt) DVB_USB_LOG_PREFIX :  fmt
 +
  #include linux/usb.h
  #include linux/usb/input.h
  #include media/rc-core.h
 @@ -84,25 +86,22 @@
  #include ts2020.h
  
  
 -#define LME2510_C_S7395  dvb-usb-lme2510c-s7395.fw;
 -#define LME2510_C_LG dvb-usb-lme2510c-lg.fw;
 -#define LME2510_C_S0194  dvb-usb-lme2510c-s0194.fw;
 -#define LME2510_C_RS2000 dvb-usb-lme2510c-rs2000.fw;
 -#define LME2510_LG   dvb-usb-lme2510-lg.fw;
 -#define LME2510_S0194dvb-usb-lme2510-s0194.fw;
 +#define LME2510_C_S7395  dvb-usb-lme2510c-s7395.fw
 +#define LME2510_C_LG dvb-usb-lme2510c-lg.fw
 +#define LME2510_C_S0194  dvb-usb-lme2510c-s0194.fw
 +#define LME2510_C_RS2000 dvb-usb-lme2510c-rs2000.fw
 +#define LME2510_LG   dvb-usb-lme2510-lg.fw
 +#define LME2510_S0194dvb-usb-lme2510-s0194.fw
  
  /* debug */
  static int dvb_usb_lme2510_debug;
 -#define lme_debug(var, level, args...) do { \
 - if ((var = level)) \
 - pr_debug(DVB_USB_LOG_PREFIX:  args); \
 +#define deb_info(level, fmt, ...)\
 +do { \
 + if (dvb_usb_lme2510_debug = level) \
 + pr_debug(fmt, ##__VA_ARGS__);   \
  } while (0)


The usage of both a debug level and pr_debug() is not nice, as,
if CONFIG_DYNAMIC_DEBUG is enabled (with is the case on most distros),
one needing to debug would need to both pass a debug level AND to enable
the debug line via sysfs, with is not nice.

We might of course remove debug levels as a hole and just use 
pr_debug(), but the end result is generally worse (didn't chec
the specifics on this file).

So, the better here would be to use printk like:

#define deb_info(level, fmt, ...)\
do { if (dvb_usb_lme2510_debug = level)\
printk(KERN_DEBUG pr_fmt(fmt), ## arg);\
} while (0)

Ok, this issue were already present on the old code, but IMHO the
best is to either use the above definition of deb_info() or to just
call pr_debug() and get rid of dvb_usb_lme2510_debug.

Regards,
Mauro

 -#define deb_info(level, args...) lme_debug(dvb_usb_lme2510_debug, level, 
 args)
 -#define debug_data_snipet(level, name, p) \
 -  deb_info(level, name (%02x%02x%02x%02x%02x%02x%02x%02x), \
 - *p, *(p+1), *(p+2), *(p+3), *(p+4), \
 - *(p+5), *(p+6), *(p+7));
 -#define info(args...) pr_info(DVB_USB_LOG_PREFIX: args)
 +#define debug_data_snippet(level, name, p)   \
 + deb_info(level, name  (%*phN)\n, 8, p)
  
  module_param_named(debug, dvb_usb_lme2510_debug, int, 0644);
  MODULE_PARM_DESC(debug, set debugging level (1=info (or-able)).);
 @@ -182,10 +181,8 @@ static int lme2510_usb_talk(struct dvb_usb_device *d,
  
   if (st-usb_buffer == NULL) {
   st-usb_buffer = kmalloc(64, GFP_KERNEL);
 - if (st-usb_buffer == NULL) {
 - info(MEM Error no memory);
 + if (st-usb_buffer == NULL)
   return -ENOMEM;
 - }
   }
   buff = st-usb_buffer;
  
 @@ -234,7 +231,7 @@ static int lme2510_enable_pid(struct dvb_usb_device *d, 
 u8 index, u16 pid_out)
   u8 pid_no = index * 2;
   u8 pid_len = pid_no + 2;
   int ret = 0;
 - deb_info(1, PID Setting 

Re: [PATCH] [media] dvb: convert demod frequency ranges to Hz

2015-06-09 Thread Mauro Carvalho Chehab
Em Tue, 09 Jun 2015 09:31:17 -0300
Mauro Carvalho Chehab mche...@osg.samsung.com escreveu:

 Currently, all demods are either Satellite or Cable/Terrestrial.
 
 On Satellite, the frequency ranges are specified in kHz, while
 on Cable/Terrestrial, they're in Hz.
 
 There's a new set of demods arriving in the market that can handle
 both Satellite and Cable/Terrestrial.
 
 As the demod entry would be the same, the best is to always use
 Hz as the frequency range on the internal descriptors, letting
 the DVB core to convert to kHz when needed.

I forgot to mark as such, but this patch is RFC.

If we're willing to do such change, we'll also likely want to change
the code inside the satellite drivers to always use Hz also for
tuning frequency, keeping the Hz == kHz conversion inside the DVB
core.

 
 Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com
 ---
  drivers/media/dvb-core/dvb_frontend.c  | 27 +++
  drivers/media/dvb-frontends/cx24110.c  |  8 
  drivers/media/dvb-frontends/cx24116.c  |  8 
  drivers/media/dvb-frontends/cx24117.c  |  8 
  drivers/media/dvb-frontends/cx24120.c  |  8 
  drivers/media/dvb-frontends/cx24123.c  |  8 
  drivers/media/dvb-frontends/ds3000.c   |  8 
  drivers/media/dvb-frontends/dvb_dummy_fe.c |  8 
  drivers/media/dvb-frontends/m88ds3103.c|  6 +++---
  drivers/media/dvb-frontends/m88rs2000.c|  8 
  drivers/media/dvb-frontends/mb86a16.c  |  6 +++---
  drivers/media/dvb-frontends/mt312.c|  6 +++---
  drivers/media/dvb-frontends/s5h1420.c  |  8 
  drivers/media/dvb-frontends/si21xx.c   |  6 +++---
  drivers/media/dvb-frontends/stb0899_drv.c  |  4 ++--
  drivers/media/dvb-frontends/stv0288.c  |  6 +++---
  drivers/media/dvb-frontends/stv0299.c  |  8 
  drivers/media/dvb-frontends/stv0900_core.c |  6 +++---
  drivers/media/dvb-frontends/stv090x.c  |  4 ++--
  drivers/media/dvb-frontends/tc90522.c  |  4 ++--
  drivers/media/dvb-frontends/tda10071.c |  6 +++---
  drivers/media/dvb-frontends/tda10086.c |  6 +++---
  drivers/media/dvb-frontends/tda8083.c  |  6 +++---
  drivers/media/dvb-frontends/ves1x93.c  |  8 
  24 files changed, 104 insertions(+), 77 deletions(-)
 
 diff --git a/drivers/media/dvb-core/dvb_frontend.c 
 b/drivers/media/dvb-core/dvb_frontend.c
 index c2050742d22d..058628145169 100644
 --- a/drivers/media/dvb-core/dvb_frontend.c
 +++ b/drivers/media/dvb-core/dvb_frontend.c
 @@ -974,6 +974,8 @@ static int dvb_frontend_start(struct dvb_frontend *fe)
  static void dvb_frontend_get_frequency_limits(struct dvb_frontend *fe,
   u32 *freq_min, u32 *freq_max)
  {
 + struct dtv_frontend_properties *c = fe-dtv_property_cache;
 +
   *freq_min = max(fe-ops.info.frequency_min, 
 fe-ops.tuner_ops.info.frequency_min);
  
   if (fe-ops.info.frequency_max == 0)
 @@ -986,6 +988,19 @@ static void dvb_frontend_get_frequency_limits(struct 
 dvb_frontend *fe,
   if (*freq_min == 0 || *freq_max == 0)
   dev_warn(fe-dvb-device, DVB: adapter %i frontend %u 
 frequency limits undefined - fix the driver\n,
   fe-dvb-num, fe-id);
 +
 + switch (c-delivery_system) {
 + case SYS_DVBS:
 + case SYS_DVBS2:
 + case SYS_TURBO:
 + case SYS_DSS:
 + case SYS_ISDBS:
 + /* Userspace API expects ranges in kHz */
 + *freq_min /= 1000;
 + *freq_max /= 1000;
 + default:
 + break;
 + }
  }
  
  static int dvb_frontend_check_parameters(struct dvb_frontend *fe)
 @@ -2299,6 +2314,18 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
  
   memcpy(info, fe-ops.info, sizeof(struct dvb_frontend_info));
   dvb_frontend_get_frequency_limits(fe, info-frequency_min, 
 info-frequency_max);
 + switch (c-delivery_system) {
 + case SYS_DVBS:
 + case SYS_DVBS2:
 + case SYS_TURBO:
 + case SYS_DSS:
 + case SYS_ISDBS:
 + /* Userspace API expects ranges in kHz */
 + info-frequency_stepsize /= 1000;
 + info-frequency_tolerance /= 1000;
 + default:
 + break;
 + }
  
   /*
* Associate the 4 delivery systems supported by DVBv3
 diff --git a/drivers/media/dvb-frontends/cx24110.c 
 b/drivers/media/dvb-frontends/cx24110.c
 index 4edadb5a29de..2a5fc286db4b 100644
 --- a/drivers/media/dvb-frontends/cx24110.c
 +++ b/drivers/media/dvb-frontends/cx24110.c
 @@ -624,10 +624,10 @@ static struct dvb_frontend_ops cx24110_ops = {
   .delsys = { SYS_DVBS },
   .info = {
   .name = Conexant CX24110 DVB-S,
 - .frequency_min = 95,
 - .frequency_max = 215,
 - .frequency_stepsize = 1011,  

[PATCH] [media] dvb: convert demod frequency ranges to Hz

2015-06-09 Thread Mauro Carvalho Chehab
Currently, all demods are either Satellite or Cable/Terrestrial.

On Satellite, the frequency ranges are specified in kHz, while
on Cable/Terrestrial, they're in Hz.

There's a new set of demods arriving in the market that can handle
both Satellite and Cable/Terrestrial.

As the demod entry would be the same, the best is to always use
Hz as the frequency range on the internal descriptors, letting
the DVB core to convert to kHz when needed.

Signed-off-by: Mauro Carvalho Chehab mche...@osg.samsung.com
---
 drivers/media/dvb-core/dvb_frontend.c  | 27 +++
 drivers/media/dvb-frontends/cx24110.c  |  8 
 drivers/media/dvb-frontends/cx24116.c  |  8 
 drivers/media/dvb-frontends/cx24117.c  |  8 
 drivers/media/dvb-frontends/cx24120.c  |  8 
 drivers/media/dvb-frontends/cx24123.c  |  8 
 drivers/media/dvb-frontends/ds3000.c   |  8 
 drivers/media/dvb-frontends/dvb_dummy_fe.c |  8 
 drivers/media/dvb-frontends/m88ds3103.c|  6 +++---
 drivers/media/dvb-frontends/m88rs2000.c|  8 
 drivers/media/dvb-frontends/mb86a16.c  |  6 +++---
 drivers/media/dvb-frontends/mt312.c|  6 +++---
 drivers/media/dvb-frontends/s5h1420.c  |  8 
 drivers/media/dvb-frontends/si21xx.c   |  6 +++---
 drivers/media/dvb-frontends/stb0899_drv.c  |  4 ++--
 drivers/media/dvb-frontends/stv0288.c  |  6 +++---
 drivers/media/dvb-frontends/stv0299.c  |  8 
 drivers/media/dvb-frontends/stv0900_core.c |  6 +++---
 drivers/media/dvb-frontends/stv090x.c  |  4 ++--
 drivers/media/dvb-frontends/tc90522.c  |  4 ++--
 drivers/media/dvb-frontends/tda10071.c |  6 +++---
 drivers/media/dvb-frontends/tda10086.c |  6 +++---
 drivers/media/dvb-frontends/tda8083.c  |  6 +++---
 drivers/media/dvb-frontends/ves1x93.c  |  8 
 24 files changed, 104 insertions(+), 77 deletions(-)

diff --git a/drivers/media/dvb-core/dvb_frontend.c 
b/drivers/media/dvb-core/dvb_frontend.c
index c2050742d22d..058628145169 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -974,6 +974,8 @@ static int dvb_frontend_start(struct dvb_frontend *fe)
 static void dvb_frontend_get_frequency_limits(struct dvb_frontend *fe,
u32 *freq_min, u32 *freq_max)
 {
+   struct dtv_frontend_properties *c = fe-dtv_property_cache;
+
*freq_min = max(fe-ops.info.frequency_min, 
fe-ops.tuner_ops.info.frequency_min);
 
if (fe-ops.info.frequency_max == 0)
@@ -986,6 +988,19 @@ static void dvb_frontend_get_frequency_limits(struct 
dvb_frontend *fe,
if (*freq_min == 0 || *freq_max == 0)
dev_warn(fe-dvb-device, DVB: adapter %i frontend %u 
frequency limits undefined - fix the driver\n,
fe-dvb-num, fe-id);
+
+   switch (c-delivery_system) {
+   case SYS_DVBS:
+   case SYS_DVBS2:
+   case SYS_TURBO:
+   case SYS_DSS:
+   case SYS_ISDBS:
+   /* Userspace API expects ranges in kHz */
+   *freq_min /= 1000;
+   *freq_max /= 1000;
+   default:
+   break;
+   }
 }
 
 static int dvb_frontend_check_parameters(struct dvb_frontend *fe)
@@ -2299,6 +2314,18 @@ static int dvb_frontend_ioctl_legacy(struct file *file,
 
memcpy(info, fe-ops.info, sizeof(struct dvb_frontend_info));
dvb_frontend_get_frequency_limits(fe, info-frequency_min, 
info-frequency_max);
+   switch (c-delivery_system) {
+   case SYS_DVBS:
+   case SYS_DVBS2:
+   case SYS_TURBO:
+   case SYS_DSS:
+   case SYS_ISDBS:
+   /* Userspace API expects ranges in kHz */
+   info-frequency_stepsize /= 1000;
+   info-frequency_tolerance /= 1000;
+   default:
+   break;
+   }
 
/*
 * Associate the 4 delivery systems supported by DVBv3
diff --git a/drivers/media/dvb-frontends/cx24110.c 
b/drivers/media/dvb-frontends/cx24110.c
index 4edadb5a29de..2a5fc286db4b 100644
--- a/drivers/media/dvb-frontends/cx24110.c
+++ b/drivers/media/dvb-frontends/cx24110.c
@@ -624,10 +624,10 @@ static struct dvb_frontend_ops cx24110_ops = {
.delsys = { SYS_DVBS },
.info = {
.name = Conexant CX24110 DVB-S,
-   .frequency_min = 95,
-   .frequency_max = 215,
-   .frequency_stepsize = 1011,  /* kHz for QPSK frontends */
-   .frequency_tolerance = 29500,
+   .frequency_min = 95000, /* Hz */
+   .frequency_max = 215000U, /* Hz */
+   .frequency_stepsize = 1011000,  /* Hz */
+   .frequency_tolerance = 2950, /* Hz */
.symbol_rate_min = 100,
.symbol_rate_max = 

Re: [PATCH] USB: uvc: add support for the Microsoft Surface Pro 3 Cameras

2015-06-09 Thread Laurent Pinchart
Hi Dennis,

-ENOPATCH ?

On Tuesday 09 June 2015 12:53:34 Dennis Chen wrote:


-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] USB: uvc: add support for the Microsoft Surface Pro 3 Cameras

2015-06-09 Thread Dennis Chen
Add support for the Microsoft Surface Pro 3 Cameras.

Signed-off-by: Dennis Chen barracks...@gmail.com
---
 drivers/media/usb/uvc/uvc_driver.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/drivers/media/usb/uvc/uvc_driver.c 
b/drivers/media/usb/uvc/uvc_driver.c
index 5970dd6..ec5a407 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2538,6 +2538,22 @@ static struct usb_device_id uvc_ids[] = {
  .bInterfaceSubClass   = 1,
  .bInterfaceProtocol   = 0,
  .driver_info  = UVC_QUIRK_FORCE_Y8 },
+   /*Microsoft Surface Pro 3 Front Camera*/
+   { .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
+   | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x045e,
+ .idProduct= 0x07be,
+ .bInterfaceClass  = USB_CLASS_VIDEO,
+ .bInterfaceSubClass   = 1,
+ .bInterfaceProtocol   = 1 },
+   /* Microsoft Surface Pro 3 Rear */
+   { .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
+   | USB_DEVICE_ID_MATCH_INT_INFO,
+ .idVendor = 0x045e,
+ .idProduct= 0x07bf,
+ .bInterfaceClass  = USB_CLASS_VIDEO,
+ .bInterfaceSubClass   = 1,
+ .bInterfaceProtocol   = 1 },
/* Generic USB Video Class */
{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, 0) },
{}
-- 
2.4.2
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] USB: uvc: add support for the Microsoft Surface Pro 3 Cameras

2015-06-09 Thread Dennis Chen
 Is this needed ? Looking at the patch your cameras are UVC-compliant 
 and 
 should thus be picked by the uvcvideo driver without any change to 
 the code.

The cameras are UVC-compliant but are not recognized by the uvc driver.
The patch forces the uvc driver to pick up the camera if present.

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


cron job: media_tree daily build: OK

2015-06-09 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Wed Jun 10 04:00:17 CEST 2015
git branch: test
git hash:   25e057fdde3b33c0d18605ed27b59336a3441925
gcc version:i686-linux-gcc (GCC) 5.1.0
sparse version: v0.5.0-44-g40791b9
smatch version: 0.4.1-3153-g7d56ab3
host hardware:  x86_64
host os:4.0.0-3.slh.1-amd64

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-exynos: OK
linux-git-arm-mx: OK
linux-git-arm-omap: OK
linux-git-arm-omap1: OK
linux-git-arm-pxa: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
linux-2.6.32.27-i686: OK
linux-2.6.33.7-i686: OK
linux-2.6.34.7-i686: OK
linux-2.6.35.9-i686: OK
linux-2.6.36.4-i686: OK
linux-2.6.37.6-i686: OK
linux-2.6.38.8-i686: OK
linux-2.6.39.4-i686: OK
linux-3.0.60-i686: OK
linux-3.1.10-i686: OK
linux-3.2.37-i686: OK
linux-3.3.8-i686: OK
linux-3.4.27-i686: OK
linux-3.5.7-i686: OK
linux-3.6.11-i686: OK
linux-3.7.4-i686: OK
linux-3.8-i686: OK
linux-3.9.2-i686: OK
linux-3.10.1-i686: OK
linux-3.11.1-i686: OK
linux-3.12.23-i686: OK
linux-3.13.11-i686: OK
linux-3.14.9-i686: OK
linux-3.15.2-i686: OK
linux-3.16.7-i686: OK
linux-3.17.8-i686: OK
linux-3.18.7-i686: OK
linux-3.19-i686: OK
linux-4.0-i686: OK
linux-4.1-rc1-i686: OK
linux-2.6.32.27-x86_64: OK
linux-2.6.33.7-x86_64: OK
linux-2.6.34.7-x86_64: OK
linux-2.6.35.9-x86_64: OK
linux-2.6.36.4-x86_64: OK
linux-2.6.37.6-x86_64: OK
linux-2.6.38.8-x86_64: OK
linux-2.6.39.4-x86_64: OK
linux-3.0.60-x86_64: OK
linux-3.1.10-x86_64: OK
linux-3.2.37-x86_64: OK
linux-3.3.8-x86_64: OK
linux-3.4.27-x86_64: OK
linux-3.5.7-x86_64: OK
linux-3.6.11-x86_64: OK
linux-3.7.4-x86_64: OK
linux-3.8-x86_64: OK
linux-3.9.2-x86_64: OK
linux-3.10.1-x86_64: OK
linux-3.11.1-x86_64: OK
linux-3.12.23-x86_64: OK
linux-3.13.11-x86_64: OK
linux-3.14.9-x86_64: OK
linux-3.15.2-x86_64: OK
linux-3.16.7-x86_64: OK
linux-3.17.8-x86_64: OK
linux-3.18.7-x86_64: OK
linux-3.19-x86_64: OK
linux-4.0-x86_64: OK
linux-4.1-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS
smatch: ERRORS

Detailed results are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.log

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Wednesday.tar.bz2

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/media.html
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] USB: uvc: add support for the Microsoft Surface Pro 3 Cameras

2015-06-09 Thread Laurent Pinchart
Hi Dennis,

Thank you for the patch.

On Tuesday 09 June 2015 18:09:06 Dennis Chen wrote:
 Add support for the Microsoft Surface Pro 3 Cameras.

Is this needed ? Looking at the patch your cameras are UVC-compliant and 
should thus be picked by the uvcvideo driver without any change to the code.

 Signed-off-by: Dennis Chen barracks...@gmail.com
 ---
  drivers/media/usb/uvc/uvc_driver.c | 16 
  1 file changed, 16 insertions(+)
 
 diff --git a/drivers/media/usb/uvc/uvc_driver.c
 b/drivers/media/usb/uvc/uvc_driver.c index 5970dd6..ec5a407 100644
 --- a/drivers/media/usb/uvc/uvc_driver.c
 +++ b/drivers/media/usb/uvc/uvc_driver.c
 @@ -2538,6 +2538,22 @@ static struct usb_device_id uvc_ids[] = {
   .bInterfaceSubClass   = 1,
   .bInterfaceProtocol   = 0,
   .driver_info  = UVC_QUIRK_FORCE_Y8 },
 +   /*Microsoft Surface Pro 3 Front Camera*/
 +   { .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
 +   | USB_DEVICE_ID_MATCH_INT_INFO,
 + .idVendor = 0x045e,
 + .idProduct= 0x07be,
 + .bInterfaceClass  = USB_CLASS_VIDEO,
 + .bInterfaceSubClass   = 1,
 + .bInterfaceProtocol   = 1 },
 +   /* Microsoft Surface Pro 3 Rear */
 +   { .match_flags  = USB_DEVICE_ID_MATCH_DEVICE
 +   | USB_DEVICE_ID_MATCH_INT_INFO,
 + .idVendor = 0x045e,
 + .idProduct= 0x07bf,
 + .bInterfaceClass  = USB_CLASS_VIDEO,
 + .bInterfaceSubClass   = 1,
 + .bInterfaceProtocol   = 1 },
 /* Generic USB Video Class */
 { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, 0) },
 {}

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] omap3isp: Fix sub-device power management code

2015-06-09 Thread Laurent Pinchart
Hi Sakari,

Thank you for the patch.

On Friday 29 May 2015 02:17:47 Sakari Ailus wrote:
 The power management code was reworked a little due to interface changes in
 the MC. Due to those changes the power management broke a bit, fix it so the
 functionality is reverted to old behaviour.

I found the commit message a bit vague. How about

Commit 813f5c0ac5cc (media: Change media device link_notify behaviour) 
modified the media controller link setup notification API and updated the 
OMAP3 ISP driver accordingly. As a side effect it introduced a bug by turning 
power on after setting the link instead of before. This results in powered off 
entities being accessed. Fix it.

Or have I misunderstood the problem ?

 Signed-off-by: Sakari Ailus sakari.ai...@iki.fi
 Fixes: 813f5c0ac5cc [media] media: Change media device link_notify behaviour
 Cc: sta...@vger.kernel.org # since v3.10
 ---
  drivers/media/platform/omap3isp/isp.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/drivers/media/platform/omap3isp/isp.c
 b/drivers/media/platform/omap3isp/isp.c index a038c05..3e6b97b 100644
 --- a/drivers/media/platform/omap3isp/isp.c
 +++ b/drivers/media/platform/omap3isp/isp.c
 @@ -829,14 +829,14 @@ static int isp_pipeline_link_notify(struct media_link
 *link, u32 flags, int ret;
 
   if (notification == MEDIA_DEV_NOTIFY_POST_LINK_CH 
 - !(link-flags  MEDIA_LNK_FL_ENABLED)) {
 + !(flags  MEDIA_LNK_FL_ENABLED)) {

Isn't link-flags == flags in the post notification callback ?

   /* Powering off entities is assumed to never fail. */
   isp_pipeline_pm_power(source, -sink_use);
   isp_pipeline_pm_power(sink, -source_use);
   return 0;
   }
 
 - if (notification == MEDIA_DEV_NOTIFY_POST_LINK_CH 
 + if (notification == MEDIA_DEV_NOTIFY_PRE_LINK_CH 
   (flags  MEDIA_LNK_FL_ENABLED)) {
 
   ret = isp_pipeline_pm_power(source, sink_use);

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] rc/Kconfig: fix indentation problem

2015-06-09 Thread Hans Verkuil
The RC_ST and IR_SUNXI entries have weird indentation, and the RC_ST
entry is actually malformed. Fix it.

Signed-off-by: Hans Verkuil hans.verk...@cisco.com

diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig
index ddfab25..b6e1311 100644
--- a/drivers/media/rc/Kconfig
+++ b/drivers/media/rc/Kconfig
@@ -371,21 +371,21 @@ config RC_ST
tristate ST remote control receiver
depends on RC_CORE
depends on ARCH_STI || COMPILE_TEST
-   help
-Say Y here if you want support for ST remote control driver
-which allows both IR and UHF RX.
-The driver passes raw pulse and space information to the LIRC decoder.
+   ---help---
+  Say Y here if you want support for ST remote control driver
+  which allows both IR and UHF RX.
+  The driver passes raw pulse and space information to the LIRC 
decoder.

-If you're not sure, select N here.
+  If you're not sure, select N here.

 config IR_SUNXI
-tristate SUNXI IR remote control
-depends on RC_CORE
-depends on ARCH_SUNXI || COMPILE_TEST
----help---
-  Say Y if you want to use sunXi internal IR Controller
-
-  To compile this driver as a module, choose M here: the module will
-  be called sunxi-ir.
+   tristate SUNXI IR remote control
+   depends on RC_CORE
+   depends on ARCH_SUNXI || COMPILE_TEST
+   ---help---
+  Say Y if you want to use sunXi internal IR Controller
+
+  To compile this driver as a module, choose M here: the module will
+  be called sunxi-ir.

 endif #RC_DEVICES
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] cobalt: fix 64-bit division

2015-06-09 Thread Hans Verkuil
There was still one more remaining 64-bit division in the cobalt code.
Replace it by div_u64.

Signed-off-by: Hans Verkuil hans.verk...@cisco.com
Reported-by: Mauro Carvalho Chehab mche...@osg.samsung.com

diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c 
b/drivers/media/pci/cobalt/cobalt-v4l2.c
index 6fb8812..b40c2d1 100644
--- a/drivers/media/pci/cobalt/cobalt-v4l2.c
+++ b/drivers/media/pci/cobalt/cobalt-v4l2.c
@@ -327,7 +327,7 @@ static int cobalt_start_streaming(struct vb2_queue *q, 
unsigned int count)
iowrite32(clk_freq / 100, clkloss-ref_clk_cnt_val);
/* The lower bound for the clock frequency is 0.5% lower as is
 * allowed by the spec */
-   iowrite32u64)bt-pixelclock * 995) / 1000) / 100,
+   iowrite32(div_u64(bt-pixelclock * 995, 10),
  clkloss-test_clk_cnt_val);
/* will be enabled after the first frame has been received */
iowrite32(bt-width * bt-height, fw-active_length);
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2 v3] au0828: Add support for media controller

2015-06-09 Thread Mauro Carvalho Chehab
Em Mon, 8 Jun 2015 21:08:32 -0600
Shuah Khan shuahk...@gmail.com escreveu:

 On Mon, Jun 8, 2015 at 7:20 PM, Rafael Lourenço de Lima Chehab
 chehabraf...@gmail.com wrote:
  Add support for analog and dvb tv using media controller.
 
  Signed-off-by: Rafael Lourenço de Lima Chehab chehabraf...@gmail.com
  ---
   drivers/media/dvb-frontends/au8522_decoder.c | 17 +
   drivers/media/dvb-frontends/au8522_priv.h| 12 
   drivers/media/usb/au0828/au0828-core.c   | 98 
  
   drivers/media/usb/au0828/au0828-dvb.c| 10 +++
   drivers/media/usb/au0828/au0828-video.c  | 83 +++
   drivers/media/usb/au0828/au0828.h|  6 ++
   6 files changed, 226 insertions(+)
 
  diff --git a/drivers/media/dvb-frontends/au8522_decoder.c 
  b/drivers/media/dvb-frontends/au8522_decoder.c
  index 33aa9410b624..24990db7ba38 100644
  --- a/drivers/media/dvb-frontends/au8522_decoder.c
  +++ b/drivers/media/dvb-frontends/au8522_decoder.c
  @@ -731,6 +731,9 @@ static int au8522_probe(struct i2c_client *client,
  struct v4l2_subdev *sd;
  int instance;
  struct au8522_config *demod_config;
  +#ifdef CONFIG_MEDIA_CONTROLLER
  +   int ret;
  +#endif
 
 You won't need to enclose the code in CONFIG_MEDIA_CONTROLLER
 blocks, once the patch I sent gets in. Please see below for patch.
 
 https://lkml.org/lkml/2015/6/5/777

True. Well, let me apply both Rafael and your patches. Then, I'll do
the cleanup.

Regards,
Mauro

 
 
  /* Check if the adapter supports the needed features */
  if (!i2c_check_functionality(client-adapter,
  @@ -767,6 +770,20 @@ static int au8522_probe(struct i2c_client *client,
 
  sd = state-sd;
  v4l2_i2c_subdev_init(sd, client, au8522_ops);
  +#if defined(CONFIG_MEDIA_CONTROLLER)
  +
  +   state-pads[AU8522_PAD_INPUT].flags = MEDIA_PAD_FL_SINK;
  +   state-pads[AU8522_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
  +   state-pads[AU8522_PAD_VBI_OUT].flags = MEDIA_PAD_FL_SOURCE;
  +   sd-entity.type = MEDIA_ENT_T_V4L2_SUBDEV_DECODER;
  +
  +   ret = media_entity_init(sd-entity, ARRAY_SIZE(state-pads),
  +   state-pads, 0);
  +   if (ret  0) {
  +   v4l_info(client, failed to initialize media entity!\n);
  +   return ret;
  +   }
  +#endif
 
  hdl = state-hdl;
  v4l2_ctrl_handler_init(hdl, 4);
  diff --git a/drivers/media/dvb-frontends/au8522_priv.h 
  b/drivers/media/dvb-frontends/au8522_priv.h
  index b8aca1c84786..ed6eb2675508 100644
  --- a/drivers/media/dvb-frontends/au8522_priv.h
  +++ b/drivers/media/dvb-frontends/au8522_priv.h
  @@ -39,6 +39,14 @@
   #define AU8522_DIGITAL_MODE 1
   #define AU8522_SUSPEND_MODE 2
 
  +enum au8522_media_pads {
  +   AU8522_PAD_INPUT,
  +   AU8522_PAD_VID_OUT,
  +   AU8522_PAD_VBI_OUT,
  +
  +   AU8522_NUM_PADS
  +};
  +
   struct au8522_state {
  struct i2c_client *c;
  struct i2c_adapter *i2c;
  @@ -68,6 +76,10 @@ struct au8522_state {
  u32 id;
  u32 rev;
  struct v4l2_ctrl_handler hdl;
  +
  +#ifdef CONFIG_MEDIA_CONTROLLER
  +   struct media_pad pads[AU8522_NUM_PADS];
  +#endif
   };
 
   /* These are routines shared by both the VSB/QAM demodulator and the analog
  diff --git a/drivers/media/usb/au0828/au0828-core.c 
  b/drivers/media/usb/au0828/au0828-core.c
  index 0934024fb89d..0378a2c99ebb 100644
  --- a/drivers/media/usb/au0828/au0828-core.c
  +++ b/drivers/media/usb/au0828/au0828-core.c
  @@ -127,8 +127,22 @@ static int recv_control_msg(struct au0828_dev *dev, 
  u16 request, u32 value,
  return status;
   }
 
  +static void au0828_unregister_media_device(struct au0828_dev *dev)
  +{
  +
  +#ifdef CONFIG_MEDIA_CONTROLLER
  +   if (dev-media_dev) {
  +   media_device_unregister(dev-media_dev);
  +   kfree(dev-media_dev);
  +   dev-media_dev = NULL;
  +   }
  +#endif
  +}
  +
   static void au0828_usb_release(struct au0828_dev *dev)
   {
  +   au0828_unregister_media_device(dev);
  +
  /* I2C */
  au0828_i2c_unregister(dev);
 
  @@ -161,6 +175,8 @@ static void au0828_usb_disconnect(struct usb_interface 
  *interface)
  */
  dev-dev_state = DEV_DISCONNECTED;
 
  +   au0828_unregister_media_device(dev);
  +
  au0828_rc_unregister(dev);
  /* Digital TV */
  au0828_dvb_unregister(dev);
  @@ -180,6 +196,81 @@ static void au0828_usb_disconnect(struct usb_interface 
  *interface)
  au0828_usb_release(dev);
   }
 
  +static void au0828_media_device_register(struct au0828_dev *dev,
  + struct usb_device *udev)
  +{
  +#ifdef CONFIG_MEDIA_CONTROLLER
  +   struct media_device *mdev;
  +   int ret;
  +
  +   mdev = kzalloc(sizeof(*mdev), GFP_KERNEL);
  +   if (!mdev)
  +   return;
  +
  +   mdev-dev = 

Re: [PATCH] treewide: Fix typo compatability - compatibility

2015-06-09 Thread Masanari Iida
On Wed, Jun 10, 2015 at 7:27 AM, Mauro Carvalho Chehab
mche...@osg.samsung.com wrote:
 Em Wed, 27 May 2015 15:05:42 +0300
 Laurent Pinchart laurent.pinch...@ideasonboard.com escreveu:

 Even though 'compatability' has a dedicated entry in the Wiktionary,
 it's listed as 'Mispelling of compatibility'. Fix it.

 Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com

 Acked-by: Mauro Carvalho Chehab mche...@osg.samsung.com

 ---
  arch/metag/include/asm/elf.h | 2 +-
  arch/powerpc/kvm/book3s.c| 2 +-
  arch/sparc/include/uapi/asm/pstate.h | 2 +-
  drivers/gpu/drm/drm_atomic_helper.c  | 4 ++--
  drivers/media/dvb-frontends/au8522_dig.c | 2 +-
  drivers/net/wireless/ipw2x00/ipw2100.h   | 2 +-
  6 files changed, 7 insertions(+), 7 deletions(-)

 I can split this into one patch per subsystem, but that seems a bit overkill.
 Can someone take it ?

 Who? That's the problem with treewide patches ;)

 Perhaps you should re-submit it with the acks you got to akpm.

 Regards,
 Mauro

Laurent,
Please re-submit your patch to  triv...@kernel.org  with [trivial] in the title.

Ex.
[PATCH] [trivial]  treewide: Fix typo compatability - compatibility

Regards,
Masanari
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html