cron job: media_tree daily build: OK

2016-05-12 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:   Fri May 13 04:00:22 CEST 2016
git branch: test
git hash:   d1532d5575696965a52b19553dd7dacf75f3fec5
gcc version:i686-linux-gcc (GCC) 5.3.0
sparse version: v0.5.0-56-g7647c77
smatch version: v0.5.0-3428-gdfe27cf
host hardware:  x86_64
host os:4.5.0-164

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

Detailed results are available here:

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

Full logs are available here:

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

The Media Infrastructure API from this daily build is here:

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


Re: [PATCH/RFC v2 2/4] v4l: Add metadata video device type

2016-05-12 Thread Sakari Ailus
Hi Laurent,

Thanks for the patchset!

On Thu, May 12, 2016 at 03:18:01AM +0300, Laurent Pinchart wrote:
> The metadata video device is used to transfer metadata between
> userspace and kernelspace. It supports the metadata buffer type only.

I remember we briefly discussed this before but I have to bring this up
again: do you think we need a different device node type? It depends purely
on the use case for which purpose a DMA engine is used for. The receiver
hardware doesn't even really know whether the data is image data or
metadata; the hardware may well simply write all of it to memory and that's
it.

Should we use a different device node type for metadata, every driver which
uses sensors connected over the CSI-2 bus --- that hardware is designed to
receive metadata using a separate data type which is part of the same stream
--- would be required to create one node for image data and another for
metadata, essentially doubling the number of data device nodes.

Doubling doesn't necessarily sound bad, but modern devices tend to have tens
of DMA engines already.

For what it's worth, multi-plane buffers use video devices as well so this
is not the first time a type of a device node would make use of multiple
buffer types.

-- 
Regards,

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


[PATCH] media: Add a driver for the ov5645 camera sensor.

2016-05-12 Thread Todor Tomov
The ov5645 sensor from Omnivision supports up to 2592x1944
and CSI2 interface.

The driver adds support for the following modes:
- 1280x960
- 1920x1080
- 2592x1944

Output format is packed 8bit UYVY.

Signed-off-by: Todor Tomov 
---
 .../devicetree/bindings/media/i2c/ov5645.txt   |   54 +
 drivers/media/i2c/Kconfig  |   11 +
 drivers/media/i2c/Makefile |1 +
 drivers/media/i2c/ov5645.c | 1344 
 4 files changed, 1410 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5645.txt
 create mode 100644 drivers/media/i2c/ov5645.c

diff --git a/Documentation/devicetree/bindings/media/i2c/ov5645.txt 
b/Documentation/devicetree/bindings/media/i2c/ov5645.txt
new file mode 100644
index 000..1d65fa8
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/i2c/ov5645.txt
@@ -0,0 +1,54 @@
+* Omnivision 1/4-Inch 5Mp CMOS Digital Image Sensor
+
+The Omnivision OV5645 is a 1/4-Inch CMOS active pixel digital image sensor with
+an active array size of 2592H x 1944V. It is programmable through a serial SCCB
+interface.
+
+Required Properties:
+- compatible: value should be "ovti,ov5645"
+- clocks: reference to the xclk clock
+- clock-names: should be "xclk"
+- clock-rates: the xclk clock frequency
+
+Optional Properties:
+- reset-gpio: Chip reset GPIO
+- pwdn-gpio: Chip power down GPIO
+- DOVDD-supply: Chip IO regulator
+- DVDD-supply: Chip core regulator
+- AVDD-supply: Chip analog regulator
+
+The device node must contain one 'port' child node for its digital output
+video port, in accordance with the video interface bindings defined in
+Documentation/devicetree/bindings/media/video-interfaces.txt.
+
+Example:
+
+{
+   ...
+
+   ov5645: ov5645@78 {
+   compatible = "ovti,ov5645";
+   reg = <0x78>;
+
+   pwdn-gpio = < 6 GPIO_ACTIVE_LOW>;
+   reset-gpio = < 20 GPIO_ACTIVE_LOW>;
+   pinctrl-names = "default";
+   pinctrl-0 = <_rear_default>;
+
+   clocks = < 200>;
+   clock-names = "xclk";
+   clock-rates = <2388>;
+
+   DOVDD-supply = <_dovdd_1v8>;
+   AVDD-supply = <_avdd_2v8>;
+   DVDD-supply = <_dvdd_1v2>;
+
+   port {
+   ov5645_ep: endpoint {
+   clock-lanes = <1>;
+   data-lanes = <0 2>;
+   remote-endpoint = <_ep>;
+   };
+   };
+   };
+   };
diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig
index 521bbf1..aa17eba 100644
--- a/drivers/media/i2c/Kconfig
+++ b/drivers/media/i2c/Kconfig
@@ -490,6 +490,17 @@ config VIDEO_OV2659
  To compile this driver as a module, choose M here: the
  module will be called ov2659.
 
+config VIDEO_OV5645
+   tristate "OmniVision OV5645 sensor support"
+   depends on I2C && VIDEO_V4L2
+   depends on MEDIA_CAMERA_SUPPORT
+   ---help---
+ This is a Video4Linux2 sensor-level driver for the OmniVision
+ OV5645 camera.
+
+ To compile this driver as a module, choose M here: the
+ module will be called ov5645.
+
 config VIDEO_OV7640
tristate "OmniVision OV7640 sensor support"
depends on I2C && VIDEO_V4L2
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index 07db257..29003df 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -54,6 +54,7 @@ obj-$(CONFIG_VIDEO_VP27SMPX) += vp27smpx.o
 obj-$(CONFIG_VIDEO_SONY_BTF_MPX) += sony-btf-mpx.o
 obj-$(CONFIG_VIDEO_UPD64031A) += upd64031a.o
 obj-$(CONFIG_VIDEO_UPD64083) += upd64083.o
+obj-$(CONFIG_VIDEO_OV5645) += ov5645.o
 obj-$(CONFIG_VIDEO_OV7640) += ov7640.o
 obj-$(CONFIG_VIDEO_OV7670) += ov7670.o
 obj-$(CONFIG_VIDEO_OV9650) += ov9650.o
