Re: [PATCH] staging: vboxvideo: make a couple of symbols static

2017-07-22 Thread Michael Thayer
22.07.2017 00:17, Hans de Goede wrote:
> Hi,
> 
> On 19-07-17 11:36, Colin King wrote:
>> From: Colin Ian King 
>>
>> Module parameter vbox_modeset and structure vbox_bo_driver do not need to
>> be in global scope and hence can be made static.
>>
>> Cleans up a couple of sparse warnings:
>> symbol 'vbox_modeset' was not declared. Should it be static?
>> symbol 'vbox_bo_driver' was not declared. Should it be static?
>>
>> Signed-off-by: Colin Ian King 
> 
> Looks good to me:
> 
> Acked-by: Hans de Goede 

Looks good to me too.  Sorry for the slow response.  Still had no time
to actually apply it, but as said, it looks completely sensible.

Regards
Michael

Acked-by: Michael Thayer 

>> ---
>>   drivers/staging/vboxvideo/vbox_drv.c | 2 +-
>>   drivers/staging/vboxvideo/vbox_ttm.c | 2 +-
>>   2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/vboxvideo/vbox_drv.c
>> b/drivers/staging/vboxvideo/vbox_drv.c
>> index 6d0600c37c0c..e18642e5027e 100644
>> --- a/drivers/staging/vboxvideo/vbox_drv.c
>> +++ b/drivers/staging/vboxvideo/vbox_drv.c
>> @@ -36,7 +36,7 @@
>> #include "vbox_drv.h"
>>   -int vbox_modeset = -1;
>> +static int vbox_modeset = -1;
>> MODULE_PARM_DESC(modeset, "Disable/Enable modesetting");
>>   module_param_named(modeset, vbox_modeset, int, 0400);
>> diff --git a/drivers/staging/vboxvideo/vbox_ttm.c
>> b/drivers/staging/vboxvideo/vbox_ttm.c
>> index 34a905d40735..4eb410a2a1a8 100644
>> --- a/drivers/staging/vboxvideo/vbox_ttm.c
>> +++ b/drivers/staging/vboxvideo/vbox_ttm.c
>> @@ -230,7 +230,7 @@ static void vbox_ttm_tt_unpopulate(struct ttm_tt
>> *ttm)
>>   ttm_pool_unpopulate(ttm);
>>   }
>>   -struct ttm_bo_driver vbox_bo_driver = {
>> +static struct ttm_bo_driver vbox_bo_driver = {
>>   .ttm_tt_create = vbox_ttm_tt_create,
>>   .ttm_tt_populate = vbox_ttm_tt_populate,
>>   .ttm_tt_unpopulate = vbox_ttm_tt_unpopulate,
>>

-- 
Michael Thayer | VirtualBox engineer
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | D-71384 Weinstadt

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande Handelsregister
der Handelskammer Midden-Nederland, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 3/3] staging: pi433: - style fix, space at start of line

2017-07-22 Thread Marcus Wolf
Reviewed-by: Marcus Wolf 
 
Regarding the patch for rf69.c, I'd prefer to have all mantisses allinged (all
'm' as a column below each other, all 'a' below each other, ...). For me that
improves the readability a lot. Maybe that can be acchieved somehow without
breaking the style rules - but for sure, that's just luxury :-)

Thanks to Derk for his routine piece of work :-)

Marcus
 

