Direct Cash Loan SA Guarantee 3.5% Fixed Interest Rate!!!

2016-06-08 Thread DIRECT CASH LOAN SA
Welcome To Direct Cash Loan At 3.5% Interest Rate!!!


Dear Valued Customer,

Consolidate your debts with Direct Cash Loan SA for your peace of mind at a 
fixed interest rate of 3.5%, personal and business loans are also welcome.For 
details open enclosed documents and file in your applications by sending an 
email to: infodirec...@fastservice.com


Yours in Service,

Lydia Venter (Mrs.),

Supervisor Loan Application Team

Direct Cash Loan SA

Tel No:+27622539768

Email:infodirec...@fastservice.com


Direct Cash Loan Low Rate Offer.docx
Description: MS-Word 2007 document


cron job: media_tree daily build: ERRORS

2016-06-08 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:   Thu Jun  9 04:00:14 CEST 2016
git branch: test
git hash:   4566b2543d89542cdd7fe940579787a160eba883
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-264

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-pxa: OK
linux-git-blackfin-bf561: ERRORS
linux-git-i686: OK
linux-git-m32r: OK
linux-git-mips: ERRORS
linux-git-powerpc64: OK
linux-git-sh: OK
linux-git-x86_64: OK
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: OK
linux-3.3.8-i686: OK
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: OK
linux-4.7-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: OK
linux-3.3.8-x86_64: OK
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: OK
linux-4.7-rc1-x86_64: OK
apps: OK
spec-git: OK
sparse: WARNINGS
smatch: WARNINGS

Detailed results are available here:

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

Full logs are available here:

http://www.xs4all.nl/~hverkuil/logs/Thursday.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


[PATCH 1/2] [media] s5p-mfc: fix typo in s5p_mfc_dec function comment

2016-06-08 Thread Javier Martinez Canillas
The function comment has an obvious typo error, so fix it.

Signed-off-by: Javier Martinez Canillas 
---

 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index a01a373a4c4f..8e2ee1a0df2b 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -564,7 +564,7 @@ out:
return ret;
 }
 
-/* Reqeust buffers */
+/* Request buffers */
 static int vidioc_reqbufs(struct file *file, void *priv,
  struct v4l2_requestbuffers *reqbufs)
 {
-- 
2.5.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 2/2] [media] s5p-mfc: don't print errors on VIDIOC_REQBUFS unsupported mem type

2016-06-08 Thread Javier Martinez Canillas
The V4L2 documentation says that applications must call the VIDIOC_REQBUFS
ioctl to determine if a memory mapped, user pointer or DMABUF based I/O is
supported by the driver.

For example GStreamer does this by first calling VIDIOC_REQBUFS with count
zero for all the possible streaming I/O methods and then finally doing the
real VIDIOC_REQBUFS with count N using a known to be supported memory type.

But the driver prints an error on VIDIOC_REQBUFS if the memory type is not
supported which leads to the following errors that can confuse the users:

[  178.704390] vidioc_reqbufs:575: Only V4L2_MEMORY_MMAP is supported
[  178.704666] vidioc_reqbufs:575: Only V4L2_MEMORY_MMAP is supported
[  178.714956] vidioc_reqbufs:575: Only V4L2_MEMORY_MMAP is supported
[  178.715229] vidioc_reqbufs:575: Only V4L2_MEMORY_MMAP is supported

Signed-off-by: Javier Martinez Canillas 

---

 drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
index 8e2ee1a0df2b..038215c198ac 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
@@ -572,7 +572,7 @@ static int vidioc_reqbufs(struct file *file, void *priv,
struct s5p_mfc_ctx *ctx = fh_to_ctx(priv);
 
if (reqbufs->memory != V4L2_MEMORY_MMAP) {
-   mfc_err("Only V4L2_MEMORY_MMAP is supported\n");
+   mfc_debug(2, "Only V4L2_MEMORY_MMAP is supported\n");
return -EINVAL;
}
 
-- 
2.5.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] media: s5p-mfc fix memory leak in s5p_mfc_remove()

2016-06-08 Thread Shuah Khan
s5p_mfc_remove() fails to release encoder and decoder video devices.

Signed-off-by: Shuah Khan 
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 274b4f1..af61f54 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1317,7 +1317,9 @@ static int s5p_mfc_remove(struct platform_device *pdev)
destroy_workqueue(dev->watchdog_workqueue);
 
video_unregister_device(dev->vfd_enc);
+   video_device_release(dev->vfd_enc);
video_unregister_device(dev->vfd_dec);
+   video_device_release(dev->vfd_dec);
v4l2_device_unregister(>v4l2_dev);
s5p_mfc_release_firmware(dev);
vb2_dma_contig_cleanup_ctx(dev->alloc_ctx[0]);
-- 
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: s5p-mfc fix video device release double release in probe error path

2016-06-08 Thread Shuah Khan
Fix Decoder and encoder video device double release in probe error path.
video_device_release(dev->vfd_dec) get called twice if decoder register
fails. Also, video_device_release(dev->vfd_enc) get called twice if encoder
register fails.

Signed-off-by: Shuah Khan 
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 6ee620e..274b4f1 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1266,7 +1266,6 @@ static int s5p_mfc_probe(struct platform_device *pdev)
ret = video_register_device(dev->vfd_dec, VFL_TYPE_GRABBER, 0);
if (ret) {
v4l2_err(>v4l2_dev, "Failed to register video device\n");
-   video_device_release(dev->vfd_dec);
goto err_dec_reg;
}
v4l2_info(>v4l2_dev,
@@ -1275,7 +1274,6 @@ static int s5p_mfc_probe(struct platform_device *pdev)
ret = video_register_device(dev->vfd_enc, VFL_TYPE_GRABBER, 0);
if (ret) {
v4l2_err(>v4l2_dev, "Failed to register video device\n");
-   video_device_release(dev->vfd_enc);
goto err_enc_reg;
}
v4l2_info(>v4l2_dev,
-- 
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 0/5] R-Car VSP: Add CLU support

2016-06-08 Thread Laurent Pinchart
Hello,

This patch series adds support for the Cubic Look Up table (CLU) to the vsp1
driver.

The first three patches are small unrelated fixes, I've included them here to
get them review and they will be added to the next pull request for the vsp1
driver. Patch 4/5 replaces the custom ioctl used to configure the 1D lookup
table (LUT) by an array control, to align it with the CLU API. This isn't an
issue as there's no user of this API with the mainline kernel.

Finally patch 5/5 adds support for the CLU, exposing the look-up table
contents through a control. The look-up table being quite large, I will likely
work on supporting partial control updates in the control framework at some
point. Feel free to beat me to it.

Laurent Pinchart (5):
  v4l: vsp1: pipe: Fix typo in comment
  v4l: vsp1: dl: Don't free fragments with interrupts disabled
  v4l: vsp1: lut: Initialize the mutex
  v4l: vsp1: lut: Expose configuration through a control
  v4l: vsp1: Add Cubic Look Up Table (CLU) support

 drivers/media/platform/vsp1/Makefile  |   2 +-
 drivers/media/platform/vsp1/vsp1.h|   3 +
 drivers/media/platform/vsp1/vsp1_clu.c| 276 ++
 drivers/media/platform/vsp1/vsp1_clu.h|  44 +
 drivers/media/platform/vsp1/vsp1_dl.c |  72 ++--
 drivers/media/platform/vsp1/vsp1_drv.c|  25 ++-
 drivers/media/platform/vsp1/vsp1_entity.c |   1 +
 drivers/media/platform/vsp1/vsp1_entity.h |   1 +
 drivers/media/platform/vsp1/vsp1_lut.c|  72 +---
 drivers/media/platform/vsp1/vsp1_lut.h|   6 +-
 drivers/media/platform/vsp1/vsp1_pipe.h   |   2 +-
 drivers/media/platform/vsp1/vsp1_regs.h   |   9 +
 include/uapi/linux/vsp1.h |  34 
 13 files changed, 465 insertions(+), 82 deletions(-)
 create mode 100644 drivers/media/platform/vsp1/vsp1_clu.c
 create mode 100644 drivers/media/platform/vsp1/vsp1_clu.h
 delete mode 100644 include/uapi/linux/vsp1.h

-- 
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 1/5] v4l: vsp1: pipe: Fix typo in comment

