[RFC][PATCH 0/2] ALSA: control: export all of TLV related macros to user land

2016-09-09 Thread Takashi Sakamoto
Hi,

Currently, TLV related protocol is not shared to user land. This is not
good in a point of application interfaces, because application developers
can't realize the protocol just to see UAPI headers.

For this purpose, this patchset moves all of macros related to TLV to UAPI
header. As a result, a header just for kernel land is obsoleted. When adding
new items to the protocol, it's added to the UAPI header. This change affects
some drivers in media subsystem.

In my concern, this change can break applications. When these macros are
already defined in application side and they includes tlv UAPI header
directly, 'redefined' warning is generated at preprocess time. But the
compilation will be success itself. If these two macros have different
content, the result of preprocess is dominated to the order to define.
However, the most applications are assumed to use TLV feature via libraries
such as alsa-lib, thus I'm optimistic to this concern.

As another my concern, the name of these macros are quite simple, as
'TLV_XXX'. It might be help application developers to rename them with a
prefix, as 'SNDRV_CTL_TLV_XXX'. (But not yet. I'm a lazy guy.)

Takashi Sakamoto (2):
  ALSA: control: export layout of TLV payload to UAPI header
  ALSA: control: replace include statements for TLV

 Documentation/DocBook/writing-an-alsa-driver.tmpl |  2 +-
 Documentation/sound/alsa/Channel-Mapping-API.txt  |  2 +-
 drivers/media/pci/cx18/cx18-alsa-mixer.c  |  2 +-
 drivers/media/pci/cx23885/cx23885-alsa.c  |  2 +-
 drivers/media/pci/cx25821/cx25821-alsa.c  |  2 +-
 drivers/media/pci/cx88/cx88-alsa.c|  2 +-
 drivers/media/pci/ivtv/ivtv-alsa-mixer.c  |  2 +-
 drivers/media/usb/em28xx/em28xx-audio.c   |  2 +-
 include/sound/tlv.h   | 62 +--
 include/uapi/sound/tlv.h  | 60 ++
 sound/core/pcm_lib.c  |  2 +-
 sound/core/vmaster.c  |  2 +-
 sound/drivers/dummy.c |  2 +-
 sound/drivers/vx/vx_mixer.c   |  2 +-
 sound/firewire/isight.c   |  2 +-
 sound/hda/hdmi_chmap.c|  2 +-
 sound/i2c/other/ak4xxx-adda.c |  2 +-
 sound/i2c/other/pt2258.c  |  2 +-
 sound/isa/ad1816a/ad1816a_lib.c   |  2 +-
 sound/isa/cs423x/cs4236_lib.c |  2 +-
 sound/isa/opl3sa2.c   |  2 +-
 sound/isa/opti9xx/opti92x-ad1848.c|  2 +-
 sound/isa/wss/wss_lib.c   |  2 +-
 sound/pci/ac97/ac97_codec.c   |  2 +-
 sound/pci/ak4531_codec.c  |  2 +-
 sound/pci/asihpi/asihpi.c |  2 +-
 sound/pci/au88x0/au88x0.h |  2 +-
 sound/pci/ca0106/ca0106_mixer.c   |  2 +-
 sound/pci/cs4281.c|  2 +-
 sound/pci/ctxfi/ctmixer.c |  2 +-
 sound/pci/echoaudio/darla20.c |  2 +-
 sound/pci/echoaudio/darla24.c |  2 +-
 sound/pci/echoaudio/echo3g.c  |  2 +-
 sound/pci/echoaudio/gina20.c  |  2 +-
 sound/pci/echoaudio/gina24.c  |  2 +-
 sound/pci/echoaudio/indigo.c  |  2 +-
 sound/pci/echoaudio/indigodj.c|  2 +-
 sound/pci/echoaudio/indigodjx.c   |  2 +-
 sound/pci/echoaudio/indigoio.c|  2 +-
 sound/pci/echoaudio/indigoiox.c   |  2 +-
 sound/pci/echoaudio/layla20.c |  2 +-
 sound/pci/echoaudio/layla24.c |  2 +-
 sound/pci/echoaudio/mia.c |  2 +-
 sound/pci/echoaudio/mona.c|  2 +-
 sound/pci/emu10k1/emufx.c |  2 +-
 sound/pci/emu10k1/emumixer.c  |  2 +-
 sound/pci/emu10k1/p16v.c  |  2 +-
 sound/pci/es1938.c|  2 +-
 sound/pci/fm801.c |  2 +-
 sound/pci/hda/hda_codec.c |  2 +-
 sound/pci/hda/hda_generic.c   |  2 +-
 sound/pci/hda/patch_cirrus.c  |  2 +-
 sound/pci/hda/patch_hdmi.c|  2 +-
 sound/pci/ice1712/aureon.c|  2 +-
 sound/pci/ice1712/ice1712.c   |  2 +-
 sound/pci/ice1712/juli.c  |  2 +-
 sound/pci/ice1712/maya44.c|  2 +-
 sound/pci/ice1712/phase.c |  2 +-
 sound/pci/ice1712/pontis.c|  2 +-
 sound/pci/ice1712/prodigy192.c|  2 +-
 sound/pci/ice1712/prodigy_hifi.c  |  2 +-
 sound/pci/ice1712/quartet.c   |  2 +-
 

[RFC][PATCH 1/2] ALSA: control: export layout of TLV payload to UAPI header

2016-09-09 Thread Takashi Sakamoto
In ALSA control interface, each element set can have threshold level
information. This information is transferred between drivers/applications,
in a shape of tlv packet. The layout of this packet is defined in
'uapi/sound/asound.h' (struct snd_ctl_tlv):

struct snd_ctl_tlv {
unsigned int numid;
unsigned int length;
unsigned int tlv[0];
};

Data in the payload (struct snd_ctl_tlv.tlv) is expected to be filled
according to our own protocol. This protocol is described in
'include/sound/tlv.h'. A layout of the payload is expected as:

struct snd_ctl_tlv.tlv[0]: one of SNDRV_CTL_TLVT_XXX
struct snd_ctl_tlv.tlv[1]: Length of data
struct snd_ctl_tlv.tlv[2...]: data

Unfortunately, the macro is not exported to user land yet, thus
applications cannot get to know the protocol.

Additionally, ALSA control core has a feature called as 'user-defined'
element set. This allows applications to add/remove arbitrary element sets
with elements to control devices. Elements in the element set can be
operated by the same way as the ones added by in-kernel implementation.

For threshold level information of 'user-defined' element set, applications
need to register the information to an element set. However, as described
above, layout of the payload is closed in kernel land. This is quite
inconvenient, too.

This commit moves the protocol to UAPI header for TLV. According to this
change, an old header is obsoleted.

Signed-off-by: Takashi Sakamoto 
---
 include/sound/tlv.h  | 62 +---
 include/uapi/sound/tlv.h | 60 ++
 2 files changed, 61 insertions(+), 61 deletions(-)

diff --git a/include/sound/tlv.h b/include/sound/tlv.h
index df97d19..7b0d0d1 100644
--- a/include/sound/tlv.h
+++ b/include/sound/tlv.h
@@ -22,67 +22,7 @@
  *
  */
 
-/*
- * TLV structure is right behind the struct snd_ctl_tlv:
- *   unsigned int type - see SNDRV_CTL_TLVT_*
- *   unsigned int length
- *    data aligned to sizeof(unsigned int), use
- *block_length = (length + (sizeof(unsigned int) - 1)) &
- *   ~(sizeof(unsigned int) - 1)) 
- */
-
+/* You should include UAPI header directly, instead of this. */
 #include 
 
-#define TLV_ITEM(type, ...) \
-   (type), TLV_LENGTH(__VA_ARGS__), __VA_ARGS__
-#define TLV_LENGTH(...) \
-   ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ }))
-
-#define TLV_CONTAINER_ITEM(...) \
-   TLV_ITEM(SNDRV_CTL_TLVT_CONTAINER, __VA_ARGS__)
-#define DECLARE_TLV_CONTAINER(name, ...) \
-   unsigned int name[] = { TLV_CONTAINER_ITEM(__VA_ARGS__) }
-
-#define TLV_DB_SCALE_MASK  0x
-#define TLV_DB_SCALE_MUTE  0x1
-#define TLV_DB_SCALE_ITEM(min, step, mute) \
-   TLV_ITEM(SNDRV_CTL_TLVT_DB_SCALE,   \
-(min), \
-((step) & TLV_DB_SCALE_MASK) | \
-   ((mute) ? TLV_DB_SCALE_MUTE : 0))
-#define DECLARE_TLV_DB_SCALE(name, min, step, mute) \
-   unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) }
-
-/* dB scale specified with min/max values instead of step */
-#define TLV_DB_MINMAX_ITEM(min_dB, max_dB) \
-   TLV_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB))
-#define TLV_DB_MINMAX_MUTE_ITEM(min_dB, max_dB)\
-   TLV_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB))
-#define DECLARE_TLV_DB_MINMAX(name, min_dB, max_dB) \
-   unsigned int name[] = { TLV_DB_MINMAX_ITEM(min_dB, max_dB) }
-#define DECLARE_TLV_DB_MINMAX_MUTE(name, min_dB, max_dB) \
-   unsigned int name[] = { TLV_DB_MINMAX_MUTE_ITEM(min_dB, max_dB) }
-
-/* linear volume between min_dB and max_dB (.01dB unit) */
-#define TLV_DB_LINEAR_ITEM(min_dB, max_dB) \
-   TLV_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))
-#define DECLARE_TLV_DB_LINEAR(name, min_dB, max_dB)\
-   unsigned int name[] = { TLV_DB_LINEAR_ITEM(min_dB, max_dB) }
-
-/* dB range container:
- * Items in dB range container must be ordered by their values and by their
- * dB values. This implies that larger values must correspond with larger
- * dB values (which is also required for all other mixer controls).
- */
-/* Each item is:*/
-#define TLV_DB_RANGE_ITEM(...) \
-   TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__)
-#define DECLARE_TLV_DB_RANGE(name, ...) \
-   unsigned int name[] = { TLV_DB_RANGE_ITEM(__VA_ARGS__) }
-/* The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR */
-#define TLV_DB_RANGE_HEAD(num) \
-   SNDRV_CTL_TLVT_DB_RANGE, 6 * (num) * sizeof(unsigned int)
-
-#define TLV_DB_GAIN_MUTE   -999
-
 #endif /* __SOUND_TLV_H */