diff --git a/drivers/media/i2c/ov5645.c b/drivers/media/i2c/ov5645.c
new file mode 100644
index 000..bae07e4
--- /dev/null
+++ b/drivers/media/i2c/ov5645.c
@@ -0,0 +1,1344 @@
+/*
+ * Driver for the OV5645 camera sensor.
+ *
+ * Copyright (c) 2011-2015, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2015 By Tech Design S.L. All Rights Reserved.
+ * Copyright (C) 2012-2013 Freescale Semiconductor, Inc. All Rights Reserved.
+ *
+ * Based on:
+ * - the OV5645 driver from QC msm-3.10 kernel on codeaurora.org:
+ *   https://us.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/
+ *   media/platform/msm/camera_v2/sensor/ov5645.c?h=LA.BR.1.2.4_rb1.41
+ * - the OV5640 driver posted on linux-media:
+ *   https://www.mail-archive.com/linux-media%40vger.kernel.org/msg92671.html
+ */
+
+/*
+ * This program is free software; you 

[PATCH v2 1/2] vb2: core: Skip planes array verification if pb is NULL

2016-05-12 Thread Sakari Ailus
An earlier patch fixing an input validation issue introduced another
issue: vb2_core_dqbuf() is called with pb argument value NULL in some
cases, causing a NULL pointer dereference. Fix this by skipping the
verification as there's nothing to verify.

Signed-off-by: David R 

Use if () instead of ? :; it's nicer that way. Improve the comment in the
code as well.

Fixes: e7e0c3e26587 ("[media] videobuf2-core: Check user space planes array in 
dqbuf")

Signed-off-by: Sakari Ailus 
Cc: sta...@vger.kernel.org # for v4.4 and later
---
 drivers/media/v4l2-core/videobuf2-core.c | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c 
b/drivers/media/v4l2-core/videobuf2-core.c
index 9fbcb67..633fc1a 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -1648,7 +1648,7 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct 
vb2_buffer **vb,
 void *pb, int nonblocking)
 {
unsigned long flags;
-   int ret;
+   int ret = 0;
 
/*
 * Wait for at least one buffer to become available on the done_list.
@@ -1664,10 +1664,12 @@ static int __vb2_get_done_vb(struct vb2_queue *q, 
struct vb2_buffer **vb,
spin_lock_irqsave(>done_lock, flags);
*vb = list_first_entry(>done_list, struct vb2_buffer, done_entry);
/*
-* Only remove the buffer from done_list if v4l2_buffer can handle all
-* the planes.
+* Only remove the buffer from done_list if all planes can be
+* handled. Some cases such as V4L2 file I/O and DVB have pb
+* == NULL; skip the check then as there's nothing to verify.
 */
-   ret = call_bufop(q, verify_planes_array, *vb, pb);
+   if (pb)
+   ret = call_bufop(q, verify_planes_array, *vb, pb);
if (!ret)
list_del(&(*vb)->done_entry);
spin_unlock_irqrestore(>done_lock, flags);
-- 
2.1.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 v2 0/2] videobuf2: Fix kernel memory overwriting

2016-05-12 Thread Sakari Ailus
Hi folks,

There was a bug in the first version of the set --- the pb argument to
__vb2_get_done_vb() is NULL in cases which did not get tested the last time.

The second patch in the set was reverted for that reason.

This set contains a patch originally from David and again the second
reverted patch to fix the memory corruption issue. The previous set can be
found here:



The patches have been tested with V4L2 streaming and file I/O API but not
with DVB.

-- 
Kind regards,
Sakari

--
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/2] [media] videobuf2-v4l2: Verify planes array in buffer dequeueing

2016-05-12 Thread Sakari Ailus
When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer
which will be dequeued is not known until the buffer has been removed from
the queue. The number of planes is specific to a buffer, not to the queue.

This does lead to the situation where multi-plane buffers may be requested
and queued with n planes, but VIDIOC_DQBUF IOCTL may be passed an argument
struct with fewer planes.

__fill_v4l2_buffer() however uses the number of planes from the dequeued
videobuf2 buffer, overwriting kernel memory (the m.planes array allocated
in video_usercopy() in v4l2-ioctl.c)  if the user provided fewer
planes than the dequeued buffer had. Oops!

Fixes: b0e0e1f83de3 ("[media] media: videobuf2: Prepare to divide videobuf2")

Signed-off-by: Sakari Ailus 
Acked-by: Hans Verkuil 
Cc: sta...@vger.kernel.org # for v4.4 and later
Signed-off-by: Mauro Carvalho Chehab 
---
 drivers/media/v4l2-core/videobuf2-v4l2.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c 
b/drivers/media/v4l2-core/videobuf2-v4l2.c
index 0b1b8c7..7f366f1 100644
--- a/drivers/media/v4l2-core/videobuf2-v4l2.c
+++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
@@ -74,6 +74,11 @@ static int __verify_planes_array(struct vb2_buffer *vb, 
const struct v4l2_buffer
return 0;
 }
 
+static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb)
+{
+   return __verify_planes_array(vb, pb);
+}
+
 /**
  * __verify_length() - Verify that the bytesused value for each plane fits in
  * the plane length and that the data offset doesn't exceed the bytesused 
value.
@@ -437,6 +442,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
 }
 
 static const struct vb2_buf_ops v4l2_buf_ops = {
+   .verify_planes_array= __verify_planes_array_core,
.fill_user_buffer   = __fill_v4l2_buffer,
.fill_vb2_buffer= __fill_vb2_buffer,
.copy_timestamp = __copy_timestamp,
-- 
2.1.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


CHECK MESSAGE.

2016-05-12 Thread ttg_account4
I have profitable business opportunity i would like to introduce to you, reply 
with your name and your location.

Best regards, 
Mr. Matthew Daniels.
--
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/9] [media] : v4l: add Mediatek compressed video block format

2016-05-12 Thread Tiffany Lin
Add V4L2_PIX_FMT_MT21 format used on MT8173 driver.
It is compressed format and need MT8173 MDP driver to transfer to other 
standard format.

Signed-off-by: Tiffany Lin 
---
 include/uapi/linux/videodev2.h |1 +
 1 file changed, 1 insertion(+)

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 8f95191..52feea6 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -625,6 +625,7 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_Y8I  v4l2_fourcc('Y', '8', 'I', ' ') /* Greyscale 
8-bit L/R interleaved */
 #define V4L2_PIX_FMT_Y12I v4l2_fourcc('Y', '1', '2', 'I') /* Greyscale 
12-bit L/R interleaved */
 #define V4L2_PIX_FMT_Z16  v4l2_fourcc('Z', '1', '6', ' ') /* Depth data 
16-bit */
+#define V4L2_PIX_FMT_MT21 v4l2_fourcc('M', 'T', '2', '1') /* Mediatek 
compressed block mode  */
 
 /* SDR formats - used only for Software Defined Radio devices */
 #define V4L2_SDR_FMT_CU8  v4l2_fourcc('C', 'U', '0', '8') /* IQ u8 */
-- 
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/9] [media] DocBook/v4l: Add compressed video formats used on MT8173 codec driver

2016-05-12 Thread Tiffany Lin
Add V4L2_PIX_FMT_MT21 documentation

Signed-off-by: Tiffany Lin 
---
 Documentation/DocBook/media/v4l/pixfmt.xml |6 ++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml 
b/Documentation/DocBook/media/v4l/pixfmt.xml
index 5a08aee..d40e0ce 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -1980,6 +1980,12 @@ array. Anything what's in between the UYVY lines is JPEG 
data and should be
 concatenated to form the JPEG stream. 
 
  
+ 
+   V4L2_PIX_FMT_MT21
+   'MT21'
+   Compressed two-planar YVU420 format used by Mediatek MT8173
+   codec driver.
+ 

   
 
-- 
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/9] Add MT8173 Video Decoder Driver

2016-05-12 Thread Tiffany Lin
==
 Introduction
==

The purpose of this series is to add the driver for video codec hw embedded in 
the Mediatek's MT8173 SoCs.
Mediatek Video Codec is able to handle video decoding of in a range of formats.