2016-06-08 Thread Laurent Pinchart
The vsp1_pipeline wq field is a wait queue, not a work queue. Fix the
comment accordingly.

Signed-off-by: Laurent Pinchart 
---
 drivers/media/platform/vsp1/vsp1_pipe.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/vsp1/vsp1_pipe.h 
b/drivers/media/platform/vsp1/vsp1_pipe.h
index 3ecd3c1794a9..2cbf1a5ea1fb 100644
--- a/drivers/media/platform/vsp1/vsp1_pipe.h
+++ b/drivers/media/platform/vsp1/vsp1_pipe.h
@@ -61,7 +61,7 @@ enum vsp1_pipeline_state {
  * @pipe: the media pipeline
  * @irqlock: protects the pipeline state
  * @state: current state
- * @wq: work queue to wait for state change completion
+ * @wq: wait queue to wait for state change completion
  * @frame_end: frame end interrupt handler
  * @lock: protects the pipeline use count and stream count
  * @kref: pipeline reference count
-- 
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 3/5] v4l: vsp1: lut: Initialize the mutex

2016-06-08 Thread Laurent Pinchart
The LUT mutex isn't initialized when creating the LUT, fix it.

Signed-off-by: Laurent Pinchart 
---
 drivers/media/platform/vsp1/vsp1_lut.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/vsp1/vsp1_lut.c 
b/drivers/media/platform/vsp1/vsp1_lut.c
index 2c367cb9755c..9a2c55b3570a 100644
--- a/drivers/media/platform/vsp1/vsp1_lut.c
+++ b/drivers/media/platform/vsp1/vsp1_lut.c
@@ -201,6 +201,8 @@ struct vsp1_lut *vsp1_lut_create(struct vsp1_device *vsp1)
if (lut == NULL)
return ERR_PTR(-ENOMEM);
 
+   mutex_init(>lock);
+
lut->entity.ops = _entity_ops;
lut->entity.type = VSP1_ENTITY_LUT;
 
-- 
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 4/5] v4l: vsp1: lut: Expose configuration through a control

2016-06-08 Thread Laurent Pinchart
Replace the custom ioctl with a V4L2 control in order to standardize the
API.

Signed-off-by: Laurent Pinchart 
---
 drivers/media/platform/vsp1/vsp1_lut.c | 74 ++
 drivers/media/platform/vsp1/vsp1_lut.h |  6 +--
 include/uapi/linux/vsp1.h  | 34 
 3 files changed, 52 insertions(+), 62 deletions(-)
 delete mode 100644 include/uapi/linux/vsp1.h

diff --git a/drivers/media/platform/vsp1/vsp1_lut.c 
b/drivers/media/platform/vsp1/vsp1_lut.c
index 9a2c55b3570a..4c2d1e3ddaf0 100644
--- a/drivers/media/platform/vsp1/vsp1_lut.c
+++ b/drivers/media/platform/vsp1/vsp1_lut.c
@@ -13,7 +13,6 @@
 
 #include 
 #include 
-#include 
 
 #include 
 
@@ -35,43 +34,60 @@ static inline void vsp1_lut_write(struct vsp1_lut *lut, 
struct vsp1_dl_list *dl,
 }
 
 /* 
-
- * V4L2 Subdevice Core Operations
+ * Controls
  */
 
-static int lut_set_table(struct vsp1_lut *lut, struct vsp1_lut_config *config)
+#define V4L2_CID_VSP1_LUT_TABLE(V4L2_CID_USER_BASE + 1)
+
+static int lut_set_table(struct vsp1_lut *lut, struct v4l2_ctrl *ctrl)
 {
struct vsp1_dl_body *dlb;
unsigned int i;
 
-   dlb = vsp1_dl_fragment_alloc(lut->entity.vsp1, ARRAY_SIZE(config->lut));
+   dlb = vsp1_dl_fragment_alloc(lut->entity.vsp1, 256);
if (!dlb)
return -ENOMEM;
 
-   for (i = 0; i < ARRAY_SIZE(config->lut); ++i)
+   for (i = 0; i < 256; ++i)
vsp1_dl_fragment_write(dlb, VI6_LUT_TABLE + 4 * i,
-  config->lut[i]);
+  ctrl->p_new.p_u32[i]);
 
-   mutex_lock(>lock);
swap(lut->lut, dlb);
-   mutex_unlock(>lock);
 
vsp1_dl_fragment_free(dlb);
return 0;
 }
 