diff --git a/include/uapi/sound/tlv.h b/include/uapi/sound/tlv.h
index ffc4f20..b741e0e 100644
--- a/include/uapi/sound/tlv.h
+++ b/include/uapi/sound/tlv.h
@@ -28,4 +28,64 @@
 

[RFC][PATCH 2/2] ALSA: control: replace include statements for UAPI TLV header

2016-09-09 Thread Takashi Sakamoto
A former commit moves all of macros related TLV to UAPI header and
obsoletes a header for TLV just for kernel land. The aim is to share TLV
packet protocol to user land.

This commit changes codes to include it tree-widely. Although the obsoleted
header still remains for out-of-tree drivers, the drivers should be changed
as soon as possible, because the header might be removed in future release.

Signed-off-by: Takashi Sakamoto 
---
 Documentation/DocBook/writing-an-alsa-driver.tmpl | 2 +-
 Documentation/sound/alsa/Channel-Mapping-API.txt  | 2 +-
 drivers/media/pci/cx18/cx18-alsa-mixer.c  | 2 +-
 drivers/media/pci/cx23885/cx23885-alsa.c  | 2 +-
 drivers/media/pci/cx25821/cx25821-alsa.c  | 2 +-
 drivers/media/pci/cx88/cx88-alsa.c| 2 +-
 drivers/media/pci/ivtv/ivtv-alsa-mixer.c  | 2 +-
 drivers/media/usb/em28xx/em28xx-audio.c   | 2 +-
 sound/core/pcm_lib.c  | 2 +-
 sound/core/vmaster.c  | 2 +-
 sound/drivers/dummy.c | 2 +-
 sound/drivers/vx/vx_mixer.c   | 2 +-
 sound/firewire/isight.c   | 2 +-
 sound/hda/hdmi_chmap.c| 2 +-
 sound/i2c/other/ak4xxx-adda.c | 2 +-
 sound/i2c/other/pt2258.c  | 2 +-
 sound/isa/ad1816a/ad1816a_lib.c   | 2 +-
 sound/isa/cs423x/cs4236_lib.c | 2 +-
 sound/isa/opl3sa2.c   | 2 +-
 sound/isa/opti9xx/opti92x-ad1848.c| 2 +-
 sound/isa/wss/wss_lib.c   | 2 +-
 sound/pci/ac97/ac97_codec.c   | 2 +-
 sound/pci/ak4531_codec.c  | 2 +-
 sound/pci/asihpi/asihpi.c | 2 +-
 sound/pci/au88x0/au88x0.h | 2 +-
 sound/pci/ca0106/ca0106_mixer.c   | 2 +-
 sound/pci/cs4281.c| 2 +-
 sound/pci/ctxfi/ctmixer.c | 2 +-
 sound/pci/echoaudio/darla20.c | 2 +-
 sound/pci/echoaudio/darla24.c | 2 +-
 sound/pci/echoaudio/echo3g.c  | 2 +-
 sound/pci/echoaudio/gina20.c  | 2 +-
 sound/pci/echoaudio/gina24.c  | 2 +-
 sound/pci/echoaudio/indigo.c  | 2 +-
 sound/pci/echoaudio/indigodj.c| 2 +-
 sound/pci/echoaudio/indigodjx.c   | 2 +-
 sound/pci/echoaudio/indigoio.c| 2 +-
 sound/pci/echoaudio/indigoiox.c   | 2 +-
 sound/pci/echoaudio/layla20.c | 2 +-
 sound/pci/echoaudio/layla24.c | 2 +-
 sound/pci/echoaudio/mia.c | 2 +-
 sound/pci/echoaudio/mona.c| 2 +-
 sound/pci/emu10k1/emufx.c | 2 +-
 sound/pci/emu10k1/emumixer.c  | 2 +-
 sound/pci/emu10k1/p16v.c  | 2 +-
 sound/pci/es1938.c| 2 +-
 sound/pci/fm801.c | 2 +-
 sound/pci/hda/hda_codec.c | 2 +-
 sound/pci/hda/hda_generic.c   | 2 +-
 sound/pci/hda/patch_cirrus.c  | 2 +-
 sound/pci/hda/patch_hdmi.c| 2 +-
 sound/pci/ice1712/aureon.c| 2 +-
 sound/pci/ice1712/ice1712.c   | 2 +-
 sound/pci/ice1712/juli.c  | 2 +-
 sound/pci/ice1712/maya44.c| 2 +-
 sound/pci/ice1712/phase.c | 2 +-
 sound/pci/ice1712/pontis.c| 2 +-
 sound/pci/ice1712/prodigy192.c| 2 +-
 sound/pci/ice1712/prodigy_hifi.c  | 2 +-
 sound/pci/ice1712/quartet.c   | 2 +-
 sound/pci/ice1712/se.c| 2 +-
 sound/pci/ice1712/wm8766.c| 2 +-
 sound/pci/ice1712/wm8776.c| 2 +-
 sound/pci/ice1712/wtm.c   | 2 +-
 sound/pci/lola/lola_mixer.c   | 2 +-
 sound/pci/mixart/mixart_mixer.c   | 2 +-
 sound/pci/oxygen/oxygen.c | 2 +-
 sound/pci/oxygen/oxygen_mixer.c   | 2 +-
 sound/pci/oxygen/xonar_cs43xx.c   | 2 +-
 sound/pci/oxygen/xonar_dg.c   | 2 +-
 sound/pci/oxygen/xonar_dg_mixer.c | 2 +-
 sound/pci/oxygen/xonar_hdmi.c | 2 +-
 sound/pci/oxygen/xonar_pcm179x.c  | 2 +-
 sound/pci/oxygen/xonar_wm87x6.c   | 2 +-
 sound/pci/pcxhr/pcxhr_mix22.c | 2 +-
 sound/pci/pcxhr/pcxhr_mixer.c | 2 +-
 sound/pci/trident/trident_main.c  | 2 +-
 sound/pci/via82xx.c   | 2 +-
 

cron job: media_tree daily build: ERRORS

2016-09-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:   Sat Sep 10 04:00:20 CEST 2016
git branch: test
git hash:   8a5a2ba86ab8fc12267fea974b9cd730ad2dee24
gcc version:i686-linux-gcc (GCC) 5.4.0
sparse version: v0.5.0-56-g7647c77
smatch version: v0.5.0-3428-gdfe27cf
host hardware:  x86_64
host os:4.6.0-164

linux-git-arm-at91: ERRORS
linux-git-arm-davinci: OK
linux-git-arm-multi: ERRORS
linux-git-blackfin-bf561: ERRORS
linux-git-i686: ERRORS
linux-git-m32r: OK
linux-git-mips: OK
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: ERRORS
linux-2.6.36.4-i686: ERRORS
linux-2.6.37.6-i686: ERRORS
linux-2.6.38.8-i686: ERRORS
linux-2.6.39.4-i686: ERRORS
linux-3.0.60-i686: ERRORS
linux-3.1.10-i686: ERRORS
linux-3.2.37-i686: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: ERRORS
linux-3.5.7-i686: ERRORS
linux-3.6.11-i686: ERRORS
linux-3.7.4-i686: ERRORS
linux-3.8-i686: ERRORS
linux-3.9.2-i686: ERRORS
linux-3.10.1-i686: ERRORS
linux-3.11.1-i686: ERRORS
linux-3.12.23-i686: ERRORS
linux-3.13.11-i686: ERRORS
linux-3.14.9-i686: ERRORS
linux-3.15.2-i686: ERRORS
linux-3.16.7-i686: ERRORS
linux-3.17.8-i686: ERRORS
linux-3.18.7-i686: ERRORS
linux-3.19-i686: ERRORS
linux-4.0-i686: ERRORS
linux-4.1.1-i686: ERRORS
linux-4.2-i686: ERRORS
linux-4.3-i686: ERRORS
linux-4.4-i686: ERRORS
linux-4.5-i686: ERRORS
linux-4.6-i686: ERRORS
linux-4.7-i686: ERRORS
linux-4.8-rc1-i686: OK
linux-2.6.36.4-x86_64: ERRORS
linux-2.6.37.6-x86_64: ERRORS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: ERRORS
linux-3.0.60-x86_64: ERRORS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: ERRORS
linux-3.5.7-x86_64: ERRORS
linux-3.6.11-x86_64: ERRORS
linux-3.7.4-x86_64: ERRORS
linux-3.8-x86_64: ERRORS
linux-3.9.2-x86_64: ERRORS
linux-3.10.1-x86_64: ERRORS
linux-3.11.1-x86_64: ERRORS
linux-3.12.23-x86_64: ERRORS
linux-3.13.11-x86_64: ERRORS
linux-3.14.9-x86_64: ERRORS
linux-3.15.2-x86_64: ERRORS
linux-3.16.7-x86_64: ERRORS
linux-3.17.8-x86_64: ERRORS
linux-3.18.7-x86_64: ERRORS
linux-3.19-x86_64: ERRORS
linux-4.0-x86_64: ERRORS
linux-4.1.1-x86_64: ERRORS
linux-4.2-x86_64: ERRORS
linux-4.3-x86_64: ERRORS
linux-4.4-x86_64: ERRORS
linux-4.5-x86_64: ERRORS
linux-4.6-x86_64: ERRORS
linux-4.7-x86_64: ERRORS
linux-4.8-rc1-x86_64: OK
apps: WARNINGS
spec-git: OK
sparse: WARNINGS
smatch: WARNINGS