This patch series add Mediatek block format V4L2_PIX_FMT_MT21, the decoder 
driver will decoded bitstream to
V4L2_PIX_FMT_MT21 format.

This patch series rely on MTK VPU driver in patch series "Add MT8173 Video 
Encoder Driver and VPU Driver"[1]
and patch "CHROMIUM: v4l: Add V4L2_PIX_FMT_VP9 definition"[2] for VP9 support.
Mediatek Video Decoder driver rely on VPU driver to load, communicate with VPU.

Internally the driver uses videobuf2 framework and MTK IOMMU and MTK SMI both 
have been merged in v4.6-rc1.

[1]https://patchwork.linuxtv.org/patch/33734/
[2]https://chromium-review.googlesource.com/#/c/245241/

==
 Device interface
==

In principle the driver bases on v4l2 memory-to-memory framework:
it provides a single video node and each opened file handle gets its own 
private context with separate
buffer queues. Each context consist of 2 buffer queues: OUTPUT (for source 
buffers, i.e. bitstream)
and CAPTURE (for destination buffers, i.e. decoded video frames).
OUTPUT and CAPTURE buffer could be MMAP or DMABUF memory type.
VIDIOC_G_CTRL and VIDIOC_G_EXT_CTRLS return V4L2_CID_MIN_BUFFERS_FOR_CAPTURE 
only when dirver in MTK_STATE_HEADER
state, or it will return EAGAIN.
Driver do not support subscribe event for control 'User Controls' for now.
And it default support export DMABUF for other display drivers.

Change in v2:
1. Add documentation for V4L2_PIX_FMT_MT21
2. Remove DRM_FORMAT_MT21
3. Refine code according to review comments

v4l2-compliance test output:
localhost Encode # ./v4l2-compliance -d /dev/video0
Driver Info:
Driver name   : mtk-vcodec-dec
Card type : platform:mt8173
Bus info  : platform:mt8173
Driver version: 4.4.0
Capabilities  : 0x84204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps   : 0x04204000
Video Memory-to-Memory Multiplanar
Streaming
Extended Pix Format

Compliance test for device /dev/video0 (not using libv4l2):

Required ioctls:
test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second video open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls:
test VIDIOC_QUERYCTRL/MENU: OK
fail: 
../../../v4l-utils-1.6.0/utils/v4l2-compliance/v4l2-test-controls.cpp(357): 
g_ctrl returned an error (11)
test VIDIOC_G/S_CTRL: FAIL
fail: 
../../../v4l-utils-1.6.0/utils/v4l2-compliance/v4l2-test-controls.cpp(579): 
g_ext_ctrls returned an error (11)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
fail: 
../../../v4l-utils-1.6.0/utils/v4l2-compliance/v4l2-test-controls.cpp(721): 
subscribe event for control 'User Controls' failed
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: FAIL
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 2 Private Controls: 0

Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
fail: 
../../../v4l-utils-1.6.0/utils/v4l2-compliance/v4l2-test-formats.cpp(405): 
expected EINVAL, but got 11 when getting format for buftype 9
test VIDIOC_G_FMT: FAIL
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)


[PATCH v2 4/9] dt-bindings: Add a binding for Mediatek Video Decoder

2016-05-12 Thread Tiffany Lin
Add a DT binding documentation of Video Decoder for the
MT8173 SoC from Mediatek.

Signed-off-by: Tiffany Lin 
---
 .../devicetree/bindings/media/mediatek-vcodec.txt  |   50 ++--
 1 file changed, 46 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt 
b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
index 59a47a5..9aa8848 100644
--- a/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
+++ b/Documentation/devicetree/bindings/media/mediatek-vcodec.txt
@@ -1,25 +1,67 @@
 Mediatek Video Codec
 
 Mediatek Video Codec is the video codec hw present in Mediatek SoCs which
-supports high resolution encoding functionalities.
+supports high resolution encoding and decoding functionalities.
 
 Required properties:
 - compatible : "mediatek,mt8173-vcodec-enc" for encoder
+  "mediatek,mt8173-vcodec-dec" for decoder.
 - reg : Physical base address of the video codec registers and length of
   memory mapped region.
 - interrupts : interrupt number to the cpu.
 - mediatek,larb : must contain the local arbiters in the current Socs.
 - clocks : list of clock specifiers, corresponding to entries in
   the clock-names property.
-- clock-names: encoder must contain "venc_sel_src", "venc_sel",
-- "venc_lt_sel_src", "venc_lt_sel".
+- clock-names: encoder must contain "venc_sel_src", "venc_sel",,
+  "venc_lt_sel_src", "venc_lt_sel", decoder must contain "vcodecpll",
+  "univpll_d2", "clk_cci400_sel", "vdec_sel", "vdecpll".
 - iommus : should point to the respective IOMMU block with master port as
   argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
   for details.
 - mediatek,vpu : the node of video processor unit
 
+
 Example:
-vcodec_enc: vcodec@0x18002000 {
+
+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>,   /*VP8_VD*/
+  <0 0x16027000 0 0x800>,   /*VP6_VD*/
+  <0 0x16027800 0 0x800>,   /*VP8_VL*/
+  <0 0x16028400 0 0x400>;   /*VP9_VD*/
+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>;
+clock-names = "vcodecpll",
+  "univpll_d2",
+  "clk_cci400_sel",   
+  "vdec_sel",  
+  "vdecpll";
+  };
+
+  vcodec_enc: vcodec@0x18002000 {
 compatible = "mediatek,mt8173-vcodec-enc";
 reg = <0 0x18002000 0 0x1000>,/*VENC_SYS*/
   <0 0x19002000 0 0x1000>;/*VENC_LT_SYS*/
-- 
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 9/9] arm64: dts: mediatek: Add Video Decoder for MT8173

2016-05-12 Thread Tiffany Lin
Add video decoder node for MT8173

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

diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi 
b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
index 348ce0e..8c9e3b6 100644
--- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi
@@ -691,6 +691,44 @@
#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>;
+   clock-names = "vcodecpll",
+ "univpll_d2",
+ "clk_cci400_sel",
+ "vdec_sel",
+ "vdecpll";
+   };
+
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 7/9] [media] vcodec: mediatek: Add Mediatek VP8 Video Decoder Driver

2016-05-12 Thread Tiffany Lin
Add vp8 decoder driver for MT8173

Signed-off-by: PC Chen 
Signed-off-by: Tiffany Lin 
---
 drivers/media/platform/mtk-vcodec/Makefile |1 +
 .../media/platform/mtk-vcodec/vdec/vdec_vp8_if.c   |  632 
 drivers/media/platform/mtk-vcodec/vdec_drv_if.c|3 +
 3 files changed, 636 insertions(+)
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c

diff --git a/drivers/media/platform/mtk-vcodec/Makefile 
b/drivers/media/platform/mtk-vcodec/Makefile
index 58243ed..7743c81 100644
--- a/drivers/media/platform/mtk-vcodec/Makefile
+++ b/drivers/media/platform/mtk-vcodec/Makefile
@@ -4,6 +4,7 @@ obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \
   mtk-vcodec-common.o
 
 mtk-vcodec-dec-y := vdec/vdec_h264_if.o \
