cron job: media_tree daily build: ERRORS

2018-11-24 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:   Sun Nov 25 05:00:10 CET 2018
media-tree git hash:708d75fe1c7c6e9abc5381b6fcc32b49830383d0
media_build git hash:   a8aef9cea0a4a2f3ea86c0b37bd6a1378018c0c1
v4l-utils git hash: cdc046863805b3a3082890ce91f71538e0dbf88c
edid-decode git hash:   5eeb151a748788666534d6ea3da07f90400d24c2
gcc version:i686-linux-gcc (GCC) 8.2.0
sparse version: 0.5.2
smatch version: 0.5.1
host hardware:  x86_64
host os:4.18.0-2-amd64

linux-git-arm-at91: WARNINGS
linux-git-arm-davinci: WARNINGS
linux-git-arm-multi: WARNINGS
linux-git-arm-pxa: WARNINGS
linux-git-arm-stm32: WARNINGS
linux-git-arm64: OK
linux-git-i686: WARNINGS
linux-git-mips: WARNINGS
linux-git-powerpc64: WARNINGS
linux-git-sh: OK
linux-git-x86_64: WARNINGS
Check COMPILE_TEST: OK
linux-3.10.108-i686: OK
linux-3.10.108-x86_64: OK
linux-3.11.10-i686: OK
linux-3.11.10-x86_64: OK
linux-3.12.74-i686: OK
linux-3.12.74-x86_64: OK
linux-3.13.11-i686: OK
linux-3.13.11-x86_64: OK
linux-3.14.79-i686: OK
linux-3.14.79-x86_64: OK
linux-3.15.10-i686: OK
linux-3.15.10-x86_64: OK
linux-3.16.57-i686: OK
linux-3.16.57-x86_64: OK
linux-3.17.8-i686: ERRORS
linux-3.17.8-x86_64: ERRORS
linux-3.18.123-i686: ERRORS
linux-3.18.123-x86_64: ERRORS
linux-3.19.8-i686: ERRORS
linux-3.19.8-x86_64: ERRORS
linux-4.0.9-i686: ERRORS
linux-4.0.9-x86_64: ERRORS
linux-4.1.52-i686: ERRORS
linux-4.1.52-x86_64: ERRORS
linux-4.2.8-i686: ERRORS
linux-4.2.8-x86_64: ERRORS
linux-4.3.6-i686: ERRORS
linux-4.3.6-x86_64: ERRORS
linux-4.4.159-i686: ERRORS
linux-4.4.159-x86_64: ERRORS
linux-4.5.7-i686: ERRORS
linux-4.5.7-x86_64: ERRORS
linux-4.6.7-i686: ERRORS
linux-4.6.7-x86_64: ERRORS
linux-4.7.10-i686: ERRORS
linux-4.7.10-x86_64: ERRORS
linux-4.8.17-i686: ERRORS
linux-4.8.17-x86_64: ERRORS
linux-4.9.131-i686: ERRORS
linux-4.9.131-x86_64: ERRORS
linux-4.10.17-i686: ERRORS
linux-4.10.17-x86_64: ERRORS
linux-4.11.12-i686: ERRORS
linux-4.11.12-x86_64: ERRORS
linux-4.12.14-i686: ERRORS
linux-4.12.14-x86_64: ERRORS
linux-4.13.16-i686: ERRORS
linux-4.13.16-x86_64: ERRORS
linux-4.14.74-i686: ERRORS
linux-4.14.74-x86_64: ERRORS
linux-4.15.18-i686: OK
linux-4.15.18-x86_64: OK
linux-4.16.18-i686: OK
linux-4.16.18-x86_64: OK
linux-4.17.19-i686: OK
linux-4.17.19-x86_64: OK
linux-4.18.12-i686: OK
linux-4.18.12-x86_64: OK
linux-4.19.1-i686: OK
linux-4.19.1-x86_64: OK
linux-4.20-rc1-i686: OK
linux-4.20-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS

Detailed results are available here:

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

Full logs are available here:

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

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.html


[PATCH v3] media: video-i2c: check if chip struct has set_power function

2018-11-24 Thread Matt Ranostay
Not all future supported video chips will always have power management
support, and so it is important to check before calling set_power() is
defined.

