cron job: media_tree daily build: ERRORS

2017-10-14 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.

Results of the daily build of media_tree:

date:   Sun Oct 15 05:00:20 CEST 2017
media-tree git hash:8382e556b1a2f30c4bf866f021b33577a64f9ebf
media_build git hash:   33629e38ddda7a5a6ed0f727535c45f08c788bf3
v4l-utils git hash: 01c04f7c8ad1a91af33e20621eba9200f447737e
gcc version:i686-linux-gcc (GCC) 7.1.0
sparse version: v0.5.0
smatch version: v0.5.0-3553-g78b2ea6
host hardware:  x86_64
host os:4.12.0-164

linux-git-arm-at91: OK
linux-git-arm-davinci: OK
linux-git-arm-multi: OK
linux-git-arm-pxa: OK
linux-git-arm-stm32: OK
linux-git-blackfin-bf561: OK
linux-git-i686: OK
linux-git-m32r: WARNINGS
linux-git-mips: OK
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: ERRORS
linux-3.3.8-i686: ERRORS
linux-3.4.27-i686: ERRORS
linux-3.5.7-i686: ERRORS
linux-3.6.11-i686: ERRORS
linux-3.7.4-i686: ERRORS
linux-3.8-i686: ERRORS
linux-3.9.2-i686: ERRORS
linux-3.10.1-i686: ERRORS
linux-3.11.1-i686: ERRORS
linux-3.12.67-i686: WARNINGS
linux-3.13.11-i686: ERRORS
linux-3.14.9-i686: WARNINGS
linux-3.15.2-i686: WARNINGS
linux-3.16.7-i686: WARNINGS
linux-3.17.8-i686: WARNINGS
linux-3.18.7-i686: WARNINGS
linux-3.19-i686: WARNINGS
linux-4.0.9-i686: WARNINGS
linux-4.1.33-i686: WARNINGS
linux-4.2.8-i686: WARNINGS
linux-4.3.6-i686: WARNINGS
linux-4.4.22-i686: WARNINGS
linux-4.5.7-i686: WARNINGS
linux-4.6.7-i686: WARNINGS
linux-4.7.5-i686: WARNINGS
linux-4.8-i686: OK
linux-4.9.26-i686: OK
linux-4.10.14-i686: OK
linux-4.11-i686: OK
linux-4.12.1-i686: OK
linux-4.13-i686: OK
linux-2.6.36.4-x86_64: ERRORS
linux-2.6.37.6-x86_64: ERRORS
linux-2.6.38.8-x86_64: ERRORS
linux-2.6.39.4-x86_64: ERRORS
linux-3.0.60-x86_64: ERRORS
linux-3.1.10-x86_64: ERRORS
linux-3.2.37-x86_64: ERRORS
linux-3.3.8-x86_64: ERRORS
linux-3.4.27-x86_64: ERRORS
linux-3.5.7-x86_64: ERRORS
linux-3.6.11-x86_64: ERRORS
linux-3.7.4-x86_64: ERRORS
linux-3.8-x86_64: ERRORS
linux-3.9.2-x86_64: ERRORS
linux-3.10.1-x86_64: ERRORS
linux-3.11.1-x86_64: ERRORS
linux-3.12.67-x86_64: WARNINGS
linux-3.13.11-x86_64: ERRORS
linux-3.14.9-x86_64: WARNINGS
linux-3.15.2-x86_64: WARNINGS
linux-3.16.7-x86_64: WARNINGS
linux-3.17.8-x86_64: WARNINGS
linux-3.18.7-x86_64: WARNINGS
linux-3.19-x86_64: WARNINGS
linux-4.0.9-x86_64: WARNINGS
linux-4.1.33-x86_64: WARNINGS
linux-4.2.8-x86_64: WARNINGS
linux-4.3.6-x86_64: WARNINGS
linux-4.4.22-x86_64: WARNINGS
linux-4.5.7-x86_64: WARNINGS
linux-4.6.7-x86_64: WARNINGS
linux-4.7.5-x86_64: WARNINGS
linux-4.8-x86_64: WARNINGS
linux-4.9.26-x86_64: WARNINGS
linux-4.10.14-x86_64: WARNINGS
linux-4.11-x86_64: WARNINGS
linux-4.12.1-x86_64: WARNINGS
linux-4.13-x86_64: OK
apps: OK
spec-git: OK

Detailed results are available here:

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

Full logs are available here:

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

The Media Infrastructure API from this daily build is here:

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


[PATCH] pinctrl: rockchip: Add iomux-route switching support for rk3288

2017-10-14 Thread Heiko Stuebner
So far only the hdmi cec supports using one of two different pins
as source, so add the route switching for it.

Signed-off-by: Heiko Stuebner 
---
If I didn't mess up any numbering, the pinctrl change should look like
the following patch.

Hope that helps
Heiko

 drivers/pinctrl/pinctrl-rockchip.c | 20 
 1 file changed, 20 insertions(+)

diff --git a/drivers/pinctrl/pinctrl-rockchip.c 
b/drivers/pinctrl/pinctrl-rockchip.c
index b5cb7858ffdc..8dd49e2e144b 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -884,6 +884,24 @@ static struct rockchip_mux_route_data 
rk3228_mux_route_data[] = {
},
 };
 