Detailed results are available here:

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

Full logs are available here:

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

The Media Infrastructure API from this daily build is here:

http://www.xs4all.nl/~hverkuil/spec/index.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] dvb-usb-dvbsky: Add support for TechnoTrend S2-4650 CI

2016-09-09 Thread Olli Salonen
TechnoTrend TT-connect S2-4650 CI seems to be a variation of
the DVBSky S960CI device.

Signed-off-by: Olli Salonen 
---
 drivers/media/dvb-core/dvb-usb-ids.h  | 1 +
 drivers/media/usb/dvb-usb-v2/dvbsky.c | 4 
 2 files changed, 5 insertions(+)

diff --git a/drivers/media/dvb-core/dvb-usb-ids.h 
b/drivers/media/dvb-core/dvb-usb-ids.h
index a7a4674..a52c5c7 100644
--- a/drivers/media/dvb-core/dvb-usb-ids.h
+++ b/drivers/media/dvb-core/dvb-usb-ids.h
@@ -262,6 +262,7 @@
 #define USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI0x3012
 #define USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI_2  0x3015
 #define USB_PID_TECHNOTREND_TVSTICK_CT2_4400   0x3014
+#define USB_PID_TECHNOTREND_CONNECT_S2_4650_CI 0x3017
 #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY   0x005a
 #define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY_2 0x0081
 #define USB_PID_TERRATEC_CINERGY_HT_USB_XE 0x0058
diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c 
b/drivers/media/usb/dvb-usb-v2/dvbsky.c
index 02dbc6c..0636eac 100644
--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
@@ -851,6 +851,10 @@ static const struct usb_device_id dvbsky_id_table[] = {
USB_PID_TECHNOTREND_CONNECT_CT2_4650_CI_2,
_t680c_props, "TechnoTrend TT-connect CT2-4650 CI v1.1",
RC_MAP_TT_1500) },
+   { DVB_USB_DEVICE(USB_VID_TECHNOTREND,
+   USB_PID_TECHNOTREND_CONNECT_S2_4650_CI,
+   _s960c_props, "TechnoTrend TT-connect S2-4650 CI",
+   RC_MAP_TT_1500) },
{ DVB_USB_DEVICE(USB_VID_TERRATEC,
USB_PID_TERRATEC_H7_3,
_t680c_props, "Terratec H7 Rev.4",
-- 
2.7.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


STRICTLY CONFIDENTIAL

2016-09-09 Thread Acct. Dept.
I have important transaction for you as next of kin to claim US$18.37m  Mail me 
on my private email:   chimwia...@gmail.com
 so i can send you more details

Thanks

Mr.Chim Wai Kim










===

DISCLAIMER: This email and any files it contains are confidential and intended 
for the use of the recipient(s) only. If you are not the intended recipient you 
should notify the sender immediately and destroy the material from your system. 



--
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


Alwaleed Donation

2016-09-09 Thread emmanuelle . domingues
Did you received your Grant money?? Contact me via princebintta...@qq.com for
claim


This message was sent using IMP, the Internet Messaging Program.

--
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] platform: constify vb2_ops structures

2016-09-09 Thread Benoit Parrot
Hi,

Thanks for the patch.

Julia Lawall  wrote on Fri [2016-Sep-09 01:59:10 +0200]:
> Check for vb2_ops structures that are only stored in the ops field of a
> vb2_queue structure.  That field is declared const, so vb2_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // 
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct vb2_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct vb2_queue e;
> position p;
> @@
> e.ops = @p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct vb2_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct vb2_ops i = { ... };
> // 
> 
> Signed-off-by: Julia Lawall 
> 
> ---
>  drivers/media/platform/exynos-gsc/gsc-m2m.c  |2 +-
>  drivers/media/platform/exynos4-is/fimc-capture.c |2 +-
>  drivers/media/platform/exynos4-is/fimc-m2m.c |2 +-
>  drivers/media/platform/m2m-deinterlace.c |2 +-
>  drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c   |2 +-
>  drivers/media/platform/mx2_emmaprp.c |2 +-
>  drivers/media/platform/rcar-vin/rcar-dma.c   |2 +-
>  drivers/media/platform/rcar_jpu.c|2 +-
>  drivers/media/platform/s5p-g2d/g2d.c |2 +-
>  drivers/media/platform/s5p-jpeg/jpeg-core.c  |2 +-
>  drivers/media/platform/sh_vou.c  |2 +-
>  drivers/media/platform/soc_camera/atmel-isi.c|2 +-
>  drivers/media/platform/soc_camera/rcar_vin.c |2 +-
>  drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c |2 +-
>  drivers/media/platform/sti/bdisp/bdisp-v4l2.c|2 +-

For the following 2 drivers,

>  drivers/media/platform/ti-vpe/cal.c  |2 +-
>  drivers/media/platform/ti-vpe/vpe.c  |2 +-

Reviewed-by: Benoit Parrot 

>  drivers/media/platform/vim2m.c   |2 +-
>  drivers/media/platform/xilinx/xilinx-dma.c   |2 +-
>  19 files changed, 19 insertions(+), 19 deletions(-)

Regards,
Benoit Parrot
--
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 4/4] arm64: dts: mediatek: Add Video Decoder for MT8173

2016-09-09 Thread Tiffany Lin
Add video decoder node for MT8173

Signed-off-by: Tiffany Lin 
---
 arch/arm64/boot/dts/mediatek/mt8173.dtsi |   44 ++
 1 file changed, 44 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi 
b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 10f638f..2872cd7 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -974,6 +974,50 @@
#clock-cells = <1>;
};
 
+   vcodec_dec: vcodec@1600 {
+   compatible = "mediatek,mt8173-vcodec-dec";
+   reg = <0 0x1600 0 0x100>,   /* VDEC_SYS */
+ <0 0x1602 0 0x1000>,  /* VDEC_MISC */
+ <0 0x16021000 0 0x800>,   /* VDEC_LD */
+ <0 0x16021800 0 0x800>,   /* VDEC_TOP */
+ <0 0x16022000 0 0x1000>,  /* VDEC_CM */
+ <0 0x16023000 0 0x1000>,  /* VDEC_AD */
+ <0 0x16024000 0 0x1000>,  /* VDEC_AV */
+ <0 0x16025000 0 0x1000>,  /* VDEC_PP */
+ <0 0x16026800 0 0x800>,   /* VDEC_HWD */
+ <0 0x16027000 0 0x800>,   /* VDEC_HWQ */
+ <0 0x16027800 0 0x800>,   /* VDEC_HWB */
+ <0 0x16028400 0 0x400>;   /* VDEC_HWG */
+   interrupts = ;
+   mediatek,larb = <>;
+   iommus = < M4U_PORT_HW_VDEC_MC_EXT>,
+< M4U_PORT_HW_VDEC_PP_EXT>,
+< M4U_PORT_HW_VDEC_AVC_MV_EXT>,
+< M4U_PORT_HW_VDEC_PRED_RD_EXT>,
+< M4U_PORT_HW_VDEC_PRED_WR_EXT>,
+< M4U_PORT_HW_VDEC_UFO_EXT>,
+< M4U_PORT_HW_VDEC_VLD_EXT>,
+< M4U_PORT_HW_VDEC_VLD2_EXT>;
+   mediatek,vpu = <>;
+   power-domains = < MT8173_POWER_DOMAIN_VDEC>;
+   clocks = < CLK_APMIXED_VCODECPLL>,
+< CLK_TOP_UNIVPLL_D2>,
+< CLK_TOP_CCI400_SEL>,
+< CLK_TOP_VDEC_SEL>,
+< CLK_TOP_VCODECPLL>,
+< CLK_APMIXED_VENCPLL>,
+< CLK_TOP_VENC_LT_SEL>,
+< CLK_TOP_VCODECPLL_370P5>;
+   clock-names = "vcodecpll",
+ "univpll_d2",
+ "clk_cci400_sel",
+ "vdec_sel",
+ "vdecpll",
+ "vencpll",
+ "venc_lt_sel",
+ "vdec_bus_clk_src";
+   };
+
larb1: larb@1601 {
compatible = "mediatek,mt8173-smi-larb";
reg = <0 0x1601 0 0x1000>;
-- 
1.7.9.5

--
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 3/4] vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder

2016-09-09 Thread Tiffany Lin
Add V4L2_PIX_FMT_MT21C support

Signed-off-by: Tiffany Lin 
---
 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c 