-static long lut_ioctl(struct v4l2_subdev *subdev, unsigned int cmd, void *arg)
+static int lut_s_ctrl(struct v4l2_ctrl *ctrl)
 {
-   struct vsp1_lut *lut = to_lut(subdev);
-
-   switch (cmd) {
-   case VIDIOC_VSP1_LUT_CONFIG:
-   return lut_set_table(lut, arg);
+   struct vsp1_lut *lut =
+   container_of(ctrl->handler, struct vsp1_lut, ctrls);
 
-   default:
-   return -ENOIOCTLCMD;
+   switch (ctrl->id) {
+   case V4L2_CID_VSP1_LUT_TABLE:
+   lut_set_table(lut, ctrl);
+   break;
}
+
+   return 0;
 }
 
+static const struct v4l2_ctrl_ops lut_ctrl_ops = {
+   .s_ctrl = lut_s_ctrl,
+};
+
+static const struct v4l2_ctrl_config lut_table_control = {
+   .ops = _ctrl_ops,
+   .id = V4L2_CID_VSP1_LUT_TABLE,
+   .name = "Look-Up Table",
+   .type = V4L2_CTRL_TYPE_U32,
+   .min = 0x,
+   .max = 0x00ff,
+   .step = 1,
+   .def = 0,
+   .dims = { 256},
+};
+
 /* 
-
  * V4L2 Subdevice Pad Operations
  */
@@ -147,10 +163,6 @@ static int lut_set_format(struct v4l2_subdev *subdev,
  * V4L2 Subdevice Operations
  */
 
-static struct v4l2_subdev_core_ops lut_core_ops = {
-   .ioctl = lut_ioctl,
-};
-
 static struct v4l2_subdev_pad_ops lut_pad_ops = {
.init_cfg = vsp1_entity_init_cfg,
.enum_mbus_code = lut_enum_mbus_code,
@@ -160,7 +172,6 @@ static struct v4l2_subdev_pad_ops lut_pad_ops = {
 };
 
 static struct v4l2_subdev_ops lut_ops = {
-   .core   = _core_ops,
.pad= _pad_ops,
 };
 
@@ -176,12 +187,14 @@ static void lut_configure(struct vsp1_entity *entity,
 
vsp1_lut_write(lut, dl, VI6_LUT_CTRL, VI6_LUT_CTRL_EN);
 
-   mutex_lock(>lock);
+   mutex_lock(lut->ctrls.lock);
+
if (lut->lut) {
vsp1_dl_list_add_fragment(dl, lut->lut);
lut->lut = NULL;
}
-   mutex_unlock(>lock);
+
+   mutex_unlock(lut->ctrls.lock);
 }
 
 static const struct vsp1_entity_operations lut_entity_ops = {
@@ -201,8 +214,6 @@ struct vsp1_lut *vsp1_lut_create(struct vsp1_device *vsp1)
if (lut == NULL)
return ERR_PTR(-ENOMEM);
 
-   mutex_init(>lock);
-
lut->entity.ops = _entity_ops;
lut->entity.type = VSP1_ENTITY_LUT;
 
@@ -211,5 +222,18 @@ struct vsp1_lut *vsp1_lut_create(struct vsp1_device *vsp1)
if (ret < 0)
return ERR_PTR(ret);
 
+   /* Initialize the control handler. */
+   v4l2_ctrl_handler_init(>ctrls, 1);
+   v4l2_ctrl_new_custom(>ctrls, _table_control, NULL);
+
+   lut->entity.subdev.ctrl_handler = >ctrls;
+
+   if (lut->ctrls.error) {
+   dev_err(vsp1->dev, "lut: failed to initialize controls\n");
+   ret = lut->ctrls.error;
+   vsp1_entity_destroy(>entity);
+   return ERR_PTR(ret);
+   }
+
return lut;
 }
diff --git a/drivers/media/platform/vsp1/vsp1_lut.h 
b/drivers/media/platform/vsp1/vsp1_lut.h
index 

[PATCH 5/5] v4l: vsp1: Add Cubic Look Up Table (CLU) support

2016-06-08 Thread Laurent Pinchart
The CLU processing block is a 2D/3D lookup table that converts the input
three color component data into desired three color components using a
lookup table.

Signed-off-by: Laurent Pinchart 
---
 drivers/media/platform/vsp1/Makefile  |   2 +-
 drivers/media/platform/vsp1/vsp1.h|   3 +
 drivers/media/platform/vsp1/vsp1_clu.c| 276 ++
 drivers/media/platform/vsp1/vsp1_clu.h|  44 +
 drivers/media/platform/vsp1/vsp1_drv.c|  25 ++-
 drivers/media/platform/vsp1/vsp1_entity.c |   1 +
 drivers/media/platform/vsp1/vsp1_entity.h |   1 +
 drivers/media/platform/vsp1/vsp1_regs.h   |   9 +
 8 files changed, 354 insertions(+), 7 deletions(-)
 create mode 100644 drivers/media/platform/vsp1/vsp1_clu.c
 create mode 100644 drivers/media/platform/vsp1/vsp1_clu.h

diff --git a/drivers/media/platform/vsp1/Makefile 
b/drivers/media/platform/vsp1/Makefile
index a12356bf2135..8ab6a063569e 100644
--- a/drivers/media/platform/vsp1/Makefile
+++ b/drivers/media/platform/vsp1/Makefile
@@ -1,7 +1,7 @@
 vsp1-y := vsp1_drv.o vsp1_entity.o vsp1_pipe.o
 vsp1-y += vsp1_dl.o vsp1_drm.o vsp1_video.o
 vsp1-y += vsp1_rpf.o vsp1_rwpf.o vsp1_wpf.o
-vsp1-y += vsp1_hsit.o vsp1_lif.o vsp1_lut.o
+vsp1-y += vsp1_clu.o vsp1_hsit.o vsp1_lut.o
 vsp1-y += vsp1_bru.o vsp1_sru.o vsp1_uds.o
 vsp1-y += vsp1_hgo.o vsp1_histo.o
 vsp1-y += vsp1_lif.o
diff --git a/drivers/media/platform/vsp1/vsp1.h 
b/drivers/media/platform/vsp1/vsp1.h
index 6bf6d54c0ae4..f5e58cea36cc 100644
--- a/drivers/media/platform/vsp1/vsp1.h
+++ b/drivers/media/platform/vsp1/vsp1.h
@@ -31,6 +31,7 @@ struct vsp1_drm;
 struct vsp1_entity;
 struct vsp1_platform_data;
 struct vsp1_bru;
+struct vsp1_clu;
 struct vsp1_hgo;
 struct vsp1_hsit;
 struct vsp1_lif;
@@ -48,6 +49,7 @@ struct vsp1_uds;
 #define VSP1_HAS_SRU   (1 << 2)
 #define VSP1_HAS_BRU   (1 << 3)
 #define VSP1_HAS_HGO   (1 << 4)
+#define VSP1_HAS_CLU   (1 << 5)
 
 struct vsp1_device_info {
u32 version;
@@ -68,6 +70,7 @@ struct vsp1_device {
struct rcar_fcp_device *fcp;
 
struct vsp1_bru *bru;
+   struct vsp1_clu *clu;
struct vsp1_hgo *hgo;
struct vsp1_hsit *hsi;
struct vsp1_hsit *hst;
diff --git a/drivers/media/platform/vsp1/vsp1_clu.c 
b/drivers/media/platform/vsp1/vsp1_clu.c
new file mode 100644
index ..5f56b3f14495
--- /dev/null
+++ b/drivers/media/platform/vsp1/vsp1_clu.c
@@ -0,0 +1,276 @@
+/*
+ * vsp1_clu.c  --  R-Car VSP1 Cubic Look-Up Table
+ *
+ * Copyright (C) 2015-2016 Renesas Electronics Corporation
+ *
+ * Contact: Laurent Pinchart (laurent.pinch...@ideasonboard.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include 
+#include 
+
+#include 
+
+#include "vsp1.h"
+#include "vsp1_clu.h"
+#include "vsp1_dl.h"
+
+#define CLU_MIN_SIZE   4U
+#define CLU_MAX_SIZE   8190U
+
+/* 
-
+ * Device Access
+ */
+
+static inline void vsp1_clu_write(struct vsp1_clu *clu, struct vsp1_dl_list 
*dl,
+ u32 reg, u32 data)
+{
+   vsp1_dl_list_write(dl, reg, data);
+}
+
+/* 
-
+ * Controls
+ */
+
+#define V4L2_CID_VSP1_CLU_TABLE(V4L2_CID_USER_BASE + 1)
+#define V4L2_CID_VSP1_CLU_MODE (V4L2_CID_USER_BASE + 2)
+#define V4L2_CID_VSP1_CLU_MODE_2D  0
+#define V4L2_CID_VSP1_CLU_MODE_3D  1
+
+static int clu_set_table(struct vsp1_clu *clu, struct v4l2_ctrl *ctrl)
+{
+   struct vsp1_dl_body *dlb;
+   unsigned int i;
+
+   dlb = vsp1_dl_fragment_alloc(clu->entity.vsp1, 1 + 17 * 17 * 17);
+   if (!dlb)
+   return -ENOMEM;
+
+   vsp1_dl_fragment_write(dlb, VI6_CLU_ADDR, 0);
+   for (i = 0; i < 17 * 17 * 17; ++i)
+   vsp1_dl_fragment_write(dlb, VI6_CLU_DATA, ctrl->p_new.p_u32[i]);
+
+   swap(clu->clu, dlb);
+
+   vsp1_dl_fragment_free(dlb);
+   return 0;
+}
+
+static int clu_s_ctrl(struct v4l2_ctrl *ctrl)
+{
+   struct vsp1_clu *clu =
+   container_of(ctrl->handler, struct vsp1_clu, ctrls);
+
+   switch (ctrl->id) {
+   case V4L2_CID_VSP1_CLU_TABLE:
+   clu_set_table(clu, ctrl);
+   break;
+
+   case V4L2_CID_VSP1_CLU_MODE:
+   clu->mode = ctrl->val;
+   break;
+ 

[PATCH 2/5] v4l: vsp1: dl: Don't free fragments with interrupts disabled

2016-06-08 Thread Laurent Pinchart
Freeing a fragment requires freeing DMA coherent memory, which can't be
performed with interrupts disabled as per the DMA mapping API contract.
The fragments can't thus be freed synchronously when a display list is
recycled. Instead, move the fragments to a garbage list and use a work
queue to run the garbage collection.

Signed-off-by: Laurent Pinchart 
---
 drivers/media/platform/vsp1/vsp1_dl.c | 72 ---
 1 file changed, 58 insertions(+), 14 deletions(-)

diff --git a/drivers/media/platform/vsp1/vsp1_dl.c 
b/drivers/media/platform/vsp1/vsp1_dl.c
index e238d9b9376b..37c3518aa2a8 100644
--- a/drivers/media/platform/vsp1/vsp1_dl.c
+++ b/drivers/media/platform/vsp1/vsp1_dl.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include "vsp1.h"
 #include "vsp1_dl.h"
@@ -92,11 +93,13 @@ enum vsp1_dl_mode {
  * @index: index of the related WPF
  * @mode: display list operation mode (header or headerless)
  * @vsp1: the VSP1 device
- * @lock: protects the active, queued and pending lists
+ * @lock: protects the free, active, queued, pending and gc_fragments lists
  * @free: array of all free display lists
  * @active: list currently being processed (loaded) by hardware
  * @queued: list queued to the hardware (written to the DL registers)
  * @pending: list waiting to be queued to the hardware
+ * @gc_work: fragments garbage collector work struct
+ * @gc_fragments: array of display list fragments waiting to be freed
  */
 struct vsp1_dl_manager {
unsigned int index;
@@ -108,6 +111,9 @@ struct vsp1_dl_manager {
struct vsp1_dl_list *active;
struct vsp1_dl_list *queued;
struct vsp1_dl_list *pending;
+
+   struct work_struct gc_work;
+   struct list_head gc_fragments;
 };
 
 /* 
-
@@ -262,21 +268,10 @@ static struct vsp1_dl_list *vsp1_dl_list_alloc(struct 
vsp1_dl_manager *dlm)
return dl;
 }
 
-static void vsp1_dl_list_free_fragments(struct vsp1_dl_list *dl)
-{
-   struct vsp1_dl_body *dlb, *next;
-
-   list_for_each_entry_safe(dlb, next, >fragments, list) {
-   list_del(>list);
-   vsp1_dl_body_cleanup(dlb);
-   kfree(dlb);
-   }
-}
-
 static void vsp1_dl_list_free(struct vsp1_dl_list *dl)
 {
vsp1_dl_body_cleanup(>body0);
-   vsp1_dl_list_free_fragments(dl);
+   list_splice_init(>fragments, >dlm->gc_fragments);
kfree(dl);
 }
 
@@ -311,7 +306,16 @@ static void __vsp1_dl_list_put(struct vsp1_dl_list *dl)
if (!dl)
return;
 
-   vsp1_dl_list_free_fragments(dl);
+   /* We can't free fragments here as DMA memory can only be freed in
+* interruptible context. Move all fragments to the display list
+* manager's list of fragments to be freed, they will be
+* garbage-collected by the work queue.
+*/
+   if (!list_empty(>fragments)) {
+   list_splice_init(>fragments, >dlm->gc_fragments);
+   schedule_work(>dlm->gc_work);
+   }
+
dl->body0.num_entries = 0;
 
list_add_tail(>list, >dlm->free);
@@ -550,6 +554,40 @@ void vsp1_dlm_reset(struct vsp1_dl_manager *dlm)
dlm->pending = NULL;
 }
 
+/*
+ * Free all fragments awaiting to be garbage-collected.
+ *
+ * This function must be called without the display list manager lock held.
+ */
+static void vsp1_dlm_fragments_free(struct vsp1_dl_manager *dlm)
+{
+   unsigned long flags;
+
+   spin_lock_irqsave(>lock, flags);
+
+   while (!list_empty(>gc_fragments)) {
+   struct vsp1_dl_body *dlb;
+
+   dlb = list_first_entry(>gc_fragments, struct vsp1_dl_body,
+  list);
+   list_del(>list);
+
+   spin_unlock_irqrestore(>lock, flags);
+   vsp1_dl_fragment_free(dlb);
+   spin_lock_irqsave(>lock, flags);
+   }
+
+   spin_unlock_irqrestore(>lock, flags);
+}
+
+static void vsp1_dlm_garbage_collect(struct work_struct *work)
+{
+   struct vsp1_dl_manager *dlm =
+   container_of(work, struct vsp1_dl_manager, gc_work);
+
+   vsp1_dlm_fragments_free(dlm);
+}
+
 struct vsp1_dl_manager *vsp1_dlm_create(struct vsp1_device *vsp1,
unsigned int index,
unsigned int prealloc)
@@ -568,6 +606,8 @@ struct vsp1_dl_manager *vsp1_dlm_create(struct vsp1_device 
*vsp1,
 
spin_lock_init(>lock);
INIT_LIST_HEAD(>free);
+   INIT_LIST_HEAD(>gc_fragments);
+   INIT_WORK(>gc_work, vsp1_dlm_garbage_collect);
 
for (i = 0; i < prealloc; ++i) {
struct vsp1_dl_list *dl;
@@ -589,8 +629,12 @@ void vsp1_dlm_destroy(struct vsp1_dl_manager *dlm)
if (!dlm)
return;
 
+   cancel_work_sync(>gc_work);
+
list_for_each_entry_safe(dl, 

Re: [PATCH v4 1/2] [media] atmel-isc: add the Image Sensor Controller code

2016-06-08 Thread Boris Brezillon
Hi Songjun,

On Tue, 7 Jun 2016 15:11:52 +0800
Songjun Wu  wrote:

> Add driver for the Image Sensor Controller. It manages
> incoming data from a parallel based CMOS/CCD sensor.
> It has an internal image processor, also integrates a
> triple channel direct memory access controller master
> interface.
> 
> Signed-off-by: Songjun Wu 
> ---
> 
> Changes in v4:
> - Modify the isc clock code since the dt is changed.
> 
> Changes in v3:
> - Add pm runtime feature.
> - Modify the isc clock code since the dt is changed.
> 
> Changes in v2:
> - Add "depends on COMMON_CLK" and "VIDEO_V4L2_SUBDEV_API"
>   in Kconfig file.
> - Correct typos and coding style according to Laurent's remarks
> - Delete the loop while in 'isc_clk_enable' function.
> - Add the code to support VIDIOC_CREATE_BUFS in
>   'isc_queue_setup' function.
> - Invoke isc_config to configure register in
>   'isc_start_streaming' function.
> - Add the struct completion 'comp' to synchronize with
>   the frame end interrupt in 'isc_stop_streaming' function.
> - Check the return value of the clk_prepare_enable
>   in 'isc_open' function.
> - Set the default format in 'isc_open' function.
> - Add an exit condition in the loop while in 'isc_config'.
> - Delete the hardware setup operation in 'isc_set_format'.
> - Refuse format modification during streaming
>   in 'isc_s_fmt_vid_cap' function.
> - Invoke v4l2_subdev_alloc_pad_config to allocate and
>   initialize the pad config in 'isc_async_complete' function.
> - Remove the '.owner  = THIS_MODULE,' in atmel_isc_driver.
> - Replace the module_platform_driver_probe() with
>   module_platform_driver().
> 
>  drivers/media/platform/Kconfig|1 +
>  drivers/media/platform/Makefile   |2 +
>  drivers/media/platform/atmel/Kconfig  |9 +
>  drivers/media/platform/atmel/Makefile |1 +
>  drivers/media/platform/atmel/atmel-isc-regs.h |  276 +
>  drivers/media/platform/atmel/atmel-isc.c  | 1580 
> +
>  6 files changed, 1869 insertions(+)
>  create mode 100644 drivers/media/platform/atmel/Kconfig
>  create mode 100644 drivers/media/platform/atmel/Makefile
>  create mode 100644 drivers/media/platform/atmel/atmel-isc-regs.h
>  create mode 100644 drivers/media/platform/atmel/atmel-isc.c
> 
> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> index 84e041c..91d7aea 100644
> --- a/drivers/media/platform/Kconfig
> +++ b/drivers/media/platform/Kconfig
> @@ -110,6 +110,7 @@ source "drivers/media/platform/exynos4-is/Kconfig"
>  source "drivers/media/platform/s5p-tv/Kconfig"
>  source "drivers/media/platform/am437x/Kconfig"
>  source "drivers/media/platform/xilinx/Kconfig"
> +source "drivers/media/platform/atmel/Kconfig"
>  
>  config VIDEO_TI_CAL
>   tristate "TI CAL (Camera Adaptation Layer) driver"
> diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
> index bbb7bd1..ad8f471 100644
> --- a/drivers/media/platform/Makefile
> +++ b/drivers/media/platform/Makefile
> @@ -55,4 +55,6 @@ obj-$(CONFIG_VIDEO_AM437X_VPFE) += am437x/
>  
>  obj-$(CONFIG_VIDEO_XILINX)   += xilinx/
>  
> +obj-$(CONFIG_VIDEO_ATMEL_ISC)+= atmel/
> +
>  ccflags-y += -I$(srctree)/drivers/media/i2c
> diff --git a/drivers/media/platform/atmel/Kconfig 
> b/drivers/media/platform/atmel/Kconfig
> new file mode 100644
> index 000..867dca2
> --- /dev/null
> +++ b/drivers/media/platform/atmel/Kconfig
> @@ -0,0 +1,9 @@
> +config VIDEO_ATMEL_ISC
> + tristate "ATMEL Image Sensor Controller (ISC) support"
> + depends on VIDEO_V4L2 && COMMON_CLK && VIDEO_V4L2_SUBDEV_API && HAS_DMA
> + depends on ARCH_AT91 || COMPILE_TEST
> + select VIDEOBUF2_DMA_CONTIG
> + select REGMAP_MMIO
> + help
> +This module makes the ATMEL Image Sensor Controller available
> +as a v4l2 device.
> \ No newline at end of file
> diff --git a/drivers/media/platform/atmel/Makefile 
> b/drivers/media/platform/atmel/Makefile
> new file mode 100644
> index 000..9d7c999
> --- /dev/null
> +++ b/drivers/media/platform/atmel/Makefile
> @@ -0,0 +1 @@
> +obj-$(CONFIG_VIDEO_ATMEL_ISC) += atmel-isc.o
> diff --git a/drivers/media/platform/atmel/atmel-isc-regs.h 
> b/drivers/media/platform/atmel/atmel-isc-regs.h
> new file mode 100644
> index 000..dda9396
> --- /dev/null
> +++ b/drivers/media/platform/atmel/atmel-isc-regs.h
> @@ -0,0 +1,276 @@
> +#ifndef __ATMEL_ISC_REGS_H
> +#define __ATMEL_ISC_REGS_H
> +
> +#include 
> +
> +/* ISC Control Enable Register 0 */
> +#define ISC_CTRLEN  0x
> +
> +#define ISC_CTRLEN_CAPTURE  BIT(0)
> +#define ISC_CTRLEN_CAPTURE_MASK BIT(0)
> +
> +#define ISC_CTRLEN_UPPROBIT(1)
> +#define ISC_CTRLEN_UPPRO_MASK   BIT(1)
> +
> +#define ISC_CTRLEN_HISREQ   BIT(2)
> +#define ISC_CTRLEN_HISREQ_MASK  BIT(2)
> +
> +#define ISC_CTRLEN_HISCLR

Re: [PATCH] media: s5p-mfc: fix error path in driver probe

2016-06-08 Thread Shuah Khan
Hi Marek,

On 06/08/2016 08:35 AM, Liviu Dudau wrote:
> On Wed, Jun 08, 2016 at 01:33:40PM +0200, Marek Szyprowski wrote:
>> This patch fixes the error path in the driver probe, so in case of
>> any failure, the resources are not leaked.
>>
>> Reported-by: Liviu Dudau 
>> Signed-off-by: Marek Szyprowski 
> 
> Looks good to me now! If it is useful:
> 
> Acked-by: Liviu Dudau 
> 
>> ---
>>  drivers/media/platform/s5p-mfc/s5p_mfc.c | 14 +-
>>  1 file changed, 9 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c 
>> b/drivers/media/platform/s5p-mfc/s5p_mfc.c
>> index 6ee620ee8cd5..1f3a7ee753db 100644
>> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
>> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
>> @@ -1159,7 +1159,10 @@ static int s5p_mfc_probe(struct platform_device *pdev)
>>  dev->variant = mfc_get_drv_data(pdev);
>>  
>>  res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> -
>> +if (res == NULL) {
>> +dev_err(>dev, "failed to get io resource\n");
>> +return -ENOENT;
>> +}
>>  dev->regs_base = devm_ioremap_resource(>dev, res);
>>  if (IS_ERR(dev->regs_base))
>>  return PTR_ERR(dev->regs_base);
>> @@ -1167,15 +1170,14 @@ static int s5p_mfc_probe(struct platform_device 
>> *pdev)
>>  res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>>  if (res == NULL) {
>>  dev_err(>dev, "failed to get irq resource\n");
>> -ret = -ENOENT;
>> -goto err_res;
>> +return -ENOENT;
>>  }
>>  dev->irq = res->start;
>>  ret = devm_request_irq(>dev, dev->irq, s5p_mfc_irq,
>>  0, pdev->name, dev);
>>  if (ret) {
>>  dev_err(>dev, "Failed to install irq (%d)\n", ret);
>> -goto err_res;
>> +return ret;
>>  }
>>  
>>  ret = s5p_mfc_configure_dma_memory(dev);
>> @@ -1187,7 +1189,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
>>  ret = s5p_mfc_init_pm(dev);
>>  if (ret < 0) {
>>  dev_err(>dev, "failed to get mfc clock source\n");
>> -return ret;
>> +goto err_dma;
>>  }
>>  
>>  vb2_dma_contig_set_max_seg_size(dev->mem_dev_l, DMA_BIT_MASK(32));
>> @@ -1301,6 +1303,8 @@ err_mem_init_ctx_1:
>>  vb2_dma_contig_cleanup_ctx(dev->alloc_ctx[0]);
>>  err_res:

While you are at it, could you change this to err_pm. err_res doesn't
match the actual failure.

thanks,
-- Shuah

>>  s5p_mfc_final_pm(dev);
>> +err_dma:
>> +s5p_mfc_unconfigure_dma_memory(dev);
>>  
>>  pr_debug("%s-- with error\n", __func__);
>>  return ret;
>> -- 
>> 1.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: Digital Devices CI adapter problem

2016-06-08 Thread Devin Heitmueller
On Wed, Jun 8, 2016 at 4:10 PM, Marcin Kałuża
 wrote:
> Hello!
> I'm looking for someone who was able to successfully use Octopus Dual
> CI bridge by Digital Devices under Linux. We got it _almost_ working -
> we have a strange problem of the module dropping TS packets in sets of
> 30-33 packets rather randomly and this corrupts the whole stream.
>
> Their support ignored the ticket so far
> (http://support.digital-devices.eu/ticket.php?track=UG1-B42-NSGV=marcin.kaluza%40trioptimum.com=51010)
> and we're slowly running out of options.
>
> We've tried rebuilding the module using streaming dma api
> (DDB_ALT_DMA), we changed the kernel (our 3.18.22 and 4.2.3 from FC
> 23), disabled smp, still the same.
>
> Strange things happen when I call read() to get data back from CI, if
> I use any other buffer size then their internal dma buffer (672*188),
> I sometimes get the data not in order I wrote them (we use test TS
> stream with a counter inside ts payload), and the strangest of all -
> if I use bigger buffer (i.e. 1000*188), read() always returns that
> value (188000), but actual amount of content in my read buffer vary
> greatly (although never exeeds their buffer size of 672*188) - we
> clear the read buffer before each read so we know how much data was
> actually read. That's probably a bug, but I have no idea how can this
> even happen (their code
> (https://github.com/DigitalDevices/dddvb/blob/master/ddbridge/ddbridge-core.c#L772)
> looks quite ok as for my not so great knowledge of linux kernel driver
> coding). Has anyone encountered similar problems? It looks like a race
> condition of some sort, but I was unable find/fix it.
>
> I'll be most grateful for any reply/suggestions/help...
> Martin

This mailing list generally isn't for vendors' out-of-kernel drivers.
If Digital Devices wants to not be responsive to users who bought
their products and wants the community to provide free tech support
for their devices, they should get their drivers merged upstream.  :-)

That said, the math in ddb_input_read() looks pretty wonky.  The fact
that it always returns count (i.e. the size of the buffer provided
from userland), without taking into account how much data is actually
in the ring buffer certainly looks wrong.  If there isn't enough data
available, it should return the amount of data that *is* available,
not the size of the buffer passed in from userland.

I would add some more logging to that routine and see what's going on.
You'll probably have to take some time to understand what the actual
buffer filling algorithm is supposed to be for that hardware in order
to figure out what's going wrong.

Devin

-- 
Devin J. Heitmueller - Kernel Labs
http://www.kernellabs.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


Digital Devices CI adapter problem

2016-06-08 Thread Marcin Kałuża
Hello!
I'm looking for someone who was able to successfully use Octopus Dual
CI bridge by Digital Devices under Linux. We got it _almost_ working -
we have a strange problem of the module dropping TS packets in sets of
30-33 packets rather randomly and this corrupts the whole stream.

Their support ignored the ticket so far
(http://support.digital-devices.eu/ticket.php?track=UG1-B42-NSGV=marcin.kaluza%40trioptimum.com=51010)
and we're slowly running out of options.

We've tried rebuilding the module using streaming dma api
(DDB_ALT_DMA), we changed the kernel (our 3.18.22 and 4.2.3 from FC
23), disabled smp, still the same.

Strange things happen when I call read() to get data back from CI, if
I use any other buffer size then their internal dma buffer (672*188),
I sometimes get the data not in order I wrote them (we use test TS
stream with a counter inside ts payload), and the strangest of all -
if I use bigger buffer (i.e. 1000*188), read() always returns that
value (188000), but actual amount of content in my read buffer vary
greatly (although never exeeds their buffer size of 672*188) - we
clear the read buffer before each read so we know how much data was
actually read. That's probably a bug, but I have no idea how can this
even happen (their code
(https://github.com/DigitalDevices/dddvb/blob/master/ddbridge/ddbridge-core.c#L772)
looks quite ok as for my not so great knowledge of linux kernel driver
coding). Has anyone encountered similar problems? It looks like a race
condition of some sort, but I was unable find/fix it.

I'll be most grateful for any reply/suggestions/help...
Martin
--
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] of: reserved_mem: restore old behavior when no region is defined

2016-06-08 Thread Sumit Semwal
On 8 June 2016 at 18:35, Rob Herring  wrote:
> On Wed, Jun 8, 2016 at 1:51 AM, Marek Szyprowski
>  wrote:
>> Change return value back to -ENODEV when no region is defined for given
>> device. This restores old behavior of this function, as some drivers rely
>> on such error code.
>>
>> Reported-by: Liviu Dudau 
>> Fixes: 59ce4039727ef40 ("of: reserved_mem: add support for using more than
>>one region for given device")
>> Signed-off-by: Marek Szyprowski 
>> ---
>>  drivers/of/of_reserved_mem.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
Looks reasonable; FWIW
Reviewed-by: Sumit Semwal 
> Acked-by: Rob Herring 
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel



-- 
Thanks and regards,

Sumit Semwal
Linaro Mobile Group - Kernel Team Lead
Linaro.org │ Open source software for ARM SoCs
--
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: s5p-mfc: fix error path in driver probe

2016-06-08 Thread Liviu Dudau
On Wed, Jun 08, 2016 at 01:33:40PM +0200, Marek Szyprowski wrote:
> This patch fixes the error path in the driver probe, so in case of
> any failure, the resources are not leaked.
> 
> Reported-by: Liviu Dudau 
> Signed-off-by: Marek Szyprowski 

Looks good to me now! If it is useful:

Acked-by: Liviu Dudau 

> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc.c | 14 +-
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c 
> b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> index 6ee620ee8cd5..1f3a7ee753db 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> @@ -1159,7 +1159,10 @@ static int s5p_mfc_probe(struct platform_device *pdev)
>   dev->variant = mfc_get_drv_data(pdev);
>  
>   res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -
> + if (res == NULL) {
> + dev_err(>dev, "failed to get io resource\n");
> + return -ENOENT;
> + }
>   dev->regs_base = devm_ioremap_resource(>dev, res);
>   if (IS_ERR(dev->regs_base))
>   return PTR_ERR(dev->regs_base);
> @@ -1167,15 +1170,14 @@ static int s5p_mfc_probe(struct platform_device *pdev)
>   res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>   if (res == NULL) {
>   dev_err(>dev, "failed to get irq resource\n");
> - ret = -ENOENT;
> - goto err_res;
> + return -ENOENT;
>   }
>   dev->irq = res->start;
>   ret = devm_request_irq(>dev, dev->irq, s5p_mfc_irq,
>   0, pdev->name, dev);
>   if (ret) {
>   dev_err(>dev, "Failed to install irq (%d)\n", ret);
> - goto err_res;
> + return ret;
>   }
>  
>   ret = s5p_mfc_configure_dma_memory(dev);
> @@ -1187,7 +1189,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
>   ret = s5p_mfc_init_pm(dev);
>   if (ret < 0) {
>   dev_err(>dev, "failed to get mfc clock source\n");
> - return ret;
> + goto err_dma;
>   }
>  
>   vb2_dma_contig_set_max_seg_size(dev->mem_dev_l, DMA_BIT_MASK(32));
> @@ -1301,6 +1303,8 @@ err_mem_init_ctx_1:
>   vb2_dma_contig_cleanup_ctx(dev->alloc_ctx[0]);
>  err_res:
>   s5p_mfc_final_pm(dev);
> +err_dma:
> + s5p_mfc_unconfigure_dma_memory(dev);
>  
>   pr_debug("%s-- with error\n", __func__);
>   return ret;
> -- 
> 1.9.2
> 

-- 
---
   .oooO
   (   )
\ (  Oooo.
 \_) (   )
  ) /
 (_/

 One small step
   for me ...
--
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 4.8] rtl2832

2016-06-08 Thread Antti Palosaari

The following changes since commit 94d0eaa419871a6e2783f8c131b1d76d5f2a5524:

  [media] mn88472: move out of staging to media (2016-06-07 15:46:47 -0300)

are available in the git repository at:

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

for you to fetch changes up to b3ce3f22e249dd2fd8a8a7249132f0ad9873dc05:

  rtl2832: add support for slave ts pid filter (2016-06-08 16:35:31 +0300)


Martin Blumenstingl (1):
  rtl2832: add support for slave ts pid filter

 drivers/media/dvb-frontends/rtl2832.c  | 25 +++--
 drivers/media/dvb-frontends/rtl2832_priv.h |  1 +
 2 files changed, 20 insertions(+), 6 deletions(-)

--
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: [PATCH 1/2] Add OV5647 device tree documentation

2016-06-08 Thread Ramiro Oliveira


On 06-06-2016 15:38, Rob Herring wrote:
> On Fri, Jun 03, 2016 at 06:36:40PM +0100, Ramiro Oliveira wrote:
>> From: roliveir 
>>
>> Signed-off-by: Ramiro Oliveira 
>> ---
>>  .../devicetree/bindings/media/i2c/ov5647.txt  | 19 
>> +++
>>  1 file changed, 19 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/media/i2c/ov5647.txt
>>
>> diff --git a/Documentation/devicetree/bindings/media/i2c/ov5647.txt 
>> b/Documentation/devicetree/bindings/media/i2c/ov5647.txt
>> new file mode 100644
>> index 000..5e4aa49
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/media/i2c/ov5647.txt
>> @@ -0,0 +1,19 @@
>> +Omnivision OV5657 raw image sensor
> Still 5657?
Sorry, I thought I had changed it.
>> +-
>> +
>> +OV5657 is a raw image sensor with MIPI CSI-2 and CCP2 image data interfaces
>> +and CCI (I2C compatible) control bus.
>> +
>> +Required properties:
>> +
>> +- compatible: "ov5647";
> Needs vendor prefix?
I'll add the ovti prefix
>> +- reg   : I2C slave address of the sensor;
> What happened to the clocks property. I'm pretty sure the driver always 
> needs to know the input clock freq.
I've seen some drivers that don't make any reference to clock freq, but I can
add it, if you think it's necessary.
>> +
>> +The common video interfaces bindings (see video-interfaces.txt) should be
>> +used to specify link to the image data receiver. The OV5647 device
>> +node should contain one 'port' child node with an 'endpoint' subnode.
>> +
>> +Following properties are valid for the endpoint node:
>> +
>> +- data-lanes : (optional) specifies MIPI CSI-2 data lanes as covered in
>> +  video-interfaces.txt.  The sensor supports only two data lanes.
>> -- 
>> 2.8.1
>>
>>
Regards,
Ramiro
--
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] of: reserved_mem: restore old behavior when no region is defined

2016-06-08 Thread Rob Herring
On Wed, Jun 8, 2016 at 1:51 AM, Marek Szyprowski
 wrote:
> Change return value back to -ENODEV when no region is defined for given
> device. This restores old behavior of this function, as some drivers rely
> on such error code.
>
> Reported-by: Liviu Dudau 
> Fixes: 59ce4039727ef40 ("of: reserved_mem: add support for using more than
>one region for given device")
> Signed-off-by: Marek Szyprowski 
> ---
>  drivers/of/of_reserved_mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Rob Herring 
--
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: s5p-mfc: fix error path in driver probe

2016-06-08 Thread Marek Szyprowski
This patch fixes the error path in the driver probe, so in case of
any failure, the resources are not leaked.

Reported-by: Liviu Dudau 
Signed-off-by: Marek Szyprowski 
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c 
b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index 6ee620ee8cd5..1f3a7ee753db 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -1159,7 +1159,10 @@ static int s5p_mfc_probe(struct platform_device *pdev)
dev->variant = mfc_get_drv_data(pdev);
 
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
+   if (res == NULL) {
+   dev_err(>dev, "failed to get io resource\n");
+   return -ENOENT;
+   }
dev->regs_base = devm_ioremap_resource(>dev, res);
if (IS_ERR(dev->regs_base))
return PTR_ERR(dev->regs_base);
@@ -1167,15 +1170,14 @@ static int s5p_mfc_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
if (res == NULL) {
dev_err(>dev, "failed to get irq resource\n");
-   ret = -ENOENT;
-   goto err_res;
+   return -ENOENT;
}
dev->irq = res->start;
ret = devm_request_irq(>dev, dev->irq, s5p_mfc_irq,
0, pdev->name, dev);
if (ret) {
dev_err(>dev, "Failed to install irq (%d)\n", ret);
-   goto err_res;
+   return ret;
}
 
ret = s5p_mfc_configure_dma_memory(dev);
@@ -1187,7 +1189,7 @@ static int s5p_mfc_probe(struct platform_device *pdev)
ret = s5p_mfc_init_pm(dev);
if (ret < 0) {
dev_err(>dev, "failed to get mfc clock source\n");
-   return ret;
+   goto err_dma;
}
 
vb2_dma_contig_set_max_seg_size(dev->mem_dev_l, DMA_BIT_MASK(32));
@@ -1301,6 +1303,8 @@ err_mem_init_ctx_1:
vb2_dma_contig_cleanup_ctx(dev->alloc_ctx[0]);
 err_res:
s5p_mfc_final_pm(dev);
+err_dma:
+   s5p_mfc_unconfigure_dma_memory(dev);
 
pr_debug("%s-- with error\n", __func__);
return ret;
-- 
1.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] of: reserved_mem: restore old behavior when no region is defined

2016-06-08 Thread Liviu Dudau
On Wed, Jun 08, 2016 at 08:51:53AM +0200, Marek Szyprowski wrote:
> Change return value back to -ENODEV when no region is defined for given
> device. This restores old behavior of this function, as some drivers rely
> on such error code.
> 
> Reported-by: Liviu Dudau 
> Fixes: 59ce4039727ef40 ("of: reserved_mem: add support for using more than
>one region for given device")
> Signed-off-by: Marek Szyprowski 

Reviewed-by: Liviu Dudau 

> ---
>  drivers/of/of_reserved_mem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
> index 3cf129f..06af99f 100644
> --- a/drivers/of/of_reserved_mem.c
> +++ b/drivers/of/of_reserved_mem.c
> @@ -334,7 +334,7 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
>  
>   target = of_parse_phandle(np, "memory-region", idx);
>   if (!target)
> - return -EINVAL;
> + return -ENODEV;
>  
>   rmem = __find_rmem(target);
>   of_node_put(target);
> -- 
> 1.9.2
> 
> ___
> dri-devel mailing list
> dri-de...@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 

| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---
¯\_(ツ)_/¯
--
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 v4 3/7] media: s5p-mfc: replace custom reserved memory handling code with generic one

2016-06-08 Thread Liviu Dudau
On Tue, May 24, 2016 at 03:31:26PM +0200, Marek Szyprowski wrote:
> This patch removes custom code for initialization and handling of
> reserved memory regions in s5p-mfc driver and replaces it with generic
> reserved memory regions api.
> 
> s5p-mfc driver now handles two reserved memory regions defined by
> generic reserved memory bindings. Support for non-dt platform has been
> removed, because all supported platforms have been already converted to
> device tree.
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  drivers/media/platform/s5p-mfc/s5p_mfc.c | 138 
> ++-
>  1 file changed, 63 insertions(+), 75 deletions(-)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c 
> b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> index d1d9d388..fff5f43 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> @@ -22,6 +22,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include "s5p_mfc_common.h"
>  #include "s5p_mfc_ctrl.h"
> @@ -1043,66 +1044,71 @@ static const struct v4l2_file_operations s5p_mfc_fops 
> = {
>   .mmap = s5p_mfc_mmap,
>  };
>  
> -static int match_child(struct device *dev, void *data)
> -{
> - if (!dev_name(dev))
> - return 0;
> - return !strcmp(dev_name(dev), (char *)data);
> -}
> -
> +/* DMA memory related helper functions */
>  static void s5p_mfc_memdev_release(struct device *dev)
>  {
> - dma_release_declared_memory(dev);
> + of_reserved_mem_device_release(dev);
>  }
>  
> -static void *mfc_get_drv_data(struct platform_device *pdev);
> -
> -static int s5p_mfc_alloc_memdevs(struct s5p_mfc_dev *dev)
> +static struct device *s5p_mfc_alloc_memdev(struct device *dev,
> +const char *name, unsigned int idx)
>  {
> - unsigned int mem_info[2] = { };
> + struct device *child;
> + int ret;
>  
> - dev->mem_dev_l = devm_kzalloc(>plat_dev->dev,
> - sizeof(struct device), GFP_KERNEL);
> - if (!dev->mem_dev_l) {
> - mfc_err("Not enough memory\n");
> - return -ENOMEM;
> + child = devm_kzalloc(dev, sizeof(struct device), GFP_KERNEL);
> + if (!child)
> + return NULL;
> +
> + device_initialize(child);
> + dev_set_name(child, "%s:%s", dev_name(dev), name);
> + child->parent = dev;
> + child->bus = dev->bus;
> + child->coherent_dma_mask = dev->coherent_dma_mask;
> + child->dma_mask = dev->dma_mask;
> + child->release = s5p_mfc_memdev_release;
> +
> + if (device_add(child) == 0) {
> + ret = of_reserved_mem_device_init_by_idx(child, dev->of_node,
> +  idx);
> + if (ret == 0)
> + return child;
>   }
>  
> - dev_set_name(dev->mem_dev_l, "%s", "s5p-mfc-l");
> - dev->mem_dev_l->release = s5p_mfc_memdev_release;
> - device_initialize(dev->mem_dev_l);
> - of_property_read_u32_array(dev->plat_dev->dev.of_node,
> - "samsung,mfc-l", mem_info, 2);
> - if (dma_declare_coherent_memory(dev->mem_dev_l, mem_info[0],
> - mem_info[0], mem_info[1],
> - DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) {
> - mfc_err("Failed to declare coherent memory for\n"
> - "MFC device\n");
> - return -ENOMEM;
> - }
> + put_device(child);
> + return NULL;
> +}
>  
> - dev->mem_dev_r = devm_kzalloc(>plat_dev->dev,
> - sizeof(struct device), GFP_KERNEL);
> - if (!dev->mem_dev_r) {
> - mfc_err("Not enough memory\n");
> - return -ENOMEM;
> - }
> +static int s5p_mfc_configure_dma_memory(struct s5p_mfc_dev *mfc_dev)
> +{
> + struct device *dev = _dev->plat_dev->dev;
>  
> - dev_set_name(dev->mem_dev_r, "%s", "s5p-mfc-r");
> - dev->mem_dev_r->release = s5p_mfc_memdev_release;
> - device_initialize(dev->mem_dev_r);
> - of_property_read_u32_array(dev->plat_dev->dev.of_node,
> - "samsung,mfc-r", mem_info, 2);
> - if (dma_declare_coherent_memory(dev->mem_dev_r, mem_info[0],
> - mem_info[0], mem_info[1],
> - DMA_MEMORY_MAP | DMA_MEMORY_EXCLUSIVE) == 0) {
> - pr_err("Failed to declare coherent memory for\n"
> - "MFC device\n");
> - return -ENOMEM;
> + /*
> +  * Create and initialize virtual devices for accessing
> +  * reserved memory regions.
> +  */
> + mfc_dev->mem_dev_l = s5p_mfc_alloc_memdev(dev, "left",
> +   MFC_BANK1_ALLOC_CTX);
> + if (!mfc_dev->mem_dev_l)
> + return -ENODEV;
> + mfc_dev->mem_dev_r = s5p_mfc_alloc_memdev(dev, "right",
> +   MFC_BANK2_ALLOC_CTX);
> + if 

Call DR JAMES ADAMS No + 27 748 044 206

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


Re: [PATCH 1/3] ARM: dts: exynos: replace hardcoded reserved memory ranges with auto-allocated ones

2016-06-08 Thread Krzysztof Kozlowski
On 06/07/2016 02:03 PM, Marek Szyprowski wrote:
> Generic reserved memory regions bindings allow to automatically allocate
> region of given parameters (alignment and size), so use this feature
> instead of the hardcoded values, which had no dependency on the real
> hardware. This patch also increases "left" region from 8MiB to 16MiB to
> make the codec really usable with nowadays steams (with 8MiB reserved
> region it was not even possible to decode 480p H264 video).
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)

Applied all three on top of topic branch.

Thanks,
Krzysztof

--
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] of: reserved_mem: restore old behavior when no region is defined

2016-06-08 Thread Sylwester Nawrocki
On 06/08/2016 08:51 AM, Marek Szyprowski wrote:
> Change return value back to -ENODEV when no region is defined for given
> device. This restores old behavior of this function, as some drivers rely
> on such error code.
> 
> Reported-by: Liviu Dudau 
> Fixes: 59ce4039727ef40 ("of: reserved_mem: add support for using more than
>one region for given device")
> Signed-off-by: Marek Szyprowski 

Reviewed-by: Sylwester Nawrocki 

I think this needs to be added to the media tree, where the original
patch it fixes was applied.

-- 
Thanks,
Sylwester
--
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] of: reserved_mem: restore old behavior when no region is defined

2016-06-08 Thread Marek Szyprowski
Change return value back to -ENODEV when no region is defined for given
device. This restores old behavior of this function, as some drivers rely
on such error code.

Reported-by: Liviu Dudau 
Fixes: 59ce4039727ef40 ("of: reserved_mem: add support for using more than
   one region for given device")
Signed-off-by: Marek Szyprowski 
---
 drivers/of/of_reserved_mem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c
index 3cf129f..06af99f 100644
--- a/drivers/of/of_reserved_mem.c
+++ b/drivers/of/of_reserved_mem.c
@@ -334,7 +334,7 @@ int of_reserved_mem_device_init_by_idx(struct device *dev,
 
target = of_parse_phandle(np, "memory-region", idx);
if (!target)
-   return -EINVAL;
+   return -ENODEV;
 
rmem = __find_rmem(target);
of_node_put(target);
-- 
1.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