+   vdec/vdec_vp8_if.o \
mtk_vcodec_dec_drv.o \
vdec_drv_if.o \
vdec_vpu_if.o \
diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c 
b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c
new file mode 100644
index 000..cd9b190
--- /dev/null
+++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c
@@ -0,0 +1,632 @@
+/*
+ * Copyright (c) 2016 MediaTek Inc.
+ * Author: Jungchang Tsao 
+ *PC Chen 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include "../mtk_vcodec_intr.h"
+#include "../vdec_vpu_if.h"
+#include "../vdec_drv_base.h"
+
+/* Decoding picture buffer size (3 reference frames plus current frame) */
+#define VP8_DPB_SIZE   4
+
+/* HW working buffer size (bytes) */
+#define VP8_WORKING_BUF_SZ (45 * 4096)
+
+/* HW control register address */
+#define VP8_SEGID_DRAM_ADDR0x3c
+#define VP8_HW_VLD_ADDR0x93C
+#define VP8_HW_VLD_VALUE   0x940
+#define VP8_BSASET 0x100
+#define VP8_BSDSET 0x104
+#define VP8_RW_CKEN_SET0x0
+#define VP8_RW_DCM_CON 0x18
+#define VP8_WO_VLD_SRST0x108
+#define VP8_RW_MISC_SYS_SEL0x84
+#define VP8_RW_MISC_SPEC_CON   0xC8
+#define VP8_WO_VLD_SRST0x108
+#define VP8_RW_VP8_CTRL0xA4
+#define VP8_RW_MISC_DCM_CON0xEC
+#define VP8_RW_MISC_SRST   0xF4
+#define VP8_RW_MISC_FUNC_CON   0xCC
+
+#define VP8_MAX_FRM_BUF_NUM5
+#define VP8_MAX_FRM_BUF_NODE_NUM   (VP8_MAX_FRM_BUF_NUM * 2)
+
+/* required buffer size (bytes) to store decode information */
+#define VP8_HW_SEGMENT_DATA_SZ 272
+#define VP8_HW_SEGMENT_UINT4
+
+#define VP8_DEC_TABLE_PROC_LOOP96
+#define VP8_DEC_TABLE_UNIT 3
+#define VP8_DEC_TABLE_SZ   300
+#define VP8_DEC_TABLE_OFFSET   2
+#define VP8_DEC_TABLE_RW_UNIT  4
+
+/**
+ * struct vdec_vp8_dec_info - decode misc information
+ * @working_buf_dma   : working buffer dma address
+ * @prev_y_dma: previous decoded frame buffer Y plane address
+ * @cur_y_fb_dma  : current plane Y frame buffer dma address
+ * @cur_c_fb_dma  : current plane C frame buffer dma address
+ * @bs_dma   : bitstream dma address
+ * @bs_sz: bitstream size
+ * @resolution_changed: resolution change flag 1 - changed,  0 - not change
+ * @show_frame   : display this frame or not
+ * @wait_key_frame: wait key frame coming
+ */
+struct vdec_vp8_dec_info {
+   uint64_t working_buf_dma;
+   uint64_t prev_y_dma;
+   uint64_t cur_y_fb_dma;
+   uint64_t cur_c_fb_dma;
+   uint64_t bs_dma;
+   uint32_t bs_sz;
+   uint32_t resolution_changed;
+   uint32_t show_frame;
+   uint32_t wait_key_frame;
+};
+
+/**
+ * struct vdec_vp8_vsi - VPU shared information
+ * @dec: decoding information
+ * @pic: picture information
+ * @dec_table  : decoder coefficient table
+ * @segment_buf: segmentation buffer
+ * @load_data  : flag to indicate reload decode data
+ */
+struct vdec_vp8_vsi {
+   struct vdec_vp8_dec_info dec;
+   struct vdec_pic_info pic;
+   uint32_t dec_table[VP8_DEC_TABLE_SZ];
+   uint32_t segment_buf[VP8_HW_SEGMENT_DATA_SZ][VP8_HW_SEGMENT_UINT];
+   uint32_t load_data;
+};
+
+/**
+ * struct vdec_vp8_hw_reg_base - HW register base
+ * @sys: base address for sys
+ * @misc   : base 

[PATCH v2 8/9] [media] vcodec: mediatek: Add Mediatek VP9 Video Decoder Driver

2016-05-12 Thread Tiffany Lin
Add vp9 decoder driver for MT8173

Signed-off-by: Tiffany Lin 
---
 drivers/media/platform/mtk-vcodec/Makefile |1 +
 .../media/platform/mtk-vcodec/vdec/vdec_vp9_if.c   |  947 
 drivers/media/platform/mtk-vcodec/vdec_drv_if.c|3 +
 3 files changed, 951 insertions(+)
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c

diff --git a/drivers/media/platform/mtk-vcodec/Makefile 
b/drivers/media/platform/mtk-vcodec/Makefile
index 7743c81..852d969 100644
--- a/drivers/media/platform/mtk-vcodec/Makefile
+++ b/drivers/media/platform/mtk-vcodec/Makefile
@@ -5,6 +5,7 @@ obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \
 
 mtk-vcodec-dec-y := vdec/vdec_h264_if.o \
vdec/vdec_vp8_if.o \
+   vdec/vdec_vp9_if.o \
mtk_vcodec_dec_drv.o \
vdec_drv_if.o \
vdec_vpu_if.o \
diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c 
b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
new file mode 100644
index 000..d2b36fd
--- /dev/null
+++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
@@ -0,0 +1,947 @@
+/*
+ * Copyright (c) 2016 MediaTek Inc.
+ * Author: Daniel Hsiao 
+ * Kai-Sean Yang 
+ * Tiffany Lin 
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * version 2 as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include "../mtk_vcodec_intr.h"
+#include "../vdec_drv_base.h"
+#include "../vdec_vpu_if.h"
+
+#define VP9_SUPER_FRAME_BS_SZ 64
+#define MAX_VP9_DPB_SIZE   9
+
+#define REFS_PER_FRAME 3
+#define MAX_NUM_REF_FRAMES 8
+#define VP9_MAX_FRM_BUF_NUM 9
+#define VP9_MAX_FRM_BUF_NODE_NUM (VP9_MAX_FRM_BUF_NUM * 2)
+#define MAX_CODED_WIDTH4096U
+#define MAX_CODED_HEIGHT   2304U
+
+
+struct vdec_vp9_frm_hdr {
+   unsigned int width;
+   unsigned int height;
+   unsigned char show_frame;
+};
+
+struct vdec_vp9_work_buf {
+   unsigned int buf_w;
+   unsigned int buf_h;
+   struct mtk_vcodec_mem mv_buf;
+};
+
+struct vp9_input_ctx {
+   unsigned long v_fifo_sa;
+   unsigned long v_fifo_ea;
+   unsigned long p_fifo_sa;
+   unsigned long p_fifo_ea;
+   unsigned long v_frm_sa;
+   unsigned long v_frm_ea;
+   unsigned long p_frm_sa;
+   unsigned long p_frm_end;
+   unsigned int frm_sz;
+   unsigned int uncompress_sz;
+};
+
+struct vp9_dram_buf {
+   unsigned long va;
+   unsigned long pa;
+   unsigned int sz;
+   unsigned int vpua;
+};
+
+struct vp9_fb_info {
+   struct vdec_fb *fb;
+   struct vp9_dram_buf y_buf;
+   struct vp9_dram_buf c_buf;
+   struct vp9_dram_buf ufo_len_y;
+   struct vp9_dram_buf ufo_len_c;
+   unsigned int y_width;
+   unsigned int y_height;
+   unsigned int y_crop_width;
+   unsigned int y_crop_height;
+
+   unsigned int c_width;
+   unsigned int c_height;
+   unsigned int c_crop_width;
+   unsigned int c_crop_height;
+
+   unsigned int frm_num;
+};
+
+struct vp9_ref_cnt_buf {
+   struct vp9_fb_info buf;
+   unsigned int ref_cnt;
+};
+
+struct vp9_scale_factors {
+   int x_scale_fp;
+   int y_scale_fp;
+   int x_step_q4;
+   int y_step_q4;
+   unsigned int ref_scaling_en;
+};
+
+struct vp9_ref_buf {
+   struct vp9_fb_info *buf;
+   struct vp9_scale_factors scale_factors;
+   unsigned int idx;
+};
+
+struct vp9_sf_ref_fb {
+   struct vdec_fb fb;
+   int used;
+   int idx;
+};
+
+/*
+ * struct vdec_vp9_vsi - shared buffer between host and VPU firmware
+ */
+struct vdec_vp9_vsi {
+   unsigned char sf_bs_buf[VP9_SUPER_FRAME_BS_SZ];
+   struct vp9_sf_ref_fb sf_ref_fb[VP9_MAX_FRM_BUF_NUM-1];
+   int sf_next_ref_fb_idx;
+   unsigned int sf_frm_cnt;
+   unsigned int sf_frm_offset[VP9_MAX_FRM_BUF_NUM-1];
+   unsigned int sf_frm_sz[VP9_MAX_FRM_BUF_NUM-1];
+   unsigned int sf_frm_idx;
+   unsigned int sf_init;
+   struct vdec_fb fb;
+   struct mtk_vcodec_mem bs;
+   struct vdec_fb cur_fb;
+   unsigned int pic_w;
+   unsigned int pic_h;
+   unsigned int buf_w;
+   unsigned int buf_h;
+   unsigned int buf_sz_y_bs;
+   unsigned int buf_sz_c_bs;
+   unsigned int buf_len_sz_y;
+   unsigned int buf_len_sz_c;
+   unsigned int profile;
+   unsigned int show_frame;
+   unsigned int show_existing_frame;
+   unsigned int frm_to_show;
+   unsigned 

[PATCH v2 5/9] [Media] vcodec: mediatek: Add Mediatek V4L2 Video Decoder Driver

2016-05-12 Thread Tiffany Lin
Add v4l2 layer decoder driver for MT8173

Signed-off-by: Tiffany Lin 
---
 drivers/media/platform/mtk-vcodec/Makefile |   10 +-
 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 1336 
 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h |   81 ++
 .../media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c |  440 +++
 .../media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c  |  154 +++
 .../media/platform/mtk-vcodec/mtk_vcodec_dec_pm.h  |   28 +
 drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h |   81 +-
 .../media/platform/mtk-vcodec/mtk_vcodec_intr.h|2 +-
 .../media/platform/mtk-vcodec/mtk_vcodec_util.c|   10 +-
 drivers/media/platform/mtk-vcodec/vdec_drv_base.h  |   56 +
 drivers/media/platform/mtk-vcodec/vdec_drv_if.c|  113 ++
 drivers/media/platform/mtk-vcodec/vdec_drv_if.h|   93 ++
 drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h   |  103 ++
 13 files changed, 2491 insertions(+), 16 deletions(-)
 create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
 create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.h
 create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
 create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.c
 create mode 100644 drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_pm.h
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec_drv_base.h
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec_drv_if.c
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec_drv_if.h
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h

diff --git a/drivers/media/platform/mtk-vcodec/Makefile 
b/drivers/media/platform/mtk-vcodec/Makefile
index dc5cb00..4c8ed2f 100644
--- a/drivers/media/platform/mtk-vcodec/Makefile
+++ b/drivers/media/platform/mtk-vcodec/Makefile
@@ -1,7 +1,13 @@
 
 
-obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-enc.o mtk-vcodec-common.o
-
+obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \
+  mtk-vcodec-enc.o \
+  mtk-vcodec-common.o
+
+mtk-vcodec-dec-y := mtk_vcodec_dec_drv.o \
+   vdec_drv_if.o \
+   mtk_vcodec_dec.o \
+   mtk_vcodec_dec_pm.o \
 
 
 mtk-vcodec-enc-y := venc/venc_vp8_if.o \
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c 
b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
new file mode 100644
index 000..35c2186
--- /dev/null
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
@@ -0,0 +1,1336 @@
+/*
+* Copyright (c) 2016 MediaTek Inc.
+* Author: PC Chen 
+* Tiffany Lin 
+*
+* This program is free software; you can redistribute it and/or modify
+* it under the terms of the GNU General Public License version 2 as
+* published by the Free Software Foundation.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+* GNU General Public License for more details.
+*/
+
+#include 
+#include 
+#include 
+
+#include "mtk_vcodec_drv.h"
+#include "mtk_vcodec_dec.h"
+#include "mtk_vcodec_intr.h"
+#include "mtk_vcodec_util.h"
+#include "vdec_drv_if.h"
+#include "mtk_vcodec_dec_pm.h"
+
+#define OUT_FMT_IDX0
+#define CAP_FMT_IDX3
+
+#define VCODEC_CAPABILITY_4K_DISABLED  0x10
+#define VCODEC_DEC_4K_CODED_WIDTH  4096U
+#define VCODEC_DEC_4K_CODED_HEIGHT 2304U
+
+#define MTK_VDEC_MIN_W 64U
+#define MTK_VDEC_MIN_H 64U
+#define MTK_VDEC_MAX_W 2048U
+#define MTK_VDEC_MAX_H 1088U
+#define DFT_CFG_WIDTH  MTK_VDEC_MIN_W
+#define DFT_CFG_HEIGHT MTK_VDEC_MIN_H
+
+static struct mtk_video_fmt mtk_video_formats[] = {
+   {
+   .fourcc = V4L2_PIX_FMT_H264,
+   .type = MTK_FMT_DEC,
+   .num_planes = 1,
+   },
+   {
+   .fourcc = V4L2_PIX_FMT_VP8,
+   .type = MTK_FMT_DEC,
+   .num_planes = 1,
+   },
+   {
+   .fourcc = V4L2_PIX_FMT_VP9,
+   .type = MTK_FMT_DEC,
+   .num_planes = 1,
+   },
+   {
+   .fourcc = V4L2_PIX_FMT_MT21,
+   .type = MTK_FMT_FRAME,
+   .num_planes = 2,
+   },
+};
+
+static const struct mtk_codec_framesizes mtk_vdec_framesizes[] = {
+   {
+   .fourcc = V4L2_PIX_FMT_H264,
+   .stepwise = {  MTK_VDEC_MIN_W, MTK_VDEC_MAX_W, 16,
+   MTK_VDEC_MIN_H, MTK_VDEC_MAX_H, 16 },
+   },
+   {
+   .fourcc = V4L2_PIX_FMT_VP8,
+   .stepwise = {  MTK_VDEC_MIN_W, MTK_VDEC_MAX_W, 16,
+   MTK_VDEC_MIN_H, MTK_VDEC_MAX_H, 16 },
+   },
+   {
+   .fourcc = V4L2_PIX_FMT_VP9,
+   .stepwise = {  MTK_VDEC_MIN_W, MTK_VDEC_MAX_W, 16,
+   

[PATCH v2 6/9] [media] vcodec: mediatek: Add Mediatek H264 Video Decoder Driver

2016-05-12 Thread Tiffany Lin
Add h264 decoder driver for MT8173

Signed-off-by: PC Chen 
Signed-off-by: Tiffany Lin 
---
 drivers/media/platform/mtk-vcodec/Makefile |5 +-
 .../media/platform/mtk-vcodec/vdec/vdec_h264_if.c  |  504 
 drivers/media/platform/mtk-vcodec/vdec_drv_if.c|4 +
 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c|  168 +++
 drivers/media/platform/mtk-vcodec/vdec_vpu_if.h|   96 
 5 files changed, 775 insertions(+), 2 deletions(-)
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec_vpu_if.c
 create mode 100644 drivers/media/platform/mtk-vcodec/vdec_vpu_if.h

diff --git a/drivers/media/platform/mtk-vcodec/Makefile 
b/drivers/media/platform/mtk-vcodec/Makefile
index 4c8ed2f..58243ed 100644
--- a/drivers/media/platform/mtk-vcodec/Makefile
+++ b/drivers/media/platform/mtk-vcodec/Makefile
@@ -1,11 +1,12 @@
 
-
 obj-$(CONFIG_VIDEO_MEDIATEK_VCODEC) += mtk-vcodec-dec.o \
   mtk-vcodec-enc.o \
   mtk-vcodec-common.o
 
-mtk-vcodec-dec-y := mtk_vcodec_dec_drv.o \
+mtk-vcodec-dec-y := vdec/vdec_h264_if.o \
+   mtk_vcodec_dec_drv.o \
vdec_drv_if.o \
+   vdec_vpu_if.o \
mtk_vcodec_dec.o \
mtk_vcodec_dec_pm.o \
 
diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c 
b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c
new file mode 100644
index 000..fcd92f2
--- /dev/null
+++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c
@@ -0,0 +1,504 @@
+/*
+ * Copyright (c) 2016 MediaTek Inc.
+ * Author: PC Chen 
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include 
+#include 
+
+#include "../mtk_vcodec_intr.h"
+#include "../vdec_vpu_if.h"
+#include "../vdec_drv_base.h"
+
+#define NAL_NON_IDR_SLICE  0x01
+#define NAL_IDR_SLICE  0x05
+#define NAL_H264_PPS   0x08
+#define NAL_TYPE(value)((value) & 0x1F)
+
+#define BUF_PREDICTION_SZ  (32 * 1024)
+
+#define MB_UNIT_LEN16
+
+/* motion vector size (bytes) for every macro block */
+#define HW_MB_STORE_SZ 64
+
+#define H264_MAX_FB_NUM17
+#define HDR_PARSING_BUF_SZ 1024
+
+/**
+ * struct h264_fb - h264 decode frame buffer information
+ * @vdec_fb_va  : virtual address of struct vdec_fb
+ * @y_fb_dma: dma address of Y frame buffer (luma)
+ * @c_fb_dma: dma address of C frame buffer (chroma)
+ * @poc : picture order count of frame buffer
+ * @reserved: for 8 bytes alignment
+ */
+struct h264_fb {
+   uint64_t vdec_fb_va;
+   uint64_t y_fb_dma;
+   uint64_t c_fb_dma;
+   int32_t poc;
+   uint32_t reserved;
+};
+
+/**
+ * struct h264_ring_fb_list - ring frame buffer list
+ * @fb_list   : frame buffer arrary
+ * @read_idx  : read index
+ * @write_idx : write index
+ * @count : buffer count in list
+ */
+struct h264_ring_fb_list {
+   struct h264_fb fb_list[H264_MAX_FB_NUM];
+   unsigned int read_idx;
+   unsigned int write_idx;
+   unsigned int count;
+   unsigned int reserved;
+};
+
+/**
+ * struct vdec_h264_dec_info - decode information
+ * @dpb_sz : decoding picture buffer size
+ * @resolution_changed  : resoltion change happen
+ * @realloc_mv_buf : flag to notify driver to re-allocate mv buffer
+ * @reserved   : for 8 bytes alignment
+ * @bs_dma : Input bit-stream buffer dma address
+ * @y_fb_dma   : Y frame buffer dma address
+ * @c_fb_dma   : C frame buffer dma address
+ * @vdec_fb_va : VDEC frame buffer struct virtual address
+ */
+struct vdec_h264_dec_info {
+   uint32_t dpb_sz;
+   uint32_t resolution_changed;
+   uint32_t realloc_mv_buf;
+   uint32_t reserved;
+   uint64_t bs_dma;
+   uint64_t y_fb_dma;
+   uint64_t c_fb_dma;
+   uint64_t vdec_fb_va;
+};
+
+/**
+ * struct vdec_h264_vsi - shared memory for decode information exchange
+ *between VPU and Host.
+ *The memory is allocated by VPU then mapping to Host
+ *in vpu_dec_init() and freed in vpu_dec_deinit()
+ *by VPU.
+ *AP-W/R : AP is writer/reader on this item
+ *  

[PATCH v2 1/9] [media] VPU: mediatek: Add decode support

2016-05-12 Thread Tiffany Lin
From: Andrew-CT Chen 

VPU driver add decode support

Signed-off-by: Andrew-CT Chen 
Signed-off-by: Tiffany Lin 
---
 drivers/media/platform/mtk-vpu/mtk_vpu.c |   12 
 drivers/media/platform/mtk-vpu/mtk_vpu.h |   27 +++
 2 files changed, 39 insertions(+)

diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c 
b/drivers/media/platform/mtk-vpu/mtk_vpu.c
index b60d02c..ca23b1f 100644
--- a/drivers/media/platform/mtk-vpu/mtk_vpu.c
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c
@@ -134,6 +134,8 @@ struct vpu_wdt {
  *
  * @signaled:  the signal of vpu initialization completed
  * @fw_ver:VPU firmware version
+ * @dec_capability:decoder capability which is not used for now and
+ * the value is reserved for future use
  * @enc_capability:encoder capability which is not used for now and
  * the value is reserved for future use
  * @wq:wait queue for VPU initialization status
@@ -141,6 +143,7 @@ struct vpu_wdt {
 struct vpu_run {
u32 signaled;
char fw_ver[VPU_FW_VER_LEN];
+   unsigned intdec_capability;
unsigned intenc_capability;
wait_queue_head_t wq;
 };
@@ -415,6 +418,14 @@ int vpu_wdt_reg_handler(struct platform_device *pdev,
 }
 EXPORT_SYMBOL_GPL(vpu_wdt_reg_handler);
 
+unsigned int vpu_get_vdec_hw_capa(struct platform_device *pdev)
+{
+   struct mtk_vpu *vpu = platform_get_drvdata(pdev);
+
+   return vpu->run.dec_capability;
+}
+EXPORT_SYMBOL_GPL(vpu_get_vdec_hw_capa);
+
 unsigned int vpu_get_venc_hw_capa(struct platform_device *pdev)
 {
struct mtk_vpu *vpu = platform_get_drvdata(pdev);
@@ -600,6 +611,7 @@ static void vpu_init_ipi_handler(void *data, unsigned int 
len, void *priv)
 
vpu->run.signaled = run->signaled;
strncpy(vpu->run.fw_ver, run->fw_ver, VPU_FW_VER_LEN);
+   vpu->run.dec_capability = run->dec_capability;
vpu->run.enc_capability = run->enc_capability;
wake_up_interruptible(>run.wq);
 }
diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.h 
b/drivers/media/platform/mtk-vpu/mtk_vpu.h
index 5ab37f0..f457479 100644
--- a/drivers/media/platform/mtk-vpu/mtk_vpu.h
+++ b/drivers/media/platform/mtk-vpu/mtk_vpu.h
@@ -37,6 +37,18 @@ typedef void (*ipi_handler_t) (void *data,
 command to VPU.
 For other IPI below, AP should send the request
 to VPU to trigger the interrupt.
+ * @IPI_VDEC_H264:  The interrupt from vpu is to notify kernel to
+handle H264 vidoe decoder job, and vice versa.
+Decode output format is always MT21 no matter what
+the input format is.
+ * @IPI_VDEC_VP8:   The interrupt from is to notify kernel to
+handle VP8 video decoder job, and vice versa.
+Decode output format is always MT21 no matter what
+the input format is.
+ * @IPI_VDEC_VP9:   The interrupt from vpu is to notify kernel to
+handle VP9 video decoder job, and vice versa.
+Decode output format is always MT21 no matter what
+the input format is.
  * @IPI_VENC_H264:  The interrupt from vpu is to notify kernel to
 handle H264 video encoder job, and vice versa.
  * @IPI_VENC_VP8:   The interrupt fro vpu is to notify kernel to
@@ -46,6 +58,9 @@ typedef void (*ipi_handler_t) (void *data,
 
 enum ipi_id {
IPI_VPU_INIT = 0,
+   IPI_VDEC_H264,
+   IPI_VDEC_VP8,
+   IPI_VDEC_VP9,
IPI_VENC_H264,
IPI_VENC_VP8,
IPI_MAX,
@@ -55,10 +70,12 @@ enum ipi_id {
  * enum rst_id - reset id to register reset function for VPU watchdog timeout
  *
  * @VPU_RST_ENC: encoder reset id
+ * @VPU_RST_DEC: decoder reset id
  * @VPU_RST_MAX: maximum reset id
  */
 enum rst_id {
VPU_RST_ENC,
+   VPU_RST_DEC,
VPU_RST_MAX,
 };
 
@@ -125,6 +142,16 @@ struct platform_device *vpu_get_plat_device(struct 
platform_device *pdev);
 int vpu_wdt_reg_handler(struct platform_device *pdev,
void vpu_wdt_reset_func(void *),
void *priv, enum rst_id id);
+
+/**
+ * vpu_get_vdec_hw_capa - get video decoder hardware capability
+ *
+ * @pdev:  VPU platform device
+ *
+ * Return: video decoder hardware capability
+ **/
+unsigned int vpu_get_vdec_hw_capa(struct platform_device *pdev);
+
 /**
  * vpu_get_venc_hw_capa - get video encoder hardware capability
  *
-- 
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] [media] af9035: fix for MXL5007T devices with I2C read issues

2016-05-12 Thread Alessandro Radicati
The MXL5007T tuner will lock-up on some devices after an I2C
read transaction.  This patch works around this issue by inhibiting such
operations and emulating a 0x00 response.  The workaround is only applied to
USB devices known to exhibit this flaw.

Signed-off-by: Alessandro Radicati 
---
 drivers/media/usb/dvb-usb-v2/af9035.c | 21 +
 drivers/media/usb/dvb-usb-v2/af9035.h |  1 +
 2 files changed, 22 insertions(+)

diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c 
b/drivers/media/usb/dvb-usb-v2/af9035.c
index 2638e32..06e300e 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.c
+++ b/drivers/media/usb/dvb-usb-v2/af9035.c
@@ -348,6 +348,9 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
 
ret = af9035_rd_regs(d, reg, [1].buf[0],
msg[1].len);
+   } else if (state->no_read) {
+   memset(msg[1].buf, 0, msg[1].len);
+   ret = 0;
} else {
/* I2C write + read */
u8 buf[MAX_XFER_SIZE];
@@ -421,6 +424,9 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
if (msg[0].len > 40) {
/* TODO: correct limits > 40 */
ret = -EOPNOTSUPP;
+   } else if (state->no_read) {
+   memset(msg[0].buf, 0, msg[0].len);
+   ret = 0;
} else {
/* I2C read */
u8 buf[5];
@@ -962,6 +968,21 @@ skip_eeprom:
state->af9033_config[i].clock = clock_lut_af9035[tmp];
}
 
+   state->no_read = false;
+   /* Some MXL5007T devices cannot properly handle tuner I2C read ops. */
+   if (state->af9033_config[0].tuner == AF9033_TUNER_MXL5007T &&
+   le16_to_cpu(d->udev->descriptor.idVendor) == USB_VID_AVERMEDIA)
+
+   switch (le16_to_cpu(d->udev->descriptor.idProduct)) {
+   case USB_PID_AVERMEDIA_A867:
+   case USB_PID_AVERMEDIA_TWINSTAR:
+   dev_info(>udev->dev,
+   "%s: Device may have issues with I2C read 
operations. Enabling fix.\n",
+   KBUILD_MODNAME);
+   state->no_read = true;
+   break;
+   }
+
return 0;
 
 err:
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.h 
b/drivers/media/usb/dvb-usb-v2/af9035.h
index 89e629a..c91d1a3 100644
--- a/drivers/media/usb/dvb-usb-v2/af9035.h
+++ b/drivers/media/usb/dvb-usb-v2/af9035.h
@@ -62,6 +62,7 @@ struct state {
u8 chip_version;
u16 chip_type;
u8 dual_mode:1;
+   u8 no_read:1;
u16 eeprom_addr;
u8 af9033_i2c_addr[2];
struct af9033_config af9033_config[2];
-- 
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] Revert "[media] videobuf2-v4l2: Verify planes array in buffer dequeueing"

2016-05-12 Thread Sakari Ailus
Hi Nicolas,

Nicolas Dufresne wrote:
> Le mercredi 11 mai 2016 à 13:27 -0300, Mauro Carvalho Chehab a écrit :
>> This patch causes a Kernel panic when called on a DVB driver.
>>
>> This reverts commit 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab.
> 
> Seems rather tricky, since this commit fixed a possible (user induced)
> buffer overflow according to Sakari comment. Would be nice to fix and
> resubmit.

I have updated patches here:



These are tested on V4L2 streaming API only so far, I'll test file I/O
today but with DVB I'd need some help with testing. I'd very much
appreciate test reports if someone has a chance to test the two patches
with a DVB adapter using VB2.

Thanks.

-- 
Kind regards,

Sakari Ailus
sakari.ai...@linux.intel.com
--
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] Revert "[media] videobuf2-v4l2: Verify planes array in buffer dequeueing"

2016-05-12 Thread Nicolas Dufresne
Le mercredi 11 mai 2016 à 13:27 -0300, Mauro Carvalho Chehab a écrit :
> This patch causes a Kernel panic when called on a DVB driver.
> 
> This reverts commit 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab.

Seems rather tricky, since this commit fixed a possible (user induced)
buffer overflow according to Sakari comment. Would be nice to fix and
resubmit.

> 
> Cc: Sakari Ailus 
> Cc: Hans Verkuil 
> Cc: sta...@vgar.kernel.org
> Fixes: 2c1f6951a8a8 ("[media] videobuf2-v4l2: Verify planes array in
> buffer dequeueing")
> Signed-off-by: Mauro Carvalho Chehab 
> ---
>  drivers/media/v4l2-core/videobuf2-v4l2.c | 6 --
>  1 file changed, 6 deletions(-)
> 
> diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c
> b/drivers/media/v4l2-core/videobuf2-v4l2.c
> index 7f366f1b0377..0b1b8c7b6ce5 100644
> --- a/drivers/media/v4l2-core/videobuf2-v4l2.c
> +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c
> @@ -74,11 +74,6 @@ static int __verify_planes_array(struct vb2_buffer
> *vb, const struct v4l2_buffer
>   return 0;
>  }
>  
> -static int __verify_planes_array_core(struct vb2_buffer *vb, const
> void *pb)
> -{
> - return __verify_planes_array(vb, pb);
> -}
> -
>  /**
>   * __verify_length() - Verify that the bytesused value for each
> plane fits in
>   * the plane length and that the data offset doesn't exceed the
> bytesused value.
> @@ -442,7 +437,6 @@ static int __fill_vb2_buffer(struct vb2_buffer
> *vb,
>  }
>  
>  static const struct vb2_buf_ops v4l2_buf_ops = {
> - .verify_planes_array= __verify_planes_array_core,
>   .fill_user_buffer   = __fill_v4l2_buffer,
>   .fill_vb2_buffer= __fill_vb2_buffer,
>   .copy_timestamp = __copy_timestamp,
--
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


[CFP] SIGGRAPH ASIA 2016 Emerging Technologies (E-Tech): Submission deadline is getting close.

2016-05-12 Thread Yuichi Itoh
SIGGRAPH ASIA 2016 Emerging Technologies (E-Tech): Submission deadline
is getting close. Please visit SA16 website and submit your work!

SIGGRAPH ASIA 2016 Website:
https://sa2016.siggraph.org/en/

Research on interactive technologies is an important academic
discipline to investigate a fundamental problem of relationship
between technology and human. In order to drive this research to be
able to widely help human's life in the future, propulsion of research
by making actually working prototypes with novel technological
innovations is crucial. Through the experience of using or enjoying
the demonstration of such prototypes, we can learn the progress of
technology, we can imagine our future lives, or we can conceive
further sophisticated ideas.
Interactive technology has been one of the most important inseparable
wheels of SIGGRAPH and SIGGRAPH Asia, and the Emerging Technologies
program has played a vital role in driving the development of research
communities to pursue technological innovations and to make a great
impact on the public.
At SIGGRAPH Asia 2016 we are looking for submissions that use novel
interactive technologies which have possibilities to bring benefits,
usefulness, or comfort, into our future lives.
These technologies may include, but are not limited to:

- 3D interaction
- Augmented human
- Brain-machine interface/brain-computer interface
- Collaborative technologies
- Device technologies
- Display technologies
- Embodiment interaction
- Haptics
- Illusion/actuality
- Interaction technologies
- Interactive visualization and other graphics technologies
- Multi-/cross-modality
- Perception/cognition
- Physical computing
- Robotics
- Sensors
- Social interaction
- Tangible UI
- Technologies for everyday life, food and kitchen
- Telepresence / Tele-existence
- Virtual and augmented reality

Feel free to submit your work even if it does not fall under the list
of categories above. If it is new, cool, and exciting, we want to see
it at SIGGRAPH Asia 2016!
To encourage submissions from industry, you can choose either
“industrial” or “academic” with your submission. If your work mainly
contributes to the progress of academic discipline in the field of
interactive technologies, you should choose the “academic track”. On
the other hand, if your work is a prototype of a new product which is
(almost) on the market and expected to provide an impact to consumers,
you should choose the “industrial track”. You can choose both
categories if your work satisfies both features. Submissions in each
category are reviewed individually according to their own evaluation
criteria.
The main form of presentation at Emerging Technologies is a live,
working, hands-on demonstration. It is essential that your work can be
effectively demonstrated by the time the conference opens in December.
To ensure this, the submission process requires all submitters to
provide extensive technical, logistical, and practical documentation.
Running an Emerging Technologies demo is hard work, but it is also
very rewarding. Your work will be experienced by thousands of people
and widely reported in media. We invite submissions from academic
institutions as well as corporations and individuals. All submissions
will be peer-reviewed by experts in relevant fields, and the final
selections will be made by the Emerging Technologies program committee
members.
Accepted Emerging Technologies works will be presented as on-going
demonstrations throughout SIGGRAPH Asia 2016 in Macao, China.
Technical support will be provided to make the most of each demo. If
your work is accepted, you will have the opportunity to give a
technical presentation, advertised in the conference program. Media
outreach efforts will be organized to further increase awareness and
publicity. A promotional video will be widely distributed, and an
extended abstract and video of each exhibit will be distributed
through the ACM Digital Library for SIGGRAPH Asia 2016. In addition,
if you want to give an oral presentation about your work, you may do
so during the Emerging Technologies Talks session at SIGGRAPH Asia
2016.
Some of the accepted Emerging Technologies works will be chosen as
"Emerging Technologies Prize" by the Emerging Technologies program
committee members and reviewers at the event venue. The quality of
work, how they are demonstrated onsite, and how attractive attendees
view the works are criteria upon which each work will be judged.
Emerging Technologies is the most important inseparable wheels of both
SIGGRAPH and SIGGRAPH Asia, because SIGGRAPH is a conference on
Computer Graphics and Interactive Techniques. The goal of Emerging
Technologies is to gather and show such submissions as novel
interactive technologies that have possibilities to bring benefits,
usefulness, or comfort, into our future lives.

The deadline for submission to the Emerging Technologies program is 23
May 2016, 23:59 UTC/GMT. Please return to this page often for further
submission details