b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
index 28a8453..fd3befc 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
@@ -25,7 +25,7 @@
 #include "mtk_vcodec_dec_pm.h"
 
 #define OUT_FMT_IDX0
-#define CAP_FMT_IDX0
+#define CAP_FMT_IDX3
 
 #define MTK_VDEC_MIN_W 64U
 #define MTK_VDEC_MIN_H 64U
@@ -48,6 +48,11 @@ static struct mtk_video_fmt mtk_video_formats[] = {
.type = MTK_FMT_DEC,
.num_planes = 1,
},
+   {
+   .fourcc = V4L2_PIX_FMT_MT21C,
+   .type = MTK_FMT_FRAME,
+   .num_planes = 2,
+   },
 };
 
 static const struct mtk_codec_framesizes mtk_vdec_framesizes[] = {
-- 
1.7.9.5

--
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 2/4] docs-rst: Add compressed video formats used on MT8173 codec driver

2016-09-09 Thread Tiffany Lin
Add V4L2_PIX_FMT_MT21C documentation

Signed-off-by: Tiffany Lin 
---
 Documentation/media/uapi/v4l/pixfmt-reserved.rst |   10 ++
 1 file changed, 10 insertions(+)

diff --git a/Documentation/media/uapi/v4l/pixfmt-reserved.rst 
b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
index 0dd2f7f..0989e99 100644
--- a/Documentation/media/uapi/v4l/pixfmt-reserved.rst
+++ b/Documentation/media/uapi/v4l/pixfmt-reserved.rst
@@ -339,7 +339,17 @@ please make a proposal on the linux-media mailing list.
  array. Anything what's in between the UYVY lines is JPEG data and
  should be concatenated to form the JPEG stream.
 
+-  .. _V4L2-PIX-FMT-MT21C:
 
+   -  ``V4L2_PIX_FMT_MT21C``
+
+   -  'MT21C'
+
+   -  Compressed two-planar YVU420 format used by Mediatek MT8173.
+  The compression is lossless.
+  It is an opaque intermediate format, and MDP HW could convert
+  V4L2_PIX_FMT_MT21C to V4L2_PIX_FMT_NV12M,
+  V4L2_PIX_FMT_YUV420M and V4L2_PIX_FMT_YVU420.
 
 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
 
-- 
1.7.9.5

--
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 0/4] Add V4L2_PIX_FMT_MT21C format for MT8173 codec driver

2016-09-09 Thread Tiffany Lin
This patch series add Mediatek compressed block format V4L2_PIX_FMT_MT21C,
the decoder driver will decoded bitstream to V4L2_PIX_FMT_MT21C format.

User space applications could use MT8173 MDP driver to convert 
V4L2_PIX_FMT_MT21C
to V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M and V4L2_PIX_FMT_YVU420.
MDP driver[1] is stand alone driver.

Usage:
MT21C -> MT8173 MDP -> NV12M/YUV420M/YVU420 NV12M/NV21M/YUV420M/YVU420M -> 
mt8173 Encoder -> H264/VP8
H264/VP8/VP9 -> mtk8173 Decoder -> MT21C

When encode with MT21 source, the pipeline will be:
MT21C -> MDP driver-> NV12M/NV21M/YUV420M/YVU420M -> Encoder -> H264/VP8

When playback, the pipeline will be:
H264/VP8/VP9 -> Decoder driver -> MT21C -> MDP Driver -> DRM

[1]https://patchwork.kernel.org/patch/9305329/

---
v2: add more information for MT21C in docs-rst
---


Tiffany Lin (4):
  v4l: add Mediatek compressed video block format
  docs-rst: Add compressed video formats used on MT8173 codec driver
  vcodec: mediatek: Add V4L2_PIX_FMT_MT21C support for v4l2 decoder
  arm64: dts: mediatek: Add Video Decoder for MT8173

 Documentation/media/uapi/v4l/pixfmt-reserved.rst   |   10 +
 arch/arm64/boot/dts/mediatek/mt8173.dtsi   |   44 
 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |7 +++-
 drivers/media/v4l2-core/v4l2-ioctl.c   |1 +
 include/uapi/linux/videodev2.h |1 +
 5 files changed, 62 insertions(+), 1 deletion(-)

-- 
1.7.9.5

--
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] pci: constify vb2_ops structures

2016-09-09 Thread Julia Lawall


On Fri, 9 Sep 2016, Andrey Utkin wrote:

> On Fri, Sep 09, 2016 at 10:31:30PM +0800, Julia Lawall wrote:
> > Will this soon reach linux-next?
>
> No idea. Indeed it's simpler if you leave your patch as is, and then
> later we patch this new driver separately.

OK, thanks.

julia
--
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


IR remote repeat handling broken + patch

2016-09-09 Thread Alec Leamas

Dear list,

Somewhere between 4.4.7 and 4.6.4 the IR remote repeat events broke. I 
eventually bisected it down to "[078600f] [media] rc-core: allow calling 
rc_open with device not initialized". While going further with this I 
discovered that  a patch had been posted on this list [1].  However, the 
patch is seemingly not reviewed.


Could someone please review this patch? I have tested it myself, and 
Fedora has pulled  the patch in the  branches [2]. The problem is bad, 
blocking many remotes from working as expected in lirc.



Cheers!


--alec


[1] http://www.spinics.net/lists/linux-media/msg103384.html

[2] https://bugzilla.redhat.com/show_bug.cgi?id=1360688

--
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] pci: constify vb2_ops structures

2016-09-09 Thread Andrey Utkin
On Fri, Sep 09, 2016 at 10:31:30PM +0800, Julia Lawall wrote:
> Will this soon reach linux-next?

No idea. Indeed it's simpler if you leave your patch as is, and then
later we patch this new driver separately.
--
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: [GIT PULL STABLE 4.6] af9035 regression

2016-09-09 Thread Antti Palosaari

On 09/09/2016 05:49 PM, Mauro Carvalho Chehab wrote:

Hi Antti,

Em Sat, 3 Sep 2016 02:40:52 +0300
Antti Palosaari  escreveu:


The following changes since commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a:

   Linux 4.6 (2016-05-15 15:43:13 -0700)


Is this patchset really meant to Kernel 4.6? if so, you should send
the path to sta...@vger.kernel.org, c/c the mailing list.

It helps to point the original patch that fixed the issue upstream,
as they won't apply the fix if it was not fixed upstream yet.


I think you already applied upstream patch, that one is just back-ported 
to 4.6.


It is that patch:
https://patchwork.linuxtv.org/patch/36795/

and it contains all the needed tags including Cc stable. Could you send 
it to stable?


Antti



Regards,
Mauro



are available in the git repository at:

   git://linuxtv.org/anttip/media_tree.git af9035_fix

for you to fetch changes up to 7bb87ff5255defe87916f32cd1fcef163a489339:

   af9035: fix dual tuner detection with PCTV 79e (2016-09-03 02:23:44
+0300)


Stefan Pöschel (1):
   af9035: fix dual tuner detection with PCTV 79e

  drivers/media/usb/dvb-usb-v2/af9035.c | 53
+++--
  drivers/media/usb/dvb-usb-v2/af9035.h |  2 +-
  2 files changed, 36 insertions(+), 19 deletions(-)





Thanks,
Mauro



--
http://palosaari.fi/
--
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: [GIT PULL STABLE 4.6] af9035 regression

2016-09-09 Thread Mauro Carvalho Chehab
Hi Antti,

Em Sat, 3 Sep 2016 02:40:52 +0300
Antti Palosaari  escreveu:

> The following changes since commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a:
> 
>Linux 4.6 (2016-05-15 15:43:13 -0700)

Is this patchset really meant to Kernel 4.6? if so, you should send
the path to sta...@vger.kernel.org, c/c the mailing list.

It helps to point the original patch that fixed the issue upstream,
as they won't apply the fix if it was not fixed upstream yet.

Regards,
Mauro

> 
> are available in the git repository at:
> 
>git://linuxtv.org/anttip/media_tree.git af9035_fix
> 
> for you to fetch changes up to 7bb87ff5255defe87916f32cd1fcef163a489339:
> 
>af9035: fix dual tuner detection with PCTV 79e (2016-09-03 02:23:44 
> +0300)
> 
> 
> Stefan Pöschel (1):
>af9035: fix dual tuner detection with PCTV 79e
> 
>   drivers/media/usb/dvb-usb-v2/af9035.c | 53 
> +++--
>   drivers/media/usb/dvb-usb-v2/af9035.h |  2 +-
>   2 files changed, 36 insertions(+), 19 deletions(-)
> 



Thanks,
Mauro
--
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] pci: constify vb2_ops structures

2016-09-09 Thread Julia Lawall


On Fri, 9 Sep 2016, Andrey Utkin wrote:

> On Fri, Sep 09, 2016 at 01:59:18AM +0200, Julia Lawall wrote:
> > Check for vb2_ops structures that are only stored in the ops field of a
> > vb2_queue structure.  That field is declared const, so vb2_ops structures
> > that have this property can be declared as const also.
>
> > Signed-off-by: Julia Lawall 
> >
> > ---
> >  drivers/media/pci/cx23885/cx23885-417.c|2 +-
> >  drivers/media/pci/cx23885/cx23885-dvb.c|2 +-
> >  drivers/media/pci/cx23885/cx23885-video.c  |2 +-
> >  drivers/media/pci/cx25821/cx25821-video.c  |2 +-
> >  drivers/media/pci/cx88/cx88-blackbird.c|2 +-
> >  drivers/media/pci/cx88/cx88-dvb.c  |2 +-
> >  drivers/media/pci/cx88/cx88-video.c|2 +-
> >  drivers/media/pci/netup_unidvb/netup_unidvb_core.c |2 +-
> >  drivers/media/pci/saa7134/saa7134-empress.c|2 +-
> >  drivers/media/pci/saa7134/saa7134-video.c  |2 +-
> >  drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c |2 +-
> >  drivers/media/pci/tw68/tw68-video.c|2 +-
> >  drivers/media/pci/tw686x/tw686x-video.c|2 +-
> >  13 files changed, 13 insertions(+), 13 deletions(-)
>
> Applies and compiles cleanly on media tree.
> But please regenerate this patch on git://linuxtv.org/media_tree.git -
> it has a new driver by me, drivers/media/pci/tw5864 , which is affected.

Will this soon reach linux-next?

julia
--
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 2/2] [media] pxa_camera: remove an unused structure pointer

2016-09-09 Thread Mauro Carvalho Chehab
As reported by smatch:

drivers/media/platform/pxa_camera.c: In function 'pxa_dma_start_channels':
drivers/media/platform/pxa_camera.c:457:21: warning: variable 'active' set but 
not used [-Wunused-but-set-variable]
  struct pxa_buffer *active;
 ^~

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/pxa_camera.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/media/platform/pxa_camera.c 
b/drivers/media/platform/pxa_camera.c
index 733677f06cb4..11478364c6d6 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -455,9 +455,6 @@ static void pxa_videobuf_set_actdma(struct pxa_camera_dev 
*pcdev,
 static void pxa_dma_start_channels(struct pxa_camera_dev *pcdev)
 {
int i;
-   struct pxa_buffer *active;
-
-   active = pcdev->active;
 
for (i = 0; i < pcdev->channels; i++) {
dev_dbg(pcdev_to_dev(pcdev),
-- 
2.7.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


[PATCH 1/2] [media] pxa_camera: make soc_mbus_xlate_by_fourcc() static

2016-09-09 Thread Mauro Carvalho Chehab
As warned by smatch:

drivers/media/platform/pxa_camera.c:283:39: warning: no previous prototype for 
'soc_mbus_xlate_by_fourcc' [-Wmissing-prototypes]
 const struct soc_camera_format_xlate *soc_mbus_xlate_by_fourcc(
   ^~~~

Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/platform/pxa_camera.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/pxa_camera.c 
b/drivers/media/platform/pxa_camera.c
index c2d1ceaea49b..733677f06cb4 100644
--- a/drivers/media/platform/pxa_camera.c
+++ b/drivers/media/platform/pxa_camera.c
@@ -280,8 +280,9 @@ static const char *pxa_cam_driver_description = 
"PXA_Camera";
 /*
  * Format translation functions
  */
-const struct soc_camera_format_xlate *soc_mbus_xlate_by_fourcc(
-   struct soc_camera_format_xlate *user_formats, unsigned int fourcc)
+static const struct soc_camera_format_xlate
+*soc_mbus_xlate_by_fourcc(struct soc_camera_format_xlate *user_formats,
+ unsigned int fourcc)
 {
unsigned int i;
 
-- 
2.7.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


[PATCH] [media] vivid: support for contiguous DMA buffers

2016-09-09 Thread Vincent Abriou
It allow to simulate the behavior of hardware with such limitations or
to connect vivid to real hardware with such limitations.

Add the "allocator" module parameter option to let vivid use the
dma-contig instead of vmalloc.

Tested on X86 and ARM configuration.

Signed-off-by: Philipp Zabel 
Signed-off-by: Hans Verkuil 
Signed-off-by: Vincent Abriou 

Cc: Philipp Zabel 
Cc: Hans Verkuil 

---
 Documentation/media/v4l-drivers/vivid.rst |  8 
 drivers/media/platform/vivid/Kconfig  |  1 +
 drivers/media/platform/vivid/vivid-core.c | 32 ++-
 3 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/Documentation/media/v4l-drivers/vivid.rst 
b/Documentation/media/v4l-drivers/vivid.rst
index c8cf371..3e44b22 100644
--- a/Documentation/media/v4l-drivers/vivid.rst
+++ b/Documentation/media/v4l-drivers/vivid.rst
@@ -263,6 +263,14 @@ all configurable using the following module options:
removed. Unless overridden by ccs_cap_mode and/or ccs_out_mode the
will default to enabling crop, compose and scaling.
 
+- allocators:
+
+   memory allocator selection, default is 0. It specifies the way buffers
+   will be allocated.
+
+   - 0: vmalloc
+   - 1: dma-contig
+
 Taken together, all these module options allow you to precisely customize
 the driver behavior and test your application with all sorts of permutations.
 It is also very suitable to emulate hardware that is not yet available, e.g.
diff --git a/drivers/media/platform/vivid/Kconfig 
b/drivers/media/platform/vivid/Kconfig
index 8e6918c..ee57562 100644
--- a/drivers/media/platform/vivid/Kconfig
+++ b/drivers/media/platform/vivid/Kconfig
@@ -8,6 +8,7 @@ config VIDEO_VIVID
select FB_CFB_IMAGEBLIT
select MEDIA_CEC_EDID
select VIDEOBUF2_VMALLOC
+   select VIDEOBUF2_DMA_CONTIG
select VIDEO_V4L2_TPG
default n
---help---
diff --git a/drivers/media/platform/vivid/vivid-core.c 
b/drivers/media/platform/vivid/vivid-core.c
index 741460a..deca868 100644
--- a/drivers/media/platform/vivid/vivid-core.c
+++ b/drivers/media/platform/vivid/vivid-core.c
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -151,6 +152,12 @@ static bool no_error_inj;
 module_param(no_error_inj, bool, 0444);
 MODULE_PARM_DESC(no_error_inj, " if set disable the error injecting controls");
 
+static unsigned allocators[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 
0 };
+module_param_array(allocators, uint, NULL, 0444);
+MODULE_PARM_DESC(allocators, " memory allocator selection, default is 0.\n"
+"\t\t0 == vmalloc\n"
+"\t\t1 == dma-contig");
+
 static struct vivid_dev *vivid_devs[VIVID_MAX_DEVS];
 
 const struct v4l2_rect vivid_min_rect = {
@@ -636,6 +643,10 @@ static int vivid_create_instance(struct platform_device 
*pdev, int inst)
 {
static const struct v4l2_dv_timings def_dv_timings =
V4L2_DV_BT_CEA_1280X720P60;
+   static const struct vb2_mem_ops * const vivid_mem_ops[2] = {
+   _vmalloc_memops,
+   _dma_contig_memops,
+   };
unsigned in_type_counter[4] = { 0, 0, 0, 0 };
unsigned out_type_counter[4] = { 0, 0, 0, 0 };
int ccs_cap = ccs_cap_mode[inst];
@@ -646,6 +657,7 @@ static int vivid_create_instance(struct platform_device 
*pdev, int inst)
struct video_device *vfd;
struct vb2_queue *q;
unsigned node_type = node_types[inst];
+   unsigned allocator = allocators[inst];
v4l2_std_id tvnorms_cap = 0, tvnorms_out = 0;
int ret;
int i;
@@ -1036,6 +1048,11 @@ static int vivid_create_instance(struct platform_device 
*pdev, int inst)
if (!dev->cec_workqueue)
goto unreg_dev;
 
+   if (allocator == 1)
+   dma_coerce_mask_and_coherent(>dev, DMA_BIT_MASK(32));
+   else if (allocator >= ARRAY_SIZE(vivid_mem_ops))
+   allocator = 0;
+
/* start creating the vb2 queues */
if (dev->has_vid_cap) {
/* initialize vid_cap queue */
@@ -1046,10 +1063,11 @@ static int vivid_create_instance(struct platform_device 
*pdev, int inst)
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct vivid_buffer);
q->ops = _vid_cap_qops;
-   q->mem_ops = _vmalloc_memops;
+   q->mem_ops = vivid_mem_ops[allocator];
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->min_buffers_needed = 2;
q->lock = >mutex;
+   q->dev = dev->v4l2_dev.dev;
 
ret = vb2_queue_init(q);
if (ret)
@@ -1065,10 +1083,11 @@ static int vivid_create_instance(struct platform_device 
*pdev, 

[PATCH] v4l2-ctl: Fix unneeded dot in "no hsync lock"

2016-09-09 Thread Andrey Utkin
From: Andrey Utkin 

Signed-off-by: Andrey Utkin 
---
 utils/v4l2-ctl/v4l2-ctl-io.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/v4l2-ctl/v4l2-ctl-io.cpp b/utils/v4l2-ctl/v4l2-ctl-io.cpp
index e778569..30798ea 100644
--- a/utils/v4l2-ctl/v4l2-ctl-io.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-io.cpp
@@ -53,7 +53,7 @@ static const flag_def in_status_def[] = {
{ V4L2_IN_ST_NO_COLOR,"no color" },
{ V4L2_IN_ST_HFLIP,   "hflip" },
{ V4L2_IN_ST_VFLIP,   "vflip" },
-   { V4L2_IN_ST_NO_H_LOCK,   "no hsync lock." },
+   { V4L2_IN_ST_NO_H_LOCK,   "no hsync lock" },
{ V4L2_IN_ST_COLOR_KILL,  "color kill" },
{ V4L2_IN_ST_NO_SYNC, "no sync lock" },
{ V4L2_IN_ST_NO_EQU,  "no equalizer lock" },
-- 
2.9.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 v2 0/3] doc-rst:c-domain: fix some issues in the c-domain

2016-09-09 Thread Markus Heiser

Am 09.09.2016 um 14:08 schrieb Mauro Carvalho Chehab :

> Em Wed,  7 Sep 2016 09:12:55 +0200
> Markus Heiser  escreveu:
> 
>> From: Markus Heiser 
>> 
>> Hi Jon,
>> 
>> according to your remarks I fixed the first and second patch. The third 
>> patch is
>> resend unchanged;
>> 
>>> Am 06.09.2016 um 14:28 schrieb Jonathan Corbet :
>>> 
>>> As others have pointed out, we generally want to hide the difference
>>> between functions and macros, so this is probably one change we don't
>>> want.  
>> 
>> I read "probably", so there might be a chance to persuade you ;)
>> 
>> I'm not a friend of *information hiding* and since the index is sorted
>> alphabetical it does no matter if the entry is 'FOO (C function)' or 'FOO (C
>> macro)'. The last one has the right information e.g. for someone how is 
>> looking
>> for a macro. FOO is a function-like macro and not a function, if the author
>> describes the macro he might use the word "macro FOO" but in the index it is
>> tagged as C function.
>> 
>> Macros and functions are totally different even if their notation looks
>> similarly. So where is the benefit of entries like 'FOO (C function)', which 
>> is
>> IMHO ambiguous.
>> 
>> I tagged the 'function-like macros index entry' patch with 'RFC' and resend 
>> it
>> within this series. If you and/or others have a different opinion, feel free 
>> to
>> drop it.
>> 
>> Thanks for review.
>> 
>> -- Markus --
>> 
>> 
>> Markus Heiser (3):
>>  doc-rst:c-domain: fix sphinx version incompatibility
>>  doc-rst:c-domain: function-like macros arguments
>>  doc-rst:c-domain: function-like macros index entry
>> 
>> Documentation/sphinx/cdomain.py | 79 
>> +++--
>> 1 file changed, 76 insertions(+), 3 deletions(-)
>> 
> 
> Those patches indeed fix the issues. The arguments are now
> processed properly.
> 
> Tested-by: Mauro Carvalho Chehab 
> 
> ---
> 
> Using either this approach or my kernel-doc patch, I'm now getting
> only two warnings:
> 
> 1) at media-entity.h, even without nitpick mode:
> 
> ./include/media/media-entity.h:1053: warning: No description found for 
> parameter '...'
> 
> This is caused by this kernel-doc tag and the corresponding macro:
> 
>   /**
>* media_entity_call - Calls a struct media_entity_operations operation 
> on
>*  an entity
>*
>* @entity: entity where the @operation will be called
>* @operation: type of the operation. Should be the name of a member of
>*  struct _entity_operations.
>*
>* This helper function will check if @operation is not %NULL. On such 
> case,
>* it will issue a call to @operation\(@entity, @args\).
>*/
> 
>   #define media_entity_call(entity, operation, args...)   
> \
>   (((entity)->ops && (entity)->ops->operation) ?  
> \
>(entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)
> 
> 
> Basically, the Sphinx C domain seems to be expecting a description for
> "...". I didn't find any way to get rid of that.
> 
> 2) a nitpick warning at v4l2-mem2mem.h:
> 
> ./include/media/v4l2-mem2mem.h:339: WARNING: c:type reference target not 
> found: queue_init
> 
> 
>   /**
>* v4l2_m2m_ctx_init() - allocate and initialize a m2m context
>*
>* @m2m_dev: opaque pointer to the internal data to handle M2M context
>* @drv_priv: driver's instance private data
>* @queue_init: a callback for queue type-specific initialization 
> function
>*  to be used for initializing videobuf_queues
>*
>* Usually called from driver's ``open()`` function.
>*/
>   struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(struct v4l2_m2m_dev *m2m_dev,
>   void *drv_priv,
>   int (*queue_init)(void *priv, struct vb2_queue *src_vq, 
> struct vb2_queue *dst_vq));
> 
> I checked the output of kernel-doc, and it looked ok. Yet, it expects
> "queue_init" to be defined somehow. I suspect that this is an error at
> Sphinx C domain parser.
> 
> Markus,
> 
> Could you please take a look on those?

Yes, I will give it a try, but I don't know if I find the time
today.

On wich branch could I test this?

-- Markus --

> 
> Thanks,
> Mauro
> --
> To unsubscribe from this list: send the line "unsubscribe linux-doc" 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


[GIT PULL FOR v4.9] FCP and VSP1 changes

2016-09-09 Thread Laurent Pinchart
Hi Mauro,

This pull request supersedes the one sent on September the 5th under the title 
"[GIT PULL FOR v4.9] VSP1 changes". I've stripped the histogram-related 
patches that you would like to discuss, to only keep the non-controversial 
patches that are ready for v4.9, and added other FCP-related patches from my 
tree.

The following changes since commit 036bbb8213ecca49799217f30497dc0484178e53:

  [media] cobalt: update EDID (2016-09-06 16:46:39 -0300)

are available in the git repository at:

  git://linuxtv.org/pinchartl/media.git vsp1/next

for you to fetch changes up to f4664c79de7314ab463490625c8a889510c7ea91:

  v4l: vsp1: Add R8A7792 VSP1V support (2016-09-09 14:57:35 +0300)


Kieran Bingham (3):
  dt-bindings: Update Renesas R-Car FCP DT bindings for FCPF
  dt-bindings: Document Renesas R-Car FCP power-domains usage
  v4l: rcar-fcp: Extend compatible list to support the FDP

Laurent Pinchart (5):
  v4l: ioctl: Clear the v4l2_pix_format_mplane reserved field
  v4l: rcar-fcp: Keep the coding style consistent
  v4l: rcar-fcp: Don't force users to check for disabled FCP support
  v4l: vsp1: Report device model and rev through media device information
  v4l: vsp1: Fix tri-planar format support through DRM API

Sergei Shtylyov (1):
  v4l: vsp1: Add R8A7792 VSP1V support

 Documentation/devicetree/bindings/media/renesas,fcp.txt |  9 +-
 drivers/media/platform/rcar-fcp.c   |  9 +++---
 drivers/media/platform/vsp1/vsp1.h  |  2 ++
 drivers/media/platform/vsp1/vsp1_drm.c  |  6 ++--
 drivers/media/platform/vsp1/vsp1_drv.c  | 43 ++--
 drivers/media/platform/vsp1/vsp1_regs.h |  2 ++
 drivers/media/v4l2-core/v4l2-ioctl.c|  8 ++---
 include/media/rcar-fcp.h|  2 +-
 include/media/vsp1.h|  2 +-
-- 
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 v2 0/3] doc-rst:c-domain: fix some issues in the c-domain

2016-09-09 Thread Mauro Carvalho Chehab
Em Wed,  7 Sep 2016 09:12:55 +0200
Markus Heiser  escreveu:

> From: Markus Heiser 
> 
> Hi Jon,
> 
> according to your remarks I fixed the first and second patch. The third patch 
> is
> resend unchanged;
> 
> > Am 06.09.2016 um 14:28 schrieb Jonathan Corbet :
> >
> > As others have pointed out, we generally want to hide the difference
> > between functions and macros, so this is probably one change we don't
> > want.  
> 
> I read "probably", so there might be a chance to persuade you ;)
> 
> I'm not a friend of *information hiding* and since the index is sorted
> alphabetical it does no matter if the entry is 'FOO (C function)' or 'FOO (C
> macro)'. The last one has the right information e.g. for someone how is 
> looking
> for a macro. FOO is a function-like macro and not a function, if the author
> describes the macro he might use the word "macro FOO" but in the index it is
> tagged as C function.
> 
> Macros and functions are totally different even if their notation looks
> similarly. So where is the benefit of entries like 'FOO (C function)', which 
> is
> IMHO ambiguous.
> 
> I tagged the 'function-like macros index entry' patch with 'RFC' and resend it
> within this series. If you and/or others have a different opinion, feel free 
> to
> drop it.
> 
> Thanks for review.
> 
> -- Markus --
> 
> 
> Markus Heiser (3):
>   doc-rst:c-domain: fix sphinx version incompatibility
>   doc-rst:c-domain: function-like macros arguments
>   doc-rst:c-domain: function-like macros index entry
> 
>  Documentation/sphinx/cdomain.py | 79 
> +++--
>  1 file changed, 76 insertions(+), 3 deletions(-)
> 

Those patches indeed fix the issues. The arguments are now
processed properly.

Tested-by: Mauro Carvalho Chehab 

---

Using either this approach or my kernel-doc patch, I'm now getting
only two warnings:

1) at media-entity.h, even without nitpick mode:

./include/media/media-entity.h:1053: warning: No description found for 
parameter '...'

This is caused by this kernel-doc tag and the corresponding macro:

/**
 * media_entity_call - Calls a struct media_entity_operations operation 
on
 *  an entity
 *
 * @entity: entity where the @operation will be called
 * @operation: type of the operation. Should be the name of a member of
 *  struct _entity_operations.
 *
 * This helper function will check if @operation is not %NULL. On such 
case,
 * it will issue a call to @operation\(@entity, @args\).
 */

#define media_entity_call(entity, operation, args...)   
\
(((entity)->ops && (entity)->ops->operation) ?  
\
 (entity)->ops->operation((entity) , ##args) : -ENOIOCTLCMD)


Basically, the Sphinx C domain seems to be expecting a description for
"...". I didn't find any way to get rid of that.

2) a nitpick warning at v4l2-mem2mem.h:

./include/media/v4l2-mem2mem.h:339: WARNING: c:type reference target not found: 
queue_init


/**
 * v4l2_m2m_ctx_init() - allocate and initialize a m2m context
 *
 * @m2m_dev: opaque pointer to the internal data to handle M2M context
 * @drv_priv: driver's instance private data
 * @queue_init: a callback for queue type-specific initialization 
function
 *  to be used for initializing videobuf_queues
 *
 * Usually called from driver's ``open()`` function.
 */
struct v4l2_m2m_ctx *v4l2_m2m_ctx_init(struct v4l2_m2m_dev *m2m_dev,
void *drv_priv,
int (*queue_init)(void *priv, struct vb2_queue *src_vq, 
struct vb2_queue *dst_vq));

I checked the output of kernel-doc, and it looked ok. Yet, it expects
"queue_init" to be defined somehow. I suspect that this is an error at
Sphinx C domain parser.

Markus,

Could you please take a look on those?

Thanks,
Mauro
--
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] v4l: rcar-fcp: Extend compatible list to support the FDP

2016-09-09 Thread Laurent Pinchart
From: Kieran Bingham 

The FCP must be powered up for the FDP1 to function, even when the FDP1
does not make use of the FCNL features. Extend the compatible list
to allow us to use the power domain and runtime-pm support.

Signed-off-by: Kieran Bingham 
Reviewed-by: Laurent Pinchart 
Signed-off-by: Laurent Pinchart 
---
 drivers/media/platform/rcar-fcp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/rcar-fcp.c 
b/drivers/media/platform/rcar-fcp.c
index f7bcbf7677a0..f3a3f31cdfa9 100644
--- a/drivers/media/platform/rcar-fcp.c
+++ b/drivers/media/platform/rcar-fcp.c
@@ -165,6 +165,7 @@ static int rcar_fcp_remove(struct platform_device *pdev)
 }
 
 static const struct of_device_id rcar_fcp_of_match[] = {
+   { .compatible = "renesas,fcpf" },
{ .compatible = "renesas,fcpv" },
{ },
 };
-- 
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] [media] v4l2-subdev.h: fix a typo at a kernel-doc markup

2016-09-09 Thread Mauro Carvalho Chehab
One struct at the comment was not written well.

Fix it.

Signed-off-by: Mauro Carvalho Chehab 
---
 include/media/v4l2-subdev.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h
index e175c2c891a8..863f92600607 100644
--- a/include/media/v4l2-subdev.h
+++ b/include/media/v4l2-subdev.h
@@ -421,7 +421,7 @@ struct v4l2_subdev_video_ops {
  *   in video mode via the vbi device node.
  *
  *  @decode_vbi_line: video decoders that support sliced VBI need to implement
- * this ioctl. Field p of the  v4l2_sliced_vbi_line is set to the
+ * this ioctl. Field p of the  v4l2_decode_vbi_line is set to the
  * start of the VBI data that was generated by the decoder. The driver
  * then parses the sliced VBI data and sets the other fields in the
  * struct accordingly. The pointer p is updated to point to the start of
-- 
2.7.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] [v4l-utils] libdvb5: Fix multiple definition of dvb_dev_remote_init linking error

2016-09-09 Thread Sakari Ailus
On Wed, Sep 07, 2016 at 12:53:26PM +0300, Laurent Pinchart wrote:
> The function is defined in a header file when HAVE_DVBV5_REMOTE is not
> set. It needs to be marked as static inline.
> 
> Signed-off-by: Laurent Pinchart 

Applied. Thank you.

-- 
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] [media] pci: constify vb2_ops structures

2016-09-09 Thread andrey_utkin
On 9 September 2016 12:34:57 EEST, Julia Lawall  wrote:
>Do you want the whole patch again, or would a patch on the new driver
>by itself be sufficient?  The changes in the different files are all
>independent.

I guess maintainers would want a single patch for everything in this
case. But don't take my word, ask/look what they say.
--
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] platform: constify vb2_ops structures

2016-09-09 Thread Jacek Anaszewski

Hi Julia,

On 09/09/2016 01:59 AM, Julia Lawall wrote:

Check for vb2_ops structures that are only stored in the ops field of a
vb2_queue structure.  That field is declared const, so vb2_ops structures
that have this property can be declared as const also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)


[...]


diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c 
b/drivers/media/platform/s5p-jpeg/jpeg-core.c
index 785e693..d9c07b8 100644
--- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
@@ -2538,7 +2538,7 @@ static void s5p_jpeg_stop_streaming(struct vb2_queue *q)
pm_runtime_put(ctx->jpeg->dev);
 }

-static struct vb2_ops s5p_jpeg_qops = {
+static const struct vb2_ops s5p_jpeg_qops = {
.queue_setup= s5p_jpeg_queue_setup,
.buf_prepare= s5p_jpeg_buf_prepare,
.buf_queue  = s5p_jpeg_buf_queue,
diff --git a/drivers/media/platform/ti-vpe/cal.c 
b/drivers/media/platform/ti-vpe/cal.c
index e967fcf..44323cb 100644
--- a/drivers/media/platform/ti-vpe/cal.c
+++ b/drivers/media/platform/ti-vpe/cal.c
@@ -1379,7 +1379,7 @@ static void cal_stop_streaming(struct vb2_queue *vq)
cal_runtime_put(ctx->dev);
 }


Thanks for the patch.

For s5p-jpeg driver:

Reviewed-by: Jacek Anaszewski 

--
Best regards,
Jacek Anaszewski
--
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] pci: constify vb2_ops structures

2016-09-09 Thread Julia Lawall

Le 09.09.2016 17:17, Andrey Utkin a écrit :

On Fri, Sep 09, 2016 at 01:59:18AM +0200, Julia Lawall wrote:
Check for vb2_ops structures that are only stored in the ops field of 
a
vb2_queue structure.  That field is declared const, so vb2_ops 
structures

that have this property can be declared as const also.



Signed-off-by: Julia Lawall 

---
 drivers/media/pci/cx23885/cx23885-417.c|2 +-
 drivers/media/pci/cx23885/cx23885-dvb.c|2 +-
 drivers/media/pci/cx23885/cx23885-video.c  |2 +-
 drivers/media/pci/cx25821/cx25821-video.c  |2 +-
 drivers/media/pci/cx88/cx88-blackbird.c|2 +-
 drivers/media/pci/cx88/cx88-dvb.c  |2 +-
 drivers/media/pci/cx88/cx88-video.c|2 +-
 drivers/media/pci/netup_unidvb/netup_unidvb_core.c |2 +-
 drivers/media/pci/saa7134/saa7134-empress.c|2 +-
 drivers/media/pci/saa7134/saa7134-video.c  |2 +-
 drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c |2 +-
 drivers/media/pci/tw68/tw68-video.c|2 +-
 drivers/media/pci/tw686x/tw686x-video.c|2 +-
 13 files changed, 13 insertions(+), 13 deletions(-)


Applies and compiles cleanly on media tree.
But please regenerate this patch on git://linuxtv.org/media_tree.git -
it has a new driver by me, drivers/media/pci/tw5864 , which is 
affected.


Do you want the whole patch again, or would a patch on the new driver by 
itself be sufficient?  The changes in the different files are all 
independent.


julia


Otherwise

Acked-by: Andrey Utkin 