Cc: Sakari Ailus 
Cc: Hans Verkuil 
Cc: Mauro Carvalho Chehab 
Cc: Akinobu Mita 
Signed-off-by: Matt Ranostay 
---

Changes from v2:
- split out from mlx90640 patch series
- added to Cc list

Changes from v1:
- none

 drivers/media/i2c/video-i2c.c | 22 +-
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c
index b6ebb8d53e90..01dcf179f203 100644
--- a/drivers/media/i2c/video-i2c.c
+++ b/drivers/media/i2c/video-i2c.c
@@ -736,9 +736,11 @@ static int video_i2c_probe(struct i2c_client *client,
video_set_drvdata(>vdev, data);
i2c_set_clientdata(client, data);
 
-   ret = data->chip->set_power(data, true);
-   if (ret)
-   goto error_unregister_device;
+   if (data->chip->set_power) {
+   ret = data->chip->set_power(data, true);
+   if (ret)
+   goto error_unregister_device;
+   }
 
pm_runtime_get_noresume(>dev);
pm_runtime_set_active(>dev);
@@ -767,7 +769,9 @@ static int video_i2c_probe(struct i2c_client *client,
pm_runtime_disable(>dev);
pm_runtime_set_suspended(>dev);
pm_runtime_put_noidle(>dev);
-   data->chip->set_power(data, false);
+
+   if (data->chip->set_power)
+   data->chip->set_power(data, false);
 
 error_unregister_device:
v4l2_device_unregister(v4l2_dev);
@@ -791,7 +795,9 @@ static int video_i2c_remove(struct i2c_client *client)
pm_runtime_disable(>dev);
pm_runtime_set_suspended(>dev);
pm_runtime_put_noidle(>dev);
-   data->chip->set_power(data, false);
+
+   if (data->chip->set_power)
+   data->chip->set_power(data, false);
 
video_unregister_device(>vdev);
 
@@ -804,6 +810,9 @@ static int video_i2c_pm_runtime_suspend(struct device *dev)
 {
struct video_i2c_data *data = i2c_get_clientdata(to_i2c_client(dev));
 
+   if (!data->chip->set_power)
+   return 0;
+
return data->chip->set_power(data, false);
 }
 
@@ -811,6 +820,9 @@ static int video_i2c_pm_runtime_resume(struct device *dev)
 {
struct video_i2c_data *data = i2c_get_clientdata(to_i2c_client(dev));
 
+   if (!data->chip->set_power)
+   return 0;
+
return data->chip->set_power(data, true);
 }
 
-- 
2.17.1



Re: [ragnatech:media-tree 32/140] drivers/media/platform/seco-cec/seco-cec.c:237:4: error: implicit declaration of function 'cec_transmit_attempt_done'

2018-11-24 Thread Hans Verkuil
On 11/24/2018 07:14 PM, Ettore Chimenti wrote:
> Hi all,
> Is this error relevant?
> I tried compiling on 'ragnatech/media-tree' 
> (708d75fe1c7c6e9abc5381b6fcc32b49830383d0) without getting errors.

This was fixed by this patch:

https://patchwork.linuxtv.org/patch/53117/

Which is why it now works.

Regards,

Hans

> 
> Thanks,
> Ettore
> 
> Il giorno sab 24 nov 2018 alle ore 18:07 kbuild test robot  > ha scritto:
> 
> tree:   git://git.ragnatech.se/linux  
> media-tree
> head:   708d75fe1c7c6e9abc5381b6fcc32b49830383d0
> commit: b03c2fb97adcc65d3c4098c4aa41fbaa6623ebf2 [32/140] media: add SECO 
> cec driver
> config: i386-randconfig-x006-201847 (attached as .config)
> compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
> reproduce:
> git checkout b03c2fb97adcc65d3c4098c4aa41fbaa6623ebf2
> # save the attached .config to linux build tree
> make ARCH=i386
> 
> Note: the ragnatech/media-tree HEAD 
> 708d75fe1c7c6e9abc5381b6fcc32b49830383d0 builds fine.
>   It only hurts bisectibility.
> 
> All error/warnings (new ones prefixed by >>):
> 
>drivers/media/platform/seco-cec/seco-cec.c: In function 
> 'secocec_tx_done':
> >> drivers/media/platform/seco-cec/seco-cec.c:237:4: error: implicit 
> declaration of function 'cec_transmit_attempt_done'
> [-Werror=implicit-function-declaration]
>cec_transmit_attempt_done(adap, CEC_TX_STATUS_NACK);
>^
>drivers/media/platform/seco-cec/seco-cec.c: In function 
> 'secocec_rx_done':
> >> drivers/media/platform/seco-cec/seco-cec.c:316:2: error: implicit 
> declaration of function 'cec_received_msg'; did you mean
> 'free_reserved_page'? [-Werror=implicit-function-declaration]
>  cec_received_msg(cec->cec_adap, );
>  ^~~~
>  free_reserved_page
>drivers/media/platform/seco-cec/seco-cec.c: In function 
> 'secocec_probe':
> >> drivers/media/platform/seco-cec/seco-cec.c:527:22: error: implicit 
> declaration of function 'cec_allocate_adapter'; did you mean
> 'cec_delete_adapter'? [-Werror=implicit-function-declaration]
>  secocec->cec_adap = cec_allocate_adapter(_cec_adap_ops,
>  ^~~~
>  cec_delete_adapter
> >> drivers/media/platform/seco-cec/seco-cec.c:527:20: warning: assignment 
> makes pointer from integer without a cast [-Wint-conversion]
>  secocec->cec_adap = cec_allocate_adapter(_cec_adap_ops,
>^
>cc1: some warnings being treated as errors
> 
> vim +/cec_transmit_attempt_done +237 
> drivers/media/platform/seco-cec/seco-cec.c
> 
>232 
>233  static void secocec_tx_done(struct cec_adapter *adap, u16 
> status_val)
>234  {
>235  if (status_val & SECOCEC_STATUS_TX_ERROR_MASK) {
>236  if (status_val & SECOCEC_STATUS_TX_NACK_ERROR)
>  > 237  cec_transmit_attempt_done(adap, 
> CEC_TX_STATUS_NACK);
>238  else
>239  cec_transmit_attempt_done(adap, 
> CEC_TX_STATUS_ERROR);
>240  } else {
>241  cec_transmit_attempt_done(adap, CEC_TX_STATUS_OK);
>242  }
>243 
>244  /* Reset status reg */
>245  status_val = SECOCEC_STATUS_TX_ERROR_MASK |
>246  SECOCEC_STATUS_MSG_SENT_MASK |
>247  SECOCEC_STATUS_TX_NACK_ERROR;
>248  smb_wr16(SECOCEC_STATUS, status_val);
>249  }
>250 
>251  static void secocec_rx_done(struct cec_adapter *adap, u16 
> status_val)
>252  {
>253  struct secocec_data *cec = cec_get_drvdata(adap);
>254  struct device *dev = cec->dev;
>255  struct cec_msg msg = { };
>256  bool flag_overflow = false;
>257  u8 payload_len, i = 0;
>258  u8 *payload_msg;
>259  u16 val = 0;
>260  int status;
>261 
>262  if (status_val & SECOCEC_STATUS_RX_OVERFLOW_MASK) {
>263  /* NOTE: Untested, it also might not be necessary 
> */
>264  dev_warn(dev, "Received more than 16 bytes. 
> Discarding");
>265  flag_overflow = true;
>266  }
>267 
>268  if (status_val & SECOCEC_STATUS_RX_ERROR_MASK) {
>269  dev_warn(dev, "Message received with errors. 
> Discarding");
>270  status = -EIO;
>271  goto rxerr;
>272  }
>273 
>274  /* Read message length */
>275  status = smb_rd16(SECOCEC_READ_DATA_LENGTH, );
>   

[v4l-utils] Add options to v4l2-ctrl to save/load settings to/from a file

2018-11-24 Thread Antonio Ospite
Hi,

AFAIK every time a new v4l device is initialized (e.g. USB webcam
plugged in) the driver sets the controls to the default value decided by
the author in the source code.

It is then the responsibility of each v4l2 applications to save and
restore any variation to the controls values made by the user if this is
required.

I was looking for a more generic way to set some controls to non-default
values in a more persistent way, my main use case is to avoid *manually*
setting "Power Line Frequency" to 50Hz every time I plug in the webcam.

Something like what alsactrl[0] does with mixer settings.
Maybe pipewire will do that?

In the mean time, inspired by [1] I cleaned up the concept and published
it as v4l2-persistent-settings[2], the idea is that the user can save
the current state of a device and it would be restored automatically via
a udev rule the next time the device is initialized.

For that, the current device state has to be stored into a file.

For now I am massaging the output of "v4l2-ctl -l", saving that to
a file, and then parsing the file to generate something I can pass to
"v4l2-ctl --set-ctrl"; however it would be handier if v4l2-ctl had
a native mechanism to export and import settings.

v4l2ctrl from v4l2ucp[3] has options to save settings to a file and
reload them from a file, but I would like to use v4l2-ctl instead which
is actively maintained.

What about adding such options to v4l2-ctl?

Thank you,
   Antonio

[0] http://git.alsa-project.org/?p=alsa-utils.git;a=tree;f=alsactl;hb=HEAD
[1] https://superuser.com/questions/471597/linux-v4l-webcam-make-settings-stick
[2] https://git.ao2.it/v4l2-persistent-settings.git/
[3] https://sourceforge.net/projects/v4l2ucp/

-- 
Antonio Ospite
https://ao2.it
https://twitter.com/ao2it

A: Because it messes up the order in which people normally read text.
   See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?


[ragnatech:media-tree 32/140] drivers/media/platform/seco-cec/seco-cec.c:237:4: error: implicit declaration of function 'cec_transmit_attempt_done'

2018-11-24 Thread kbuild test robot
tree:   git://git.ragnatech.se/linux media-tree
head:   708d75fe1c7c6e9abc5381b6fcc32b49830383d0
commit: b03c2fb97adcc65d3c4098c4aa41fbaa6623ebf2 [32/140] media: add SECO cec 
driver
config: i386-randconfig-x006-201847 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout b03c2fb97adcc65d3c4098c4aa41fbaa6623ebf2
# save the attached .config to linux build tree
make ARCH=i386 

Note: the ragnatech/media-tree HEAD 708d75fe1c7c6e9abc5381b6fcc32b49830383d0 
builds fine.
  It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   drivers/media/platform/seco-cec/seco-cec.c: In function 'secocec_tx_done':
>> drivers/media/platform/seco-cec/seco-cec.c:237:4: error: implicit 
>> declaration of function 'cec_transmit_attempt_done' 
>> [-Werror=implicit-function-declaration]
   cec_transmit_attempt_done(adap, CEC_TX_STATUS_NACK);
   ^
   drivers/media/platform/seco-cec/seco-cec.c: In function 'secocec_rx_done':
>> drivers/media/platform/seco-cec/seco-cec.c:316:2: error: implicit 
>> declaration of function 'cec_received_msg'; did you mean 
>> 'free_reserved_page'? [-Werror=implicit-function-declaration]
 cec_received_msg(cec->cec_adap, );
 ^~~~
 free_reserved_page
   drivers/media/platform/seco-cec/seco-cec.c: In function 'secocec_probe':
>> drivers/media/platform/seco-cec/seco-cec.c:527:22: error: implicit 
>> declaration of function 'cec_allocate_adapter'; did you mean 
>> 'cec_delete_adapter'? [-Werror=implicit-function-declaration]
 secocec->cec_adap = cec_allocate_adapter(_cec_adap_ops,
 ^~~~
 cec_delete_adapter
>> drivers/media/platform/seco-cec/seco-cec.c:527:20: warning: assignment makes 
>> pointer from integer without a cast [-Wint-conversion]
 secocec->cec_adap = cec_allocate_adapter(_cec_adap_ops,
   ^
   cc1: some warnings being treated as errors

vim +/cec_transmit_attempt_done +237 drivers/media/platform/seco-cec/seco-cec.c

   232  
   233  static void secocec_tx_done(struct cec_adapter *adap, u16 status_val)
   234  {
   235  if (status_val & SECOCEC_STATUS_TX_ERROR_MASK) {
   236  if (status_val & SECOCEC_STATUS_TX_NACK_ERROR)
 > 237  cec_transmit_attempt_done(adap, 
 > CEC_TX_STATUS_NACK);
   238  else
   239  cec_transmit_attempt_done(adap, 
CEC_TX_STATUS_ERROR);
   240  } else {
   241  cec_transmit_attempt_done(adap, CEC_TX_STATUS_OK);
   242  }
   243  
   244  /* Reset status reg */
   245  status_val = SECOCEC_STATUS_TX_ERROR_MASK |
   246  SECOCEC_STATUS_MSG_SENT_MASK |
   247  SECOCEC_STATUS_TX_NACK_ERROR;
   248  smb_wr16(SECOCEC_STATUS, status_val);
   249  }
   250  
   251  static void secocec_rx_done(struct cec_adapter *adap, u16 status_val)
   252  {
   253  struct secocec_data *cec = cec_get_drvdata(adap);
   254  struct device *dev = cec->dev;
   255  struct cec_msg msg = { };
   256  bool flag_overflow = false;
   257  u8 payload_len, i = 0;
   258  u8 *payload_msg;
   259  u16 val = 0;
   260  int status;
   261  
   262  if (status_val & SECOCEC_STATUS_RX_OVERFLOW_MASK) {
   263  /* NOTE: Untested, it also might not be necessary */
   264  dev_warn(dev, "Received more than 16 bytes. 
Discarding");
   265  flag_overflow = true;
   266  }
   267  
   268  if (status_val & SECOCEC_STATUS_RX_ERROR_MASK) {
   269  dev_warn(dev, "Message received with errors. 
Discarding");
   270  status = -EIO;
   271  goto rxerr;
   272  }
   273  
   274  /* Read message length */
   275  status = smb_rd16(SECOCEC_READ_DATA_LENGTH, );
   276  if (status)
   277  return;
   278  
   279  /* Device msg len already accounts for the header */
   280  msg.len = min(val + 1, CEC_MAX_MSG_SIZE);
   281  
   282  /* Read logical address */
   283  status = smb_rd16(SECOCEC_READ_BYTE0, );
   284  if (status)
   285  return;
   286  
   287  /* device stores source LA and destination */
   288  msg.msg[0] = val;
   289  
   290  /* Read operation ID */
   291  status = smb_rd16(SECOCEC_READ_OPERATION_ID, );
   292  if (status)
   293  return;
   294  
   295  msg.msg[1] = val;
   296  
   297  /* Read data if present */
   298  if (msg.len > 1) {
   299  payload_len = msg.len - 2;
   300  payload_msg = [2];
   301  
   302  /* device stores 2 bytes in every 16-bit val */
   303  for (i = 

Re: 'bad remote port parent' warnings

2018-11-24 Thread Fabio Estevam
Hi Steve,

On Fri, Nov 23, 2018 at 8:37 PM Steve Longerbeam  wrote:

> Yes, this is a regression caused by the imx subdev notifier patches.
> I've already sent a patch to the list for this, see
>
> https://www.spinics.net/lists/linux-media/msg141809.html

Thanks, this fixes it.

Hopefully it will be applied as a fix for 4.20.

Thanks


RE,

2018-11-24 Thread Miss Sharifah Ahmad Mustahfa
Hello,

First of all i will like to apologies for my manner of communication because 
you do not know me personally, its due to the fact that i have a very important 
proposal for you.


[PATCH v4l-utils] Build sdlcam only if jpeg is enabled

2018-11-24 Thread Fabrice Fontaine
Fixes:
 - 
http://autobuild.buildroot.net/results/1eded8b44cc369550566c6ce0b3c042f1aec8d44

Signed-off-by: Fabrice Fontaine 
---
 contrib/test/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/test/Makefile.am b/contrib/test/Makefile.am
index 0188fe21..c7c38e7a 100644
--- a/contrib/test/Makefile.am
+++ b/contrib/test/Makefile.am
@@ -17,8 +17,10 @@ noinst_PROGRAMS += v4l2gl
 endif
 
 if HAVE_SDL
+if HAVE_JPEG
 noinst_PROGRAMS += sdlcam
 endif
+endif
 
 driver_test_SOURCES = driver-test.c
 driver_test_LDADD = ../../utils/libv4l2util/libv4l2util.la
-- 
2.14.1