+static struct rockchip_mux_route_data rk3288_mux_route_data[] = {
+   {
+   /* edphdmi_cecinoutt1 */
+   .bank_num = 7,
+   .pin = 16,
+   .func = 2,
+   .route_offset = 0x264,
+   .route_val = BIT(16 + 12) | BIT(12),
+   }, {
+   /* edphdmi_cecinout */
+   .bank_num = 7,
+   .pin = 23,
+   .func = 4,
+   .route_offset = 0x264,
+   .route_val = BIT(16 + 12),
+   },
+};
+
 static struct rockchip_mux_route_data rk3328_mux_route_data[] = {
{
/* uart2dbg_rxm0 */
@@ -3391,6 +3409,8 @@ static struct rockchip_pin_ctrl rk3288_pin_ctrl = {
.type   = RK3288,
.grf_mux_offset = 0x0,
.pmu_mux_offset = 0x84,
+   .iomux_routes   = rk3288_mux_route_data,
+   .niomux_routes  = ARRAY_SIZE(rk3288_mux_route_data),
.pull_calc_reg  = rk3288_calc_pull_reg_and_bit,
.drv_calc_reg   = rk3288_calc_drv_reg_and_bit,
 };
-- 
2.14.1




Re: [Outreachy kernel] [PATCH v2 1/2] staging: atomisp2: cleanup null check on memory allocation

2017-10-14 Thread Julia Lawall


On Sat, 14 Oct 2017, Aishwarya Pant wrote:

> For memory allocation functions that fail with a NULL return value, it
> is preferred to use the (!x) test in place of (x == NULL).
>
> Changes in atomisp2/css2400/sh_css.c were done by hand.
>
> Done with the help of the following cocci script:
>
> @@
> type T;
> T* p;
> statement s,s1;
> @@
>
> p =
>   \(devm_kzalloc\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\|
>
> kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
>kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...)
> ...when != p
>
> if (
> - p == NULL
> + !p
>  ) s
>  else s1
>
> Signed-off-by: Aishwarya Pant 

Acked-by: Julia Lawall 

>
> --
> Changes in atomisp2/css2400/sh_css.c were done by hand, the above script
> was not able to match the pattern if (a->b != null).
>
> v2 changes:
> None, just rebase and re-send
> ---
>  .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 
> +++---
>  .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c |  6 ++--
>  .../pci/atomisp2/css2400/sh_css_param_shading.c|  2 +-
>  3 files changed, 22 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c 
> b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
> index e882b5596813..56de641d8848 100644
> --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
> +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
> @@ -5607,13 +5607,13 @@ static enum ia_css_err load_video_binaries(struct 
> ia_css_pipe *pipe)
>   mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
>   mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
>   sizeof(struct ia_css_binary), GFP_KERNEL);
> - if (mycs->yuv_scaler_binary == NULL) {
> + if (!mycs->yuv_scaler_binary) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   return err;
>   }
>   mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage
>   * sizeof(bool), GFP_KERNEL);
> - if (mycs->is_output_stage == NULL) {
> + if (!mycs->is_output_stage) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   return err;
>   }
> @@ -6258,14 +6258,14 @@ static enum ia_css_err load_primary_binaries(
>   mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
>   mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
>   sizeof(struct ia_css_binary), GFP_KERNEL);
> - if (mycs->yuv_scaler_binary == NULL) {
> + if (!mycs->yuv_scaler_binary) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   IA_CSS_LEAVE_ERR_PRIVATE(err);
>   return err;
>   }
>   mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage *
>   sizeof(bool), GFP_KERNEL);
> - if (mycs->is_output_stage == NULL) {
> + if (!mycs->is_output_stage) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   IA_CSS_LEAVE_ERR_PRIVATE(err);
>   return err;
> @@ -6982,27 +6982,27 @@ static enum ia_css_err 
> ia_css_pipe_create_cas_scaler_desc_single_output(
>   }
>
>   descr->in_info = kmalloc(descr->num_stage * sizeof(struct 
> ia_css_frame_info), GFP_KERNEL);
> - if (descr->in_info == NULL) {
> + if (!descr->in_info) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   goto ERR;
>   }
>   descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct 
> ia_css_frame_info), GFP_KERNEL);
> - if (descr->internal_out_info == NULL) {
> + if (!descr->internal_out_info) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   goto ERR;
>   }
>   descr->out_info = kmalloc(descr->num_stage * sizeof(struct 
> ia_css_frame_info), GFP_KERNEL);
> - if (descr->out_info == NULL) {
> + if (!descr->out_info) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   goto ERR;
>   }
>   descr->vf_info = kmalloc(descr->num_stage * sizeof(struct 
> ia_css_frame_info), GFP_KERNEL);
> - if (descr->vf_info == NULL) {
> + if (!descr->vf_info) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   goto ERR;
>   }
>   descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), 
> GFP_KERNEL);
> - if (descr->is_output_stage == NULL) {
> + if (!descr->is_output_stage) {
>   err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
>   goto ERR;
>   }
> @@ -7118,22 +7118,22 @@ static enum ia_css_err 
> ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
>   descr->num_stage = num_stages;
>
> 

[PATCH v2 2/2] staging: atomisp: cleanup out of memory messages

2017-10-14 Thread Aishwarya Pant
Logging of explicit out of memory messages is redundant since memory allocation
failures produce a backtrace.

Done with the help of the following cocci script:

@@
expression ex, ret;
statement s;
constant char[] c;
constant err;
identifier f, l;
@@

ex =
\(kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...)
... when != ex

if (
(
!ex
|
unlikely(!ex)
)
)
- {
- f(..., c, ...);
(
return ex;
|
return;
|
return err;
|
goto l;
)
- }
else s

Another case where if branch has multiple statements was handled with the
following condition:

{
...
- f(..., c, ...);
...
}

Signed-off-by: Aishwarya Pant 
---
v2 changes:
None, just rebase and re-send

drivers/staging/media/atomisp/i2c/ap1302.c |  4 +---
 drivers/staging/media/atomisp/i2c/gc0310.c |  4 +---
 drivers/staging/media/atomisp/i2c/gc2235.c |  4 +---
 drivers/staging/media/atomisp/i2c/imx/imx.c|  4 +---
 drivers/staging/media/atomisp/i2c/lm3554.c |  4 +---
 drivers/staging/media/atomisp/i2c/mt9m114.c|  4 +---
 drivers/staging/media/atomisp/i2c/ov2680.c |  4 +---
 drivers/staging/media/atomisp/i2c/ov2722.c |  4 +---
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c  |  4 +---
 drivers/staging/media/atomisp/i2c/ov8858.c |  6 +-
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c  |  4 +---
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c |  9 ++---
 .../media/atomisp/pci/atomisp2/css2400/sh_css_param_shading.c  |  4 +---
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_bo.c| 10 ++
 .../staging/media/atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c  |  6 +-
 .../staging/media/atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c |  5 +
 drivers/staging/media/atomisp/pci/atomisp2/hmm/hmm_vm.c|  4 +---
 .../media/atomisp/platform/intel-mid/atomisp_gmin_platform.c   |  4 +---
 18 files changed, 20 insertions(+), 68 deletions(-)

diff --git a/drivers/staging/media/atomisp/i2c/ap1302.c 
b/drivers/staging/media/atomisp/i2c/ap1302.c
index 2f772a020c8b..bfbf85122c3b 100644
--- a/drivers/staging/media/atomisp/i2c/ap1302.c
+++ b/drivers/staging/media/atomisp/i2c/ap1302.c
@@ -1153,10 +1153,8 @@ static int ap1302_probe(struct i2c_client *client,
 
/* allocate device & init sub device */
dev = devm_kzalloc(>dev, sizeof(*dev), GFP_KERNEL);
-   if (!dev) {
-   dev_err(>dev, "%s: out of memory\n", __func__);
+   if (!dev)
return -ENOMEM;
-   }
 
mutex_init(>input_lock);
 
diff --git a/drivers/staging/media/atomisp/i2c/gc0310.c 
b/drivers/staging/media/atomisp/i2c/gc0310.c
index 35ed51ffe944..291565451bfe 100644
--- a/drivers/staging/media/atomisp/i2c/gc0310.c
+++ b/drivers/staging/media/atomisp/i2c/gc0310.c
@@ -1385,10 +1385,8 @@ static int gc0310_probe(struct i2c_client *client,
 
pr_info("%s S\n", __func__);
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-   if (!dev) {
-   dev_err(>dev, "out of memory\n");
+   if (!dev)
return -ENOMEM;
-   }
 
mutex_init(>input_lock);
 
diff --git a/drivers/staging/media/atomisp/i2c/gc2235.c 
b/drivers/staging/media/atomisp/i2c/gc2235.c
index e43d31ea9676..f51535eee091 100644
--- a/drivers/staging/media/atomisp/i2c/gc2235.c
+++ b/drivers/staging/media/atomisp/i2c/gc2235.c
@@ -1123,10 +1123,8 @@ static int gc2235_probe(struct i2c_client *client,
unsigned int i;
 
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-   if (!dev) {
-   dev_err(>dev, "out of memory\n");
+   if (!dev)
return -ENOMEM;
-   }
 
mutex_init(>input_lock);
 
diff --git a/drivers/staging/media/atomisp/i2c/imx/imx.c 
b/drivers/staging/media/atomisp/i2c/imx/imx.c
index 49ab0af87096..957fb1863b40 100644
--- a/drivers/staging/media/atomisp/i2c/imx/imx.c
+++ b/drivers/staging/media/atomisp/i2c/imx/imx.c
@@ -2365,10 +2365,8 @@ static int imx_probe(struct i2c_client *client,
 
/* allocate sensor device & init sub device */
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
-   if (!dev) {
-   v4l2_err(client, "%s: out of memory\n", __func__);
+   if (!dev)
return -ENOMEM;
-   }
 
mutex_init(>input_lock);
 
diff --git a/drivers/staging/media/atomisp/i2c/lm3554.c 
b/drivers/staging/media/atomisp/i2c/lm3554.c
index 679176f7c542..37876d245a02 100644
--- a/drivers/staging/media/atomisp/i2c/lm3554.c
+++ b/drivers/staging/media/atomisp/i2c/lm3554.c
@@ -871,10 +871,8 @@ static int lm3554_probe(struct i2c_client *client,
int ret;
 
flash = kzalloc(sizeof(*flash), GFP_KERNEL);
-   if (!flash) {
-   dev_err(>dev, "out of memory\n");
+   if (!flash)

[PATCH v2 1/2] staging: atomisp2: cleanup null check on memory allocation

2017-10-14 Thread Aishwarya Pant
For memory allocation functions that fail with a NULL return value, it
is preferred to use the (!x) test in place of (x == NULL).

Changes in atomisp2/css2400/sh_css.c were done by hand.

Done with the help of the following cocci script:

@@
type T;
T* p;
statement s,s1;
@@

p =
  \(devm_kzalloc\|devm_ioremap\|usb_alloc_urb\|alloc_netdev\|dev_alloc_skb\|
   
kmalloc\|kmalloc_array\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
   kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\|devm_kzalloc\)(...)
...when != p

if (
- p == NULL
+ !p
 ) s
 else s1

Signed-off-by: Aishwarya Pant 

--
Changes in atomisp2/css2400/sh_css.c were done by hand, the above script
was not able to match the pattern if (a->b != null).

v2 changes:
None, just rebase and re-send
---
 .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 +++---
 .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c |  6 ++--
 .../pci/atomisp2/css2400/sh_css_param_shading.c|  2 +-
 3 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c 
b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
index e882b5596813..56de641d8848 100644
--- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
+++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c
@@ -5607,13 +5607,13 @@ static enum ia_css_err load_video_binaries(struct 
ia_css_pipe *pipe)
mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
sizeof(struct ia_css_binary), GFP_KERNEL);
-   if (mycs->yuv_scaler_binary == NULL) {
+   if (!mycs->yuv_scaler_binary) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
return err;
}
mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage
* sizeof(bool), GFP_KERNEL);
-   if (mycs->is_output_stage == NULL) {
+   if (!mycs->is_output_stage) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
return err;
}
@@ -6258,14 +6258,14 @@ static enum ia_css_err load_primary_binaries(
mycs->num_yuv_scaler = cas_scaler_descr.num_stage;
mycs->yuv_scaler_binary = kzalloc(cas_scaler_descr.num_stage *
sizeof(struct ia_css_binary), GFP_KERNEL);
-   if (mycs->yuv_scaler_binary == NULL) {
+   if (!mycs->yuv_scaler_binary) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
}
mycs->is_output_stage = kzalloc(cas_scaler_descr.num_stage *
sizeof(bool), GFP_KERNEL);
-   if (mycs->is_output_stage == NULL) {
+   if (!mycs->is_output_stage) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
IA_CSS_LEAVE_ERR_PRIVATE(err);
return err;
@@ -6982,27 +6982,27 @@ static enum ia_css_err 
ia_css_pipe_create_cas_scaler_desc_single_output(
}
 
descr->in_info = kmalloc(descr->num_stage * sizeof(struct 
ia_css_frame_info), GFP_KERNEL);
-   if (descr->in_info == NULL) {
+   if (!descr->in_info) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
goto ERR;
}
descr->internal_out_info = kmalloc(descr->num_stage * sizeof(struct 
ia_css_frame_info), GFP_KERNEL);
-   if (descr->internal_out_info == NULL) {
+   if (!descr->internal_out_info) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
goto ERR;
}
descr->out_info = kmalloc(descr->num_stage * sizeof(struct 
ia_css_frame_info), GFP_KERNEL);
-   if (descr->out_info == NULL) {
+   if (!descr->out_info) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
goto ERR;
}
descr->vf_info = kmalloc(descr->num_stage * sizeof(struct 
ia_css_frame_info), GFP_KERNEL);
-   if (descr->vf_info == NULL) {
+   if (!descr->vf_info) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
goto ERR;
}
descr->is_output_stage = kmalloc(descr->num_stage * sizeof(bool), 
GFP_KERNEL);
-   if (descr->is_output_stage == NULL) {
+   if (!descr->is_output_stage) {
err = IA_CSS_ERR_CANNOT_ALLOCATE_MEMORY;
goto ERR;
}
@@ -7118,22 +7118,22 @@ static enum ia_css_err 
ia_css_pipe_create_cas_scaler_desc(struct ia_css_pipe *pi
descr->num_stage = num_stages;
 
descr->in_info = kmalloc(descr->num_stage * sizeof(struct 
ia_css_frame_info), GFP_KERNEL);
-   if (descr->in_info == NULL) {
+   if (!descr->in_info) {
err = 

[PATCH v2 0/2] staging: atomisp: memory allocation cleanups

2017-10-14 Thread Aishwarya Pant
Patch series performs minor code cleanups using coccinelle to simplify memory
allocation tests and remove redundant OOM log messages.

Changes in v2:
Rebase and re-send patches

Aishwarya Pant (2):
  staging: atomisp2: cleanup null check on memory allocation
  staging: atomisp: cleanup out of memory messages

 drivers/staging/media/atomisp/i2c/ap1302.c |  4 +--
 drivers/staging/media/atomisp/i2c/gc0310.c |  4 +--
 drivers/staging/media/atomisp/i2c/gc2235.c |  4 +--
 drivers/staging/media/atomisp/i2c/imx/imx.c|  4 +--
 drivers/staging/media/atomisp/i2c/lm3554.c |  4 +--
 drivers/staging/media/atomisp/i2c/mt9m114.c|  4 +--
 drivers/staging/media/atomisp/i2c/ov2680.c |  4 +--
 drivers/staging/media/atomisp/i2c/ov2722.c |  4 +--
 drivers/staging/media/atomisp/i2c/ov5693/ov5693.c  |  4 +--
 drivers/staging/media/atomisp/i2c/ov8858.c |  6 +---
 .../media/atomisp/pci/atomisp2/atomisp_fops.c  |  4 +--
 .../media/atomisp/pci/atomisp2/atomisp_ioctl.c |  9 ++
 .../media/atomisp/pci/atomisp2/css2400/sh_css.c| 36 +++---
 .../atomisp/pci/atomisp2/css2400/sh_css_firmware.c |  6 ++--
 .../pci/atomisp2/css2400/sh_css_param_shading.c|  4 +--
 .../media/atomisp/pci/atomisp2/hmm/hmm_bo.c| 10 ++
 .../atomisp/pci/atomisp2/hmm/hmm_dynamic_pool.c|  6 +---
 .../atomisp/pci/atomisp2/hmm/hmm_reserved_pool.c   |  5 +--
 .../media/atomisp/pci/atomisp2/hmm/hmm_vm.c|  4 +--
 .../platform/intel-mid/atomisp_gmin_platform.c |  4 +--
 20 files changed, 41 insertions(+), 89 deletions(-)

-- 
2.11.0



Re: [PATCH 0/3] Enable CEC on rk3399

2017-10-14 Thread Heiko Stuebner
Am Samstag, 14. Oktober 2017, 15:14:40 CEST schrieb Pierre-Hugues Husson:
> Hi Hans,
> 
> > Nice! I had a similar dw-hdmi.c patch pending but got around to posting it.
> >
> > I'll brush off my old rk3288 patches and see if I can get CEC enabled
> > for my firefly-reload. I was close to getting it work, but I guess
> > missed the "enable cec pin" change.
> Please note that on rk3288, there are two CEC pins, and you must write
> in RK3288_GRF_SOC_CON8 which pin you're using.
> On the firefly-reload, the pin used is GPIO7C0, while the default pin
> configuration is GPIO7C7.

And as an additional note, later socs have even more of these pin-routing
settings and we currently have infrastructure in the pinctrl driver to do
this automatically depending on the pinctrl settings.

So most likely this can also be added there for the rk3288.


Heiko


Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support

2017-10-14 Thread Hans Verkuil
On 10/14/2017 03:34 PM, Thierry Reding wrote:
> On Sat, Oct 14, 2017 at 02:08:31PM +0200, Hans Verkuil wrote:
>> Hi Thierry,
>>
>> On 09/11/2017 02:29 PM, Hans Verkuil wrote:
>>> From: Hans Verkuil 
>>>
>>> This patch series adds support for the Tegra CEC functionality.
>>>
>>> This v4 has been rebased to the latest 4.14 pre-rc1 mainline.
>>>
>>> Please review! Other than for the bindings that are now Acked I have not
>>> received any feedback.
>>
>> Can you or someone else from the Tegra maintainers review this?
>>
>> I have not heard anything about this patch series, nor of the previous
>> versions of this series. What's the hold-up?
> 
> Sorry about that. I've been meaning to look at this for a while now, but
> never got around to it. From a quick glance this looks good. Let me take
> this for a quick test-drive when I'm back at the office next week and
> I'll report back.

It would be great if you can test if the TK1 dts changes will also work
with the Jetson X1. It should, but I don't have a Jetson X1 to test with.

> Is there any particular ordering that we need to observe in order to
> merge this? Looks to me like it would be safe to merge patches 1 and 3
> through the CEC (media?) tree and take the others through DRM and Tegra
> separately without breaking anything.

Correct. Once I have your Ack I can make a pull request for patches 1+3.
Patches 2+4 would have to go through you.

Regards,

Hans

> 
> Thierry
> 
>>> The first patch documents the CEC bindings, the second adds support
>>> for this to tegra124.dtsi and enables it for the Jetson TK1.
>>>
>>> The third patch adds the CEC driver itself and the final patch adds
>>> the cec notifier support to the drm/tegra driver in order to notify
>>> the CEC driver whenever the physical address changes.
>>>
>>> I expect that the dts changes apply as well to the Tegra X1/X2 and possibly
>>> other Tegra SoCs, but I can only test this with my Jetson TK1 board.
>>>
>>> The dt-bindings and the tegra-cec driver would go in through the media
>>> subsystem, the drm/tegra part through the drm subsystem and the dts
>>> changes through (I guess) the linux-tegra developers. Luckily they are
>>> all independent of one another.
>>>
>>> To test this you need the CEC utilities from 
>>> git://linuxtv.org/v4l-utils.git.
>>>
>>> To build this:
>>>
>>> git clone git://linuxtv.org/v4l-utils.git
>>> cd v4l-utils
>>> ./bootstrap.sh; ./configure
>>> make
>>> sudo make install # optional, you really only need utils/cec*
>>>
>>> To test:
>>>
>>> cec-ctl --playback # configure as playback device
>>> cec-ctl -S # detect all connected CEC devices
>>>
>>> See here for the public CEC API:
>>>
>>> https://hverkuil.home.xs4all.nl/spec/uapi/cec/cec-api.html
>>>
>>> Regards,
>>>
>>> Hans
>>>
>>> Changes since v3:
>>>
>>> - Use the new CEC_CAP_DEFAULTS define
>>> - Use IS_ERR(cec->adap) instead of IS_ERR_OR_NULL(cec->adap)
>>>   (cec_allocate_adapter never returns a NULL pointer)
>>> - Drop the device_init_wakeup: wakeup is not (yet) supported by
>>>   the CEC framework and I have never tested it.
>>>
>>> Hans Verkuil (4):
>>>   dt-bindings: document the tegra CEC bindings
>>>   ARM: tegra: add CEC support to tegra124.dtsi
>>>   tegra-cec: add Tegra HDMI CEC driver
>>>   drm/tegra: add cec-notifier support
>>>
>>>  .../devicetree/bindings/media/tegra-cec.txt|  27 ++
>>>  MAINTAINERS|   8 +
>>>  arch/arm/boot/dts/tegra124-jetson-tk1.dts  |   4 +
>>>  arch/arm/boot/dts/tegra124.dtsi|  12 +-
>>>  drivers/gpu/drm/tegra/Kconfig  |   1 +
>>>  drivers/gpu/drm/tegra/drm.h|   3 +
>>>  drivers/gpu/drm/tegra/hdmi.c   |   9 +
>>>  drivers/gpu/drm/tegra/output.c |   6 +
>>>  drivers/media/platform/Kconfig |  11 +
>>>  drivers/media/platform/Makefile|   2 +
>>>  drivers/media/platform/tegra-cec/Makefile  |   1 +
>>>  drivers/media/platform/tegra-cec/tegra_cec.c   | 501 
>>> +
>>>  drivers/media/platform/tegra-cec/tegra_cec.h   | 127 ++
>>>  13 files changed, 711 insertions(+), 1 deletion(-)
>>>  create mode 100644 Documentation/devicetree/bindings/media/tegra-cec.txt
>>>  create mode 100644 drivers/media/platform/tegra-cec/Makefile
>>>  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.c
>>>  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.h
>>>
>>



Re: [PATCH 1/3] drm: bridge: synopsys/dw-hdmi: Enable cec clock

2017-10-14 Thread Fabio Estevam
Hi Pierre,

On Sat, Oct 14, 2017 at 10:21 AM, Pierre-Hugues Husson  wrote:

> As far as I understand, dw_hdmi_cec_enable only gates
> the CEC clock inside the Synopsis IP,
> but the SOC still has to provide a specific CEC clock to it.
> To enable such an external CEC clock, the binding documentation [1]
> mentions a "cec" optional clock, and I'm not seeing any code in dw-hdmi
> to enable it.

Ok, understood.

In the case of i.MX6 we control the CEC clock via
HDMI_MC_CLKDIS_CECCLK_DISABLE bit inside the Synopsis IP.

Looks like Rockchip needs the external CEC clock then.

Regards,

Fabio Estevam


Re: cron job: media_tree daily build: ERRORS

2017-10-14 Thread Hans Verkuil
On 10/14/2017 02:39 PM, Jasmin J. wrote:
> Hello Hans!
> 
> I provided some patches to solve all of this errors.
> 
> Please can apply them.
> 
> BR,
>Jasmin
> 

I plan to apply them tomorrow or Monday.

Regards,

Hans


Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support

2017-10-14 Thread Thierry Reding
On Sat, Oct 14, 2017 at 02:08:31PM +0200, Hans Verkuil wrote:
> Hi Thierry,
> 
> On 09/11/2017 02:29 PM, Hans Verkuil wrote:
> > From: Hans Verkuil 
> > 
> > This patch series adds support for the Tegra CEC functionality.
> > 
> > This v4 has been rebased to the latest 4.14 pre-rc1 mainline.
> > 
> > Please review! Other than for the bindings that are now Acked I have not
> > received any feedback.
> 
> Can you or someone else from the Tegra maintainers review this?
> 
> I have not heard anything about this patch series, nor of the previous
> versions of this series. What's the hold-up?

Sorry about that. I've been meaning to look at this for a while now, but
never got around to it. From a quick glance this looks good. Let me take
this for a quick test-drive when I'm back at the office next week and
I'll report back.

Is there any particular ordering that we need to observe in order to
merge this? Looks to me like it would be safe to merge patches 1 and 3
through the CEC (media?) tree and take the others through DRM and Tegra
separately without breaking anything.

Thierry

> > The first patch documents the CEC bindings, the second adds support
> > for this to tegra124.dtsi and enables it for the Jetson TK1.
> > 
> > The third patch adds the CEC driver itself and the final patch adds
> > the cec notifier support to the drm/tegra driver in order to notify
> > the CEC driver whenever the physical address changes.
> > 
> > I expect that the dts changes apply as well to the Tegra X1/X2 and possibly
> > other Tegra SoCs, but I can only test this with my Jetson TK1 board.
> > 
> > The dt-bindings and the tegra-cec driver would go in through the media
> > subsystem, the drm/tegra part through the drm subsystem and the dts
> > changes through (I guess) the linux-tegra developers. Luckily they are
> > all independent of one another.
> > 
> > To test this you need the CEC utilities from 
> > git://linuxtv.org/v4l-utils.git.
> > 
> > To build this:
> > 
> > git clone git://linuxtv.org/v4l-utils.git
> > cd v4l-utils
> > ./bootstrap.sh; ./configure
> > make
> > sudo make install # optional, you really only need utils/cec*
> > 
> > To test:
> > 
> > cec-ctl --playback # configure as playback device
> > cec-ctl -S # detect all connected CEC devices
> > 
> > See here for the public CEC API:
> > 
> > https://hverkuil.home.xs4all.nl/spec/uapi/cec/cec-api.html
> > 
> > Regards,
> > 
> > Hans
> > 
> > Changes since v3:
> > 
> > - Use the new CEC_CAP_DEFAULTS define
> > - Use IS_ERR(cec->adap) instead of IS_ERR_OR_NULL(cec->adap)
> >   (cec_allocate_adapter never returns a NULL pointer)
> > - Drop the device_init_wakeup: wakeup is not (yet) supported by
> >   the CEC framework and I have never tested it.
> > 
> > Hans Verkuil (4):
> >   dt-bindings: document the tegra CEC bindings
> >   ARM: tegra: add CEC support to tegra124.dtsi
> >   tegra-cec: add Tegra HDMI CEC driver
> >   drm/tegra: add cec-notifier support
> > 
> >  .../devicetree/bindings/media/tegra-cec.txt|  27 ++
> >  MAINTAINERS|   8 +
> >  arch/arm/boot/dts/tegra124-jetson-tk1.dts  |   4 +
> >  arch/arm/boot/dts/tegra124.dtsi|  12 +-
> >  drivers/gpu/drm/tegra/Kconfig  |   1 +
> >  drivers/gpu/drm/tegra/drm.h|   3 +
> >  drivers/gpu/drm/tegra/hdmi.c   |   9 +
> >  drivers/gpu/drm/tegra/output.c |   6 +
> >  drivers/media/platform/Kconfig |  11 +
> >  drivers/media/platform/Makefile|   2 +
> >  drivers/media/platform/tegra-cec/Makefile  |   1 +
> >  drivers/media/platform/tegra-cec/tegra_cec.c   | 501 
> > +
> >  drivers/media/platform/tegra-cec/tegra_cec.h   | 127 ++
> >  13 files changed, 711 insertions(+), 1 deletion(-)
> >  create mode 100644 Documentation/devicetree/bindings/media/tegra-cec.txt
> >  create mode 100644 drivers/media/platform/tegra-cec/Makefile
> >  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.c
> >  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.h
> > 
> 


signature.asc
Description: PGP signature


Re: [PATCH 1/3] drm: bridge: synopsys/dw-hdmi: Enable cec clock

2017-10-14 Thread Pierre-Hugues Husson
Hi Fabio,

2017-10-14 2:18 GMT+02:00 Fabio Estevam :
> Hi Pierre-Hugues,
>
> On Fri, Oct 13, 2017 at 7:53 PM, Pierre-Hugues Husson  wrote:
>> The documentation already mentions "cec" optional clock, but
>> currently the driver doesn't enable it.
>
> The cec clock is enabled at dw_hdmi_cec_enable().
As far as I understand, dw_hdmi_cec_enable only gates
the CEC clock inside the Synopsis IP,
but the SOC still has to provide a specific CEC clock to it.
To enable such an external CEC clock, the binding documentation [1]
mentions a "cec" optional clock, and I'm not seeing any code in dw-hdmi
to enable it.

Regards,

[1] On next-20170929
Documentation/devicetree/bindings/display/bridge/dw_hdmi.txt line 28


Re: [PATCH 0/3] Enable CEC on rk3399

2017-10-14 Thread Pierre-Hugues Husson
Hi Hans,

> Nice! I had a similar dw-hdmi.c patch pending but got around to posting it.
>
> I'll brush off my old rk3288 patches and see if I can get CEC enabled
> for my firefly-reload. I was close to getting it work, but I guess
> missed the "enable cec pin" change.
Please note that on rk3288, there are two CEC pins, and you must write
in RK3288_GRF_SOC_CON8 which pin you're using.
On the firefly-reload, the pin used is GPIO7C0, while the default pin
configuration is GPIO7C7.

Regards,


Re: cron job: media_tree daily build: ERRORS

2017-10-14 Thread Jasmin J.
Hello Hans!

I provided some patches to solve all of this errors.

Please can apply them.

BR,
   Jasmin


Re: [PATCHv4 0/4] tegra-cec: add Tegra HDMI CEC support

2017-10-14 Thread Hans Verkuil
Hi Thierry,

On 09/11/2017 02:29 PM, Hans Verkuil wrote:
> From: Hans Verkuil 
> 
> This patch series adds support for the Tegra CEC functionality.
> 
> This v4 has been rebased to the latest 4.14 pre-rc1 mainline.
> 
> Please review! Other than for the bindings that are now Acked I have not
> received any feedback.

Can you or someone else from the Tegra maintainers review this?

I have not heard anything about this patch series, nor of the previous
versions of this series. What's the hold-up?

Regards,

Hans

> 
> The first patch documents the CEC bindings, the second adds support
> for this to tegra124.dtsi and enables it for the Jetson TK1.
> 
> The third patch adds the CEC driver itself and the final patch adds
> the cec notifier support to the drm/tegra driver in order to notify
> the CEC driver whenever the physical address changes.
> 
> I expect that the dts changes apply as well to the Tegra X1/X2 and possibly
> other Tegra SoCs, but I can only test this with my Jetson TK1 board.
> 
> The dt-bindings and the tegra-cec driver would go in through the media
> subsystem, the drm/tegra part through the drm subsystem and the dts
> changes through (I guess) the linux-tegra developers. Luckily they are
> all independent of one another.
> 
> To test this you need the CEC utilities from git://linuxtv.org/v4l-utils.git.
> 
> To build this:
> 
> git clone git://linuxtv.org/v4l-utils.git
> cd v4l-utils
> ./bootstrap.sh; ./configure
> make
> sudo make install # optional, you really only need utils/cec*
> 
> To test:
> 
> cec-ctl --playback # configure as playback device
> cec-ctl -S # detect all connected CEC devices
> 
> See here for the public CEC API:
> 
> https://hverkuil.home.xs4all.nl/spec/uapi/cec/cec-api.html
> 
> Regards,
> 
>   Hans
> 
> Changes since v3:
> 
> - Use the new CEC_CAP_DEFAULTS define
> - Use IS_ERR(cec->adap) instead of IS_ERR_OR_NULL(cec->adap)
>   (cec_allocate_adapter never returns a NULL pointer)
> - Drop the device_init_wakeup: wakeup is not (yet) supported by
>   the CEC framework and I have never tested it.
> 
> Hans Verkuil (4):
>   dt-bindings: document the tegra CEC bindings
>   ARM: tegra: add CEC support to tegra124.dtsi
>   tegra-cec: add Tegra HDMI CEC driver
>   drm/tegra: add cec-notifier support
> 
>  .../devicetree/bindings/media/tegra-cec.txt|  27 ++
>  MAINTAINERS|   8 +
>  arch/arm/boot/dts/tegra124-jetson-tk1.dts  |   4 +
>  arch/arm/boot/dts/tegra124.dtsi|  12 +-
>  drivers/gpu/drm/tegra/Kconfig  |   1 +
>  drivers/gpu/drm/tegra/drm.h|   3 +
>  drivers/gpu/drm/tegra/hdmi.c   |   9 +
>  drivers/gpu/drm/tegra/output.c |   6 +
>  drivers/media/platform/Kconfig |  11 +
>  drivers/media/platform/Makefile|   2 +
>  drivers/media/platform/tegra-cec/Makefile  |   1 +
>  drivers/media/platform/tegra-cec/tegra_cec.c   | 501 
> +
>  drivers/media/platform/tegra-cec/tegra_cec.h   | 127 ++
>  13 files changed, 711 insertions(+), 1 deletion(-)
>  create mode 100644 Documentation/devicetree/bindings/media/tegra-cec.txt
>  create mode 100644 drivers/media/platform/tegra-cec/Makefile
>  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.c
>  create mode 100644 drivers/media/platform/tegra-cec/tegra_cec.h
> 



Re: [PATCHv2 0/9] omapdrm: hdmi4: add CEC support

2017-10-14 Thread Hans Verkuil
On 10/12/2017 10:03 AM, Tomi Valkeinen wrote:
> 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
> Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> 
> On 12/10/17 09:50, Hans Verkuil wrote:
> 
>>> I can't test with a TV, so no CEC for me... But otherwise I think the
>>> series works ok now, and looks ok. So I'll apply, but it's a bit late
>>> for the next merge window, so I'll aim for 4.15 with this.
>>
>> What is the status? Do you need anything from me? I'd like to get this in 
>> for 4.15.
> 
> Thanks for reminding. I think I would've forgotten...
> 
> I sent the pull request, so all should be fine.
> 
> If possible, please test the pull request, preferably with drm-next
> merged (git://people.freedesktop.org/~airlied/linux drm-next), as I
> don't have a CEC capable display.

Tested with drm-next. Works fine!

Great to finally see this merged!

Regards,

Hans


Re: [PATCH] build: Remove IDA from lirc_dev

2017-10-14 Thread Hans Verkuil
Added Sean.

Hans

On 10/13/2017 10:33 PM, Jasmin J. wrote:
> Hi!
> 
> With this patch, the media-tree can be compiled back to Kernel 2.6.37.
> For 2.6.32 some patches do not apply. I will fix that later.
> 
> @David:
> Please can you review my changes if I reverted the patch correctly.
> "git revert" didn't work, because of the changes in lirc_dev.c.
> 
> BR,
>Jasmin
> 



Re: [PATCH 0/3] Enable CEC on rk3399

2017-10-14 Thread Hans Verkuil
On 10/14/2017 12:53 AM, Pierre-Hugues Husson wrote:
> Enable CEC on firefly-rk3399.
> Tested on a TV with cec-ctl --playback; cec-ctl -S
> 
> Pierre-Hugues Husson (3):
>   drm: bridge: synopsys/dw-hdmi: Enable cec clock
>   arm64: dts: rockchip: add the cec clk for dw-mipi-hdmi on rk3399
>   arm64: dts: rockchip: enable cec pin for rk3399 firefly
> 
>  arch/arm64/boot/dts/rockchip/rk3399-firefly.dts |  2 ++
>  arch/arm64/boot/dts/rockchip/rk3399.dtsi|  8 ++--
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c   | 16 
>  3 files changed, 24 insertions(+), 2 deletions(-)
> 

Nice! I had a similar dw-hdmi.c patch pending but got around to posting it.

I'll brush off my old rk3288 patches and see if I can get CEC enabled
for my firefly-reload. I was close to getting it work, but I guess
missed the "enable cec pin" change.

Regards,

Hans


Re: [PATCH 1/3] drm: bridge: synopsys/dw-hdmi: Enable cec clock

2017-10-14 Thread Hans Verkuil
On 10/14/2017 12:53 AM, Pierre-Hugues Husson wrote:
> The documentation already mentions "cec" optional clock, but
> currently the driver doesn't enable it.
> 
> Signed-off-by: Pierre-Hugues Husson 

Acked-by: Hans Verkuil 

Thanks!

Hans

> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 17 +
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c 
> b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> index bf14214fa464..5007cdf43131 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
> @@ -138,6 +138,7 @@ struct dw_hdmi {
>   struct device *dev;
>   struct clk *isfr_clk;
>   struct clk *iahb_clk;
> + struct clk *cec_clk;
>   struct dw_hdmi_i2c *i2c;
>  
>   struct hdmi_data_info hdmi_data;
> @@ -2382,6 +2383,18 @@ __dw_hdmi_probe(struct platform_device *pdev,
>   goto err_isfr;
>   }
>  
> + hdmi->cec_clk = devm_clk_get(hdmi->dev, "cec");
> + if (IS_ERR(hdmi->cec_clk)) {
> + hdmi->cec_clk = NULL;
> + } else {
> + ret = clk_prepare_enable(hdmi->cec_clk);
> + if (ret) {
> + dev_err(hdmi->dev, "Cannot enable HDMI cec clock: %d\n",
> + ret);
> + goto err_res;
> + }
> + }
> +
>   /* Product and revision IDs */
>   hdmi->version = (hdmi_readb(hdmi, HDMI_DESIGN_ID) << 8)
> | (hdmi_readb(hdmi, HDMI_REVISION_ID) << 0);
> @@ -2518,6 +2531,8 @@ __dw_hdmi_probe(struct platform_device *pdev,
>   cec_notifier_put(hdmi->cec_notifier);
>  
>   clk_disable_unprepare(hdmi->iahb_clk);
> + if (hdmi->cec_clk)
> + clk_disable_unprepare(hdmi->cec_clk);
>  err_isfr:
>   clk_disable_unprepare(hdmi->isfr_clk);
>  err_res:
> @@ -2541,6 +2556,8 @@ static void __dw_hdmi_remove(struct dw_hdmi *hdmi)
>  
>   clk_disable_unprepare(hdmi->iahb_clk);
>   clk_disable_unprepare(hdmi->isfr_clk);
> + if (hdmi->cec_clk)
> + clk_disable_unprepare(hdmi->cec_clk);
>  
>   if (hdmi->i2c)
>   i2c_del_adapter(>i2c->adap);
>