(however this time I'm writing from another email.)
--
To unsubscribe from this list: send the line "unsubscribe 
kernel-janitors" 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] [media] pci: constify vb2_ops structures

2016-09-09 Thread Andrey Utkin
On Fri, Sep 09, 2016 at 01:59:18AM +0200, Julia Lawall wrote:
> Check for vb2_ops structures that are only stored in the ops field of a
> vb2_queue structure.  That field is declared const, so vb2_ops structures
> that have this property can be declared as const also.

> Signed-off-by: Julia Lawall 
> 
> ---
>  drivers/media/pci/cx23885/cx23885-417.c|2 +-
>  drivers/media/pci/cx23885/cx23885-dvb.c|2 +-
>  drivers/media/pci/cx23885/cx23885-video.c  |2 +-
>  drivers/media/pci/cx25821/cx25821-video.c  |2 +-
>  drivers/media/pci/cx88/cx88-blackbird.c|2 +-
>  drivers/media/pci/cx88/cx88-dvb.c  |2 +-
>  drivers/media/pci/cx88/cx88-video.c|2 +-
>  drivers/media/pci/netup_unidvb/netup_unidvb_core.c |2 +-
>  drivers/media/pci/saa7134/saa7134-empress.c|2 +-
>  drivers/media/pci/saa7134/saa7134-video.c  |2 +-
>  drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c |2 +-
>  drivers/media/pci/tw68/tw68-video.c|2 +-
>  drivers/media/pci/tw686x/tw686x-video.c|2 +-
>  13 files changed, 13 insertions(+), 13 deletions(-)

Applies and compiles cleanly on media tree.
But please regenerate this patch on git://linuxtv.org/media_tree.git -
it has a new driver by me, drivers/media/pci/tw5864 , which is affected.

Otherwise

Acked-by: Andrey Utkin 

(however this time I'm writing from another email.)
--
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] platform: constify vb2_ops structures

2016-09-09 Thread Fabien DESSENNE
Hi


On 09/09/2016 01:59 AM, Julia Lawall wrote:
> Check for vb2_ops structures that are only stored in the ops field of a
> vb2_queue structure.  That field is declared const, so vb2_ops structures
> that have this property can be declared as const also.
>
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
>
> // 
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct vb2_ops i@p = { ... };
>
> @ok@
> identifier r.i;
> struct vb2_queue e;
> position p;
> @@
> e.ops = @p;
>
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct vb2_ops e;
> @@
> e@i@p
>
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>   struct vb2_ops i = { ... };
> // 
>
> Signed-off-by: Julia Lawall 
>
> ---
>   drivers/media/platform/exynos-gsc/gsc-m2m.c  |2 +-
>   drivers/media/platform/exynos4-is/fimc-capture.c |2 +-
>   drivers/media/platform/exynos4-is/fimc-m2m.c |2 +-
>   drivers/media/platform/m2m-deinterlace.c |2 +-
>   drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c   |2 +-
>   drivers/media/platform/mx2_emmaprp.c |2 +-
>   drivers/media/platform/rcar-vin/rcar-dma.c   |2 +-
>   drivers/media/platform/rcar_jpu.c|2 +-
>   drivers/media/platform/s5p-g2d/g2d.c |2 +-
>   drivers/media/platform/s5p-jpeg/jpeg-core.c  |2 +-
>   drivers/media/platform/sh_vou.c  |2 +-
>   drivers/media/platform/soc_camera/atmel-isi.c|2 +-
>   drivers/media/platform/soc_camera/rcar_vin.c |2 +-
>   drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c |2 +-

For this driver:
>   drivers/media/platform/sti/bdisp/bdisp-v4l2.c|2 +-
Reviewed-by: Fabien Dessenne 

>   drivers/media/platform/ti-vpe/cal.c  |2 +-
>   drivers/media/platform/ti-vpe/vpe.c  |2 +-
>   drivers/media/platform/vim2m.c   |2 +-
>   drivers/media/platform/xilinx/xilinx-dma.c   |2 +-
>   19 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/drivers/media/platform/xilinx/xilinx-dma.c 
> b/drivers/media/platform/xilinx/xilinx-dma.c
> index 7ae1a13..1d5836c 100644
> --- a/drivers/media/platform/xilinx/xilinx-dma.c
> +++ b/drivers/media/platform/xilinx/xilinx-dma.c
> @@ -474,7 +474,7 @@ static void xvip_dma_stop_streaming(struct vb2_queue *vq)
>  spin_unlock_irq(>queued_lock);
>   }
>
> -static struct vb2_ops xvip_dma_queue_qops = {
> +static const struct vb2_ops xvip_dma_queue_qops = {
>  .queue_setup = xvip_dma_queue_setup,
>  .buf_prepare = xvip_dma_buffer_prepare,
>  .buf_queue = xvip_dma_buffer_queue,
> diff --git a/drivers/media/platform/soc_camera/atmel-isi.c 
> b/drivers/media/platform/soc_camera/atmel-isi.c
> index 30211f6..46de657 100644
> --- a/drivers/media/platform/soc_camera/atmel-isi.c
> +++ b/drivers/media/platform/soc_camera/atmel-isi.c
> @@ -536,7 +536,7 @@ static void stop_streaming(struct vb2_queue *vq)
>  pm_runtime_put(ici->v4l2_dev.dev);
>   }
>
> -static struct vb2_ops isi_video_qops = {
> +static const struct vb2_ops isi_video_qops = {
>  .queue_setup= queue_setup,
>  .buf_init   = buffer_init,
>  .buf_prepare= buffer_prepare,
> diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c 
> b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> index 785e693..d9c07b8 100644
> --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c
> @@ -2538,7 +2538,7 @@ static void s5p_jpeg_stop_streaming(struct vb2_queue *q)
>  pm_runtime_put(ctx->jpeg->dev);
>   }
>
> -static struct vb2_ops s5p_jpeg_qops = {
> +static const struct vb2_ops s5p_jpeg_qops = {
>  .queue_setup= s5p_jpeg_queue_setup,
>  .buf_prepare= s5p_jpeg_buf_prepare,
>  .buf_queue  = s5p_jpeg_buf_queue,
> diff --git a/drivers/media/platform/ti-vpe/cal.c 
> b/drivers/media/platform/ti-vpe/cal.c
> index e967fcf..44323cb 100644
> --- a/drivers/media/platform/ti-vpe/cal.c
> +++ b/drivers/media/platform/ti-vpe/cal.c
> @@ -1379,7 +1379,7 @@ static void cal_stop_streaming(struct vb2_queue *vq)
>  cal_runtime_put(ctx->dev);
>   }
>
> -static struct vb2_ops cal_video_qops = {
> +static const struct vb2_ops cal_video_qops = {
>  .queue_setup= cal_queue_setup,
>  .buf_prepare= cal_buffer_prepare,
>  .buf_queue  = cal_buffer_queue,
> diff --git a/drivers/media/platform/ti-vpe/vpe.c 
> b/drivers/media/platform/ti-vpe/vpe.c
> index 55a1458..0189f7f 100644
> --- a/drivers/media/platform/ti-vpe/vpe.c
> +++ b/drivers/media/platform/ti-vpe/vpe.c

Re: [PATCH] [media] usb: constify vb2_ops structures

2016-09-09 Thread Laurent Pinchart
Hi Julia,

Thank you for the patch.

On Friday 09 Sep 2016 01:59:01 Julia Lawall wrote:
> Check for vb2_ops structures that are only stored in the ops field of a
> vb2_queue structure.  That field is declared const, so vb2_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // 
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct vb2_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct vb2_queue e;
> position p;
> @@
> e.ops = @p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct vb2_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct vb2_ops i = { ... };
> // 
> 
> Signed-off-by: Julia Lawall 

For

>  drivers/media/usb/uvc/uvc_queue.c   |2 +-

Reviewed-by: Laurent Pinchart 

-- 
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] [media] platform: constify vb2_ops structures

2016-09-09 Thread Laurent Pinchart
Hi Julia,

Thank you for the patch.

On Friday 09 Sep 2016 01:59:10 Julia Lawall wrote:
> Check for vb2_ops structures that are only stored in the ops field of a
> vb2_queue structure.  That field is declared const, so vb2_ops structures
> that have this property can be declared as const also.
> 
> The semantic patch that makes this change is as follows:
> (http://coccinelle.lip6.fr/)
> 
> // 
> @r disable optional_qualifier@
> identifier i;
> position p;
> @@
> static struct vb2_ops i@p = { ... };
> 
> @ok@
> identifier r.i;
> struct vb2_queue e;
> position p;
> @@
> e.ops = @p;
> 
> @bad@
> position p != {r.p,ok.p};
> identifier r.i;
> struct vb2_ops e;
> @@
> e@i@p
> 
> @depends on !bad disable optional_qualifier@
> identifier r.i;
> @@
> static
> +const
>  struct vb2_ops i = { ... };
> // 
> 
> Signed-off-by: Julia Lawall 

For the drivers below,

>  drivers/media/platform/m2m-deinterlace.c |2 +-
>  drivers/media/platform/rcar-vin/rcar-dma.c   |2 +-
>  drivers/media/platform/rcar_jpu.c|2 +-
>  drivers/media/platform/sh_vou.c  |2 +-
>  drivers/media/platform/soc_camera/atmel-isi.c|2 +-
>  drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c |2 +-
>  drivers/media/platform/vim2m.c   |2 +-
>  drivers/media/platform/xilinx/xilinx-dma.c   |2 +-

Reviewed-by: Laurent Pinchart 

For

>  drivers/media/platform/soc_camera/rcar_vin.c |2 +-

you can also add my

Reviewed-by: Laurent Pinchart 

tag, but the driver will be scheduled for removal very soon.

-- 
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 v3 07/10] v4l: fdp1: Remove unused struct fdp1_v4l2_buffer

2016-09-09 Thread Kieran Bingham


On 07/09/16 23:25, Laurent Pinchart wrote:
> The structure is not used, remove it.

Ahh yes, looks like a left over from my first attempt at serialising
input fields.

Reviewed-by: Kieran Bingham 

> Signed-off-by: Laurent Pinchart 
> ---
>  drivers/media/platform/rcar_fdp1.c | 13 -
>  1 file changed, 13 deletions(-)
> 
> diff --git a/drivers/media/platform/rcar_fdp1.c 
> b/drivers/media/platform/rcar_fdp1.c
> index bbeacf1527b5..fdab41165f5a 100644
> --- a/drivers/media/platform/rcar_fdp1.c
> +++ b/drivers/media/platform/rcar_fdp1.c
> @@ -514,19 +514,6 @@ enum fdp1_deint_mode {
>mode == FDP1_PREVFIELD)
>  
>  /*
> - * fdp1_v4l2_buffer: Track v4l2_buffers with a reference count
> - *
> - * As buffers come in, they may be used for more than one field.
> - * It then becomes necessary to track the usage of these buffers,
> - * and only release when the last job has completed using this
> - * vb buffer.
> - */
> -struct fdp1_v4l2_buffer {
> - struct vb2_v4l2_buffer  vb;
> - struct list_headlist;
> -};
> -
> -/*
>   * FDP1 operates on potentially 3 fields, which are tracked
>   * from the VB buffers using this context structure.
>   * Will always be a field or a full frame, never two fields.
> 

-- 
Regards

Kieran Bingham
--
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