> Derek Robson  hat am 22. Juli 2017 um 05:51 geschrieben:
>
>
> Fixed checkpatch errors of "please, no spaces at the start of a line"
>
> Signed-off-by: Derek Robson 
> ---
> drivers/staging/pi433/rf69.c | 4 +-
> drivers/staging/pi433/rf69_enum.h | 206 +++---
> 2 files changed, 105 insertions(+), 105 deletions(-)
>
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> index d931437f0b6a..f450bbf3fbbc 100644
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -440,8 +440,8 @@ int rf69_set_bandwidth_intern(struct spi_device *spi, u8
> reg, enum mantisse mant
> // check value for mantisse and exponent
> if (exponent > 7) INVALID_PARAM;
> if ( (mantisse!=mantisse16) &&
> - (mantisse!=mantisse20) &&
> - (mantisse!=mantisse24) ) INVALID_PARAM;
> + (mantisse!=mantisse20) &&
> + (mantisse!=mantisse24) ) INVALID_PARAM;
>
> // read old value
> newValue = READ_REG(reg);
> diff --git a/drivers/staging/pi433/rf69_enum.h
> b/drivers/staging/pi433/rf69_enum.h
> index fbfb59bd3f3d..635629415e63 100644
> --- a/drivers/staging/pi433/rf69_enum.h
> +++ b/drivers/staging/pi433/rf69_enum.h
> @@ -20,181 +20,181 @@
>
> enum optionOnOff
> {
> - optionOff,
> - optionOn
> + optionOff,
> + optionOn
> };
>
> enum mode
> {
> - mode_sleep,
> - standby,
> - synthesizer,
> - transmit,
> - receive
> + mode_sleep,
> + standby,
> + synthesizer,
> + transmit,
> + receive
> };
>
> enum dataMode
> {
> - packet,
> - continuous,
> - continuousNoSync
> + packet,
> + continuous,
> + continuousNoSync
> };
>
> enum modulation
> {
> - OOK,
> - FSK
> + OOK,
> + FSK
> };
>
> enum modShaping
> {
> - shapingOff,
> - shaping1_0,
> - shaping0_5,
> - shaping0_3,
> - shapingBR,
> - shaping2BR
> + shapingOff,
> + shaping1_0,
> + shaping0_5,
> + shaping0_3,
> + shapingBR,
> + shaping2BR
> };
>
> enum paRamp
> {
> - ramp3400,
> - ramp2000,
> - ramp1000,
> - ramp500,
> - ramp250,
> - ramp125,
> - ramp100,
> - ramp62,
> - ramp50,
> - ramp40,
> - ramp31,
> - ramp25,
> - ramp20,
> - ramp15,
> - ramp12,
> - ramp10
> + ramp3400,
> + ramp2000,
> + ramp1000,
> + ramp500,
> + ramp250,
> + ramp125,
> + ramp100,
> + ramp62,
> + ramp50,
> + ramp40,
> + ramp31,
> + ramp25,
> + ramp20,
> + ramp15,
> + ramp12,
> + ramp10
> };
>
> enum antennaImpedance
> {
> - fiftyOhm,
> - twohundretOhm
> + fiftyOhm,
> + twohundretOhm
> };
>
> enum lnaGain
> {
> - automatic,
> - max,
> - maxMinus6,
> - maxMinus12,
> - maxMinus24,
> - maxMinus36,
> - maxMinus48,
> - undefined
> + automatic,
> + max,
> + maxMinus6,
> + maxMinus12,
> + maxMinus24,
> + maxMinus36,
> + maxMinus48,
> + undefined
> };
>
> enum dccPercent
> {
> - dcc16Percent,
> - dcc8Percent,
> - dcc4Percent,
> - dcc2Percent,
> - dcc1Percent,
> - dcc0_5Percent,
> - dcc0_25Percent,
> - dcc0_125Percent
> + dcc16Percent,
> + dcc8Percent,
> + dcc4Percent,
> + dcc2Percent,
> + dcc1Percent,
> + dcc0_5Percent,
> + dcc0_25Percent,
> + dcc0_125Percent
> };
>
> enum mantisse
> {
> - mantisse16,
> - mantisse20,
> - mantisse24
> + mantisse16,
> + mantisse20,
> + mantisse24
> };
>
> enum thresholdType
> {
> - fixed,
> - peak,
> - average
> + fixed,
> + peak,
> + average
> };
>
> enum thresholdStep
> {
> - step_0_5db,
> - step_1_0db,
> - step_1_5db,
> - step_2_0db,
> - step_3_0db,
> - step_4_0db,
> - step_5_0db,
> - step_6_0db
> + step_0_5db,
> + step_1_0db,
> + step_1_5db,
> + step_2_0db,
> + step_3_0db,
> + step_4_0db,
> + step_5_0db,
> + step_6_0db
> };
>
> enum thresholdDecrement
> {
> - dec_every8th,
> - dec_every4th,
> - dec_every2nd,
> - dec_once,
> - dec_twice,
> - dec_4times,
> - dec_8times,
> - dec_16times
> + dec_every8th,
> + dec_every4th,
> + dec_every2nd,
> + dec_once,
> + dec_twice,
> + dec_4times,
> + dec_8times,
> + dec_16times
> };
>
> enum flag
> {
> - modeSwitchCompleted,
> - readyToReceive,
> - readyToSend,
> - pllLocked,
> - rssiExceededThreshold,
> - timeout,
> - automode,
> - syncAddressMatch,
> - fifoFull,
> -// fifoNotEmpty, collision with next enum; replaced by following enum...
> - fifoEmpty,
> - fifoLevelBelowThreshold,
> - fifoOverrun,
> - packetSent,
> - payloadReady,
> - crcOk,
> - batteryLow
> + modeSwitchCompleted,
> + readyToReceive,
> + readyToSend,
> + pllLocked,
> + rssiExceededThreshold,
> + timeout,
> + automode,
> + syncAddressMatch,
> + fifoFull,
> + // fifoNotEmpty, collision with next enum; replaced by following enum...
> + fifoEmpty,
> + fifoLevelBelowThreshold,
> + fifoOverrun,
> + packetSent,
> + payloadReady,
> + crcOk,
> + batteryLow
> };
>
> enum fifoFillCondition
> {
> - afterSyncInterrupt,
> - always
> + afterSyncInterrupt,
> + always
>

Re: [PATCH 2/3] staging: pi433: - style fix, space before tabs

2017-07-22 Thread Marcus Wolf
Reviewed-by: Marcus Wolf 

>From my point of view, the rearrangement of the block of SET_CHECKED reduces 
>the
readability a lot. I like same stuff to be aligned (all brakets below each other
as a column, all spi->dev below each other and so on) But if it  is necessary to
fullfill the rules, we have to do it the new way.

Thanks to Derek for his routine piece of work!

Marcus

> Derek Robson  hat am 22. Juli 2017 um 05:51 geschrieben:
> 
> 
> Fixed checkpatch errors of "no space before tabs"
> 
> Signed-off-by: Derek Robson 
> ---
>  drivers/staging/pi433/pi433_if.c | 12 ++--
>  drivers/staging/pi433/pi433_if.h |  4 ++--
>  drivers/staging/pi433/rf69.c |  8 
>  drivers/staging/pi433/rf69.h |  6 +++---
>  4 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/staging/pi433/pi433_if.c
> b/drivers/staging/pi433/pi433_if.c
> index 9cdebe93657c..b9e9292c01d9 100644
> --- a/drivers/staging/pi433/pi433_if.c
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -190,12 +190,12 @@ rf69_set_rx_cfg(struct pi433_device *dev, struct
> pi433_rx_cfg *rx_cfg)
>   SET_CHECKED(rf69_set_frequency  (dev->spi, rx_cfg->frequency));
>   SET_CHECKED(rf69_set_bit_rate   (dev->spi, rx_cfg->bit_rate));
>   SET_CHECKED(rf69_set_modulation (dev->spi, rx_cfg->modulation));
> - SET_CHECKED(rf69_set_antenna_impedance   (dev->spi,
> rx_cfg->antenna_impedance));
> - SET_CHECKED(rf69_set_rssi_threshold  (dev->spi, 
> rx_cfg->rssi_threshold));
> - SET_CHECKED(rf69_set_ook_threshold_dec   (dev->spi,
> rx_cfg->thresholdDecrement));
> - SET_CHECKED(rf69_set_bandwidth   (dev->spi, rx_cfg->bw_mantisse,
> rx_cfg->bw_exponent));
> + SET_CHECKED(rf69_set_antenna_impedance(dev->spi,
> rx_cfg->antenna_impedance));
> + SET_CHECKED(rf69_set_rssi_threshold(dev->spi, rx_cfg->rssi_threshold));
> + SET_CHECKED(rf69_set_ook_threshold_dec(dev->spi,
> rx_cfg->thresholdDecrement));
> + SET_CHECKED(rf69_set_bandwidth(dev->spi, rx_cfg->bw_mantisse,
> rx_cfg->bw_exponent));
>   SET_CHECKED(rf69_set_bandwidth_during_afc(dev->spi, rx_cfg->bw_mantisse,
> rx_cfg->bw_exponent));
> - SET_CHECKED(rf69_set_dagc(dev->spi, rx_cfg->dagc));
> + SET_CHECKED(rf69_set_dagc(dev->spi, rx_cfg->dagc));
>  
>   dev->rx_bytes_to_drop = rx_cfg->bytes_to_drop;
>  
> @@ -959,7 +959,7 @@ static int pi433_release(struct inode *inode, struct file
> *filp)
>  
>  static int setup_GPIOs(struct pi433_device *device)
>  {
> - charname[5];
> + charname[5];
>   int retval;
>   int i;
>  
> diff --git a/drivers/staging/pi433/pi433_if.h
> b/drivers/staging/pi433/pi433_if.h
> index e6ed3cd9b2e2..aae71f029c60 100644
> --- a/drivers/staging/pi433/pi433_if.h
> +++ b/drivers/staging/pi433/pi433_if.h
> @@ -57,7 +57,7 @@
>   *
>   * NOTE: struct layout is the same in 64bit and 32bit userspace.
>   */
> -#define PI433_TX_CFG_IOCTL_NR0
> +#define PI433_TX_CFG_IOCTL_NR0
>  struct pi433_tx_cfg
>  {
>   __u32   frequency;
> @@ -107,7 +107,7 @@ struct pi433_tx_cfg
>   *
>   * NOTE: struct layout is the same in 64bit and 32bit userspace.
>   */
> -#define PI433_RX_CFG_IOCTL_NR1
> +#define PI433_RX_CFG_IOCTL_NR1
>  struct pi433_rx_cfg {
>   __u32   frequency;
>   __u16   bit_rate;
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> index 7f4db9a1f39a..d931437f0b6a 100644
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -28,8 +28,8 @@
>  #include "rf69.h"
>  #include "rf69_registers.h"
>  
> -#define F_OSC  3200 /* in Hz */
> -#define FIFO_SIZE 66/* in byte */
> +#define F_OSC 3200   /* in Hz */
> +#define FIFO_SIZE 66 /* in byte */
>  
>  /*-*/
>  
> @@ -885,8 +885,8 @@ int rf69_read_fifo (struct spi_device *spi, u8 *buffer,
> unsigned int size)
>   /* prepare a bidirectional transfer */
>   local_buffer[0] = REG_FIFO;
>   memset(&transfer, 0, sizeof(transfer));
> - transfer.tx_buf = local_buffer;
> - transfer.rx_buf = local_buffer;
> + transfer.tx_buf = local_buffer;
> + transfer.rx_buf = local_buffer;
>   transfer.len= size+1;
>  
>   retval = spi_sync_transfer(spi, &transfer, 1);
> diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
> index b81e0762032e..373df64b6891 100644
> --- a/drivers/staging/pi433/rf69.h
> +++ b/drivers/staging/pi433/rf69.h
> @@ -20,10 +20,10 @@
>  #include "rf69_enum.h"
>  #include "rf69_registers.h"
>  
> -#define F_OSC3200  /* in Hz */
> +#define F_OSC3200  /* in Hz */
>  #define FREQUENCY43392 /* in Hz, modifying this value impacts CE
> certification */
> -#define FIFO_SIZE66/* in byte */
> -#define FIFO_THRESHOLD   15/* in byte */
> +#define FIFO_SIZE

Re: [PATCH 1/3] staging: pi433: Style fix - align block comments

2017-07-22 Thread Marcus Wolf
Reviewed-by: Marcus Wolf 

Thanks for your work, Derek!

> Derek Robson  hat am 22. Juli 2017 um 05:50 geschrieben:
> 
> 
> Fixed the alignment of block comments
> Found using checkpatch
> 
> Signed-off-by: Derek Robson 
> ---
>  drivers/staging/pi433/pi433_if.c   |  38 +++--
>  drivers/staging/pi433/rf69.c   |  10 +-
>  drivers/staging/pi433/rf69_registers.h | 280
> -
>  3 files changed, 169 insertions(+), 159 deletions(-)
> 
> diff --git a/drivers/staging/pi433/pi433_if.c
> b/drivers/staging/pi433/pi433_if.c
> index 1bc478a7f49e..9cdebe93657c 100644
> --- a/drivers/staging/pi433/pi433_if.c
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -67,9 +67,11 @@ static DEFINE_MUTEX(minor_lock); /* Protect idr accesses */
>  static struct class *pi433_class; /* mainly for udev to create /dev/pi433 */
>  
>  /* tx config is instance specific
> - so with each open a new tx config struct is needed */
> + * so with each open a new tx config struct is needed
> + */
>  /* rx config is device specific
> - so we have just one rx config, ebedded in device struct */
> + * so we have just one rx config, ebedded in device struct
> + */
>  struct pi433_device {
>   /* device handling related values */
>   dev_t   devt;
> @@ -486,9 +488,10 @@ pi433_tx_thread(void *data)
>   return 0;
>  
>   /* get data from fifo in the following order:
> -- tx_cfg
> -- size of message
> -- message */
> +  * - tx_cfg
> +  * - size of message
> +  * - message
> +  */
>   mutex_lock(&device->tx_fifo_lock);
>  
>   retval = kfifo_out(&device->tx_fifo, &tx_cfg, sizeof(tx_cfg));
> @@ -537,23 +540,26 @@ pi433_tx_thread(void *data)
>   mutex_unlock(&device->tx_fifo_lock);
>  
>   /* if rx is active, we need to interrupt the waiting for
> -incoming telegrams, to be able to send something.
> -We are only allowed, if currently no reception takes
> -place otherwise we need to  wait for the incoming telegram
> -to finish */
> +  * incoming telegrams, to be able to send something.
> +  * We are only allowed, if currently no reception takes
> +  * place otherwise we need to  wait for the incoming telegram
> +  * to finish
> +  */
>   wait_event_interruptible(device->tx_wait_queue,
>!device->rx_active ||
> device->interrupt_rx_allowed == true);
>  
>   /* prevent race conditions
> -irq will be reenabled after tx config is set */
> +  * irq will be reenabled after tx config is set
> +  */
>   disable_irq(device->irq_num[DIO0]);
>   device->tx_active = true;
>  
>   if (device->rx_active && rx_interrupted == false)
>   {
>   /* rx is currently waiting for a telegram;
> -we need to set the radio module to standby */
> +  * we need to set the radio module to standby
> +  */
>   SET_CHECKED(rf69_set_mode(device->spi, standby));
>   rx_interrupted = true;
>   }
> @@ -712,9 +718,10 @@ pi433_write(struct file *filp, const char __user *buf,
>   return -EMSGSIZE;
>  
>   /* write the following sequence into fifo:
> -- tx_cfg
> -- size of message
> -- message */
> +  * - tx_cfg
> +  * - size of message
> +  * - message
> +  */
>   mutex_lock(&device->tx_fifo_lock);
>   retval = kfifo_in(&device->tx_fifo, &instance->tx_cfg,
> sizeof(instance->tx_cfg));
>   if ( retval != sizeof(instance->tx_cfg) )
> @@ -1269,7 +1276,8 @@ static int __init pi433_init(void)
>   int status;
>  
>   /* If MAX_MSG_SIZE is smaller then FIFO_SIZE, the driver won't
> -   work stable - risk of buffer overflow */
> +  * work stable - risk of buffer overflow
> +  */
>   if (MAX_MSG_SIZE < FIFO_SIZE)
>   return -EINVAL;
>  
> diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
> index e391ce777bc7..7f4db9a1f39a 100644
> --- a/drivers/staging/pi433/rf69.c
> +++ b/drivers/staging/pi433/rf69.c
> @@ -939,8 +939,9 @@ u8 rf69_read_reg(struct spi_device *spi, u8 addr)
>   #ifdef DEBUG_VALUES
>   if (retval < 0)
>   /* should never happen, since we already checked,
> -that module is connected. Therefore no error
> -handling, just an optional error message... */
> +  * that module is connected. Therefore no error
> +  * handling, just an optional error message...
> +  

[GIT PULL] Staging driver fixes and a new driver for 4.13-rc2

2017-07-22 Thread Greg KH
The following changes since commit 5771a8c08880cdca3bfb4a3fc6d309d6bba20877:

  Linux v4.13-rc1 (2017-07-15 15:22:10 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ 
tags/staging-4.13-rc2

for you to fetch changes up to 5a1d4c5dd4eb2f1f8a9b30e61762f3b3b564df70:

  staging: rtl8188eu: add TL-WN722N v2 support (2017-07-18 09:04:22 +0200)


Staging driver fixes for 4.13-rc2

Here are some small staging driver fixes for reported issues for
4.13-rc2.

Also in here is a new driver, the virtualbox DRM driver.  It's
stand-alone and got acks from the DRM developers to go in through this
tree.  It's a new thing, but it should be fine for this point in the rc
cycle due to it being independent.

All of this has been in linux-next for a while with no reported issues.

Signed-off-by: Greg Kroah-Hartman 


Arnd Bergmann (1):
  staging: lustre: ko2iblnd: check copy_from_iter/copy_to_iter return code

Dan Carpenter (2):
  staging: vchiq_arm: fix error codes in probe
  staging: rtl8188eu: memory leak in rtw_free_cmd_obj()

Hans de Goede (1):
  staging: vboxvideo: Add vboxvideo to drivers/staging

Ian Abbott (1):
  staging: comedi: ni_mio_common: fix AO timer off-by-one regression

Lynn Lei (1):
  staging: sm750fb: fixed a assignment typo

Michael Gugino (1):
  staging: rtl8188eu: add TL-WN722N v2 support

Okash Khawaja (3):
  staging: speakup: safely close tty
  staging: speakup: add functions to register and unregister ldisc
  staging: speakup: safely register and unregister ldisc

Teddy Wang (1):
  staging: sm750fb: avoid conflicting vesafb

 drivers/staging/Kconfig|   2 +
 drivers/staging/Makefile   |   1 +
 drivers/staging/comedi/drivers/ni_mio_common.c |   3 +-
 .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c |  19 +-
 drivers/staging/rtl8188eu/core/rtw_cmd.c   |   2 +-
 drivers/staging/rtl8188eu/os_dep/usb_intf.c|   1 +
 drivers/staging/sm750fb/ddk750_chip.c  |   2 +-
 drivers/staging/sm750fb/sm750.c|  24 +
 drivers/staging/speakup/main.c |   2 +
 drivers/staging/speakup/spk_priv.h |   2 +
 drivers/staging/speakup/spk_ttyio.c|  22 +-
 drivers/staging/vboxvideo/Kconfig  |  12 +
 drivers/staging/vboxvideo/Makefile |   7 +
 drivers/staging/vboxvideo/TODO |   9 +
 drivers/staging/vboxvideo/hgsmi_base.c | 246 ++
 drivers/staging/vboxvideo/hgsmi_ch_setup.h |  66 ++
 drivers/staging/vboxvideo/hgsmi_channels.h |  53 ++
 drivers/staging/vboxvideo/hgsmi_defs.h |  92 +++
 drivers/staging/vboxvideo/modesetting.c| 142 
 drivers/staging/vboxvideo/vbox_drv.c   | 286 +++
 drivers/staging/vboxvideo/vbox_drv.h   | 296 +++
 drivers/staging/vboxvideo/vbox_err.h   |  50 ++
 drivers/staging/vboxvideo/vbox_fb.c| 412 ++
 drivers/staging/vboxvideo/vbox_hgsmi.c | 115 +++
 drivers/staging/vboxvideo/vbox_irq.c   | 197 +
 drivers/staging/vboxvideo/vbox_main.c  | 534 +
 drivers/staging/vboxvideo/vbox_mode.c  | 877 +
 drivers/staging/vboxvideo/vbox_prime.c |  74 ++
 drivers/staging/vboxvideo/vbox_ttm.c   | 472 +++
 drivers/staging/vboxvideo/vboxvideo.h  | 491 
 drivers/staging/vboxvideo/vboxvideo_guest.h|  95 +++
 drivers/staging/vboxvideo/vboxvideo_vbe.h  |  84 ++
 drivers/staging/vboxvideo/vbva_base.c  | 233 ++
 .../vc04_services/interface/vchiq_arm/vchiq_arm.c  |  10 +-
 34 files changed, 4912 insertions(+), 21 deletions(-)
 create mode 100644 drivers/staging/vboxvideo/Kconfig
 create mode 100644 drivers/staging/vboxvideo/Makefile
 create mode 100644 drivers/staging/vboxvideo/TODO
 create mode 100644 drivers/staging/vboxvideo/hgsmi_base.c
 create mode 100644 drivers/staging/vboxvideo/hgsmi_ch_setup.h
 create mode 100644 drivers/staging/vboxvideo/hgsmi_channels.h
 create mode 100644 drivers/staging/vboxvideo/hgsmi_defs.h
 create mode 100644 drivers/staging/vboxvideo/modesetting.c
 create mode 100644 drivers/staging/vboxvideo/vbox_drv.c
 create mode 100644 drivers/staging/vboxvideo/vbox_drv.h
 create mode 100644 drivers/staging/vboxvideo/vbox_err.h
 create mode 100644 drivers/staging/vboxvideo/vbox_fb.c
 create mode 100644 drivers/staging/vboxvideo/vbox_hgsmi.c
 create mode 100644 drivers/staging/vboxvideo/vbox_irq.c
 create mode 100644 drivers/staging/vboxvideo/vbox_main.c
 create mode 100644 drivers/staging/vboxvideo/vbox_mode.c
 create mode 100644 drivers/staging/vboxvideo/vbox_prime.c
 create mode 100644 d

[PATCH] staging: pi433: use IS_ERR to check kthread_run return value

2017-07-22 Thread Paolo Cretaro
Fix compiler warning: ordered comparison of pointer with integer zero

Signed-off-by: Paolo Cretaro 
---
 drivers/staging/pi433/pi433_if.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index 1bc478a7f49e..79bd19123239 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -1152,7 +1152,7 @@ static int pi433_probe(struct spi_device *spi)
device->tx_task_struct = kthread_run(pi433_tx_thread,
 device,
 "pi433_tx_task");
-   if (device->tx_task_struct < 0)
+   if (IS_ERR(device->tx_task_struct))
{
dev_dbg(device->dev, "start of send thread failed");
goto send_thread_failed;
-- 
2.13.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: pi433: use IS_ERR to check kthread_run return value

2017-07-22 Thread Paolo Cretaro
On 22/07/2017 12:27, Paolo Cretaro wrote:
> Fix compiler warning: ordered comparison of pointer with integer zero

Sorry, just noticed a similar patch has been submitted a few days ago,
please ignore this patch.

Paolo

> 
> Signed-off-by: Paolo Cretaro 
> ---
>  drivers/staging/pi433/pi433_if.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/pi433/pi433_if.c 
> b/drivers/staging/pi433/pi433_if.c
> index 1bc478a7f49e..79bd19123239 100644
> --- a/drivers/staging/pi433/pi433_if.c
> +++ b/drivers/staging/pi433/pi433_if.c
> @@ -1152,7 +1152,7 @@ static int pi433_probe(struct spi_device *spi)
>   device->tx_task_struct = kthread_run(pi433_tx_thread,
>device,
>"pi433_tx_task");
> - if (device->tx_task_struct < 0)
> + if (IS_ERR(device->tx_task_struct))
>   {
>   dev_dbg(device->dev, "start of send thread failed");
>   goto send_thread_failed;
> 
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: vboxvideo: remove unused variables

2017-07-22 Thread Paolo Cretaro
Fix compiler warnings:
vbox_mode.c:57:15: warning: variable ‘crtc_id’ set but not used
vbox_mode.c:581:25: warning: variable ‘vbox_connector’ set but not used

Signed-off-by: Paolo Cretaro 
---
 drivers/staging/vboxvideo/vbox_mode.c | 5 -
 1 file changed, 5 deletions(-)

diff --git a/drivers/staging/vboxvideo/vbox_mode.c 
b/drivers/staging/vboxvideo/vbox_mode.c
index f2b85f3256fa..a7eea70a3804 100644
--- a/drivers/staging/vboxvideo/vbox_mode.c
+++ b/drivers/staging/vboxvideo/vbox_mode.c
@@ -54,14 +54,12 @@ static void vbox_do_modeset(struct drm_crtc *crtc,
struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
struct vbox_private *vbox;
int width, height, bpp, pitch;
-   unsigned int crtc_id;
u16 flags;
s32 x_offset, y_offset;
 
vbox = crtc->dev->dev_private;
width = mode->hdisplay ? mode->hdisplay : 640;
height = mode->vdisplay ? mode->vdisplay : 480;
-   crtc_id = vbox_crtc->crtc_id;
bpp = crtc->enabled ? CRTC_FB(crtc)->format->cpp[0] * 8 : 32;
pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
x_offset = vbox->single_framebuffer ? crtc->x : vbox_crtc->x_hint;
@@ -578,9 +576,6 @@ static int vbox_mode_valid(struct drm_connector *connector,
 
 static void vbox_connector_destroy(struct drm_connector *connector)
 {
-   struct vbox_connector *vbox_connector;
-
-   vbox_connector = to_vbox_connector(connector);
drm_connector_unregister(connector);
drm_connector_cleanup(connector);
kfree(connector);
-- 
2.13.3

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 2/2] mmc: Add mmc_force_detect_change_begin / _end functions

2017-07-22 Thread Shawn Lin

invite Jack from expressif

在 2017/7/21 22:35, Quentin Schulz 写道:

From: Hans de Goede 

Some sdio devices have a multiple stage bring-up process. Specifically
the esp8089 (for which an out of tree driver is available) loads firmware
on the first call to its sdio-drivers' probe function and then resets
the device causing it to reboot from its RAM with the new firmware.



Nice to see finally someone get into here!

I was bringing up ESP8089 for rockchip platforms 4 yeas ago with
Jack from espressif, the ESP8089 RD team, face 2 face. And I forgot
most the details but it seems indeed the limitation of RAM size so that
it has to use 2 stages boot-up method.

I hople Jack could give some suggestion or details about this.



When this sdio device reboots it comes back up in 1 bit 400 KHz mode
again, and we need to walk through the whole ios negatiation and sdio setup
again.

There are 2 problems with this:

1) Typically these devices are soldered onto some (ARM) tablet / SBC
PCB and as such are described in devicetree as "non-removable", which
causes the mmc-core to scan them only once and not poll for the device
dropping of the bus. Normally this is the right thing todo but in the
eso8089 example we need the mmc-core to notice the module has disconnected
(since it is now in 1 bit mode again it will not talk to the host in 4 bit
mode). This can be worked around by using "broken-cd" in devicetree
instead of "non-removable", but that is not a proper fix since the device
really is non-removable.

2) When the mmc-core detects the device has disconnected it will poweroff
the device, causing the RAM loaded firmware to be lost. This can be worked
around in devicetree by using regulator-always-on (and avoiding the use of
mmc-pwrseq), but again that is more of a hack then a proper fix.

This commmit fixes 1) by adding a mmc_force_detect_change function which
will cause scanning for device removal / insertion until a new device is
detected. 2) Is fixed by a keep_power flag to the mmc_force_detect_change
function which when set causes the mmc-core to keep the power to the device
on during the rescan.

Cc: Icenowy Zheng 
Cc: Maxime Ripard 
Cc: Chen-Yu Tsai 
Signed-off-by: Hans de Goede 
---
 drivers/mmc/core/core.c  | 47 ++-
 include/linux/mmc/host.h |  7 +++
 2 files changed, 49 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 26431267a3e2..103badde910b 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1620,8 +1620,11 @@ int mmc_select_drive_strength(struct mmc_card *card, 
unsigned int max_dtr,
  */
 void mmc_power_up(struct mmc_host *host, u32 ocr)
 {
-   if (host->ios.power_mode == MMC_POWER_ON)
+   if (host->ios.power_mode == MMC_POWER_ON) {
+   if (host->ios.clock == 0)
+   goto set_clock;
return;
+   }

mmc_pwrseq_pre_power_on(host);

@@ -1646,6 +1649,7 @@ void mmc_power_up(struct mmc_host *host, u32 ocr)

mmc_pwrseq_post_power_on(host);

+set_clock:
host->ios.clock = host->f_init;

host->ios.power_mode = MMC_POWER_ON;
@@ -1663,6 +1667,11 @@ void mmc_power_off(struct mmc_host *host)
if (host->ios.power_mode == MMC_POWER_OFF)
return;

+   if (host->rescan_keep_power) {
+   mmc_set_clock(host, 0);
+   return;
+   }
+
mmc_pwrseq_power_off(host);

host->ios.clock = 0;
@@ -1804,6 +1813,27 @@ void mmc_detect_change(struct mmc_host *host, unsigned 
long delay)
 }
 EXPORT_SYMBOL(mmc_detect_change);

+/**
+ * mmc_force_detect_change - force rescanning of a MMC socket even if
+ *   it is non-removable
+ * @host: host to rescan
+ * @delay: optional delay to wait before detection (jiffies)
+ * @keep_power: if set do not turn of vdd / call pwrseq_off during rescan
+ *
+ * MMC drivers which need non-removable sdio devices to be rescanned
+ * (e.g. because the device reboots its fw after a firmware upload),
+ * can call this to force scanning the MMC socket for changes, even
+ * if it is non-removable.
+ */
+void mmc_force_detect_change(struct mmc_host *host, unsigned long delay,
+bool keep_power)
+{
+   host->rescan_force = 1;
+   host->rescan_keep_power = keep_power;
+   _mmc_detect_change(host, delay, false);
+}
+EXPORT_SYMBOL(mmc_force_detect_change);
+
 void mmc_init_erase(struct mmc_card *card)
 {
unsigned int sz;
@@ -2566,7 +2596,8 @@ void mmc_rescan(struct work_struct *work)
return;

/* If there is a non-removable card registered, only scan once */
-   if (!mmc_card_is_removable(host) && host->rescan_entered)
+   if (!mmc_card_is_removable(host) && host->rescan_entered &&
+   !host->rescan_force)
return;
host->rescan_entered = 1;

@@ -2583,7 +2614,8 @@ void mmc_rescan(struct

[PATCH] Staging: lustre: Place the open brace on previous line.

2017-07-22 Thread Shreeya Patel
Remove errors by placing the open braces on previous line.
This saves the vertical space of the code.

Problem found by checkpatch.

Signed-off-by: Shreeya Patel 
---
 drivers/staging/lustre/lnet/libcfs/hash.c | 24 
 1 file changed, 8 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c 
b/drivers/staging/lustre/lnet/libcfs/hash.c
index 5c2ce2e..a255e04 100644
--- a/drivers/staging/lustre/lnet/libcfs/hash.c
+++ b/drivers/staging/lustre/lnet/libcfs/hash.c
@@ -1348,8 +1348,7 @@ cfs_hash_lookup(struct cfs_hash *hs, const void *key)
 EXPORT_SYMBOL(cfs_hash_lookup);
 
 static void
-cfs_hash_for_each_enter(struct cfs_hash *hs)
-{
+cfs_hash_for_each_enter(struct cfs_hash *hs) {
LASSERT(!cfs_hash_is_exiting(hs));
 
if (!cfs_hash_with_rehash(hs))
@@ -1375,8 +1374,7 @@ cfs_hash_for_each_enter(struct cfs_hash *hs)
 }
 
 static void
-cfs_hash_for_each_exit(struct cfs_hash *hs)
-{
+cfs_hash_for_each_exit(struct cfs_hash *hs) {
int remained;
int bits;
 
@@ -1407,8 +1405,7 @@ cfs_hash_for_each_exit(struct cfs_hash *hs)
  */
 static u64
 cfs_hash_for_each_tight(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
-   void *data, int remove_safe)
-{
+   void *data, int remove_safe) {
struct hlist_node *hnode;
struct hlist_node *pos;
struct cfs_hash_bd bd;
@@ -1501,8 +1498,7 @@ EXPORT_SYMBOL(cfs_hash_for_each);
 
 void
 cfs_hash_for_each_safe(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
-  void *data)
-{
+  void *data) {
cfs_hash_for_each_tight(hs, func, data, 1);
 }
 EXPORT_SYMBOL(cfs_hash_for_each_safe);
@@ -1551,8 +1547,7 @@ EXPORT_SYMBOL(cfs_hash_size_get);
  */
 static int
 cfs_hash_for_each_relax(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
-   void *data, int start)
-{
+   void *data, int start) {
struct hlist_node *hnode;
struct hlist_node *tmp;
struct cfs_hash_bd bd;
@@ -1629,8 +1624,7 @@ cfs_hash_for_each_relax(struct cfs_hash *hs, 
cfs_hash_for_each_cb_t func,
 
 int
 cfs_hash_for_each_nolock(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
-void *data, int start)
-{
+void *data, int start) {
if (cfs_hash_with_no_lock(hs) ||
cfs_hash_with_rehash_key(hs) ||
!cfs_hash_with_no_itemref(hs))
@@ -1661,8 +1655,7 @@ EXPORT_SYMBOL(cfs_hash_for_each_nolock);
  */
 int
 cfs_hash_for_each_empty(struct cfs_hash *hs, cfs_hash_for_each_cb_t func,
-   void *data)
-{
+   void *data) {
unsigned int i = 0;
 
if (cfs_hash_with_no_lock(hs))
@@ -1718,8 +1711,7 @@ EXPORT_SYMBOL(cfs_hash_hlist_for_each);
  */
 void
 cfs_hash_for_each_key(struct cfs_hash *hs, const void *key,
- cfs_hash_for_each_cb_t func, void *data)
-{
+ cfs_hash_for_each_cb_t func, void *data) {
struct hlist_node *hnode;
struct cfs_hash_bd bds[2];
unsigned int i;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: lustre: Place the open brace on previous line.

2017-07-22 Thread Joe Perches
On Sat, 2017-07-22 at 22:26 +0530, Shreeya Patel wrote:
> Remove errors by placing the open braces on previous line.
> This saves the vertical space of the code.
> 
> Problem found by checkpatch.

No.  These are checkpatch false positives.

> diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c 
> b/drivers/staging/lustre/lnet/libcfs/hash.c
[]
> @@ -1348,8 +1348,7 @@ cfs_hash_lookup(struct cfs_hash *hs, const void *key)
>  EXPORT_SYMBOL(cfs_hash_lookup);
>  
>  static void
> -cfs_hash_for_each_enter(struct cfs_hash *hs)
> -{
> +cfs_hash_for_each_enter(struct cfs_hash *hs) {
>   LASSERT(!cfs_hash_is_exiting(hs));
>  
>   if (!cfs_hash_with_rehash(hs))

etc...

These are correctly written function definitions.
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/2] staging: wlan-ng: Fix the types of the hfa384x_comm_tallies_16/32 members

2017-07-22 Thread Christopher H Pezley
Running sparse revealed that the members of hfa384x_comm_tallies_16/32
were defined as u16/u32, but were actually used as __le16/__le32.

This patch changes the member types to reflect their use.

Signed-off-by: Christopher H Pezley 
---
 drivers/staging/wlan-ng/hfa384x.h   | 84 ++---
 drivers/staging/wlan-ng/prism2sta.c |  8 ++--
 2 files changed, 46 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h 
b/drivers/staging/wlan-ng/hfa384x.h
index f28b057..725f9f7 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -598,51 +598,51 @@ struct hfa384x_rx_frame {
 
 /*--  Inquiry Frame, Diagnose: Communication Tallies --*/
 struct hfa384x_comm_tallies_16 {
-   u16 txunicastframes;
-   u16 txmulticastframes;
-   u16 txfragments;
-   u16 txunicastoctets;
-   u16 txmulticastoctets;
-   u16 txdeferredtrans;
-   u16 txsingleretryframes;
-   u16 txmultipleretryframes;
-   u16 txretrylimitexceeded;
-   u16 txdiscards;
-   u16 rxunicastframes;
-   u16 rxmulticastframes;
-   u16 rxfragments;
-   u16 rxunicastoctets;
-   u16 rxmulticastoctets;
-   u16 rxfcserrors;
-   u16 rxdiscardsnobuffer;
-   u16 txdiscardswrongsa;
-   u16 rxdiscardswepundecr;
-   u16 rxmsginmsgfrag;
-   u16 rxmsginbadmsgfrag;
+   __le16 txunicastframes;
+   __le16 txmulticastframes;
+   __le16 txfragments;
+   __le16 txunicastoctets;
+   __le16 txmulticastoctets;
+   __le16 txdeferredtrans;
+   __le16 txsingleretryframes;
+   __le16 txmultipleretryframes;
+   __le16 txretrylimitexceeded;
+   __le16 txdiscards;
+   __le16 rxunicastframes;
+   __le16 rxmulticastframes;
+   __le16 rxfragments;
+   __le16 rxunicastoctets;
+   __le16 rxmulticastoctets;
+   __le16 rxfcserrors;
+   __le16 rxdiscardsnobuffer;
+   __le16 txdiscardswrongsa;
+   __le16 rxdiscardswepundecr;
+   __le16 rxmsginmsgfrag;
+   __le16 rxmsginbadmsgfrag;
 } __packed;
 
 struct hfa384x_comm_tallies_32 {
-   u32 txunicastframes;
-   u32 txmulticastframes;
-   u32 txfragments;
-   u32 txunicastoctets;
-   u32 txmulticastoctets;
-   u32 txdeferredtrans;
-   u32 txsingleretryframes;
-   u32 txmultipleretryframes;
-   u32 txretrylimitexceeded;
-   u32 txdiscards;
-   u32 rxunicastframes;
-   u32 rxmulticastframes;
-   u32 rxfragments;
-   u32 rxunicastoctets;
-   u32 rxmulticastoctets;
-   u32 rxfcserrors;
-   u32 rxdiscardsnobuffer;
-   u32 txdiscardswrongsa;
-   u32 rxdiscardswepundecr;
-   u32 rxmsginmsgfrag;
-   u32 rxmsginbadmsgfrag;
+   __le32 txunicastframes;
+   __le32 txmulticastframes;
+   __le32 txfragments;
+   __le32 txunicastoctets;
+   __le32 txmulticastoctets;
+   __le32 txdeferredtrans;
+   __le32 txsingleretryframes;
+   __le32 txmultipleretryframes;
+   __le32 txretrylimitexceeded;
+   __le32 txdiscards;
+   __le32 rxunicastframes;
+   __le32 rxmulticastframes;
+   __le32 rxfragments;
+   __le32 rxunicastoctets;
+   __le32 rxmulticastoctets;
+   __le32 rxfcserrors;
+   __le32 rxdiscardsnobuffer;
+   __le32 txdiscardswrongsa;
+   __le32 rxdiscardswepundecr;
+   __le32 rxmsginmsgfrag;
+   __le32 rxmsginbadmsgfrag;
 } __packed;
 
 /*--  Inquiry Frame, Diagnose: Scan Results & Subfields--*/
diff --git a/drivers/staging/wlan-ng/prism2sta.c 
b/drivers/staging/wlan-ng/prism2sta.c
index e16da34..5d0495e 100644
--- a/drivers/staging/wlan-ng/prism2sta.c
+++ b/drivers/staging/wlan-ng/prism2sta.c
@@ -991,9 +991,9 @@ static void prism2sta_inf_tallies(struct wlandevice 
*wlandev,
  struct hfa384x_inf_frame *inf)
 {
struct hfa384x *hw = wlandev->priv;
-   u16 *src16;
+   __le16 *src16;
u32 *dst;
-   u32 *src32;
+   __le32 *src32;
int i;
int cnt;
 
@@ -1005,12 +1005,12 @@ static void prism2sta_inf_tallies(struct wlandevice 
*wlandev,
cnt = sizeof(struct hfa384x_comm_tallies_32) / sizeof(u32);
if (inf->framelen > 22) {
dst = (u32 *)&hw->tallies;
-   src32 = (u32 *)&inf->info.commtallies32;
+   src32 = (__le32 *)&inf->info.commtallies32;
for (i = 0; i < cnt; i++, dst++, src32++)
*dst += le32_to_cpu(*src32);
} else {
dst = (u32 *)&hw->tallies;
-   src16 = (u16 *)&inf->info.commtallies16;
+   src16 = (__le16 *)&inf->info.commtallies16;
for (i = 0; i < cnt; i++, dst++, src16++)
*dst += le16_to_cpu(*src16);
}
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] staging: wlan-ng: Fix the types of the hfa384x_commsquality members

2017-07-22 Thread Christopher H Pezley
Running sparse revealed that the members of hfa384x_commsquality
were defined as u16, but were actually used as __le16:

drivers/staging/wlan-ng/prism2sta.c:375:46: warning: cast to
restricted __le16

This patch changes the member types to reflect their use.

Signed-off-by: Christopher H Pezley 
---
 drivers/staging/wlan-ng/hfa384x.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wlan-ng/hfa384x.h 
b/drivers/staging/wlan-ng/hfa384x.h
index 018db22..f28b057 100644
--- a/drivers/staging/wlan-ng/hfa384x.h
+++ b/drivers/staging/wlan-ng/hfa384x.h
@@ -445,9 +445,9 @@ struct hfa384x_downloadbuffer {
 
 /*-- Information Record: commsquality --*/
 struct hfa384x_commsquality {
-   u16 cq_curr_bss;
-   u16 asl_curr_bss;
-   u16 anl_curr_fc;
+   __le16 cq_curr_bss;
+   __le16 asl_curr_bss;
+   __le16 anl_curr_fc;
 } __packed;
 
 /*-- Information Record: dmbcommsquality --*/
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] staging: vboxvideo: remove unused variables

2017-07-22 Thread Hans de Goede

Hi,

On 22-07-17 12:55, Paolo Cretaro wrote:

Fix compiler warnings:
vbox_mode.c:57:15: warning: variable ‘crtc_id’ set but not used
vbox_mode.c:581:25: warning: variable ‘vbox_connector’ set but not used

Signed-off-by: Paolo Cretaro 


Patch looks good to me:

Acked-by: Hans de Goede 

Regards,

Hans



---
  drivers/staging/vboxvideo/vbox_mode.c | 5 -
  1 file changed, 5 deletions(-)

diff --git a/drivers/staging/vboxvideo/vbox_mode.c 
b/drivers/staging/vboxvideo/vbox_mode.c
index f2b85f3256fa..a7eea70a3804 100644
--- a/drivers/staging/vboxvideo/vbox_mode.c
+++ b/drivers/staging/vboxvideo/vbox_mode.c
@@ -54,14 +54,12 @@ static void vbox_do_modeset(struct drm_crtc *crtc,
struct vbox_crtc *vbox_crtc = to_vbox_crtc(crtc);
struct vbox_private *vbox;
int width, height, bpp, pitch;
-   unsigned int crtc_id;
u16 flags;
s32 x_offset, y_offset;
  
  	vbox = crtc->dev->dev_private;

width = mode->hdisplay ? mode->hdisplay : 640;
height = mode->vdisplay ? mode->vdisplay : 480;
-   crtc_id = vbox_crtc->crtc_id;
bpp = crtc->enabled ? CRTC_FB(crtc)->format->cpp[0] * 8 : 32;
pitch = crtc->enabled ? CRTC_FB(crtc)->pitches[0] : width * bpp / 8;
x_offset = vbox->single_framebuffer ? crtc->x : vbox_crtc->x_hint;
@@ -578,9 +576,6 @@ static int vbox_mode_valid(struct drm_connector *connector,
  
  static void vbox_connector_destroy(struct drm_connector *connector)

  {
-   struct vbox_connector *vbox_connector;
-
-   vbox_connector = to_vbox_connector(connector);
drm_connector_unregister(connector);
drm_connector_cleanup(connector);
kfree(connector);


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v1 2/6] mei: Switch to use new generic UUID API

2017-07-22 Thread kbuild test robot
Hi Andy,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.13-rc1 next-20170721]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Andy-Shevchenko/uuid-Convert-rest-users-to-new-API/20170723-022330
config: i386-randconfig-x019-201730 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

Note: the 
linux-review/Andy-Shevchenko/uuid-Convert-rest-users-to-new-API/20170723-022330 
HEAD f8d40b52dfac11e78d56509455812bcfe9962ce0 builds fine.
  It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from scripts/mod/file2alias.c:44:0:
>> scripts/mod/../../include/linux/mod_devicetable.h:638:2: error: unknown type 
>> name 'guid_t'
 guid_t uuid;
 ^~
   scripts/mod/file2alias.c: In function 'do_mei_entry':
>> scripts/mod/file2alias.c:1233:18: error: incompatible type for argument 2 of 
>> 'add_uuid'
 add_uuid(alias, *uuid);
 ^
   scripts/mod/file2alias.c:137:20: note: expected 'uuid_le {aka struct 
}' but argument is of type 'int'
static inline void add_uuid(char *str, uuid_le uuid)
   ^~~~
   make[3]: *** [scripts/mod/file2alias.o] Error 1
   make[3]: Target '__build' not remade because of errors.
   make[2]: *** [scripts/mod] Error 2
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [scripts] Error 2
   make[1]: Target 'modules_prepare' not remade because of errors.
   make: *** [sub-make] Error 2

vim +/guid_t +638 scripts/mod/../../include/linux/mod_devicetable.h

   626  
   627  /**
   628   * struct mei_cl_device_id - MEI client device identifier
   629   * @name: helper name
   630   * @uuid: client GUID
   631   * @version: client protocol version
   632   * @driver_info: information used by the driver.
   633   *
   634   * identifies mei client device by GUID and name
   635   */
   636  struct mei_cl_device_id {
   637  char name[MEI_CL_NAME_SIZE];
 > 638  guid_t uuid;
   639  __u8version;
   640  kernel_ulong_t driver_info;
   641  };
   642  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v1 4/6] vmbus: Switch to use new generic UUID API

2017-07-22 Thread kbuild test robot
Hi Andy,

[auto build test ERROR on linus/master]
[also build test ERROR on v4.13-rc1]
[cannot apply to next-20170721]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Andy-Shevchenko/uuid-Convert-rest-users-to-new-API/20170723-022330
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

Note: the 
linux-review/Andy-Shevchenko/uuid-Convert-rest-users-to-new-API/20170723-022330 
HEAD f8d40b52dfac11e78d56509455812bcfe9962ce0 builds fine.
  It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from scripts//mod/file2alias.c:44:0:
   scripts//mod/../../include/linux/mod_devicetable.h:408:2: error: unknown 
type name 'guid_t'
 guid_t guid;
 ^~
   scripts//mod/../../include/linux/mod_devicetable.h:638:2: error: unknown 
type name 'guid_t'
 guid_t uuid;
 ^~
   In file included from scripts//mod/file2alias.c:13:0:
   scripts//mod/file2alias.c: In function 'do_vmbus_entry':
>> scripts//mod/file2alias.c:938:49: error: request for member 'b' in something 
>> not a structure or union
  sprintf(&guid_name[i], "%02x", TO_NATIVE((guid->b)[i/2]));
^
   scripts//mod/modpost.h:92:23: note: in definition of macro 'TO_NATIVE'
#define TO_NATIVE(x) (x)
  ^
   scripts//mod/file2alias.c: In function 'do_mei_entry':
   scripts//mod/file2alias.c:1233:18: error: incompatible type for argument 2 
of 'add_uuid'
 add_uuid(alias, *uuid);
 ^
   scripts//mod/file2alias.c:137:20: note: expected 'uuid_le {aka struct 
}' but argument is of type 'int'
static inline void add_uuid(char *str, uuid_le uuid)
   ^~~~

vim +/b +938 scripts//mod/file2alias.c

b01d9f28 Rusty Russell2007-10-22  923  
d2ee52aa K. Y. Srinivasan 2011-08-25  924  /*
d2ee52aa K. Y. Srinivasan 2011-08-25  925   * Looks like: vmbus:guid
d2ee52aa K. Y. Srinivasan 2011-08-25  926   * Each byte of the guid will be 
represented by two hex characters
d2ee52aa K. Y. Srinivasan 2011-08-25  927   * in the name.
d2ee52aa K. Y. Srinivasan 2011-08-25  928   */
d2ee52aa K. Y. Srinivasan 2011-08-25  929  
6543becf Andreas Schwab   2013-01-20  930  static int do_vmbus_entry(const char 
*filename, void *symval,
d2ee52aa K. Y. Srinivasan 2011-08-25  931 char *alias)
d2ee52aa K. Y. Srinivasan 2011-08-25  932  {
d2ee52aa K. Y. Srinivasan 2011-08-25  933   int i;
6543becf Andreas Schwab   2013-01-20  934   DEF_FIELD_ADDR(symval, 
hv_vmbus_device_id, guid);
6543becf Andreas Schwab   2013-01-20  935   char guid_name[(sizeof(*guid) + 
1) * 2];
d2ee52aa K. Y. Srinivasan 2011-08-25  936  
6543becf Andreas Schwab   2013-01-20  937   for (i = 0; i < (sizeof(*guid) 
* 2); i += 2)
af3ff643 K. Y. Srinivasan 2015-12-14 @938   sprintf(&guid_name[i], 
"%02x", TO_NATIVE((guid->b)[i/2]));
d2ee52aa K. Y. Srinivasan 2011-08-25  939  
d2ee52aa K. Y. Srinivasan 2011-08-25  940   strcpy(alias, "vmbus:");
d2ee52aa K. Y. Srinivasan 2011-08-25  941   strcat(alias, guid_name);
d2ee52aa K. Y. Srinivasan 2011-08-25  942  
d2ee52aa K. Y. Srinivasan 2011-08-25  943   return 1;
d2ee52aa K. Y. Srinivasan 2011-08-25  944  }
6543becf Andreas Schwab   2013-01-20  945  ADD_TO_DEVTABLE("vmbus", 
hv_vmbus_device_id, do_vmbus_entry);
d2ee52aa K. Y. Srinivasan 2011-08-25  946  

:: The code at line 938 was first introduced by commit
:: af3ff643ea91ba64dd8d0b1cbed54d44512f96cd Drivers: hv: vmbus: Use uuid_le 
type consistently

:: TO: K. Y. Srinivasan 
:: CC: Greg Kroah-Hartman 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v1 5/6] uuid: Kill uapi/uuid.h

2017-07-22 Thread kbuild test robot
Hi Andy,

[auto build test WARNING on linus/master]
[also build test WARNING on v4.13-rc1]
[cannot apply to next-20170721]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Andy-Shevchenko/uuid-Convert-rest-users-to-new-API/20170723-022330
config: i386-tinyconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

>> ./usr/include/linux/hyperv.h:71: found __[us]{8,16,32,64} type without 
>> #include 
>> ./usr/include/linux/mei.h:93: found __[us]{8,16,32,64} type without #include 
>> 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] [media] imx: add VIDEO_V4L2_SUBDEV_API dependency

2017-07-22 Thread Steve Longerbeam

Acked-by: Steve Longerbeam 

On 07/21/2017 09:21 AM, Arnd Bergmann wrote:

Without this, I get a build error:

drivers/staging/media/imx/imx-media-vdic.c: In function '__vdic_get_fmt':
drivers/staging/media/imx/imx-media-vdic.c:554:10: error: implicit declaration 
of function 'v4l2_subdev_get_try_format'; did you mean 
'v4l2_subdev_notify_event'? [-Werror=implicit-function-declaration]

Fixes: e130291212df ("[media] media: Add i.MX media core driver")
Signed-off-by: Arnd Bergmann 
---
  drivers/staging/media/imx/Kconfig | 1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/imx/Kconfig 
b/drivers/staging/media/imx/Kconfig
index 7eff50bcea39..719508fcb0e9 100644
--- a/drivers/staging/media/imx/Kconfig
+++ b/drivers/staging/media/imx/Kconfig
@@ -1,6 +1,7 @@
  config VIDEO_IMX_MEDIA
tristate "i.MX5/6 V4L2 media core driver"
depends on MEDIA_CONTROLLER && VIDEO_V4L2 && ARCH_MXC && IMX_IPUV3_CORE
+   depends on VIDEO_V4L2_SUBDEV_API
select V4L2_FWNODE
---help---
  Say yes here to enable support for video4linux media controller


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 2/3] Staging: iio: light: tsl2x7x_core.c: Replace symbolic permission with octal permission

2017-07-22 Thread Jonathan Cameron
On Wed, 19 Jul 2017 17:55:56 +0530
Jaya Durga  wrote:

> Replace symbolic permissions with their
> octect representation to fix checkpatch warnings.
> 
> Signed-off-by: Jaya Durga 
The IIO drivers in staging are handled via the iio
tree on git.kernel.org from which Greg pulls a few
times a cycle (when I get enough queued up to make
it worth a pull request).

This code has changed substantially and these symbolic
permissions aren't there any more.

I'll probably be sending Greg a pull request sometime
this week and some time after that these will show
up in staging tree.

Thanks and unfortunate you were working on a driver
that is seeing a lot of changes at the moment as 
Brian tries to clean it up entirely for a move out of
staging.

Jonathan
> ---
>  drivers/staging/iio/light/tsl2x7x_core.c | 20 ++--
>  1 file changed, 10 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/staging/iio/light/tsl2x7x_core.c 
> b/drivers/staging/iio/light/tsl2x7x_core.c
> index af3910b..c63fe6a 100644
> --- a/drivers/staging/iio/light/tsl2x7x_core.c
> +++ b/drivers/staging/iio/light/tsl2x7x_core.c
> @@ -1498,34 +1498,34 @@ static int tsl2x7x_write_raw(struct iio_dev 
> *indio_dev,
>   return 0;
>  }
>  
> -static DEVICE_ATTR(power_state, S_IRUGO | S_IWUSR,
> +static DEVICE_ATTR(power_state, 0644,
>   tsl2x7x_power_state_show, tsl2x7x_power_state_store);
>  
> -static DEVICE_ATTR(in_proximity0_calibscale_available, S_IRUGO,
> +static DEVICE_ATTR(in_proximity0_calibscale_available, 0444,
>   tsl2x7x_prox_gain_available_show, NULL);
>  
> -static DEVICE_ATTR(in_illuminance0_calibscale_available, S_IRUGO,
> +static DEVICE_ATTR(in_illuminance0_calibscale_available, 0444,
>   tsl2x7x_gain_available_show, NULL);
>  
> -static DEVICE_ATTR(in_illuminance0_integration_time, S_IRUGO | S_IWUSR,
> +static DEVICE_ATTR(in_illuminance0_integration_time, 0644,
>   tsl2x7x_als_time_show, tsl2x7x_als_time_store);
>  
> -static DEVICE_ATTR(in_illuminance0_target_input, S_IRUGO | S_IWUSR,
> +static DEVICE_ATTR(in_illuminance0_target_input, 0644,
>   tsl2x7x_als_cal_target_show, tsl2x7x_als_cal_target_store);
>  
> -static DEVICE_ATTR(in_illuminance0_calibrate, S_IWUSR, NULL,
> +static DEVICE_ATTR(in_illuminance0_calibrate, 0200, NULL,
>   tsl2x7x_do_calibrate);
>  
> -static DEVICE_ATTR(in_proximity0_calibrate, S_IWUSR, NULL,
> +static DEVICE_ATTR(in_proximity0_calibrate, 0200, NULL,
>   tsl2x7x_do_prox_calibrate);
>  
> -static DEVICE_ATTR(in_illuminance0_lux_table, S_IRUGO | S_IWUSR,
> +static DEVICE_ATTR(in_illuminance0_lux_table, 0644,
>   tsl2x7x_luxtable_show, tsl2x7x_luxtable_store);
>  
> -static DEVICE_ATTR(in_intensity0_thresh_period, S_IRUGO | S_IWUSR,
> +static DEVICE_ATTR(in_intensity0_thresh_period, 0644,
>   tsl2x7x_als_persistence_show, tsl2x7x_als_persistence_store);
>  
> -static DEVICE_ATTR(in_proximity0_thresh_period, S_IRUGO | S_IWUSR,
> +static DEVICE_ATTR(in_proximity0_thresh_period, 0644,
>   tsl2x7x_prox_persistence_show, tsl2x7x_prox_persistence_store);
>  
>  /* Use the default register values to identify the Taos device */

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3 3/3] Staging: iio: adc: ad7280a.c: Fixed Macro argument reuse

2017-07-22 Thread Jonathan Cameron
On Wed, 19 Jul 2017 17:55:57 +0530
Jaya Durga  wrote:

> CHECK: Macro argument reuse 'addr' - possible side-effects?
> 
> convert AD7280A_DEVADDR to ad7280a_devaddr static function
> to fix checkpath check
> 
> v3: small style changes
> 
> Signed-off-by: Jaya Durga 

This patch is fine so I've applied it to the togreg branch
of iio.git which will be initially pushed out as testing
for the autobuilders to play with it.

Just as an aside there was no connection between the 3 patches
in this series.  As such, what was the point in making them
a series?  If you aren't either working on one driver,
or applying the same change to a set of drivers, please don't
combine patches into a series of random unconnected patches.

Jonathan
> ---
>  drivers/staging/iio/adc/ad7280a.c | 21 +
>  1 file changed, 13 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/iio/adc/ad7280a.c 
> b/drivers/staging/iio/adc/ad7280a.c
> index d5ab83f..f85dde9 100644
> --- a/drivers/staging/iio/adc/ad7280a.c
> +++ b/drivers/staging/iio/adc/ad7280a.c
> @@ -99,9 +99,14 @@
>  #define AD7280A_DEVADDR_MASTER   0
>  #define AD7280A_DEVADDR_ALL  0x1F
>  /* 5-bit device address is sent LSB first */
> -#define AD7280A_DEVADDR(addr)(((addr & 0x1) << 4) | ((addr & 0x2) << 
> 3) | \
> - (addr & 0x4) | ((addr & 0x8) >> 3) | \
> - ((addr & 0x10) >> 4))
> +static unsigned int ad7280a_devaddr(unsigned int addr)
> +{
> + return ((addr & 0x1) << 4) |
> +((addr & 0x2) << 3) |
> +(addr & 0x4) |
> +((addr & 0x8) >> 3) |
> +((addr & 0x10) >> 4);
> +}
>  
>  /* During a read a valid write is mandatory.
>   * So writing to the highest available address (Address 0x1F)
> @@ -372,7 +377,7 @@ static int ad7280_chain_setup(struct ad7280_state *st)
>   if (ad7280_check_crc(st, val))
>   return -EIO;
>  
> - if (n != AD7280A_DEVADDR(val >> 27))
> + if (n != ad7280a_devaddr(val >> 27))
>   return -EIO;
>   }
>  
> @@ -511,7 +516,7 @@ static int ad7280_channel_init(struct ad7280_state *st)
>   st->channels[cnt].info_mask_shared_by_type =
>   BIT(IIO_CHAN_INFO_SCALE);
>   st->channels[cnt].address =
> - AD7280A_DEVADDR(dev) << 8 | ch;
> + ad7280a_devaddr(dev) << 8 | ch;
>   st->channels[cnt].scan_index = cnt;
>   st->channels[cnt].scan_type.sign = 'u';
>   st->channels[cnt].scan_type.realbits = 12;
> @@ -558,7 +563,7 @@ static int ad7280_attr_init(struct ad7280_state *st)
>   for (ch = AD7280A_CELL_VOLTAGE_1; ch <= AD7280A_CELL_VOLTAGE_6;
>   ch++, cnt++) {
>   st->iio_attr[cnt].address =
> - AD7280A_DEVADDR(dev) << 8 | ch;
> + ad7280a_devaddr(dev) << 8 | ch;
>   st->iio_attr[cnt].dev_attr.attr.mode =
>   0644;
>   st->iio_attr[cnt].dev_attr.show =
> @@ -574,7 +579,7 @@ static int ad7280_attr_init(struct ad7280_state *st)
>   &st->iio_attr[cnt].dev_attr.attr;
>   cnt++;
>   st->iio_attr[cnt].address =
> - AD7280A_DEVADDR(dev) << 8 |
> + ad7280a_devaddr(dev) << 8 |
>   (AD7280A_CB1_TIMER + ch);
>   st->iio_attr[cnt].dev_attr.attr.mode =
>   0644;
> @@ -918,7 +923,7 @@ static int ad7280_probe(struct spi_device *spi)
>   if (ret)
>   goto error_unregister;
>  
> - ret = ad7280_write(st, AD7280A_DEVADDR(st->slave_num),
> + ret = ad7280_write(st, ad7280a_devaddr(st->slave_num),
>  AD7280A_ALERT, 0,
>  AD7280A_ALERT_GEN_STATIC_HIGH |
>  (pdata->chain_last_alert_ignore & 0xF));

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] media: imx: prpencvf: enable double write reduction

2017-07-22 Thread Steve Longerbeam
For the write channels with 4:2:0 subsampled YUV formats, avoid chroma
overdraw by only writing chroma for even lines. Reduces necessary write
memory bandwidth by at least 25% (more with rotation enabled).

Signed-off-by: Steve Longerbeam 
---
 drivers/staging/media/imx/imx-ic-prpencvf.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c 
b/drivers/staging/media/imx/imx-ic-prpencvf.c
index ed363fe..42c5045 100644
--- a/drivers/staging/media/imx/imx-ic-prpencvf.c
+++ b/drivers/staging/media/imx/imx-ic-prpencvf.c
@@ -374,6 +374,17 @@ static int prp_setup_channel(struct prp_priv *priv,
image.phys0 = addr0;
image.phys1 = addr1;
 
+   if (channel == priv->out_ch || channel == priv->rot_out_ch) {
+   switch (image.pix.pixelformat) {
+   case V4L2_PIX_FMT_YUV420:
+   case V4L2_PIX_FMT_YVU420:
+   case V4L2_PIX_FMT_NV12:
+   /* Skip writing U and V components to odd rows */
+   ipu_cpmem_skip_odd_chroma_rows(channel);
+   break;
+   }
+   }
+
ret = ipu_cpmem_set_image(channel, &image);
if (ret)
return ret;
-- 
2.7.4

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] media: imx: prpencvf: enable double write reduction

2017-07-22 Thread Steve Longerbeam

Hi Philipp,

This is the same as your patch to CSI, applied to ic-prpencvf.

I'm not really sure what this cpmem bit is doing. The U/V planes
in memory are already subsampled by 2 in both width and height.
This must be referring to what the IDMAC is transferring on the bus,
but why would it place duplicate U/V samples on the bus in the first
place?

Anyway, thanks for the heads-up on this.

Steve


On 07/22/2017 02:21 PM, Steve Longerbeam wrote:

For the write channels with 4:2:0 subsampled YUV formats, avoid chroma
overdraw by only writing chroma for even lines. Reduces necessary write
memory bandwidth by at least 25% (more with rotation enabled).

Signed-off-by: Steve Longerbeam
---
  drivers/staging/media/imx/imx-ic-prpencvf.c | 11 +++
  1 file changed, 11 insertions(+)

diff --git a/drivers/staging/media/imx/imx-ic-prpencvf.c 
b/drivers/staging/media/imx/imx-ic-prpencvf.c
index ed363fe..42c5045 100644
--- a/drivers/staging/media/imx/imx-ic-prpencvf.c
+++ b/drivers/staging/media/imx/imx-ic-prpencvf.c
@@ -374,6 +374,17 @@ static int prp_setup_channel(struct prp_priv *priv,
image.phys0 = addr0;
image.phys1 = addr1;
  
+	if (channel == priv->out_ch || channel == priv->rot_out_ch) {

+   switch (image.pix.pixelformat) {
+   case V4L2_PIX_FMT_YUV420:
+   case V4L2_PIX_FMT_YVU420:
+   case V4L2_PIX_FMT_NV12:
+   /* Skip writing U and V components to odd rows */
+   ipu_cpmem_skip_odd_chroma_rows(channel);
+   break;
+   }
+   }
+
ret = ipu_cpmem_set_image(channel, &image);
if (ret)
return ret;

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel