Re: [PATCH 4/7] media: exynos4-is: Remove dependency on obsolete SoC support

2017-10-04 Thread Krzysztof Kozlowski
On Wed, Oct 4, 2017 at 8:38 AM, Marek Szyprowski
<m.szyprow...@samsung.com> wrote:
> Support for Exynos4212 SoCs has been removed by commit bca9085e0ae9 ("ARM:
> dts: exynos: remove Exynos4212 support (dead code)"), so there is no need
> to keep remaining dead code related to this SoC version.
>
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  drivers/media/platform/exynos4-is/Kconfig | 2 +-
>  drivers/media/platform/exynos4-is/fimc-core.c | 2 +-
>  drivers/media/platform/exynos4-is/fimc-lite.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Acked-by: Krzysztof Kozlowski <k...@kernel.org>

Best regards,
Krzysztof


Re: [PATCH v4 2/4] ARM: dts: exynos: Add clean name of compatible.

2017-09-19 Thread Krzysztof Kozlowski
On Wed, Sep 13, 2017 at 08:41:53PM +0900, Hoegeun Kwon wrote:
> Exynos 5250 and 5420 have different hardware rotation limits. However,
> currently it uses only one compatible - "exynos5-gsc". Since we have
> to distinguish between these two, we add different compatible.
> 
> Signed-off-by: Hoegeun Kwon 
> ---
>  arch/arm/boot/dts/exynos5250.dtsi | 8 
>  arch/arm/boot/dts/exynos5420.dtsi | 4 ++--
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 

Thanks, applied with modified subject.

Best regards,
Krzysztof



Re: [PATCH v3 5/6] [media] exynos-gsc: Remove unnecessary compatible

2017-09-08 Thread Krzysztof Kozlowski
On Fri, Sep 8, 2017 at 8:02 AM, Hoegeun Kwon  wrote:
> Currently, the compatible('samsung,exynos5-gsc') is not used.
> Remove unnecessary compatible.
>
> Signed-off-by: Hoegeun Kwon 
> ---
>  Documentation/devicetree/bindings/media/exynos5-gsc.txt | 8 
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/exynos5-gsc.txt 
> b/Documentation/devicetree/bindings/media/exynos5-gsc.txt
> index daa56d5..1ea05f1 100644
> --- a/Documentation/devicetree/bindings/media/exynos5-gsc.txt
> +++ b/Documentation/devicetree/bindings/media/exynos5-gsc.txt
> @@ -3,9 +3,9 @@
>  G-Scaler is used for scaling and color space conversion on EXYNOS5 SoCs.
>
>  Required properties:
> -- compatible: should be "samsung,exynos5-gsc" (for Exynos 5250, 5420 and
> - 5422 SoCs) or "samsung,exynos5433-gsc" (Exynos 5433)
> - or "samsung,exynos5250-gsc" or "samsung,exynos5420-gsc"
> +- compatible: should be "samsung,exynos5250-gsc", "samsung,exynos5420-gsc"
> + or "samsung,exynos5433-gsc" (for Exynos 5250, 5420, 5422,
> + and 5433 SoCs)

You should not remove the compatible (neither here nor in the driver)
but mark it as deprecated. Removal should happen slightly later.

Best regards,
Krzysztof

>  - reg: should contain G-Scaler physical address location and length.
>  - interrupts: should contain G-Scaler interrupt number
>
> @@ -16,7 +16,7 @@ Optional properties:
>  Example:
>
>  gsc_0:  gsc@0x13e0 {
> -   compatible = "samsung,exynos5-gsc";
> +   compatible = "samsung,exynos5250-gsc;
> reg = <0x13e0 0x1000>;
> interrupts = <0 85 0>;
>  };


Re: [PATCH for v4.13] ARM: dts: exynos: add needs-hpd for Odroid-XU3/4

2017-08-02 Thread Krzysztof Kozlowski
On Mon, Jul 31, 2017 at 01:56:42PM +0200, Hans Verkuil wrote:
> CEC support was added for Exynos5 in 4.13, but for the Odroids we need to set
> 'needs-hpd' as well since CEC is disabled when there is no HDMI hotplug 
> signal,
> just as for the exynos4 Odroid-U3.
> 
> This is due to the level-shifter that is disabled when there is no HPD, thus
> blocking the CEC signal as well. Same close-but-no-cigar board design as the
> Odroid-U3.
> 
> Tested with my Odroid XU4.
> 
> Signed-off-by: Hans Verkuil 

Thanks, applied for v4.13.

Best regards,
Krzysztof



Re: [PATCHv2] ARM: dts: exynos: add needs-hpd to for Odroid-U3

2017-06-15 Thread Krzysztof Kozlowski
On Tue, Jun 13, 2017 at 03:47:06PM +0200, Hans Verkuil wrote:
> The Odroid-U3 board has an IP4791CZ12 level shifter that is
> disabled if the HPD is low, which means that the CEC pin is
> disabled as well.
> 
> Signed-off-by: Hans Verkuil 
> ---
> Changes since v1: moved  to after  to keep it somewhat
> alphabetical.
> ---
>  arch/arm/boot/dts/exynos4412-odroidu3.dts | 4 
>  1 file changed, 4 insertions(+)

Thanks, applied.

Best regards,
Krzysztof



Re: [PATCH 9/9] ARM: dts: exynos: add needs-hpd to for Odroid-U3

2017-06-07 Thread Krzysztof Kozlowski
On Wed, Jun 07, 2017 at 04:46:16PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verk...@cisco.com>
> 
> The Odroid-U3 board has an IP4791CZ12 level shifter that is
> disabled if the HPD is low, which means that the CEC pin is
> disabled as well.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Cc: Krzysztof Kozlowski <k...@kernel.org>
> Cc: Andrzej Hajda <a.ha...@samsung.com>
> Cc: devicet...@vger.kernel.org
> ---
>  arch/arm/boot/dts/exynos4412-odroidu3.dts | 4 
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos4412-odroidu3.dts 
> b/arch/arm/boot/dts/exynos4412-odroidu3.dts
> index 7504a5aa538e..7209cb48fc2a 100644
> --- a/arch/arm/boot/dts/exynos4412-odroidu3.dts
> +++ b/arch/arm/boot/dts/exynos4412-odroidu3.dts
> @@ -131,3 +131,7 @@
>   cs-gpios = < 5 GPIO_ACTIVE_HIGH>;
>   status = "okay";
>  };
> +
> + {
> + needs-hpd;
> +};

All good, except we try to keep them sorted alphabetically (helps
avoiding conflicts and makes things easier to find)... which for this
particular file will be difficult as it is semi-sorted. :)
Anyway, how about putting this new node after ?

Best regards,
Krzysztof



Re: [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family

2017-06-02 Thread Krzysztof Kozlowski
On Thu, Jun 01, 2017 at 08:19:23AM +0200, Marek Szyprowski wrote:
> Hi Krzysztof,
> 
> On 2017-05-31 21:55, Krzysztof Kozlowski wrote:
> > On Wed, May 31, 2017 at 01:00:17PM +0200, Marek Szyprowski wrote:
> > > Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
> > > Exynos4 SoC series, so enable support for it using the same compatible
> > > string.
> > > 
> > > Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.
> > > 
> > > Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> > > ---
> > >   arch/arm/boot/dts/exynos5250-pinctrl.dtsi  |  7 +++
> > >   arch/arm/boot/dts/exynos5250-snow-common.dtsi  |  4 
> > >   arch/arm/boot/dts/exynos5250.dtsi  | 13 +
> > >   arch/arm/boot/dts/exynos5420-pinctrl.dtsi  |  7 +++
> > >   arch/arm/boot/dts/exynos5420.dtsi  | 13 +
> > >   arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  4 
> > >   6 files changed, 48 insertions(+)
> > > 
> > > diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi 
> > > b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> > > index 2f6ab32b5954..1fd122db18e6 100644
> > > --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> > > +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> > > @@ -589,6 +589,13 @@
> > >   samsung,pin-pud = ;
> > >   samsung,pin-drv = ;
> > >   };
> > > +
> > > + hdmi_cec: hdmi-cec {
> > > + samsung,pins = "gpx3-6";
> > > + samsung,pin-function = ;
> > > + samsung,pin-pud = ;
> > > + samsung,pin-drv = ;
> > > + };
> > >   };
> > >   _1 {
> > > diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi 
> > > b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> > > index 8f3a80430748..e1d293dbbe5d 100644
> > > --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> > > +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> > > @@ -272,6 +272,10 @@
> > >   vdd_pll-supply = <_reg>;
> > >   };
> > > + {
> > > + status = "okay";
> > > +};
> > > +
> > >   _0 {
> > >   status = "okay";
> > >   samsung,i2c-sda-delay = <100>;
> > > diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
> > > b/arch/arm/boot/dts/exynos5250.dtsi
> > > index 79c9c885613a..fbdc1d53a2ce 100644
> > > --- a/arch/arm/boot/dts/exynos5250.dtsi
> > > +++ b/arch/arm/boot/dts/exynos5250.dtsi
> > > @@ -689,6 +689,19 @@
> > >   samsung,syscon-phandle = 
> > > <_system_controller>;
> > >   };
> > > + hdmicec: cec@101B {
> > > + compatible = "samsung,s5p-cec";
> > > + reg = <0x101B 0x200>;
> > > + interrupts = ;
> > > + clocks = < CLK_HDMI_CEC>;
> > > + clock-names = "hdmicec";
> > > + samsung,syscon-phandle = <_system_controller>;
> > > + hdmi-phandle = <>;
> > > + pinctrl-names = "default";
> > > + pinctrl-0 = <_cec>;
> > > + status = "disabled";
> > > + };
> > What about Exynos5410? Is it applicable there as well? If yes, then this
> > could be added to exynos5.dtsi... although then clocks and pinctrl
> > should remain in SoC-specific DTSI. We're following such pattern in many
> > places but I am not sure if this more readable.
> 
> Exynos5410 has the same HW module, but as for now, it doesn't have support
> for
> HDMI due to missing a few pieces (mainly clocks definitions). I'm not sure
> if it makes sense to add only HDMICEC without HDMI itself. Maybe later, when
> multimedia support is added to Exynos5410, this can be integrated to
> exynos5.dtsi.

Sounds fair, applied. Thanks!

Best regards,
Krzysztof



Re: [PATCH] ARM: dts: exynos: Add HDMI CEC device to Exynos5 SoC family

2017-05-31 Thread Krzysztof Kozlowski
On Wed, May 31, 2017 at 01:00:17PM +0200, Marek Szyprowski wrote:
> Exynos5250 and Exynos542x SoCs have the same CEC hardware module as
> Exynos4 SoC series, so enable support for it using the same compatible
> string.
> 
> Tested on Odroid XU3 (Exynos5422) and Google Snow (Exynos5250) boards.
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/boot/dts/exynos5250-pinctrl.dtsi  |  7 +++
>  arch/arm/boot/dts/exynos5250-snow-common.dtsi  |  4 
>  arch/arm/boot/dts/exynos5250.dtsi  | 13 +
>  arch/arm/boot/dts/exynos5420-pinctrl.dtsi  |  7 +++
>  arch/arm/boot/dts/exynos5420.dtsi  | 13 +
>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  4 
>  6 files changed, 48 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi 
> b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> index 2f6ab32b5954..1fd122db18e6 100644
> --- a/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-pinctrl.dtsi
> @@ -589,6 +589,13 @@
>   samsung,pin-pud = ;
>   samsung,pin-drv = ;
>   };
> +
> + hdmi_cec: hdmi-cec {
> + samsung,pins = "gpx3-6";
> + samsung,pin-function = ;
> + samsung,pin-pud = ;
> + samsung,pin-drv = ;
> + };
>  };
>  
>  _1 {
> diff --git a/arch/arm/boot/dts/exynos5250-snow-common.dtsi 
> b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> index 8f3a80430748..e1d293dbbe5d 100644
> --- a/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> +++ b/arch/arm/boot/dts/exynos5250-snow-common.dtsi
> @@ -272,6 +272,10 @@
>   vdd_pll-supply = <_reg>;
>  };
>  
> + {
> + status = "okay";
> +};
> +
>  _0 {
>   status = "okay";
>   samsung,i2c-sda-delay = <100>;
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi 
> b/arch/arm/boot/dts/exynos5250.dtsi
> index 79c9c885613a..fbdc1d53a2ce 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -689,6 +689,19 @@
>   samsung,syscon-phandle = <_system_controller>;
>   };
>  
> + hdmicec: cec@101B {
> + compatible = "samsung,s5p-cec";
> + reg = <0x101B 0x200>;
> + interrupts = ;
> + clocks = < CLK_HDMI_CEC>;
> + clock-names = "hdmicec";
> + samsung,syscon-phandle = <_system_controller>;
> + hdmi-phandle = <>;
> + pinctrl-names = "default";
> + pinctrl-0 = <_cec>;
> + status = "disabled";
> + };

What about Exynos5410? Is it applicable there as well? If yes, then this
could be added to exynos5.dtsi... although then clocks and pinctrl
should remain in SoC-specific DTSI. We're following such pattern in many
places but I am not sure if this more readable.

Beside that, looks fine to me.

Best regards,
Krzysztof



Re: [PATCH v3 16/16] ARM: dts: exynos: Remove MFC reserved buffers

2017-05-15 Thread Krzysztof Kozlowski
On Mon, Mar 20, 2017 at 11:56:42AM +0100, Marek Szyprowski wrote:
> During my research I found that some of the requirements for the memory
> buffers for MFC v6+ devices were blindly copied from the previous (v5)
> version and simply turned out to be excessive. The relaxed requirements
> are applied by the recent patches to the MFC driver and the driver is
> now fully functional even without the reserved memory blocks for all
> v6+ variants. This patch removes those reserved memory nodes from all
> boards having MFC v6+ hardware block.
> 
> Signed-off-by: Marek Szyprowski 
> Reviewed-by: Javier Martinez Canillas 
> Tested-by: Javier Martinez Canillas 
> Acked-by: Andrzej Hajda 
> Tested-by: Smitha T Murthy 
> ---
>  arch/arm/boot/dts/exynos5250-arndale.dts   | 1 -
>  arch/arm/boot/dts/exynos5250-smdk5250.dts  | 1 -
>  arch/arm/boot/dts/exynos5250-spring.dts| 1 -
>  arch/arm/boot/dts/exynos5420-arndale-octa.dts  | 1 -
>  arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 -
>  arch/arm/boot/dts/exynos5420-smdk5420.dts  | 1 -
>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 -
>  arch/arm/boot/dts/exynos5800-peach-pi.dts  | 1 -
>  8 files changed, 8 deletions(-)
> 

Thanks, applied.

Best regards,
Krzysztof



Re: [git:media_tree/master] [media] ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi

2017-04-11 Thread Krzysztof Kozlowski
On Tue, Apr 11, 2017 at 10:54 AM, Mauro Carvalho Chehab
<mche...@s-opensource.com> wrote:
> Em Tue, 11 Apr 2017 10:36:58 +0200
> Krzysztof Kozlowski <k...@kernel.org> escreveu:
>
>> On Mon, Apr 10, 2017 at 6:12 PM, Mauro Carvalho Chehab
>> <mche...@s-opensource.com> wrote:
>> > This is an automatic generated email to let you know that the following 
>> > patch were queued:
>> >
>> > Subject: [media] ARM: dts: exynos: add HDMI controller phandle to 
>> > exynos4.dtsi
>> > Author:  Hans Verkuil <hans.verk...@cisco.com>
>> > Date:Tue Dec 13 12:37:16 2016 -0200
>> >
>> > Add the new hdmi phandle to exynos4.dtsi. This phandle is needed by the
>> > s5p-cec driver to initialize the CEC notifier framework.
>> >
>> > Tested with my Odroid U3.
>> >
>> > Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
>> > Tested-by: Marek Szyprowski <m.szyprow...@samsung.com>
>> > CC: linux-samsung-...@vger.kernel.org
>> > CC: devicet...@vger.kernel.org
>> > CC: Krzysztof Kozlowski <k...@kernel.org>
>> > Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>
>> >
>> >  arch/arm/boot/dts/exynos4.dtsi | 1 +
>> >  1 file changed, 1 insertion(+)
>> >
>>
>> Mauro, you should not apply it. It is already going through samsung-soc [1].
>> if you need this patch for bisectability or any other reasons, I
>> provided a tag with it here:
>> https://www.spinics.net/lists/devicetree/msg171182.html
>>
>> Please drop the patch because now it will get duplicated.
>
> Having exactly the same patch applied on multiple trees usually is
> not a problem, provided that it doesn't rise a non-trivial
> conflict.
>
> I avoid rebase the tree where this patch is applied, as rebasing it
> affect the workflow of other developers.
>
> I'm afraid that, if I revert this patch, it will cause more harm than
> good.

Of course, revert is wrong. The patch should be dropped with rebase,
assuming that you accept the rebase itself. But if you do not
rebase... then it has to  stay.

> So, I guess the best solution to fix the issue would be to pull from
> a stable branch on your tree with has this patch and solve conflicts,
> if any. This way, nothing will popup when merging upstream.

This is why I provided it in separate tag, in first place!
That is a proper solution for avoiding any patch duplication and
conflicts. Indeed you are right that duplication of commits should not
do any harm... but it is not a proper way of development, right?

Anyway, it is up to you. I provided you a tag with it so you can merge
it if needed (which would require rebasing). If not, then of course
please do not revert it.

Best regards,
Krzysztof


Re: [git:media_tree/master] [media] ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi

2017-04-11 Thread Krzysztof Kozlowski
On Mon, Apr 10, 2017 at 6:12 PM, Mauro Carvalho Chehab
<mche...@s-opensource.com> wrote:
> This is an automatic generated email to let you know that the following patch 
> were queued:
>
> Subject: [media] ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi
> Author:  Hans Verkuil <hans.verk...@cisco.com>
> Date:Tue Dec 13 12:37:16 2016 -0200
>
> Add the new hdmi phandle to exynos4.dtsi. This phandle is needed by the
> s5p-cec driver to initialize the CEC notifier framework.
>
> Tested with my Odroid U3.
>
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Tested-by: Marek Szyprowski <m.szyprow...@samsung.com>
> CC: linux-samsung-...@vger.kernel.org
> CC: devicet...@vger.kernel.org
> CC: Krzysztof Kozlowski <k...@kernel.org>
> Signed-off-by: Mauro Carvalho Chehab <mche...@s-opensource.com>
>
>  arch/arm/boot/dts/exynos4.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>

Mauro, you should not apply it. It is already going through samsung-soc [1].
if you need this patch for bisectability or any other reasons, I
provided a tag with it here:
https://www.spinics.net/lists/devicetree/msg171182.html

Please drop the patch because now it will get duplicated.

Best regards,
Krzysztof

[1] https://www.spinics.net/lists/arm-kernel/msg575229.html


Re: [PATCHv5 07/11] s5p-cec: add cec-notifier support, move out of staging

2017-03-30 Thread Krzysztof Kozlowski
On Wed, Mar 29, 2017 at 04:15:39PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verk...@cisco.com>
> 
> By using the CEC notifier framework there is no longer any reason
> to manually set the physical address. This was the one blocking
> issue that prevented this driver from going out of staging, so do
> this move as well.
> 
> Update the bindings documenting the new hdmi phandle and
> update exynos4.dtsi accordingly.
> 
> Tested with my Odroid U3.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Tested-by: Marek Szyprowski <m.szyprow...@samsung.com>
> CC: linux-samsung-...@vger.kernel.org
> CC: Krzysztof Kozlowski <k...@kernel.org>
> ---
>  drivers/media/platform/Kconfig | 18 +++
>  drivers/media/platform/Makefile|  1 +
>  .../media => media/platform}/s5p-cec/Makefile  |  0
>  .../platform}/s5p-cec/exynos_hdmi_cec.h|  0
>  .../platform}/s5p-cec/exynos_hdmi_cecctrl.c|  0
>  .../media => media/platform}/s5p-cec/regs-cec.h|  0
>  .../media => media/platform}/s5p-cec/s5p_cec.c | 35 
> ++
>  .../media => media/platform}/s5p-cec/s5p_cec.h |  3 ++
>  drivers/staging/media/Kconfig  |  2 --
>  drivers/staging/media/Makefile |  1 -
>  drivers/staging/media/s5p-cec/Kconfig  |  9 --
>  drivers/staging/media/s5p-cec/TODO |  7 -
>  12 files changed, 52 insertions(+), 24 deletions(-)
>  rename drivers/{staging/media => media/platform}/s5p-cec/Makefile (100%)
>  rename drivers/{staging/media => media/platform}/s5p-cec/exynos_hdmi_cec.h 
> (100%)
>  rename drivers/{staging/media => 
> media/platform}/s5p-cec/exynos_hdmi_cecctrl.c (100%)
>  rename drivers/{staging/media => media/platform}/s5p-cec/regs-cec.h (100%)
>  rename drivers/{staging/media => media/platform}/s5p-cec/s5p_cec.c (89%)
>  rename drivers/{staging/media => media/platform}/s5p-cec/s5p_cec.h (97%)
>  delete mode 100644 drivers/staging/media/s5p-cec/Kconfig
>  delete mode 100644 drivers/staging/media/s5p-cec/TODO
> 

Acked-by: Krzysztof Kozlowski <k...@kernel.org>

Best regards,
Krzysztof



Re: [PATCHv5 06/11] s5p-cec.txt: document the HDMI controller phandle

2017-03-30 Thread Krzysztof Kozlowski
On Wed, Mar 29, 2017 at 04:15:38PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verk...@cisco.com>
> 
> Update the bindings documenting the new hdmi phandle.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> CC: linux-samsung-...@vger.kernel.org
> CC: devicet...@vger.kernel.org
> CC: Krzysztof Kozlowski <k...@kernel.org>
> ---
>  Documentation/devicetree/bindings/media/s5p-cec.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Krzysztof Kozlowski <k...@kernel.org>

Best regards,
Krzysztof



Re: [PATCHv5 04/11] exynos_hdmi: add CEC notifier support

2017-03-30 Thread Krzysztof Kozlowski
On Wed, Mar 29, 2017 at 04:15:36PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verk...@cisco.com>
> 
> Implement the CEC notifier support to allow CEC drivers to
> be informed when there is a new physical address.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Tested-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos_hdmi.c | 20 ++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 

Acked-by: Krzysztof Kozlowski <k...@kernel.org>
(you still need Exynos DRM maintainer ack)

Best regards,
Krzysztof



Re: [PATCHv5 05/11] ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi

2017-03-30 Thread Krzysztof Kozlowski
On Wed, Mar 29, 2017 at 04:15:37PM +0200, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verk...@cisco.com>
> 
> Add the new hdmi phandle to exynos4.dtsi. This phandle is needed by the
> s5p-cec driver to initialize the CEC notifier framework.
> 
> Tested with my Odroid U3.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Tested-by: Marek Szyprowski <m.szyprow...@samsung.com>
> CC: linux-samsung-...@vger.kernel.org
> CC: devicet...@vger.kernel.org
> CC: Krzysztof Kozlowski <k...@kernel.org>
> ---
>  arch/arm/boot/dts/exynos4.dtsi | 1 +
>  1 file changed, 1 insertion(+)
>

Thanks, applied. Now I noticed that you need it for maintaining the
bisectability for this driver (although it is a staging driver). In that
case, if anyone needs this as well then:


The following changes since commit c1ae3cfa0e89fa1a7ecc4c99031f5e9ae99d9201:

  Linux 4.11-rc1 (2017-03-05 12:59:56 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git 
tags/samsung-dt-hdmi-cec-4.12

for you to fetch changes up to 192c1df4a75499a6ab70aca38c6a7e5e40013d77:

  ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi (2017-03-31 
00:21:18 +0300)


Add to hdmi-cec node a phandle to hdmi node for new hdmi-cec notifier.


Hans Verkuil (1):
  ARM: dts: exynos: add HDMI controller phandle to exynos4.dtsi

 arch/arm/boot/dts/exynos4.dtsi | 1 +
 1 file changed, 1 insertion(+)


Best regards,
Krzysztof



Re: [PATCHv5 00/11] video/exynos/sti/cec: add CEC notifier & use in drivers

2017-03-30 Thread Krzysztof Kozlowski
On Thu, Mar 30, 2017 at 09:47:00AM +0200, Daniel Vetter wrote:
> On Wed, Mar 29, 2017 at 09:59:34PM +0200, Hans Verkuil wrote:
> > Hi Daniel,
> > 
> > On 29/03/17 19:47, Daniel Vetter wrote:
> > > On Wed, Mar 29, 2017 at 04:15:32PM +0200, Hans Verkuil wrote:
> > >> From: Hans Verkuil 
> > >>
> > >> This patch series adds the CEC physical address notifier code, based on
> > >> Russell's code:
> > >>
> > >> https://patchwork.kernel.org/patch/9277043/
> > >>
> > >> It adds support for it to the exynos_hdmi drm driver, adds support for
> > >> it to the CEC framework and finally adds support to the s5p-cec driver,
> > >> which now can be moved out of staging.
> > >>
> > >> Also included is similar code for the STI platform, contributed by
> > >> Benjamin Gaignard.
> > >>
> > >> Tested the exynos code with my Odroid U3 exynos4 devboard.
> > >>
> > >> After discussions with Daniel Vetter and Russell King I have removed
> > >> the EDID/ELD/HPD connect/disconnect events from the notifier and now
> > >> just use it to report the CEC physical address. This also means that
> > >> it is now renamed to CEC notifier instead of HPD notifier and that
> > >> it is now in drivers/media. The block_notifier was dropped as well
> > >> and instead a simple callback is registered. This means that the
> > >> relationship between HDMI and CEC is now 1:1 and no longer 1:n, but
> > >> should this be needed in the future, then that can easily be added
> > >> back.
> > >>
> > >> Daniel, regarding your suggestions here:
> > >>
> > >> http://www.spinics.net/lists/dri-devel/msg133907.html
> > >>
> > >> this patch series maps to your mail above as follows:
> > >>
> > >> struct cec_pin == struct cec_notifier
> > >> cec_(un)register_pin == cec_notifier_get/put
> > >> cec_set_address == cec_notifier_set_phys_addr
> > >> cec_(un)register_callbacks == cec_notifier_(un)register
> > >>
> > >> Comments are welcome. I'd like to get this in for the 4.12 kernel as
> > >> this is a missing piece needed to integrate CEC drivers.
> > >>
> > >> Regards,
> > >>
> > >>  Hans
> > >>
> > >> Changes since v4:
> > >> - Dropped EDID/ELD/connect/disconnect support. Instead, just report the
> > >>   CEC physical address (and use INVALID when disconnecting).
> > >> - Since this is now completely CEC specific, move it to drivers/media
> > >>   and rename to cec-notifier.
> > >> - Drop block_notifier. Instead just set a callback for the notifier.
> > >> - Use 'hdmi-phandle' in the bindings for both exynos and sti. So no
> > >>   vendor prefix and 'hdmi-phandle' instead of 'hdmi-handle'.
> > >> - Make struct cec_notifier opaque. Add a helper function to get the
> > >>   physical address from a cec_notifier struct.
> > >> - Provide dummy functions in cec-notifier.h so it can be used when
> > >>   CONFIG_MEDIA_CEC_NOTIFIER is undefined.
> > >> - Don't select the CEC notifier in the HDMI drivers. It should only
> > >>   be enabled by actual CEC drivers.
> > > 
> > > I just quickly scaned through it, but this seems to address all my
> > > concerns fully. Thanks for respinning. On the entire pile (or just the
> > > core cec notifier bits):
> > > 
> > > Acked-by: Daniel Vetter 
> > 
> > Fantastic! Thank you very much for your comments.
> > 
> > One last question: the patches for drivers/gpu/drm: can they go through
> > the media subsystem or do you want to take them? They do depend on the first
> > two patches of this series (cec-edid and cec-notifier), so it is a bit more
> > coordination if they have to go through the drm subsystem.
> 
> Doesn't seem to touch anything where I expect conflicts, so as long as it
> shows up in linux-next timely I think that's good. Please poke driver
> maintainers for their ack though, but if they fail to respond within a few
> days you can take my ack for merging the entire pile through media.
> 
> Cheers, Daniel

Hi Hans,

I will take the exynos DTS patch through samsung-soc. If anyone needs it
for bisectability, I can provide a tag.

For the drm and media exynos code, I am not the one to ack.

Best regards,
Krzysztof


Re: [PATCH 15/15] ARM: dts: exynos: Remove MFC reserved buffersg

2017-02-20 Thread Krzysztof Kozlowski
On Mon, Feb 20, 2017 at 12:28 PM, Sylwester Nawrocki
<s.nawro...@samsung.com> wrote:
> On 02/14/2017 06:03 PM, Krzysztof Kozlowski wrote:
>> On Tue, Feb 14, 2017 at 08:52:08AM +0100, Marek Szyprowski wrote:
>>> During my research I found that some of the requirements for the memory
>>> buffers for MFC v6+ devices were blindly copied from the previous (v5)
>>> version and simply turned out to be excessive. The relaxed requirements
>>> are applied by the recent patches to the MFC driver and the driver is
>>> now fully functional even without the reserved memory blocks for all
>>> v6+ variants. This patch removes those reserved memory nodes from all
>> boards having MFC v6+ hardware block.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
>> ---
>>
>> Looks okay (for v4.12). Full bisectability depends on changes in MFC
>> driver, right?  I will need a stable branch/tag with driver changes
>> (although recently Arnd did not want driver changes mixed with DTS...).
>
> I'd suggest postponing that dts cleanup patch to v4.13, everything
> should continue to work properly with just the driver patches merged
> and that way there will be no need to pull all 14 driver patches
> into the arm-soc tree.

Yes. I didn't post an update here but to make it clear - the DTS
change in this case have to wait. It cannot go to a branch with the
driver changes (regardless if these as pulled from outside or included
as is).

Best regards,
Krzysztof


Re: [PATCH 15/15] ARM: dts: exynos: Remove MFC reserved buffersg

2017-02-14 Thread Krzysztof Kozlowski
On Tue, Feb 14, 2017 at 08:52:08AM +0100, Marek Szyprowski wrote:
> During my research I found that some of the requirements for the memory
> buffers for MFC v6+ devices were blindly copied from the previous (v5)
> version and simply turned out to be excessive. The relaxed requirements
> are applied by the recent patches to the MFC driver and the driver is
> now fully functional even without the reserved memory blocks for all
> v6+ variants. This patch removes those reserved memory nodes from all
> boards having MFC v6+ hardware block.
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/boot/dts/exynos5250-arndale.dts   | 1 -
>  arch/arm/boot/dts/exynos5250-smdk5250.dts  | 1 -
>  arch/arm/boot/dts/exynos5250-spring.dts| 1 -
>  arch/arm/boot/dts/exynos5420-arndale-octa.dts  | 1 -
>  arch/arm/boot/dts/exynos5420-peach-pit.dts | 1 -
>  arch/arm/boot/dts/exynos5420-smdk5420.dts  | 1 -
>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 1 -
>  arch/arm/boot/dts/exynos5800-peach-pi.dts  | 1 -
>  8 files changed, 8 deletions(-)
>

Looks okay (for v4.12). Full bisectability depends on changes in MFC
driver, right?  I will need a stable branch/tag with driver changes
(although recently Arnd did not want driver changes mixed with DTS...).


Best regards,
Krzysztof



Re: [PATCHv3 4/5] exynos4.dtsi: add HDMI controller phandle

2017-01-23 Thread Krzysztof Kozlowski
On Mon, Jan 23, 2017 at 11:23:36AM +0100, Hans Verkuil wrote:
> From: Hans Verkuil 
> 
> Update the bindings documenting the new hdmi phandle and
> update exynos4.dtsi accordingly. This phandle is needed by the
> s5p-cec driver to initialize the HPD notifier framework.
> 
> Tested with my Odroid U3.
> 
> Signed-off-by: Hans Verkuil 
> Tested-by: Marek Szyprowski 
> CC: linux-samsung-...@vger.kernel.org
> ---
>  Documentation/devicetree/bindings/media/s5p-cec.txt | 2 ++
>  arch/arm/boot/dts/exynos4.dtsi  | 1 +
>  2 files changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/media/s5p-cec.txt 
> b/Documentation/devicetree/bindings/media/s5p-cec.txt
> index 925ab4d72eaa..710fc005150c 100644
> --- a/Documentation/devicetree/bindings/media/s5p-cec.txt
> +++ b/Documentation/devicetree/bindings/media/s5p-cec.txt
> @@ -15,6 +15,7 @@ Required properties:
>- clock-names : from common clock binding: must contain "hdmicec",
> corresponding to entry in the clocks property.
>- samsung,syscon-phandle - phandle to the PMU system controller
> +  - samsung,hdmi-phandle - phandle to the HDMI controller
>  
>  Example:
>  
> @@ -25,6 +26,7 @@ hdmicec: cec@100B {
>   clocks = < CLK_HDMI_CEC>;
>   clock-names = "hdmicec";
>   samsung,syscon-phandle = <_system_controller>;
> + samsung,hdmi-phandle = <>;
>   pinctrl-names = "default";
>   pinctrl-0 = <_cec>;
>   status = "okay";

The bindings description can be a separate patch (often welcomed) but
does not have to. It may be squashed with driver changes. But not with
DTS changes because DTS should go through samsung-soc tree (alone). The
bindings description usually go through subsystem maintainer.

When sending the bindings description, please Cc at least
devicet...@vger.kernel.org as mentioned by get_maintainers. It is
welcomed to Cc also DT maintainers (Rob & Mark) although with simple
bindings extension I think it is not a necessity.

Anyway please split this and name the subject (git log --oneline
arch/arm/boot/dts/exynos*: "ARM: dts: exynos: Foo Bar").

Best regards,
Krzysztof

> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index c64737baa45e..51dfcbb51b6b 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -762,6 +762,7 @@
>   clocks = < CLK_HDMI_CEC>;
>   clock-names = "hdmicec";
>   samsung,syscon-phandle = <_system_controller>;
> + samsung,hdmi-phandle = <>;
>   pinctrl-names = "default";
>   pinctrl-0 = <_cec>;
>   status = "disabled";
> -- 
> 2.11.0
> 
--
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: [PATCHv2 4/4] s5p-cec: add hpd-notifier support, move out of staging

2017-01-02 Thread Krzysztof Kozlowski
On Mon, Jan 02, 2017 at 03:19:07PM +0100, Hans Verkuil wrote:
> From: Hans Verkuil 
> 
> By using the HPD notifier framework there is no longer any reason
> to manually set the physical address. This was the one blocking
> issue that prevented this driver from going out of staging, so do
> this move as well.
> 
> Update the bindings documenting the new hdmi phandle and
> update exynos4.dtsi accordingly.
> 
> Tested with my Odroid U3.
> 
> Signed-off-by: Hans Verkuil 
> Tested-by: Marek Szyprowski 
> ---
>  .../devicetree/bindings/media/s5p-cec.txt  |  2 ++
>  arch/arm/boot/dts/exynos4.dtsi |  1 +
>  drivers/media/platform/Kconfig | 18 +++
>  drivers/media/platform/Makefile|  1 +
>  .../media => media/platform}/s5p-cec/Makefile  |  0
>  .../platform}/s5p-cec/exynos_hdmi_cec.h|  0
>  .../platform}/s5p-cec/exynos_hdmi_cecctrl.c|  0
>  .../media => media/platform}/s5p-cec/regs-cec.h|  0
>  .../media => media/platform}/s5p-cec/s5p_cec.c | 35 
> ++
>  .../media => media/platform}/s5p-cec/s5p_cec.h |  3 ++
>  drivers/staging/media/Kconfig  |  2 --
>  drivers/staging/media/Makefile |  1 -
>  drivers/staging/media/s5p-cec/Kconfig  |  9 --
>  drivers/staging/media/s5p-cec/TODO |  7 -
>  14 files changed, 55 insertions(+), 24 deletions(-)
>  rename drivers/{staging/media => media/platform}/s5p-cec/Makefile (100%)
>  rename drivers/{staging/media => media/platform}/s5p-cec/exynos_hdmi_cec.h 
> (100%)
>  rename drivers/{staging/media => 
> media/platform}/s5p-cec/exynos_hdmi_cecctrl.c (100%)
>  rename drivers/{staging/media => media/platform}/s5p-cec/regs-cec.h (100%)
>  rename drivers/{staging/media => media/platform}/s5p-cec/s5p_cec.c (89%)
>  rename drivers/{staging/media => media/platform}/s5p-cec/s5p_cec.h (97%)
>  delete mode 100644 drivers/staging/media/s5p-cec/Kconfig
>  delete mode 100644 drivers/staging/media/s5p-cec/TODO
> 
> diff --git a/Documentation/devicetree/bindings/media/s5p-cec.txt 
> b/Documentation/devicetree/bindings/media/s5p-cec.txt
> index 925ab4d..710fc00 100644
> --- a/Documentation/devicetree/bindings/media/s5p-cec.txt
> +++ b/Documentation/devicetree/bindings/media/s5p-cec.txt
> @@ -15,6 +15,7 @@ Required properties:
>- clock-names : from common clock binding: must contain "hdmicec",
> corresponding to entry in the clocks property.
>- samsung,syscon-phandle - phandle to the PMU system controller
> +  - samsung,hdmi-phandle - phandle to the HDMI controller
>  
>  Example:
>  
> @@ -25,6 +26,7 @@ hdmicec: cec@100B {
>   clocks = < CLK_HDMI_CEC>;
>   clock-names = "hdmicec";
>   samsung,syscon-phandle = <_system_controller>;
> + samsung,hdmi-phandle = <>;
>   pinctrl-names = "default";
>   pinctrl-0 = <_cec>;
>   status = "okay";
> diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
> index c64737b..51dfcbb 100644
> --- a/arch/arm/boot/dts/exynos4.dtsi
> +++ b/arch/arm/boot/dts/exynos4.dtsi
> @@ -762,6 +762,7 @@
>   clocks = < CLK_HDMI_CEC>;
>   clock-names = "hdmicec";
>   samsung,syscon-phandle = <_system_controller>;
> + samsung,hdmi-phandle = <>;
>   pinctrl-names = "default";
>   pinctrl-0 = <_cec>;
>   status = "disabled";

DTS change has to be a separate patch. It should also go through
arm-soc/samsung-soc tree.

If it is a dependency, then I could provide a tag with it.

Best regards,
Krzysztof

> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
> index d944421..cab1637 100644
> --- a/drivers/media/platform/Kconfig
> +++ b/drivers/media/platform/Kconfig
> @@ -392,6 +392,24 @@ config VIDEO_TI_SC
>  config VIDEO_TI_CSC
>   tristate
>  
> +menuconfig V4L_CEC_DRIVERS
> + bool "Platform HDMI CEC drivers"
> + depends on MEDIA_CEC_SUPPORT
> +
> +if V4L_CEC_DRIVERS
> +
> +config VIDEO_SAMSUNG_S5P_CEC
> +   tristate "Samsung S5P CEC driver"
> +   depends on VIDEO_DEV && MEDIA_CEC_SUPPORT && (PLAT_S5P || ARCH_EXYNOS 
> || COMPILE_TEST)
> +   select HPD_NOTIFIERS
> +   ---help---
> + This is a driver for Samsung S5P HDMI CEC interface. It uses the
> + generic CEC framework interface.
> + CEC bus is present in the HDMI connector and enables communication
> + between compatible devices.
> +
> +endif #V4L_CEC_DRIVERS
> +
>  menuconfig V4L_TEST_DRIVERS
>   bool "Media test drivers"
>   depends on MEDIA_CAMERA_SUPPORT
> diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
> index 5b3cb27..ad3bf22 100644
> --- a/drivers/media/platform/Makefile
> +++ b/drivers/media/platform/Makefile
> @@ -33,6 +33,7 @@ obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG)  

Re: [PATCH] exynos-gsc: Clean up file handle in open() error path.

2016-12-06 Thread Krzysztof Kozlowski
On Fri, Dec 02, 2016 at 10:15:27AM +0530, Shailendra Verma wrote:
> The File handle is not yet added in the vfd list.So no need to call
> v4l2_fh_del(>fh) if it fails to create control.
> 
> Signed-off-by: Shailendra Verma 
> ---
>  drivers/media/platform/exynos-gsc/gsc-m2m.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

I think I see this and exynos4-is patch for the third time...
1. sent in a very short time-frame (usually resending is after 2 weeks),
2. without any change log (should be after --- separator),
3. with different subjects (really...),
4. without versioning (use git format-patch -v2 etc).

Please, keep it a little bit more organized... Look at examples on
mailing lists how (and when) people are sending patches.

Best regards,
Krzysztof

> 
> diff --git a/drivers/media/platform/exynos-gsc/gsc-m2m.c 
> b/drivers/media/platform/exynos-gsc/gsc-m2m.c
> index 9f03b79..5ea97c1 100644
> --- a/drivers/media/platform/exynos-gsc/gsc-m2m.c
> +++ b/drivers/media/platform/exynos-gsc/gsc-m2m.c
> @@ -664,8 +664,8 @@ static int gsc_m2m_open(struct file *file)
>  
>  error_ctrls:
>   gsc_ctrls_delete(ctx);
> -error_fh:
>   v4l2_fh_del(>fh);
> +error_fh:
>   v4l2_fh_exit(>fh);
>   kfree(ctx);
>  unlock:
> -- 
> 1.7.9.5
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/9] s5p-mfc: Add support for MFC v8 available in Exynos 5433 SoCs

2016-11-16 Thread Krzysztof Kozlowski
On Wed, Nov 16, 2016 at 10:04:58AM +0100, Marek Szyprowski wrote:
> Exynos5433 SoC has MFC v8 hardware module, but it has more complex clock
> hierarchy, so a new compatible has been added.
> 
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  Documentation/devicetree/bindings/media/s5p-mfc.txt |  1 +
>  drivers/media/platform/s5p-mfc/s5p_mfc.c| 14 ++
>  2 files changed, 15 insertions(+)
> 

Acked-by: Krzysztof Kozlowski <k...@kernel.org>

Best regards,
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 2/2] exynos-gsc: Add support for Exynos5433 specific version

2016-11-09 Thread Krzysztof Kozlowski
On Wed, Nov 09, 2016 at 03:29:38PM +0100, Marek Szyprowski wrote:
> This patch add support for Exynos5433 specific version of GScaller module.
> The main difference is between Exynos 5433 and earlier is addition of
> new clocks that have to be controlled.
> 
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  .../devicetree/bindings/media/exynos5-gsc.txt  |  3 +-
>  drivers/media/platform/exynos-gsc/gsc-core.c   | 74 
> --
>  drivers/media/platform/exynos-gsc/gsc-core.h   |  6 +-
>  3 files changed, 62 insertions(+), 21 deletions(-)
> 

Acked-by: Krzysztof Kozlowski <k...@kernel.org>

Best regards,
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 1/2] exynos-gsc: Enable driver on ARCH_EXYNOS

2016-11-09 Thread Krzysztof Kozlowski
On Wed, Nov 09, 2016 at 03:29:37PM +0100, Marek Szyprowski wrote:
> This driver can be also used on Exynos5433, which is ARM64-based
> platform, which selects only ARCH_EXYNOS symbol.
> 
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  drivers/media/platform/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Acked-by: Krzysztof Kozlowski <k...@kernel.org>

Best regards,
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 2/3] media: exynos4-is: Improve clock management

2016-09-01 Thread Krzysztof Kozlowski
On 08/31/2016 03:25 PM, Marek Szyprowski wrote:
> There is no need to keep all clocks prepared all the time. Call to
> clk_prepare/unprepare can be done on demand from runtime pm callbacks
> (it is allowed to call sleeping functions from that context).
> 
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  drivers/media/platform/exynos4-is/fimc-lite.c | 16 
>  1 file changed, 4 insertions(+), 12 deletions(-)


Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>

Best regards,
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 3/3] ARM: exynos: add all required FIMC-IS clocks to exynos4x12 dtsi

2016-09-01 Thread Krzysztof Kozlowski
On 08/31/2016 03:25 PM, Marek Szyprowski wrote:
> FIMC-IS blocks must control 3 more clocks ("gicisp", "mcuctl_isp" and
> "pwm_isp") to make the hardware fully operational.
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/boot/dts/exynos4x12.dtsi | 5 -
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 

Thanks, applied.

Best regards,
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 1/3] media: exynos4-is: Add support for all required clocks

2016-09-01 Thread Krzysztof Kozlowski
On 08/31/2016 03:25 PM, Marek Szyprowski wrote:
> This patch adds 3 more clocks to Exynos4 ISP driver. Enabling them is
> needed to make the hardware operational. Till now it worked only because
> those clocks were registered with IGNORE_UNUSED flag and were enabled
> by default after SoC reset.
> 
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  Documentation/devicetree/bindings/media/exynos4-fimc-is.txt | 7 ---
>  drivers/media/platform/exynos4-is/fimc-is.c | 3 +++
>  drivers/media/platform/exynos4-is/fimc-is.h | 3 +++
>  3 files changed, 10 insertions(+), 3 deletions(-)

Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>

Best regards,
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: [PATCHv2] s5p-tv: remove obsolete driver

2016-08-10 Thread Krzysztof Kozlowski
On 08/05/2016 03:38 PM, Hans Verkuil wrote:
> The s5p-tv driver has been replaced by the exynos drm driver for quite a
> long time now. Remove this driver to avoid having duplicate drivers,
> of which this one is considered dead code by Samsung.
> 
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> ---
> Second version: forgot to update MAINTAINERS, rewrote the commit log,
> and remove the s5p-tv include from platform/Kconfig.
> ---
>  MAINTAINERS |8 -
>  drivers/gpu/drm/exynos/Kconfig  |3 +-
>  drivers/media/platform/Kconfig  |1 -
>  drivers/media/platform/Makefile |1 -
>  drivers/media/platform/s5p-tv/Kconfig   |   88 --
>  drivers/media/platform/s5p-tv/Makefile  |   19 -
>  drivers/media/platform/s5p-tv/hdmi_drv.c| 1059 -
>  drivers/media/platform/s5p-tv/hdmiphy_drv.c |  324 ---
>  drivers/media/platform/s5p-tv/mixer.h   |  364 
>  drivers/media/platform/s5p-tv/mixer_drv.c   |  527 ---
>  drivers/media/platform/s5p-tv/mixer_grp_layer.c |  270 --
>  drivers/media/platform/s5p-tv/mixer_reg.c   |  551 ---
>  drivers/media/platform/s5p-tv/mixer_video.c | 1130 
> ---
>  drivers/media/platform/s5p-tv/mixer_vp_layer.c  |  242 -
>  drivers/media/platform/s5p-tv/regs-hdmi.h   |  146 ---
>  drivers/media/platform/s5p-tv/regs-mixer.h  |  122 ---
>  drivers/media/platform/s5p-tv/regs-sdo.h|   63 --
>  drivers/media/platform/s5p-tv/regs-vp.h |   88 --
>  drivers/media/platform/s5p-tv/sdo_drv.c |  497 --
>  drivers/media/platform/s5p-tv/sii9234_drv.c |  407 
>  20 files changed, 1 insertion(+), 5909 deletions(-)
>  delete mode 100644 drivers/media/platform/s5p-tv/Kconfig
>  delete mode 100644 drivers/media/platform/s5p-tv/Makefile
>  delete mode 100644 drivers/media/platform/s5p-tv/hdmi_drv.c
>  delete mode 100644 drivers/media/platform/s5p-tv/hdmiphy_drv.c
>  delete mode 100644 drivers/media/platform/s5p-tv/mixer.h
>  delete mode 100644 drivers/media/platform/s5p-tv/mixer_drv.c
>  delete mode 100644 drivers/media/platform/s5p-tv/mixer_grp_layer.c
>  delete mode 100644 drivers/media/platform/s5p-tv/mixer_reg.c
>  delete mode 100644 drivers/media/platform/s5p-tv/mixer_video.c
>  delete mode 100644 drivers/media/platform/s5p-tv/mixer_vp_layer.c
>  delete mode 100644 drivers/media/platform/s5p-tv/regs-hdmi.h
>  delete mode 100644 drivers/media/platform/s5p-tv/regs-mixer.h
>  delete mode 100644 drivers/media/platform/s5p-tv/regs-sdo.h
>  delete mode 100644 drivers/media/platform/s5p-tv/regs-vp.h
>  delete mode 100644 drivers/media/platform/s5p-tv/sdo_drv.c
>  delete mode 100644 drivers/media/platform/s5p-tv/sii9234_drv.c

Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>

Best regards,
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


[PATCH v6 19/46] [media] dma-mapping: Use unsigned long for dma_attrs

2016-07-13 Thread Krzysztof Kozlowski
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
[for bdisp]
Acked-by: Fabien Dessenne <fabien.desse...@st.com>
[for vb2-core]
Reviewed-by: Marek Szyprowski <m.szyprow...@samsung.com>

---

Changes since v5:
1. Rebased on linux-next.
---
 drivers/media/platform/sti/bdisp/bdisp-hw.c| 26 
 drivers/media/v4l2-core/videobuf2-dma-contig.c | 28 ++
 drivers/media/v4l2-core/videobuf2-dma-sg.c | 21 +--
 drivers/media/v4l2-core/videobuf2-vmalloc.c|  2 +-
 include/media/videobuf2-core.h |  6 +++---
 include/media/videobuf2-dma-contig.h   |  2 --
 6 files changed, 28 insertions(+), 57 deletions(-)

diff --git a/drivers/media/platform/sti/bdisp/bdisp-hw.c 
b/drivers/media/platform/sti/bdisp/bdisp-hw.c
index 3df66d11c795..b7892f3efd98 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-hw.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-hw.c
@@ -430,14 +430,11 @@ int bdisp_hw_get_and_clear_irq(struct bdisp_dev *bdisp)
  */
 void bdisp_hw_free_nodes(struct bdisp_ctx *ctx)
 {
-   if (ctx && ctx->node[0]) {
-   DEFINE_DMA_ATTRS(attrs);
-
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
+   if (ctx && ctx->node[0])
dma_free_attrs(ctx->bdisp_dev->dev,
   sizeof(struct bdisp_node) * MAX_NB_NODE,
-  ctx->node[0], ctx->node_paddr[0], );
-   }
+  ctx->node[0], ctx->node_paddr[0],
+  DMA_ATTR_WRITE_COMBINE);
 }
 
 /**
@@ -455,12 +452,10 @@ int bdisp_hw_alloc_nodes(struct bdisp_ctx *ctx)
unsigned int i, node_size = sizeof(struct bdisp_node);
void *base;
dma_addr_t paddr;
-   DEFINE_DMA_ATTRS(attrs);
 
/* Allocate all the nodes within a single memory page */
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
base = dma_alloc_attrs(dev, node_size * MAX_NB_NODE, ,
-  GFP_KERNEL | GFP_DMA, );
+  GFP_KERNEL | GFP_DMA, DMA_ATTR_WRITE_COMBINE);
if (!base) {
dev_err(dev, "%s no mem\n", __func__);
return -ENOMEM;
@@ -493,13 +488,9 @@ void bdisp_hw_free_filters(struct device *dev)
 {
int size = (BDISP_HF_NB * NB_H_FILTER) + (BDISP_VF_NB * NB_V_FILTER);
 
-   if (bdisp_h_filter[0].virt) {
-   DEFINE_DMA_ATTRS(attrs);
-
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
+   if (bdisp_h_filter[0].virt)
dma_free_attrs(dev, size, bdisp_h_filter[0].virt,
-  bdisp_h_filter[0].paddr, );
-   }
+  bdisp_h_filter[0].paddr, DMA_ATTR_WRITE_COMBINE);
 }
 
 /**
@@ -516,12 +507,11 @@ int bdisp_hw_alloc_filters(struct device *dev)
unsigned int i, size;
void *base;
dma_addr_t paddr;
-   DEFINE_DMA_ATTRS(attrs);
 
/* Allocate all the filters within a single memory page */
size = (BDISP_HF_NB * NB_H_FILTER) + (BDISP_VF_NB * NB_V_FILTER);
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
-   base = dma_alloc_attrs(dev, size, , GFP_KERNEL | GFP_DMA, );
+   base = dma_alloc_attrs(dev, size, , GFP_KERNEL | GFP_DMA,
+  DMA_ATTR_WRITE_COMBINE);
if (!base)
return -ENOMEM;
 
diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c 
b/drivers/media/v4l2-core/videobuf2-dma-contig.c
index 863f658a3fa1..1ec4434a86bb 100644
--- a/drivers/media/v4l2-core/videobuf2-dma-contig.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c
@@ -27,7 +27,7 @@ struct vb2_dc_buf {
unsigned long   size;
void*cookie;
dma_addr_t  dma_addr;
-   struct dma_attrsattrs;
+   unsigned long   attrs;
enum dma_data_direction dma_dir;
struct sg_table *dma_sgt;
struct frame_vector *vec;
@@ -130,12 +130,12 @@ static void vb2_dc_put(void *buf_priv)
kfree(buf->sgt_base);
}
dma_free_attrs(buf->dev, buf->size, buf->cookie, buf->dma_addr,
-   >attrs);
+  buf->attrs);
put_device(buf->dev);
kfree(buf);
 }
 
-static void *vb2_dc_alloc(struct device *dev, const struct dma_attrs *attrs,
+static void *vb2_dc_alloc(struct device *dev, unsigned long attrs,
  unsigned long size, enum dma_data_direction dma_dir,
  gfp_t gfp_flags)
 {
@@ -146,16 +146,16 @@ static void *vb2_dc_alloc(struct device *dev, const 
struct dma_attrs *attrs,
return ERR_PTR(-ENOMEM);
 
if (attrs)

[PATCH v6 45/46] dma-mapping: Remove dma_get_attr

2016-07-13 Thread Krzysztof Kozlowski
After switching DMA attributes to unsigned long it is easier to just
compare the bits.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
[for avr32]
Acked-by: Hans-Christian Noren Egtvedt <egtv...@samfundet.no>
[for arc]
Acked-by: Vineet Gupta <vgu...@synopsys.com>
[for arm64 and dma-iommu]
Acked-by: Robin Murphy <robin.mur...@arm.com>
---
 Documentation/DMA-API.txt  |  4 +--
 arch/arc/mm/dma.c  |  4 +--
 arch/arm/mm/dma-mapping.c  | 36 --
 arch/arm/xen/mm.c  |  4 +--
 arch/arm64/mm/dma-mapping.c| 10 +++
 arch/avr32/mm/dma-coherent.c   |  4 +--
 arch/ia64/sn/pci/pci_dma.c | 10 ++-
 arch/metag/kernel/dma.c|  2 +-
 arch/mips/mm/dma-default.c |  6 ++---
 arch/openrisc/kernel/dma.c |  4 +--
 arch/parisc/kernel/pci-dma.c   |  2 +-
 arch/powerpc/platforms/cell/iommu.c| 12 -
 drivers/gpu/drm/rockchip/rockchip_drm_gem.c|  2 +-
 drivers/iommu/dma-iommu.c  |  2 +-
 drivers/media/v4l2-core/videobuf2-dma-contig.c |  2 +-
 include/linux/dma-mapping.h| 10 ---
 16 files changed, 47 insertions(+), 67 deletions(-)

diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 24f9688bb98a..1d26eeb6b5f6 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -422,9 +422,7 @@ void whizco_dma_map_sg_attrs(struct device *dev, dma_addr_t 
dma_addr,
 unsigned long attrs)
 {

-   int foo =  dma_get_attr(DMA_ATTR_FOO, attrs);
-   
-   if (foo)
+   if (attrs & DMA_ATTR_FOO)
/* twizzle the frobnozzle */

 
diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c
index 3d1f467d1792..74bbe68dce9d 100644
--- a/arch/arc/mm/dma.c
+++ b/arch/arc/mm/dma.c
@@ -46,7 +46,7 @@ static void *arc_dma_alloc(struct device *dev, size_t size,
 *   (vs. always going to memory - thus are faster)
 */
if ((is_isa_arcv2() && ioc_exists) ||
-   dma_get_attr(DMA_ATTR_NON_CONSISTENT, attrs))
+   (attrs & DMA_ATTR_NON_CONSISTENT))
need_coh = 0;
 
/*
@@ -95,7 +95,7 @@ static void arc_dma_free(struct device *dev, size_t size, 
void *vaddr,
struct page *page = virt_to_page(dma_handle);
int is_non_coh = 1;
 
-   is_non_coh = dma_get_attr(DMA_ATTR_NON_CONSISTENT, attrs) ||
+   is_non_coh = (attrs & DMA_ATTR_NON_CONSISTENT) ||
(is_isa_arcv2() && ioc_exists);
 
if (PageHighMem(page) || !is_non_coh)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ebb3fde99043..43e03b5293d0 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -126,7 +126,7 @@ static dma_addr_t arm_dma_map_page(struct device *dev, 
struct page *page,
 unsigned long offset, size_t size, enum dma_data_direction dir,
 unsigned long attrs)
 {
-   if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs))
+   if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0)
__dma_page_cpu_to_dev(page, offset, size, dir);
return pfn_to_dma(dev, page_to_pfn(page)) + offset;
 }
@@ -155,7 +155,7 @@ static dma_addr_t arm_coherent_dma_map_page(struct device 
*dev, struct page *pag
 static void arm_dma_unmap_page(struct device *dev, dma_addr_t handle,
size_t size, enum dma_data_direction dir, unsigned long attrs)
 {
-   if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs))
+   if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0)
__dma_page_dev_to_cpu(pfn_to_page(dma_to_pfn(dev, handle)),
  handle & ~PAGE_MASK, size, dir);
 }
@@ -622,9 +622,9 @@ static void __free_from_contiguous(struct device *dev, 
struct page *page,
 
 static inline pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot)
 {
-   prot = dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs) ?
-   pgprot_writecombine(prot) :
-   pgprot_dmacoherent(prot);
+   prot = (attrs & DMA_ATTR_WRITE_COMBINE) ?
+   pgprot_writecombine(prot) :
+   pgprot_dmacoherent(prot);
return prot;
 }
 
@@ -744,7 +744,7 @@ static void *__dma_alloc(struct device *dev, size_t size, 
dma_addr_t *handle,
.gfp = gfp,
.prot = prot,
.caller = caller,
-   .want_vaddr = !dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs),
+   .want_vaddr = ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0),
};
 
 #ifdef CONFIG_DMA_API_DEBUG
@@ -887,7 +887,7 @@ static void __arm_dma_free(struct device *dev, size_t size, 
void *cpu_addr,
.size = PAGE_

[PATCH v6 01/46] [media] mtk-vcodec: Remove unused dma_attrs

2016-07-13 Thread Krzysztof Kozlowski
The local variable dma_attrs is set but never read.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>

---

Changes since v5:
New patch.
---
 drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c 
b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
index 60b0bde232f4..ae1eb8fde7f8 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
@@ -246,7 +246,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
struct video_device *vfd_enc;
struct resource *res;
int i, j, ret;
-   DEFINE_DMA_ATTRS(attrs);
 
dev = devm_kzalloc(>dev, sizeof(*dev), GFP_KERNEL);
if (!dev)
@@ -380,9 +379,6 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
goto err_enc_reg;
}
 
-   /* Avoid the iommu eat big hunks */
-   dma_set_attr(DMA_ATTR_ALLOC_SINGLE_PAGES, );
-
mtk_v4l2_debug(0, "encoder registered as /dev/video%d",
vfd_enc->num);
 
-- 
1.9.1

--
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 v6 00/46] dma-mapping: Use unsigned long for dma_attrs

2016-07-13 Thread Krzysztof Kozlowski
Hi,

The fifth version of this patchset was merged by Andrew Morton
few days ago.  It was rebased on v4.7-rc5 so it missed some ongoing
changes.

This is just rebase on next-20160713.


For easier testing the patchset is available here:
repo:   https://github.com/krzk/linux
branch: for-next/dma-attrs-const-v6


Changes since v5

1. New patches:
   1/46:  [media] mtk-vcodec: Remove unused dma_attrs
   44/46: remoteproc: qcom: Use unsigned long for dma_attrs
2. 19/46: rebased on next, some more changes inside
3. Added accumulated acks: Marek Szyprowski, Richard Kuo,
   Konrad Rzeszutek Wilk, Daniel Vetter and Joerg Roedel.


Changes since v4

1. Collect some acks. Still need more.
2. Minor fixes pointed by Robin Murphy.
3. Applied changes from Bart Van Assche's comment.
4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/).


Changes since v3

1. Collect some acks.
2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code
   the value of DMA_ATTR_WEAK_ORDERING").
3. Minor fix pointed out by Michael Ellerman.


Changes since v2

1. Follow Christoph Hellwig's comments (don't use BIT add
   documentation, remove dma_get_attr).


Rationale
=
The dma-mapping core and the implementations do not change the
DMA attributes passed by pointer.  Thus the pointer can point to const
data.  However the attributes do not have to be a bitfield. Instead
unsigned long will do fine:

1. This is just simpler.  Both in terms of reading the code and setting
   attributes.  Instead of initializing local attributes on the stack
   and passing pointer to it to dma_set_attr(), just set the bits.

2. It brings safeness and checking for const correctness because the
   attributes are passed by value.


Best regards,
Krzysztof


Krzysztof Kozlowski (46):
  [media] mtk-vcodec: Remove unused dma_attrs
  dma-mapping: Use unsigned long for dma_attrs
  alpha: dma-mapping: Use unsigned long for dma_attrs
  arc: dma-mapping: Use unsigned long for dma_attrs
  ARM: dma-mapping: Use unsigned long for dma_attrs
  arm64: dma-mapping: Use unsigned long for dma_attrs
  avr32: dma-mapping: Use unsigned long for dma_attrs
  blackfin: dma-mapping: Use unsigned long for dma_attrs
  c6x: dma-mapping: Use unsigned long for dma_attrs
  cris: dma-mapping: Use unsigned long for dma_attrs
  frv: dma-mapping: Use unsigned long for dma_attrs
  drm/exynos: dma-mapping: Use unsigned long for dma_attrs
  drm/mediatek: dma-mapping: Use unsigned long for dma_attrs
  drm/msm: dma-mapping: Use unsigned long for dma_attrs
  drm/nouveau: dma-mapping: Use unsigned long for dma_attrs
  drm/rockship: dma-mapping: Use unsigned long for dma_attrs
  infiniband: dma-mapping: Use unsigned long for dma_attrs
  iommu: dma-mapping: Use unsigned long for dma_attrs
  [media] dma-mapping: Use unsigned long for dma_attrs
  xen: dma-mapping: Use unsigned long for dma_attrs
  swiotlb: dma-mapping: Use unsigned long for dma_attrs
  powerpc: dma-mapping: Use unsigned long for dma_attrs
  video: dma-mapping: Use unsigned long for dma_attrs
  x86: dma-mapping: Use unsigned long for dma_attrs
  iommu: intel: dma-mapping: Use unsigned long for dma_attrs
  h8300: dma-mapping: Use unsigned long for dma_attrs
  hexagon: dma-mapping: Use unsigned long for dma_attrs
  ia64: dma-mapping: Use unsigned long for dma_attrs
  m68k: dma-mapping: Use unsigned long for dma_attrs
  metag: dma-mapping: Use unsigned long for dma_attrs
  microblaze: dma-mapping: Use unsigned long for dma_attrs
  mips: dma-mapping: Use unsigned long for dma_attrs
  mn10300: dma-mapping: Use unsigned long for dma_attrs
  nios2: dma-mapping: Use unsigned long for dma_attrs
  openrisc: dma-mapping: Use unsigned long for dma_attrs
  parisc: dma-mapping: Use unsigned long for dma_attrs
  misc: mic: dma-mapping: Use unsigned long for dma_attrs
  s390: dma-mapping: Use unsigned long for dma_attrs
  sh: dma-mapping: Use unsigned long for dma_attrs
  sparc: dma-mapping: Use unsigned long for dma_attrs
  tile: dma-mapping: Use unsigned long for dma_attrs
  unicore32: dma-mapping: Use unsigned long for dma_attrs
  xtensa: dma-mapping: Use unsigned long for dma_attrs
  remoteproc: qcom: Use unsigned long for dma_attrs
  dma-mapping: Remove dma_get_attr
  dma-mapping: Document the DMA attributes next to the declaration

 Documentation/DMA-API.txt  |  33 +++---
 Documentation/DMA-attributes.txt   |   2 +-
 arch/alpha/include/asm/dma-mapping.h   |   2 -
 arch/alpha/kernel/pci-noop.c   |   2 +-
 arch/alpha/kernel/pci_iommu.c  |  12 +-
 arch/arc/mm/dma.c  |  12 +-
 arch/arm/common/dmabounce.c|   4 +-
 arch/arm/include/asm/dma-mapping.h |  13 +--
 arch/arm/include/asm/xen/page-coherent.h   |  16 +--
 arch/arm/mm/dma-mapping.c 

Re: [PATCH 2/2] [media] s5p-g2d: Replace old driver with DRM version

2016-07-13 Thread Krzysztof Kozlowski
On 07/13/2016 01:02 AM, Mauro Carvalho Chehab wrote:
> I suspect that you'll be applying this one via DRM tree, so:
> 
> Em Tue, 24 May 2016 15:28:13 +0200
> Krzysztof Kozlowski <k.kozlow...@samsung.com> escreveu:
> 
>> Remove the old non-DRM driver because it is now entirely supported by
>> exynos_drm_g2d driver.
>>
>> Cc: Kyungmin Park <kyungmin.p...@samsung.com>
>> Cc: Kamil Debski <k.deb...@samsung.com>
>> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
> 
> Acked-by: Mauro Carvalho Chehab <mche...@s-opensource.com>
> 
> PS.: If you prefer to apply this one via my tree, I'm ok too. Just
> let me know when the first patch gets merged upstream.

This patchset was insufficient and I didn't came up with follow up.
Please ignore it for now.

Best regards,
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 v5 00/44] dma-mapping: Use unsigned long for dma_attrs

2016-07-12 Thread Krzysztof Kozlowski
On 07/12/2016 02:16 PM, Daniel Vetter wrote:
> On Thu, Jun 30, 2016 at 10:23:39AM +0200, Krzysztof Kozlowski wrote:
>> Hi,
>>
>>
>> This is fifth approach for replacing struct dma_attrs with unsigned
>> long.
>>
>> The main patch (1/44) doing the change is split into many subpatches
>> for easier review (2-42).  They should be squashed together when
>> applying.
> 
> For all the drm driver patches:
> 
> Acked-by: Daniel Vetter <daniel.vet...@ffwll.ch>
> 
> Should I pull these in through drm-misc, or do you prefer to merge them
> through a special topic branch (with everything else) instead on your own?
> -Daniel

Thanks. I saw today that Andrew Morton applied the patchset so I think
he will handle it.

Best regards,
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


[PATCH v5 18/44] [media] dma-mapping: Use unsigned long for dma_attrs

2016-06-30 Thread Krzysztof Kozlowski
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
[for bdisp]
Acked-by: Fabien Dessenne <fabien.desse...@st.com>
---
 drivers/media/platform/sti/bdisp/bdisp-hw.c| 26 +++---
 drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 +++---
 drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 
 include/media/videobuf2-dma-contig.h   |  7 ++
 4 files changed, 26 insertions(+), 56 deletions(-)

diff --git a/drivers/media/platform/sti/bdisp/bdisp-hw.c 
b/drivers/media/platform/sti/bdisp/bdisp-hw.c
index 052c932ac942..d86ba40eec8d 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-hw.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-hw.c
@@ -125,14 +125,11 @@ int bdisp_hw_get_and_clear_irq(struct bdisp_dev *bdisp)
  */
 void bdisp_hw_free_nodes(struct bdisp_ctx *ctx)
 {
-   if (ctx && ctx->node[0]) {
-   DEFINE_DMA_ATTRS(attrs);
-
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
+   if (ctx && ctx->node[0])
dma_free_attrs(ctx->bdisp_dev->dev,
   sizeof(struct bdisp_node) * MAX_NB_NODE,
-  ctx->node[0], ctx->node_paddr[0], );
-   }
+  ctx->node[0], ctx->node_paddr[0],
+  DMA_ATTR_WRITE_COMBINE);
 }
 
 /**
@@ -150,12 +147,10 @@ int bdisp_hw_alloc_nodes(struct bdisp_ctx *ctx)
unsigned int i, node_size = sizeof(struct bdisp_node);
void *base;
dma_addr_t paddr;
-   DEFINE_DMA_ATTRS(attrs);
 
/* Allocate all the nodes within a single memory page */
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
base = dma_alloc_attrs(dev, node_size * MAX_NB_NODE, ,
-  GFP_KERNEL | GFP_DMA, );
+  GFP_KERNEL | GFP_DMA, DMA_ATTR_WRITE_COMBINE);
if (!base) {
dev_err(dev, "%s no mem\n", __func__);
return -ENOMEM;
@@ -188,13 +183,9 @@ void bdisp_hw_free_filters(struct device *dev)
 {
int size = (BDISP_HF_NB * NB_H_FILTER) + (BDISP_VF_NB * NB_V_FILTER);
 
-   if (bdisp_h_filter[0].virt) {
-   DEFINE_DMA_ATTRS(attrs);
-
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
+   if (bdisp_h_filter[0].virt)
dma_free_attrs(dev, size, bdisp_h_filter[0].virt,
-  bdisp_h_filter[0].paddr, );
-   }
+  bdisp_h_filter[0].paddr, DMA_ATTR_WRITE_COMBINE);
 }
 
 /**
@@ -211,12 +202,11 @@ int bdisp_hw_alloc_filters(struct device *dev)
unsigned int i, size;
void *base;
dma_addr_t paddr;
-   DEFINE_DMA_ATTRS(attrs);
 
/* Allocate all the filters within a single memory page */
size = (BDISP_HF_NB * NB_H_FILTER) + (BDISP_VF_NB * NB_V_FILTER);
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
-   base = dma_alloc_attrs(dev, size, , GFP_KERNEL | GFP_DMA, );
+   base = dma_alloc_attrs(dev, size, , GFP_KERNEL | GFP_DMA,
+  DMA_ATTR_WRITE_COMBINE);
if (!base)
return -ENOMEM;
 
diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c 
b/drivers/media/v4l2-core/videobuf2-dma-contig.c
index 5361197f3e57..8009a582326b 100644
--- a/drivers/media/v4l2-core/videobuf2-dma-contig.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c
@@ -23,7 +23,7 @@
 
 struct vb2_dc_conf {
struct device   *dev;
-   struct dma_attrsattrs;
+   unsigned long   attrs;
 };
 
 struct vb2_dc_buf {
@@ -32,7 +32,7 @@ struct vb2_dc_buf {
unsigned long   size;
void*cookie;
dma_addr_t  dma_addr;
-   struct dma_attrsattrs;
+   unsigned long   attrs;
enum dma_data_direction dma_dir;
struct sg_table *dma_sgt;
struct frame_vector *vec;
@@ -135,7 +135,7 @@ static void vb2_dc_put(void *buf_priv)
kfree(buf->sgt_base);
}
dma_free_attrs(buf->dev, buf->size, buf->cookie, buf->dma_addr,
-   >attrs);
+  buf->attrs);
put_device(buf->dev);
kfree(buf);
 }
@@ -153,14 +153,14 @@ static void *vb2_dc_alloc(void *alloc_ctx, unsigned long 
size,
 
buf->attrs = conf->attrs;
buf->cookie = dma_alloc_attrs(dev, size, >dma_addr,
-   GFP_KERNEL | gfp_flags, >attrs);
+   GFP_KERNEL | gfp_flags, buf->attrs);
if (!buf->cookie) {
dev_err(dev, "dma_alloc_coherent of size %ld failed\n", size);
kfree(bu

[PATCH v5 43/44] dma-mapping: Remove dma_get_attr

2016-06-30 Thread Krzysztof Kozlowski
After switching DMA attributes to unsigned long it is easier to just
compare the bits.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
[for avr32]
Acked-by: Hans-Christian Noren Egtvedt <egtv...@samfundet.no>
[for arc]
Acked-by: Vineet Gupta <vgu...@synopsys.com>
[for arm64 and dma-iommu]
Acked-by: Robin Murphy <robin.mur...@arm.com>
---
 Documentation/DMA-API.txt  |  4 +--
 arch/arc/mm/dma.c  |  4 +--
 arch/arm/mm/dma-mapping.c  | 36 --
 arch/arm/xen/mm.c  |  4 +--
 arch/arm64/mm/dma-mapping.c| 10 +++
 arch/avr32/mm/dma-coherent.c   |  4 +--
 arch/ia64/sn/pci/pci_dma.c | 10 ++-
 arch/metag/kernel/dma.c|  2 +-
 arch/mips/mm/dma-default.c |  6 ++---
 arch/openrisc/kernel/dma.c |  4 +--
 arch/parisc/kernel/pci-dma.c   |  2 +-
 arch/powerpc/platforms/cell/iommu.c| 12 -
 drivers/gpu/drm/rockchip/rockchip_drm_gem.c|  2 +-
 drivers/iommu/dma-iommu.c  |  2 +-
 drivers/media/v4l2-core/videobuf2-dma-contig.c |  2 +-
 include/linux/dma-mapping.h| 10 ---
 16 files changed, 47 insertions(+), 67 deletions(-)

diff --git a/Documentation/DMA-API.txt b/Documentation/DMA-API.txt
index 24f9688bb98a..1d26eeb6b5f6 100644
--- a/Documentation/DMA-API.txt
+++ b/Documentation/DMA-API.txt
@@ -422,9 +422,7 @@ void whizco_dma_map_sg_attrs(struct device *dev, dma_addr_t 
dma_addr,
 unsigned long attrs)
 {

-   int foo =  dma_get_attr(DMA_ATTR_FOO, attrs);
-   
-   if (foo)
+   if (attrs & DMA_ATTR_FOO)
/* twizzle the frobnozzle */

 
diff --git a/arch/arc/mm/dma.c b/arch/arc/mm/dma.c
index 3d1f467d1792..74bbe68dce9d 100644
--- a/arch/arc/mm/dma.c
+++ b/arch/arc/mm/dma.c
@@ -46,7 +46,7 @@ static void *arc_dma_alloc(struct device *dev, size_t size,
 *   (vs. always going to memory - thus are faster)
 */
if ((is_isa_arcv2() && ioc_exists) ||
-   dma_get_attr(DMA_ATTR_NON_CONSISTENT, attrs))
+   (attrs & DMA_ATTR_NON_CONSISTENT))
need_coh = 0;
 
/*
@@ -95,7 +95,7 @@ static void arc_dma_free(struct device *dev, size_t size, 
void *vaddr,
struct page *page = virt_to_page(dma_handle);
int is_non_coh = 1;
 
-   is_non_coh = dma_get_attr(DMA_ATTR_NON_CONSISTENT, attrs) ||
+   is_non_coh = (attrs & DMA_ATTR_NON_CONSISTENT) ||
(is_isa_arcv2() && ioc_exists);
 
if (PageHighMem(page) || !is_non_coh)
diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
index ebb3fde99043..43e03b5293d0 100644
--- a/arch/arm/mm/dma-mapping.c
+++ b/arch/arm/mm/dma-mapping.c
@@ -126,7 +126,7 @@ static dma_addr_t arm_dma_map_page(struct device *dev, 
struct page *page,
 unsigned long offset, size_t size, enum dma_data_direction dir,
 unsigned long attrs)
 {
-   if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs))
+   if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0)
__dma_page_cpu_to_dev(page, offset, size, dir);
return pfn_to_dma(dev, page_to_pfn(page)) + offset;
 }
@@ -155,7 +155,7 @@ static dma_addr_t arm_coherent_dma_map_page(struct device 
*dev, struct page *pag
 static void arm_dma_unmap_page(struct device *dev, dma_addr_t handle,
size_t size, enum dma_data_direction dir, unsigned long attrs)
 {
-   if (!dma_get_attr(DMA_ATTR_SKIP_CPU_SYNC, attrs))
+   if ((attrs & DMA_ATTR_SKIP_CPU_SYNC) == 0)
__dma_page_dev_to_cpu(pfn_to_page(dma_to_pfn(dev, handle)),
  handle & ~PAGE_MASK, size, dir);
 }
@@ -622,9 +622,9 @@ static void __free_from_contiguous(struct device *dev, 
struct page *page,
 
 static inline pgprot_t __get_dma_pgprot(unsigned long attrs, pgprot_t prot)
 {
-   prot = dma_get_attr(DMA_ATTR_WRITE_COMBINE, attrs) ?
-   pgprot_writecombine(prot) :
-   pgprot_dmacoherent(prot);
+   prot = (attrs & DMA_ATTR_WRITE_COMBINE) ?
+   pgprot_writecombine(prot) :
+   pgprot_dmacoherent(prot);
return prot;
 }
 
@@ -744,7 +744,7 @@ static void *__dma_alloc(struct device *dev, size_t size, 
dma_addr_t *handle,
.gfp = gfp,
.prot = prot,
.caller = caller,
-   .want_vaddr = !dma_get_attr(DMA_ATTR_NO_KERNEL_MAPPING, attrs),
+   .want_vaddr = ((attrs & DMA_ATTR_NO_KERNEL_MAPPING) == 0),
};
 
 #ifdef CONFIG_DMA_API_DEBUG
@@ -887,7 +887,7 @@ static void __arm_dma_free(struct device *dev, size_t size, 
void *cpu_addr,
.size = PAGE_

[PATCH v5 00/44] dma-mapping: Use unsigned long for dma_attrs

2016-06-30 Thread Krzysztof Kozlowski
Hi,


This is fifth approach for replacing struct dma_attrs with unsigned
long.

The main patch (1/44) doing the change is split into many subpatches
for easier review (2-42).  They should be squashed together when
applying.


Rebased on v4.7-rc5.

For easier testing the patchset is available here:
repo:   https://github.com/krzk/linux
branch: for-next/dma-attrs-const-v5


Changes since v4

1. Collect some acks. Still need more.
2. Minor fixes pointed by Robin Murphy.
3. Applied changes from Bart Van Assche's comment.
4. More tests and builds (using https://www.kernel.org/pub/tools/crosstool/).


Changes since v3

1. Collect some acks.
2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code
   the value of DMA_ATTR_WEAK_ORDERING").
3. Minor fix pointed out by Michael Ellerman.


Changes since v2

1. Follow Christoph Hellwig's comments (don't use BIT add
   documentation, remove dma_get_attr).


Rationale
=
The dma-mapping core and the implementations do not change the
DMA attributes passed by pointer.  Thus the pointer can point to const
data.  However the attributes do not have to be a bitfield. Instead
unsigned long will do fine:

1. This is just simpler.  Both in terms of reading the code and setting
   attributes.  Instead of initializing local attributes on the stack
   and passing pointer to it to dma_set_attr(), just set the bits.

2. It brings safeness and checking for const correctness because the
   attributes are passed by value.


Best regards,
Krzysztof


Krzysztof Kozlowski (44):
  dma-mapping: Use unsigned long for dma_attrs
  alpha: dma-mapping: Use unsigned long for dma_attrs
  arc: dma-mapping: Use unsigned long for dma_attrs
  ARM: dma-mapping: Use unsigned long for dma_attrs
  arm64: dma-mapping: Use unsigned long for dma_attrs
  avr32: dma-mapping: Use unsigned long for dma_attrs
  blackfin: dma-mapping: Use unsigned long for dma_attrs
  c6x: dma-mapping: Use unsigned long for dma_attrs
  cris: dma-mapping: Use unsigned long for dma_attrs
  frv: dma-mapping: Use unsigned long for dma_attrs
  drm/exynos: dma-mapping: Use unsigned long for dma_attrs
  drm/mediatek: dma-mapping: Use unsigned long for dma_attrs
  drm/msm: dma-mapping: Use unsigned long for dma_attrs
  drm/nouveau: dma-mapping: Use unsigned long for dma_attrs
  drm/rockship: dma-mapping: Use unsigned long for dma_attrs
  infiniband: dma-mapping: Use unsigned long for dma_attrs
  iommu: dma-mapping: Use unsigned long for dma_attrs
  [media] dma-mapping: Use unsigned long for dma_attrs
  xen: dma-mapping: Use unsigned long for dma_attrs
  swiotlb: dma-mapping: Use unsigned long for dma_attrs
  powerpc: dma-mapping: Use unsigned long for dma_attrs
  video: dma-mapping: Use unsigned long for dma_attrs
  x86: dma-mapping: Use unsigned long for dma_attrs
  iommu: intel: dma-mapping: Use unsigned long for dma_attrs
  h8300: dma-mapping: Use unsigned long for dma_attrs
  hexagon: dma-mapping: Use unsigned long for dma_attrs
  ia64: dma-mapping: Use unsigned long for dma_attrs
  m68k: dma-mapping: Use unsigned long for dma_attrs
  metag: dma-mapping: Use unsigned long for dma_attrs
  microblaze: dma-mapping: Use unsigned long for dma_attrs
  mips: dma-mapping: Use unsigned long for dma_attrs
  mn10300: dma-mapping: Use unsigned long for dma_attrs
  nios2: dma-mapping: Use unsigned long for dma_attrs
  openrisc: dma-mapping: Use unsigned long for dma_attrs
  parisc: dma-mapping: Use unsigned long for dma_attrs
  misc: mic: dma-mapping: Use unsigned long for dma_attrs
  s390: dma-mapping: Use unsigned long for dma_attrs
  sh: dma-mapping: Use unsigned long for dma_attrs
  sparc: dma-mapping: Use unsigned long for dma_attrs
  tile: dma-mapping: Use unsigned long for dma_attrs
  unicore32: dma-mapping: Use unsigned long for dma_attrs
  xtensa: dma-mapping: Use unsigned long for dma_attrs
  dma-mapping: Remove dma_get_attr
  dma-mapping: Document the DMA attributes next to the declaration

 Documentation/DMA-API.txt  |  33 +++---
 Documentation/DMA-attributes.txt   |   2 +-
 arch/alpha/include/asm/dma-mapping.h   |   2 -
 arch/alpha/kernel/pci-noop.c   |   2 +-
 arch/alpha/kernel/pci_iommu.c  |  12 +-
 arch/arc/mm/dma.c  |  12 +-
 arch/arm/common/dmabounce.c|   4 +-
 arch/arm/include/asm/dma-mapping.h |  13 +--
 arch/arm/include/asm/xen/page-coherent.h   |  16 +--
 arch/arm/mm/dma-mapping.c  | 117 +--
 arch/arm/xen/mm.c  |   8 +-
 arch/arm64/mm/dma-mapping.c|  66 +--
 arch/avr32/mm/dma-coherent.c   |  12 +-
 arch/blackfin/kernel/dma-mapping.c |   8 +-
 arch/c6x/include/asm/dma-mapping.h |   4 +-
 arch/c6x/ke

Re: [PATCH v4 18/44] [media] dma-mapping: Use unsigned long for dma_attrs

2016-06-10 Thread Krzysztof Kozlowski
On 06/10/2016 02:28 PM, Fabien DESSENNE wrote:
> Hi
> 
> On 06/10/2016 12:11 PM, Krzysztof Kozlowski wrote:
>> Split out subsystem specific changes for easier reviews. This will be
>> squashed with main commit.
>>
>> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
>> ---
>>  drivers/media/platform/sti/bdisp/bdisp-hw.c| 26 +++---
> 
> For bdisp: Acked-by: Fabien Dessenne <fabien.desse...@st.com>
> 
> 
> The other part deals with v4l2-core, I let Mauro (ot other) review/ack
> it. I also think it would be better to split this patch in two patches

In case Mauro misses this patch, I will split it on next iteration.

Thanks,
Krzysztof

> (bdisp / v4l2-core)
>>  drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 
>> +++---
>>  drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 
>>  include/media/videobuf2-dma-contig.h   |  7 ++
>>  4 files changed, 26 insertions(+), 56 deletions(-)

--
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 v4 00/44] dma-mapping: Use unsigned long for dma_attrs

2016-06-10 Thread Krzysztof Kozlowski
Hi,


This is fourth approach for replacing struct dma_attrs with unsigned
long.

The main patch (1/44) doing the change is split into many subpatches
for easier review (2-42).  They should be squashed together when
applying.


*Important:* Patchset is tested on my ARM platforms and *only* build
tested on allyesconfigs: ARM, ARM64, i386, x86_64 and powerpc.
Please kindly provide reviewes and tests for other platforms.

Rebased on next-20160607.

For easier testing the patchset is available here:
repo:   https://github.com/krzk/linux
branch: for-next/dma-attrs-const-v4


Changes since v3

1. Collect some acks.
2. Drop wrong patch 1/45 ("powerpc: dma-mapping: Don't hard-code
   the value of DMA_ATTR_WEAK_ORDERING").
3. Minor fix pointed out by Michael Ellerman.


Changes since v2

1. Follow Christoph Hellwig's comments (don't use BIT add
   documentation, remove dma_get_attr).


Rationale
=
The dma-mapping core and the implementations do not change the
DMA attributes passed by pointer.  Thus the pointer can point to const
data.  However the attributes do not have to be a bitfield. Instead
unsigned long will do fine:

1. This is just simpler.  Both in terms of reading the code and setting
   attributes.  Instead of initializing local attributes on the stack
   and passing pointer to it to dma_set_attr(), just set the bits.

2. It brings safeness and checking for const correctness because the
   attributes are passed by value.


Best regards,
Krzysztof


Krzysztof Kozlowski (44):
  dma-mapping: Use unsigned long for dma_attrs
  alpha: dma-mapping: Use unsigned long for dma_attrs
  arc: dma-mapping: Use unsigned long for dma_attrs
  ARM: dma-mapping: Use unsigned long for dma_attrs
  arm64: dma-mapping: Use unsigned long for dma_attrs
  avr32: dma-mapping: Use unsigned long for dma_attrs
  blackfin: dma-mapping: Use unsigned long for dma_attrs
  c6x: dma-mapping: Use unsigned long for dma_attrs
  cris: dma-mapping: Use unsigned long for dma_attrs
  frv: dma-mapping: Use unsigned long for dma_attrs
  drm/exynos: dma-mapping: Use unsigned long for dma_attrs
  drm/mediatek: dma-mapping: Use unsigned long for dma_attrs
  drm/msm: dma-mapping: Use unsigned long for dma_attrs
  drm/nouveau: dma-mapping: Use unsigned long for dma_attrs
  drm/rockship: dma-mapping: Use unsigned long for dma_attrs
  infiniband: dma-mapping: Use unsigned long for dma_attrs
  iommu: dma-mapping: Use unsigned long for dma_attrs
  [media] dma-mapping: Use unsigned long for dma_attrs
  xen: dma-mapping: Use unsigned long for dma_attrs
  swiotlb: dma-mapping: Use unsigned long for dma_attrs
  powerpc: dma-mapping: Use unsigned long for dma_attrs
  video: dma-mapping: Use unsigned long for dma_attrs
  x86: dma-mapping: Use unsigned long for dma_attrs
  iommu: intel: dma-mapping: Use unsigned long for dma_attrs
  h8300: dma-mapping: Use unsigned long for dma_attrs
  hexagon: dma-mapping: Use unsigned long for dma_attrs
  ia64: dma-mapping: Use unsigned long for dma_attrs
  m68k: dma-mapping: Use unsigned long for dma_attrs
  metag: dma-mapping: Use unsigned long for dma_attrs
  microblaze: dma-mapping: Use unsigned long for dma_attrs
  mips: dma-mapping: Use unsigned long for dma_attrs
  mn10300: dma-mapping: Use unsigned long for dma_attrs
  nios2: dma-mapping: Use unsigned long for dma_attrs
  openrisc: dma-mapping: Use unsigned long for dma_attrs
  parisc: dma-mapping: Use unsigned long for dma_attrs
  misc: mic: dma-mapping: Use unsigned long for dma_attrs
  s390: dma-mapping: Use unsigned long for dma_attrs
  sh: dma-mapping: Use unsigned long for dma_attrs
  sparc: dma-mapping: Use unsigned long for dma_attrs
  tile: dma-mapping: Use unsigned long for dma_attrs
  unicore32: dma-mapping: Use unsigned long for dma_attrs
  xtensa: dma-mapping: Use unsigned long for dma_attrs
  dma-mapping: Remove dma_get_attr
  dma-mapping: Document the DMA attributes next to the declaration

 Documentation/DMA-API.txt  |  33 +++---
 Documentation/DMA-attributes.txt   |   2 +-
 arch/alpha/include/asm/dma-mapping.h   |   2 -
 arch/alpha/kernel/pci-noop.c   |   2 +-
 arch/alpha/kernel/pci_iommu.c  |  12 +-
 arch/arc/mm/dma.c  |  12 +-
 arch/arm/common/dmabounce.c|   4 +-
 arch/arm/include/asm/dma-mapping.h |  13 +--
 arch/arm/include/asm/xen/page-coherent.h   |  16 +--
 arch/arm/mm/dma-mapping.c  | 121 ++-
 arch/arm/xen/mm.c  |   8 +-
 arch/arm64/mm/dma-mapping.c|  67 +--
 arch/avr32/mm/dma-coherent.c   |  12 +-
 arch/blackfin/kernel/dma-mapping.c |   8 +-
 arch/c6x/include/asm/dma-mapping.h |   4 +-
 arch/c6x/kernel/dma.c  |   9 +-
 arch/c6x/mm/dma-

[PATCH v4 18/44] [media] dma-mapping: Use unsigned long for dma_attrs

2016-06-10 Thread Krzysztof Kozlowski
Split out subsystem specific changes for easier reviews. This will be
squashed with main commit.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/media/platform/sti/bdisp/bdisp-hw.c| 26 +++---
 drivers/media/v4l2-core/videobuf2-dma-contig.c | 30 +++---
 drivers/media/v4l2-core/videobuf2-dma-sg.c | 19 
 include/media/videobuf2-dma-contig.h   |  7 ++
 4 files changed, 26 insertions(+), 56 deletions(-)

diff --git a/drivers/media/platform/sti/bdisp/bdisp-hw.c 
b/drivers/media/platform/sti/bdisp/bdisp-hw.c
index 052c932ac942..d86ba40eec8d 100644
--- a/drivers/media/platform/sti/bdisp/bdisp-hw.c
+++ b/drivers/media/platform/sti/bdisp/bdisp-hw.c
@@ -125,14 +125,11 @@ int bdisp_hw_get_and_clear_irq(struct bdisp_dev *bdisp)
  */
 void bdisp_hw_free_nodes(struct bdisp_ctx *ctx)
 {
-   if (ctx && ctx->node[0]) {
-   DEFINE_DMA_ATTRS(attrs);
-
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
+   if (ctx && ctx->node[0])
dma_free_attrs(ctx->bdisp_dev->dev,
   sizeof(struct bdisp_node) * MAX_NB_NODE,
-  ctx->node[0], ctx->node_paddr[0], );
-   }
+  ctx->node[0], ctx->node_paddr[0],
+  DMA_ATTR_WRITE_COMBINE);
 }
 
 /**
@@ -150,12 +147,10 @@ int bdisp_hw_alloc_nodes(struct bdisp_ctx *ctx)
unsigned int i, node_size = sizeof(struct bdisp_node);
void *base;
dma_addr_t paddr;
-   DEFINE_DMA_ATTRS(attrs);
 
/* Allocate all the nodes within a single memory page */
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
base = dma_alloc_attrs(dev, node_size * MAX_NB_NODE, ,
-  GFP_KERNEL | GFP_DMA, );
+  GFP_KERNEL | GFP_DMA, DMA_ATTR_WRITE_COMBINE);
if (!base) {
dev_err(dev, "%s no mem\n", __func__);
return -ENOMEM;
@@ -188,13 +183,9 @@ void bdisp_hw_free_filters(struct device *dev)
 {
int size = (BDISP_HF_NB * NB_H_FILTER) + (BDISP_VF_NB * NB_V_FILTER);
 
-   if (bdisp_h_filter[0].virt) {
-   DEFINE_DMA_ATTRS(attrs);
-
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
+   if (bdisp_h_filter[0].virt)
dma_free_attrs(dev, size, bdisp_h_filter[0].virt,
-  bdisp_h_filter[0].paddr, );
-   }
+  bdisp_h_filter[0].paddr, DMA_ATTR_WRITE_COMBINE);
 }
 
 /**
@@ -211,12 +202,11 @@ int bdisp_hw_alloc_filters(struct device *dev)
unsigned int i, size;
void *base;
dma_addr_t paddr;
-   DEFINE_DMA_ATTRS(attrs);
 
/* Allocate all the filters within a single memory page */
size = (BDISP_HF_NB * NB_H_FILTER) + (BDISP_VF_NB * NB_V_FILTER);
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, );
-   base = dma_alloc_attrs(dev, size, , GFP_KERNEL | GFP_DMA, );
+   base = dma_alloc_attrs(dev, size, , GFP_KERNEL | GFP_DMA,
+  DMA_ATTR_WRITE_COMBINE);
if (!base)
return -ENOMEM;
 
diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c 
b/drivers/media/v4l2-core/videobuf2-dma-contig.c
index e3e47ace7daf..36cb488dc737 100644
--- a/drivers/media/v4l2-core/videobuf2-dma-contig.c
+++ b/drivers/media/v4l2-core/videobuf2-dma-contig.c
@@ -23,7 +23,7 @@
 
 struct vb2_dc_conf {
struct device   *dev;
-   struct dma_attrsattrs;
+   unsigned long   attrs;
 };
 
 struct vb2_dc_buf {
@@ -32,7 +32,7 @@ struct vb2_dc_buf {
unsigned long   size;
void*cookie;
dma_addr_t  dma_addr;
-   struct dma_attrsattrs;
+   unsigned long   attrs;
enum dma_data_direction dma_dir;
struct sg_table *dma_sgt;
struct frame_vector *vec;
@@ -135,7 +135,7 @@ static void vb2_dc_put(void *buf_priv)
kfree(buf->sgt_base);
}
dma_free_attrs(buf->dev, buf->size, buf->cookie, buf->dma_addr,
-   >attrs);
+  buf->attrs);
put_device(buf->dev);
kfree(buf);
 }
@@ -153,14 +153,14 @@ static void *vb2_dc_alloc(void *alloc_ctx, unsigned long 
size,
 
buf->attrs = conf->attrs;
buf->cookie = dma_alloc_attrs(dev, size, >dma_addr,
-   GFP_KERNEL | gfp_flags, >attrs);
+   GFP_KERNEL | gfp_flags, buf->attrs);
if (!buf->cookie) {
dev_err(dev, "dma_alloc_coherent of size %ld failed\n", size);
kfree(buf);
return ERR_PTR(-ENOMEM);
}
 
-   if (!dma

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 v4 5/7] ARM: Exynos: remove code for MFC custom reserved memory handling

2016-06-06 Thread Krzysztof Kozlowski
On 06/03/2016 08:57 AM, Krzysztof Kozlowski wrote:
> On 06/02/2016 07:25 PM, Javier Martinez Canillas wrote:
>> Marek mentioned that bisectability is only partially broken because the old
>> binding will still work after this series if IOMMU is enabled (because the
>> properties are ignored in this case). But will break if IOMMU isn't enabled
>> which will be the case for some boards that fails to boot with IOMMU due the
>> bootloader leaving the FIMD enabled doing DMA operations automatically 
>> AFAIU. 
>>
>> Now, I'm OK with not keeping backwards compatibility for the MFC dt bindings
>> since arguably the driver has been broken for a long time and nobody cared
>> and also I don't think anyone in practice boots a new kernel with an old DTB
>> for Exynos.
>>
>> But I don't think is correct to introduce a new issue as is the case if this
>> patch is applied before the previous patches in the series since this causes
>> the driver to probe to fail and the following warn on boot (while it used to
>> at least probe correctly in mainline):
> 
> Okay but the patches will go through separate tree. This is not a
> problem, as I said, I just need a stable tag from media tree with first
> four patches (Mauro?).

Applied again this and DTS changes (remaining two patches) for v4.8 on
top of branch provided by Sylwester:
https://git.kernel.org/cgit/linux/kernel/git/krzk/linux.git/log/?h=for-v4.8/exynos-mfc

Best regards,
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: [ATTN] Re: [PATCH v4 5/7] ARM: Exynos: remove code for MFC custom reserved memory handling

2016-06-06 Thread Krzysztof Kozlowski
On 06/03/2016 11:59 AM, Sylwester Nawrocki wrote:
> On 06/03/2016 08:57 AM, Krzysztof Kozlowski wrote:
>> On 06/02/2016 07:25 PM, Javier Martinez Canillas wrote:
>>> On 06/02/2016 12:31 PM, Krzysztof Kozlowski wrote:
>>>> On 06/02/2016 05:20 PM, Javier Martinez Canillas wrote:
>>>>> On 05/30/2016 03:28 AM, Krzysztof Kozlowski wrote:
>>>>>> On 05/24/2016 03:31 PM, Marek Szyprowski wrote:
>>>>>>> Once MFC driver has been converted to generic reserved memory bindings,
>>>>>>> there is no need for custom memory reservation code.
>>>>>>>
>>>>>>> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
>>>>>>> ---
>>>>>>>  arch/arm/mach-exynos/Makefile  |  2 -
>>>>>>>  arch/arm/mach-exynos/exynos.c  | 19 
>>>>>>>  arch/arm/mach-exynos/mfc.h | 16 ---
>>>>>>>  arch/arm/mach-exynos/s5p-dev-mfc.c | 93 -
>>>>>>>  4 files changed, 130 deletions(-)
>>>>>>>  delete mode 100644 arch/arm/mach-exynos/mfc.h
>>>>>>>  delete mode 100644 arch/arm/mach-exynos/s5p-dev-mfc.c
>>>>>>
>>>>>> Thanks, applied.
>>>>>
>>>>> This patch can't be applied before patches 2/5 and 3/5, or the custom
>>>>> memory regions reservation will break with the current s5p-mfc driver.
>>>>
>>>> Yes, I know. As I understood from talk with Marek, the driver is broken
>>>> now so continuous work was not chosen. If it is not correct and full
>>>
>>> It's true that the driven is currently broken in mainline and is not really
>>> stable, I posted fixes for all the issues I found (mostly in module removal
>>> and insert paths).
>>>
>>> But with just the following patch from Ayaka on top of mainline, I'm able to
>>> have video decoding working: https://lkml.org/lkml/2016/5/6/577
>>
>> Which is still a "future" patch, not current state...
>>>
>>> Marek mentioned that bisectability is only partially broken because the old
>>> binding will still work after this series if IOMMU is enabled (because the
>>> properties are ignored in this case). But will break if IOMMU isn't enabled
>>> which will be the case for some boards that fails to boot with IOMMU due the
>>> bootloader leaving the FIMD enabled doing DMA operations automatically 
>>> AFAIU. 
>>>
>>> Now, I'm OK with not keeping backwards compatibility for the MFC dt bindings
>>> since arguably the driver has been broken for a long time and nobody cared
>>> and also I don't think anyone in practice boots a new kernel with an old DTB
>>> for Exynos.
>>>
>>> But I don't think is correct to introduce a new issue as is the case if this
>>> patch is applied before the previous patches in the series since this causes
>>> the driver to probe to fail and the following warn on boot (while it used to
>>> at least probe correctly in mainline):
>>
>> Okay but the patches will go through separate tree. This is not a
>> problem, as I said, I just need a stable tag from media tree with first
>> four patches (Mauro?).
> 
> I have prepared a topic branch including media patches from this patch
> series and the dependency fix patches from Javier and Marek.
> So this could be used as a topic branch to pull into media master branch
> and a dependency topic branch for Krzysztof's samsung-soc tree.
> Mauro, can we do it this way? I already talked to Kamil about this.
> 
> ---8<
> The following changes since commit 1a695a905c18548062509178b98bc91e67510864:
> 
>   Linux 4.7-rc1 (2016-05-29 09:29:24 -0700)
> 
> are available in the git repository at:
> 
>   git://linuxtv.org/snawrocki/samsung.git for-v4.8/media/exynos-mfc
> 
> for you to fetch changes up to 04f776734c4e03e33111d3d5a994b589870df623:
> 
>   media: s5p-mfc: add iommu support (2016-06-03 11:13:45 +0200)

Thanks Sylwester! Although this is branch not a tag but I believe it
will stay stable. Pulled. I will apply Exynos-specific patches on top of it.

Best regards,
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 v4 5/7] ARM: Exynos: remove code for MFC custom reserved memory handling

2016-06-03 Thread Krzysztof Kozlowski
On 06/02/2016 07:25 PM, Javier Martinez Canillas wrote:
> Hello Krzysztof,
> 
> On 06/02/2016 12:31 PM, Krzysztof Kozlowski wrote:
>> On 06/02/2016 05:20 PM, Javier Martinez Canillas wrote:
>>> Hello Krzysztof,
>>>
>>> On 05/30/2016 03:28 AM, Krzysztof Kozlowski wrote:
>>>> On 05/24/2016 03:31 PM, Marek Szyprowski wrote:
>>>>> Once MFC driver has been converted to generic reserved memory bindings,
>>>>> there is no need for custom memory reservation code.
>>>>>
>>>>> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
>>>>> ---
>>>>>  arch/arm/mach-exynos/Makefile  |  2 -
>>>>>  arch/arm/mach-exynos/exynos.c  | 19 
>>>>>  arch/arm/mach-exynos/mfc.h | 16 ---
>>>>>  arch/arm/mach-exynos/s5p-dev-mfc.c | 93 
>>>>> --
>>>>>  4 files changed, 130 deletions(-)
>>>>>  delete mode 100644 arch/arm/mach-exynos/mfc.h
>>>>>  delete mode 100644 arch/arm/mach-exynos/s5p-dev-mfc.c
>>>>
>>>> Thanks, applied.
>>>>
>>>
>>> This patch can't be applied before patches 2/5 and 3/5, or the custom
>>> memory regions reservation will break with the current s5p-mfc driver.
>>
>> Yes, I know. As I understood from talk with Marek, the driver is broken
>> now so continuous work was not chosen. If it is not correct and full
> 
> It's true that the driven is currently broken in mainline and is not really
> stable, I posted fixes for all the issues I found (mostly in module removal
> and insert paths).
> 
> But with just the following patch from Ayaka on top of mainline, I'm able to
> have video decoding working: https://lkml.org/lkml/2016/5/6/577

Which is still a "future" patch, not current state...
> 
> Marek mentioned that bisectability is only partially broken because the old
> binding will still work after this series if IOMMU is enabled (because the
> properties are ignored in this case). But will break if IOMMU isn't enabled
> which will be the case for some boards that fails to boot with IOMMU due the
> bootloader leaving the FIMD enabled doing DMA operations automatically AFAIU. 
> 
> Now, I'm OK with not keeping backwards compatibility for the MFC dt bindings
> since arguably the driver has been broken for a long time and nobody cared
> and also I don't think anyone in practice boots a new kernel with an old DTB
> for Exynos.
> 
> But I don't think is correct to introduce a new issue as is the case if this
> patch is applied before the previous patches in the series since this causes
> the driver to probe to fail and the following warn on boot (while it used to
> at least probe correctly in mainline):

Okay but the patches will go through separate tree. This is not a
problem, as I said, I just need a stable tag from media tree with first
four patches (Mauro?).

Best regards,
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 v4 5/7] ARM: Exynos: remove code for MFC custom reserved memory handling

2016-06-02 Thread Krzysztof Kozlowski
On 06/02/2016 05:20 PM, Javier Martinez Canillas wrote:
> Hello Krzysztof,
> 
> On 05/30/2016 03:28 AM, Krzysztof Kozlowski wrote:
>> On 05/24/2016 03:31 PM, Marek Szyprowski wrote:
>>> Once MFC driver has been converted to generic reserved memory bindings,
>>> there is no need for custom memory reservation code.
>>>
>>> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
>>> ---
>>>  arch/arm/mach-exynos/Makefile  |  2 -
>>>  arch/arm/mach-exynos/exynos.c  | 19 
>>>  arch/arm/mach-exynos/mfc.h | 16 ---
>>>  arch/arm/mach-exynos/s5p-dev-mfc.c | 93 
>>> --
>>>  4 files changed, 130 deletions(-)
>>>  delete mode 100644 arch/arm/mach-exynos/mfc.h
>>>  delete mode 100644 arch/arm/mach-exynos/s5p-dev-mfc.c
>>
>> Thanks, applied.
>>
> 
> This patch can't be applied before patches 2/5 and 3/5, or the custom
> memory regions reservation will break with the current s5p-mfc driver.

Yes, I know. As I understood from talk with Marek, the driver is broken
now so continuous work was not chosen. If it is not correct and full
bisectability is required, then entire patchset requires special
handling - I need a stable tag from media tree. Without this everything
will be broken anyway.

Best regards,
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 v4 5/7] ARM: Exynos: remove code for MFC custom reserved memory handling

2016-05-30 Thread Krzysztof Kozlowski
On 05/24/2016 03:31 PM, Marek Szyprowski wrote:
> Once MFC driver has been converted to generic reserved memory bindings,
> there is no need for custom memory reservation code.
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/mach-exynos/Makefile  |  2 -
>  arch/arm/mach-exynos/exynos.c  | 19 
>  arch/arm/mach-exynos/mfc.h | 16 ---
>  arch/arm/mach-exynos/s5p-dev-mfc.c | 93 
> --
>  4 files changed, 130 deletions(-)
>  delete mode 100644 arch/arm/mach-exynos/mfc.h
>  delete mode 100644 arch/arm/mach-exynos/s5p-dev-mfc.c

Thanks, applied.

What is your final decision for DTS patches? Which approach for MFC
reserved memory node?

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 v4 2/7] media: s5p-mfc: use generic reserved memory bindings

2016-05-27 Thread Krzysztof Kozlowski
On 05/24/2016 03:31 PM, Marek Szyprowski wrote:
> Use generic reserved memory bindings and mark old, custom properties
> as obsoleted.
> 
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  .../devicetree/bindings/media/s5p-mfc.txt  | 39 
> +-
>  1 file changed, 31 insertions(+), 8 deletions(-)
>

Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>


Best regards,
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 1/2] drm/exynos: g2d: Add support for old S5Pv210 type

2016-05-25 Thread Krzysztof Kozlowski
On 05/24/2016 06:05 PM, Tobias Jakobi wrote:
> Hello Krzysztof,
> 
> 
> Krzysztof Kozlowski wrote:
>> On 05/24/2016 03:49 PM, Tobias Jakobi wrote:
>>> Hello Krzysztof,
>>>
>>> are you sure that these are the only differences. Because AFAIK there
>>> are quite a few more:
>>> - DMA submission of commands
>>> - blend mode / rounding
>>> - solid fill
>>> - YCrCb support
>>> - and probably more
>>>
>>> One would need to add least split the command list parser into a v3 and
>>> v41 version to accomodate for the differences. In fact userspace/libdrm
>>> would need to know which hw type it currently uses, but you currently
>>> always return 4.1 in the corresponding ioctl.
>>
>> Eh, so probably my patch does not cover fully the support for v3 G2D. I
>> looked mostly at the differences between v3 and v4 in the s5p-g2d driver
>> itself. However you are right that this might be not sufficient because
>> exynos-g2d moved forward and is different than s5p-g2d.
>>
>>> Krzysztof Kozlowski wrote:
>>>> The non-DRM s5p-g2d driver supports two versions of G2D: v3.0 on
>>>> S5Pv210 and v4.x on Exynos 4x12 (or newer). The driver for 3.0 device
>>>> version is doing two things differently:
>>>> 1. Before starting the render process, it invalidates caches (pattern,
>>>>source buffer and mask buffer). Cache control is not present on v4.x
>>>>device.
>>>> 2. Scalling is done through StretchEn command (in BITBLT_COMMAND_REG
>>>>register) instead of SRC_SCALE_CTRL_REG as in v4.x. However the
>>>>exynos_drm_g2d driver does not implement the scalling so this
>>>>difference can be eliminated.
>>> Huh? Where did you get this from? Scaling works with the DRM driver.
>>
>> I was looking for the usage of scaling reg (as there is no scaling
>> command). How the scaling is implemented then?
> Like you said above the drivers work completly different. The DRM one
> receives a command list that is constructed by userspace (libdrm
> mostly), copies it to a contiguous buffer and passes the memory address
> of that buffer to the engine which then works on it. Of course
> everything is slightly more complex.
> 
> You don't see any reference to scaling in the driver because the scaling
> regs don't need any kind of specific validation.
> 
> If you want to know how the command list is constructed, the best way is
> to look into libdrm. The Exynos specific tests actually cover scaling.

Thanks for explanations. The patch is insufficient then and it requires
much more effort. Please drop the series as of now.

Best regards,
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 v4 6/7] ARM: dts: exynos: convert MFC device to generic reserved memory bindings

2016-05-25 Thread Krzysztof Kozlowski
On 05/24/2016 03:31 PM, Marek Szyprowski wrote:
> This patch replaces custom properties for defining reserved memory
> regions with generic reserved memory bindings for MFC video codec
> device.
> 
> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
> ---
>  arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi  | 27 
> ++
>  arch/arm/boot/dts/exynos4210-origen.dts|  4 ++--
>  arch/arm/boot/dts/exynos4210-smdkv310.dts  |  4 ++--
>  arch/arm/boot/dts/exynos4412-origen.dts|  4 ++--
>  arch/arm/boot/dts/exynos4412-smdk4412.dts  |  4 ++--
>  arch/arm/boot/dts/exynos5250-arndale.dts   |  4 ++--
>  arch/arm/boot/dts/exynos5250-smdk5250.dts  |  4 ++--
>  arch/arm/boot/dts/exynos5250-spring.dts|  4 ++--
>  arch/arm/boot/dts/exynos5420-arndale-octa.dts  |  4 ++--
>  arch/arm/boot/dts/exynos5420-peach-pit.dts |  4 ++--
>  arch/arm/boot/dts/exynos5420-smdk5420.dts  |  4 ++--
>  arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi |  4 ++--
>  arch/arm/boot/dts/exynos5800-peach-pi.dts  |  4 ++--
>  13 files changed, 51 insertions(+), 24 deletions(-)
>  create mode 100644 arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi
> 
> diff --git a/arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi 
> b/arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi
> new file mode 100644
> index 000..e7445c9
> --- /dev/null
> +++ b/arch/arm/boot/dts/exynos-mfc-reserved-memory.dtsi
> @@ -0,0 +1,27 @@
> +/*
> + * Samsung's Exynos SoC MFC (Video Codec) reserved memory common definition.

Reviewed-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>

One nit - our copyright would be welcomed:
Copyright (c) 2016 Samsung Electronics Co., Ltd

However if there are no objections I will add it when applying.

Best regards,
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 1/2] drm/exynos: g2d: Add support for old S5Pv210 type

2016-05-24 Thread Krzysztof Kozlowski
On 05/24/2016 03:49 PM, Tobias Jakobi wrote:
> Hello Krzysztof,
> 
> are you sure that these are the only differences. Because AFAIK there
> are quite a few more:
> - DMA submission of commands
> - blend mode / rounding
> - solid fill
> - YCrCb support
> - and probably more
> 
> One would need to add least split the command list parser into a v3 and
> v41 version to accomodate for the differences. In fact userspace/libdrm
> would need to know which hw type it currently uses, but you currently
> always return 4.1 in the corresponding ioctl.

Eh, so probably my patch does not cover fully the support for v3 G2D. I
looked mostly at the differences between v3 and v4 in the s5p-g2d driver
itself. However you are right that this might be not sufficient because
exynos-g2d moved forward and is different than s5p-g2d.

> Krzysztof Kozlowski wrote:
>> The non-DRM s5p-g2d driver supports two versions of G2D: v3.0 on
>> S5Pv210 and v4.x on Exynos 4x12 (or newer). The driver for 3.0 device
>> version is doing two things differently:
>> 1. Before starting the render process, it invalidates caches (pattern,
>>source buffer and mask buffer). Cache control is not present on v4.x
>>device.
>> 2. Scalling is done through StretchEn command (in BITBLT_COMMAND_REG
>>register) instead of SRC_SCALE_CTRL_REG as in v4.x. However the
>>exynos_drm_g2d driver does not implement the scalling so this
>>difference can be eliminated.
> Huh? Where did you get this from? Scaling works with the DRM driver.

I was looking for the usage of scaling reg (as there is no scaling
command). How the scaling is implemented then?

Thanks for feedback!

Best regards,
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


[PATCH 1/2] drm/exynos: g2d: Add support for old S5Pv210 type

2016-05-24 Thread Krzysztof Kozlowski
The non-DRM s5p-g2d driver supports two versions of G2D: v3.0 on
S5Pv210 and v4.x on Exynos 4x12 (or newer). The driver for 3.0 device
version is doing two things differently:
1. Before starting the render process, it invalidates caches (pattern,
   source buffer and mask buffer). Cache control is not present on v4.x
   device.
2. Scalling is done through StretchEn command (in BITBLT_COMMAND_REG
   register) instead of SRC_SCALE_CTRL_REG as in v4.x. However the
   exynos_drm_g2d driver does not implement the scalling so this
   difference can be eliminated.

After adding support for v3.0 to exynos_drm_g2d driver, the old driver
can be removed.

Cc: Kyungmin Park <kyungmin.p...@samsung.com>
Cc: Kamil Debski <k.deb...@samsung.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/gpu/drm/exynos/exynos_drm_g2d.c | 37 +++--
 drivers/gpu/drm/exynos/exynos_drm_g2d.h |  7 +++
 2 files changed, 42 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.c 
b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
index 493552368295..44d8b28e9d98 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.c
@@ -19,6 +19,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -38,6 +39,7 @@
 #define G2D_SOFT_RESET 0x
 #define G2D_INTEN  0x0004
 #define G2D_INTC_PEND  0x000C
+#define G2D_CACHECTL   0x0018 /* S5PV210 specific */
 #define G2D_DMA_SFR_BASE_ADDR  0x0080
 #define G2D_DMA_COMMAND0x0084
 #define G2D_DMA_STATUS 0x008C
@@ -78,6 +80,11 @@
 #define G2D_INTP_GCMD_FIN  (1 << 1)
 #define G2D_INTP_SCMD_FIN  (1 << 0)
 
+/* G2D_CACHECTL, S5PV210 specific */
+#define G2D_CACHECTL_PATCACHE  (BIT(2))
+#define G2D_CACHECTL_SRCBUFFER (BIT(1))
+#define G2D_CACHECTL_MASKBUFFER(BIT(0))
+
 /* G2D_DMA_COMMAND */
 #define G2D_DMA_HALT   (1 << 2)
 #define G2D_DMA_CONTINUE   (1 << 1)
@@ -245,6 +252,7 @@ struct g2d_data {
 
unsigned long   current_pool;
unsigned long   max_pool;
+   enum exynos_drm_g2d_typetype;
 };
 
 static int g2d_init_cmdlist(struct g2d_data *g2d)
@@ -1125,6 +1133,13 @@ int exynos_g2d_set_cmdlist_ioctl(struct drm_device 
*drm_dev, void *data,
cmdlist->data[cmdlist->last++] = G2D_SRC_BASE_ADDR;
cmdlist->data[cmdlist->last++] = 0;
 
+   if (g2d->type == EXYNOS_DRM_G2D_TYPE_3X) {
+   cmdlist->data[cmdlist->last++] = G2D_CACHECTL;
+   cmdlist->data[cmdlist->last++] = G2D_CACHECTL_PATCACHE |
+G2D_CACHECTL_SRCBUFFER |
+G2D_CACHECTL_MASKBUFFER;
+   }
+
/*
 * 'LIST_HOLD' command should be set to the DMA_HOLD_CMD_REG
 * and GCF bit should be set to INTEN register if user wants
@@ -1369,10 +1384,20 @@ static int g2d_probe(struct platform_device *pdev)
struct exynos_drm_subdrv *subdrv;
int ret;
 
+   /* Sanity check, we can be instatiated only from DT */
+   if (!dev->of_node)
+   return -EINVAL;
+
g2d = devm_kzalloc(dev, sizeof(*g2d), GFP_KERNEL);
if (!g2d)
return -ENOMEM;
 
+   g2d->type = (enum exynos_drm_g2d_type)of_device_get_match_data(dev);
+   if (g2d->type == EXYNOS_DRM_G2D_TYPE_UNKNOWN) {
+   dev_err(dev, "failed to get type of device\n");
+   return -EINVAL;
+   }
+
g2d->runqueue_slab = kmem_cache_create("g2d_runqueue_slab",
sizeof(struct g2d_runqueue_node), 0, 0, NULL);
if (!g2d->runqueue_slab)
@@ -1535,8 +1560,16 @@ static const struct dev_pm_ops g2d_pm_ops = {
 };
 
 static const struct of_device_id exynos_g2d_match[] = {
-   { .compatible = "samsung,exynos5250-g2d" },
-   { .compatible = "samsung,exynos4212-g2d" },
+   {
+   .compatible = "samsung,exynos5250-g2d",
+   .data = (void *)EXYNOS_DRM_G2D_TYPE_4X,
+   }, {
+   .compatible = "samsung,exynos4212-g2d",
+   .data = (void *)EXYNOS_DRM_G2D_TYPE_4X,
+   }, {
+   .compatible = "samsung,s5pv210-g2d",
+   .data = (void *)EXYNOS_DRM_G2D_TYPE_3X,
+   },
{},
 };
 MODULE_DEVICE_TABLE(of, exynos_g2d_match);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_g2d.h 
b/drivers/gpu/drm/exynos/exynos_drm_g2d.h
index 1a9c7ca8c15b..84ec8aff6f0a 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_g2d.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_g2d.h
@@ -7,6 +7,13 @@
  * published by the Free Software Foundationr
  */
 
+enum exynos_drm_g2d

[PATCH 2/2] [media] s5p-g2d: Replace old driver with DRM version

2016-05-24 Thread Krzysztof Kozlowski
Remove the old non-DRM driver because it is now entirely supported by
exynos_drm_g2d driver.

Cc: Kyungmin Park <kyungmin.p...@samsung.com>
Cc: Kamil Debski <k.deb...@samsung.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 MAINTAINERS   |   8 -
 drivers/gpu/drm/exynos/Kconfig|   1 -
 drivers/media/platform/Kconfig|  12 -
 drivers/media/platform/Makefile   |   1 -
 drivers/media/platform/s5p-g2d/Makefile   |   3 -
 drivers/media/platform/s5p-g2d/g2d-hw.c   | 117 -
 drivers/media/platform/s5p-g2d/g2d-regs.h | 122 -
 drivers/media/platform/s5p-g2d/g2d.c  | 800 --
 drivers/media/platform/s5p-g2d/g2d.h  |  91 
 9 files changed, 1155 deletions(-)
 delete mode 100644 drivers/media/platform/s5p-g2d/Makefile
 delete mode 100644 drivers/media/platform/s5p-g2d/g2d-hw.c
 delete mode 100644 drivers/media/platform/s5p-g2d/g2d-regs.h
 delete mode 100644 drivers/media/platform/s5p-g2d/g2d.c
 delete mode 100644 drivers/media/platform/s5p-g2d/g2d.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 243c0811a4d8..01763419c6a1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1616,14 +1616,6 @@ L:   linux-arm-ker...@lists.infradead.org (moderated 
for non-subscribers)
 S: Maintained
 F: arch/arm/mach-s5pv210/
 
-ARM/SAMSUNG S5P SERIES 2D GRAPHICS ACCELERATION (G2D) SUPPORT
-M: Kyungmin Park <kyungmin.p...@samsung.com>
-M: Kamil Debski <k.deb...@samsung.com>
-L: linux-arm-ker...@lists.infradead.org
-L: linux-media@vger.kernel.org
-S: Maintained
-F: drivers/media/platform/s5p-g2d/
-
 ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
 M: Kyungmin Park <kyungmin.p...@samsung.com>
 M: Kamil Debski <k.deb...@samsung.com>
diff --git a/drivers/gpu/drm/exynos/Kconfig b/drivers/gpu/drm/exynos/Kconfig
index d814b3048ee5..b0eb20ba1b28 100644
--- a/drivers/gpu/drm/exynos/Kconfig
+++ b/drivers/gpu/drm/exynos/Kconfig
@@ -95,7 +95,6 @@ comment "Sub-drivers"
 
 config DRM_EXYNOS_G2D
bool "G2D"
-   depends on VIDEO_SAMSUNG_S5P_G2D=n
select FRAME_VECTOR
help
  Choose this option if you want to use Exynos G2D for DRM.
diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 84e041c0a70e..171005c53d62 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -161,18 +161,6 @@ config VIDEO_MEM2MEM_DEINTERLACE
help
Generic deinterlacing V4L2 driver.
 
-config VIDEO_SAMSUNG_S5P_G2D
-   tristate "Samsung S5P and EXYNOS4 G2D 2d graphics accelerator driver"
-   depends on VIDEO_DEV && VIDEO_V4L2
-   depends on ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
-   depends on HAS_DMA
-   select VIDEOBUF2_DMA_CONTIG
-   select V4L2_MEM2MEM_DEV
-   default n
-   ---help---
- This is a v4l2 driver for Samsung S5P and EXYNOS4 G2D
- 2d graphics accelerator.
-
 config VIDEO_SAMSUNG_S5P_JPEG
tristate "Samsung S5P/Exynos3250/Exynos4 JPEG codec driver"
depends on VIDEO_DEV && VIDEO_V4L2
diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile
index bbb7bd1eb268..ad5e26a0bd17 100644
--- a/drivers/media/platform/Makefile
+++ b/drivers/media/platform/Makefile
@@ -32,7 +32,6 @@ obj-$(CONFIG_VIDEO_SAMSUNG_S5P_JPEG)  += s5p-jpeg/
 obj-$(CONFIG_VIDEO_SAMSUNG_S5P_MFC)+= s5p-mfc/
 obj-$(CONFIG_VIDEO_SAMSUNG_S5P_TV) += s5p-tv/
 
-obj-$(CONFIG_VIDEO_SAMSUNG_S5P_G2D)+= s5p-g2d/
 obj-$(CONFIG_VIDEO_SAMSUNG_EXYNOS_GSC) += exynos-gsc/
 
 obj-$(CONFIG_VIDEO_STI_BDISP)  += sti/bdisp/
diff --git a/drivers/media/platform/s5p-g2d/Makefile 
b/drivers/media/platform/s5p-g2d/Makefile
deleted file mode 100644
index 2c48c416a804..
--- a/drivers/media/platform/s5p-g2d/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-s5p-g2d-objs := g2d.o g2d-hw.o
-
-obj-$(CONFIG_VIDEO_SAMSUNG_S5P_G2D)+= s5p-g2d.o
diff --git a/drivers/media/platform/s5p-g2d/g2d-hw.c 
b/drivers/media/platform/s5p-g2d/g2d-hw.c
deleted file mode 100644
index e87bd93811d4..
--- a/drivers/media/platform/s5p-g2d/g2d-hw.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Samsung S5P G2D - 2D Graphics Accelerator Driver
- *
- * Copyright (c) 2011 Samsung Electronics Co., Ltd.
- * Kamil Debski, <k.deb...@samsung.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 "g2d.h"
-#include "g2d-regs.h"
-
-#define w(x, a)writel((x), d->regs + (a))
-#define r(a)   readl(d->regs + (a))
-
-/* g2d_reset clears all g2d registers */
-void g2d_reset(struct g2d_dev *d)
-{
-   w(1, SO

Re: [PATCH v2] s5p-mfc: Don't try to put pm->clock if lookup failed

2016-05-03 Thread Krzysztof Kozlowski
On Mon, May 02, 2016 at 03:14:22PM -0400, Javier Martinez Canillas wrote:
> Failing to get the struct s5p_mfc_pm .clock is a non-fatal error so the
> clock field can have a errno pointer value. But s5p_mfc_final_pm() only
> checks if .clock is not NULL before attempting to unprepare and put it.
> 
> This leads to the following warning in clk_put() due s5p_mfc_final_pm():
> 
> WARNING: CPU: 3 PID: 1023 at drivers/clk/clk.c:2814 
> s5p_mfc_final_pm+0x48/0x74 [s5p_mfc]
> CPU: 3 PID: 1023 Comm: rmmod Tainted: GW   
> 4.6.0-rc6-next-20160502-5-g5a15a49106bc #9
> Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
> [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
> [] (show_stack) from [] (dump_stack+0x88/0x9c)
> [] (dump_stack) from [] (__warn+0xe8/0x100)
> [] (__warn) from [] (warn_slowpath_null+0x20/0x28)
> [] (warn_slowpath_null) from [] 
> (s5p_mfc_final_pm+0x48/0x74 [s5p_mfc])
> [] (s5p_mfc_final_pm [s5p_mfc]) from [] 
> (s5p_mfc_remove+0x8c/0x94 [s5p_mfc])
> [] (s5p_mfc_remove [s5p_mfc]) from [] 
> (platform_drv_remove+0x24/0x3c)
> [] (platform_drv_remove) from [] 
> (__device_release_driver+0x84/0x110)
> [] (__device_release_driver) from [] 
> (driver_detach+0xac/0xb0)
> [] (driver_detach) from [] (bus_remove_driver+0x4c/0xa0)
> [] (bus_remove_driver) from [] 
> (SyS_delete_module+0x174/0x1b8)
> [] (SyS_delete_module) from [] (ret_fast_syscall+0x0/0x3c)
> 
> Assign the pointer to NULL in case of a lookup failure to fix the issue.
> 
> Signed-off-by: Javier Martinez Canillas <jav...@osg.samsung.com>
> 
> ---
> 
> Changes in v2:
> - Set the clock pointer to NULL instead of checking for !IS_ERR_OR_NULL().
>   Suggested by Arnd Bergmann.
> 
>  drivers/media/platform/s5p-mfc/s5p_mfc_pm.c | 1 +
>  1 file changed, 1 insertion(+)

This is a fix for bug, so for statistics:
Fixes: d19f405a5a8d ("[media] s5p-mfc: Fix selective sclk_mfc init")

... and although not fatal, but annoying so I think this deserves:
Cc: <sta...@vger.kernel.org>

Anyway:
Reviewed-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>

Best regards,
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: [PATCHv14 03/18] dts: exynos4412-odroid*: enable the HDMI CEC device

2016-03-29 Thread Krzysztof Kozlowski
On Fri, Mar 25, 2016 at 10:10 PM, Hans Verkuil  wrote:
> From: Marek Szyprowski 
>
> Add a dts node entry and enable the HDMI CEC device present in the Exynos4
> family of SoCs.
>
> Signed-off-by: Marek Szyprowski 
> Signed-off-by: Hans Verkuil 
> ---
>  arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 4 
>  1 file changed, 4 insertions(+)

Applied for v4.7 with a little bit different subject and the new node
put in alphabetical order. Please don't include your original patch in
your tree because any merging will probably end with having these
nodes twice.

https://git.kernel.org/cgit/linux/kernel/git/krzk/linux.git/log/?h=next/dt
(but tell me if you need to base on this so I would prepare a tag)

Best regards,
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: [PATCHv14 02/18] dts: exynos4: add node for the HDMI CEC device

2016-03-29 Thread Krzysztof Kozlowski
On Fri, Mar 25, 2016 at 10:10 PM, Hans Verkuil <hverk...@xs4all.nl> wrote:
> From: Kamil Debski <ka...@wypas.org>
>
> This patch adds HDMI CEC node specific to the Exynos4210/4x12 SoC series.
>
> Signed-off-by: Kamil Debski <ka...@wypas.org>
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
> ---
>  arch/arm/boot/dts/exynos4.dtsi | 12 
>  1 file changed, 12 insertions(+)

Applied for v4.7 with a little bit different subject.

Best regards,
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: [PATCHv14 01/18] dts: exynos4*: add HDMI CEC pin definition to pinctrl

2016-03-29 Thread Krzysztof Kozlowski
On Fri, Mar 25, 2016 at 10:09 PM, Hans Verkuil <hverk...@xs4all.nl> wrote:
> From: Kamil Debski <ka...@wypas.org>
>
> Add pinctrl nodes for the HDMI CEC device to the Exynos4210 and
> Exynos4x12 SoCs. These are required by the HDMI CEC device.
>
> Signed-off-by: Kamil Debski <ka...@wypas.org>
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
> ---
>  arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 7 +++
>  arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 7 +++
>  2 files changed, 14 insertions(+)

Applied for v4.7 with a little bit different subject:
https://git.kernel.org/cgit/linux/kernel/git/krzk/linux.git/log/?h=next/dt
(but tell me if you need to base on this so I would prepare a tag)

Best regards,
--
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: [PATCHv13 01/17] dts: exynos4*: add HDMI CEC pin definition to pinctrl

2016-03-20 Thread Krzysztof Kozlowski
On 19.03.2016 17:15, Hans Verkuil wrote:
> On 03/19/2016 03:50 AM, Krzysztof Kozlowski wrote:
>> On Fri, Mar 18, 2016 at 03:07:00PM +0100, Hans Verkuil wrote:
>>> From: Kamil Debski <ka...@wypas.org>
>>>
>>> Add pinctrl nodes for the HDMI CEC device to the Exynos4210 and
>>> Exynos4x12 SoCs. These are required by the HDMI CEC device.
>>>
>>> Signed-off-by: Kamil Debski <ka...@wypas.org>
>>> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
>>> Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
>>> ---
>>>  arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 7 +++
>>>  arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 7 +++
>>>  2 files changed, 14 insertions(+)
>>
>> Hi Hans,
>>
>> I see you have been carrying these three patches for a long time.
>> Initially I thought that there are some dependencies... but maybe there
>> are not?
>>
>> Can I take these Exynos DTS patches to samsung-soc?
> 
> That would be very nice!

I'll apply them after merge window.


> BTW, it would be nice if someone from Samsung could try to improve the s5p
> CEC driver from this patch series.
> 
> The problem is that it expects userspace to tell it the physical address,
> which is read from the EDID. But the HDMI driver in the kernel already knows
> this, so requiring userspace to handle this is not nice.
> 
> Basically the CEC driver needs to know when a new EDID has been read and
> when the hotplug detect goes low (EDID has been lost).
> 
> If someone who actually knows the HDMI code could provide me with a patch,
> then I can fix the CEC driver. I have an odroid to test with, so I can check
> the code.

Not quite my area of knowledge but I'll keep it in mind.

Best regards,
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: [PATCHv13 01/17] dts: exynos4*: add HDMI CEC pin definition to pinctrl

2016-03-18 Thread Krzysztof Kozlowski
On Fri, Mar 18, 2016 at 03:07:00PM +0100, Hans Verkuil wrote:
> From: Kamil Debski <ka...@wypas.org>
> 
> Add pinctrl nodes for the HDMI CEC device to the Exynos4210 and
> Exynos4x12 SoCs. These are required by the HDMI CEC device.
> 
> Signed-off-by: Kamil Debski <ka...@wypas.org>
> Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
> ---
>  arch/arm/boot/dts/exynos4210-pinctrl.dtsi | 7 +++
>  arch/arm/boot/dts/exynos4x12-pinctrl.dtsi | 7 +++
>  2 files changed, 14 insertions(+)

Hi Hans,

I see you have been carrying these three patches for a long time.
Initially I thought that there are some dependencies... but maybe there
are not?

Can I take these Exynos DTS patches to samsung-soc?

Best regards,
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: [RFT 1/2] [media] exynos4-is: Add missing endpoint of_node_put on error paths

2016-03-13 Thread Krzysztof Kozlowski
On 11.03.2016 21:30, Sylwester Nawrocki wrote:
> On 01/26/2016 01:41 AM, Krzysztof Kozlowski wrote:
>> In fimc_md_parse_port_node() endpoint node is get with of_get_next_child()
>> but it is not put on error path.
> 
> "is get" doesn't sound right to me, how about rephrasing this to:
> 
> "In fimc_md_parse_port_node() reference count of the endpoint node
> "is incremented by of_get_next_child() but it is not decremented
>  on error path."
> 
>> Fixes: 56fa1a6a6a7d ("[media] s5p-fimc: Change the driver directory name to 
>> exynos4-is")
>> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
>> ---
>> Not tested on hardware, only built+static checkers.
>> ---
>>  drivers/media/platform/exynos4-is/media-dev.c | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/media/platform/exynos4-is/media-dev.c 
>> b/drivers/media/platform/exynos4-is/media-dev.c
>> index f3b2dd30ec77..de0977479327 100644
>> --- a/drivers/media/platform/exynos4-is/media-dev.c
>> +++ b/drivers/media/platform/exynos4-is/media-dev.c
>> @@ -339,8 +339,10 @@ static int fimc_md_parse_port_node(struct fimc_md *fmd,
>>  return 0;
>>  
>>  v4l2_of_parse_endpoint(ep, );
>> -if (WARN_ON(endpoint.base.port == 0) || index >= FIMC_MAX_SENSORS)
>> +if (WARN_ON(endpoint.base.port == 0) || index >= FIMC_MAX_SENSORS) {
>> +of_node_put(ep);
>>  return -EINVAL;
>> +}
> 
> Thanks for the patch, it looks correct but it doesn't apply cleanly
> due to patches already in media master branch [1]. Could you refresh
> this patch and resend?
> Also I don't quite like multiple calls to of_node_put(), how about
> doing something like this instead:

How about sending your patch then with my reported-by?

Best regards,
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 0/2] [media] exynos4-is: Trivial fixes for DT port/endpoint parse logic

2016-03-04 Thread Krzysztof Kozlowski
2016-03-05 5:20 GMT+09:00 Javier Martinez Canillas :
> Hello,
>
> This series have two trivial fixes for issues that I noticed while
> reading as a reference the driver's functions that parse the graph
> port and endpoints nodes.
>
> It was only compile tested because I don't have access to a Exynos4
> hardware to test the DT parsing, but the patches are very simple.

Not directly related, but similar: my previous two patches for missing
of_node_put [0] are unfortunately still waiting. Although I have
Exynos4 boards, but I don't have infrastructure/scripts to test it.

Best regards,
Krzysztof

[0] https://patchwork.linuxtv.org/patch/32707/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2] media: platform: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-04 Thread Krzysztof Kozlowski
2016-03-04 20:02 GMT+09:00 Sylwester Nawrocki <s.nawro...@samsung.com>:
> On 03/04/2016 02:02 AM, Krzysztof Kozlowski wrote:
>> The MFD_SYSCON depends on HAS_IOMEM so when selecting
>> it avoid unmet direct dependencies.
>
>> diff --git a/drivers/media/platform/exynos4-is/Kconfig
>> b/drivers/media/platform/exynos4-is/Kconfig
>> index 57d42c6172c5..c4317b99d257 100644
>> --- a/drivers/media/platform/exynos4-is/Kconfig
>> +++ b/drivers/media/platform/exynos4-is/Kconfig
>> @@ -17,6 +17,7 @@ config VIDEO_S5P_FIMC
>>   tristate "S5P/EXYNOS4 FIMC/CAMIF camera interface driver"
>>   depends on I2C
>>   depends on HAS_DMA
>> + depends on HAS_IOMEM# For MFD_SYSCON
>>   select VIDEOBUF2_DMA_CONTIG
>>   select V4L2_MEM2MEM_DEV
>>   select MFD_SYSCON
>
> While we are already at it, shouldn't "depends on HAS_IOMEM"
> be instead added at the top level entry in this Kconfig file,
> i.e. "config VIDEO_SAMSUNG_EXYNOS4_IS" ? For things like
> devm_ioremap_resource() depending on HAS_IOMEM and used in all
> the sub-drivers, enabled by VIDEO_SAMSUNG_EXYNOS4_IS?

Indeed that would make sense... but now after some more looking at it,
even this patch is not needed. All these drivers are children of
MEDIA_SUPPORT which already depends on HAS_IOMEM.

Best regards,
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 v2] media: platform: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
On 04.03.2016 16:03, Holger Schurig wrote:
> Krzysztof Kozlowski <k.kozlow...@samsung.com> writes:
> 
>> +depends on HAS_IOMEM# For MFD_SYSCON
> 
> 
> I think this comment is not necessary, it's also highly unusual. On
> other words: other patches like this don't add such comments.
> 
> You can always use "git blame" to find out why some line has changed the
> way it changed ...

No problem, I can remove it. I thought it might be useful since this
dependency is not for the driver but for selected item.

Best regards,
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


[PATCH v2] media: platform: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>

---

Changes since v1:
1. Fix comments from Arnd: VIDEO_OMAP3 does not require it, however
   VIDEO_S5P_FIMC still needs it.
---
 drivers/media/platform/exynos4-is/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/exynos4-is/Kconfig 
b/drivers/media/platform/exynos4-is/Kconfig
index 57d42c6172c5..c4317b99d257 100644
--- a/drivers/media/platform/exynos4-is/Kconfig
+++ b/drivers/media/platform/exynos4-is/Kconfig
@@ -17,6 +17,7 @@ config VIDEO_S5P_FIMC
tristate "S5P/EXYNOS4 FIMC/CAMIF camera interface driver"
depends on I2C
depends on HAS_DMA
+   depends on HAS_IOMEM# For MFD_SYSCON
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
select MFD_SYSCON
-- 
2.5.0

--
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: [rtc-linux] [RFC 06/15] pinctrl: rockchip: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
2016-03-03 17:03 GMT+09:00 Krzysztof Kozlowski <k.kozlow...@samsung.com>:
> The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
> direct dependencies.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
> ---
>  drivers/pinctrl/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
> index fb8200b8e8ec..dc7ab58d4d74 100644
> --- a/drivers/pinctrl/Kconfig
> +++ b/drivers/pinctrl/Kconfig
> @@ -131,6 +131,7 @@ config PINCTRL_MESON
>
>  config PINCTRL_ROCKCHIP
> bool
> +   depends on HAS_IOMEM# For MFD_SYSCON
> select PINMUX

False alarm, no need for the patch (non-selectable symbol)

Best regards,
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: [rtc-linux] [RFC 07/15] pinctrl: mvebu: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
2016-03-03 17:03 GMT+09:00 Krzysztof Kozlowski <k.kozlow...@samsung.com>:
> The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
> direct dependencies.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
> ---
>  drivers/pinctrl/mvebu/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/pinctrl/mvebu/Kconfig b/drivers/pinctrl/mvebu/Kconfig
> index 170602407c0d..13685923729c 100644
> --- a/drivers/pinctrl/mvebu/Kconfig
> +++ b/drivers/pinctrl/mvebu/Kconfig
> @@ -7,6 +7,7 @@ config PINCTRL_MVEBU
>
>  config PINCTRL_DOVE
> bool
> +   depends on HAS_IOMEM# For MFD_SYSCON
> select PINCTRL_MVEBU
> select MFD_SYSCON

False alarm, no need for the patch (non-selectable symbol)

Best regards,
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: [rtc-linux] [RFC 12/15] soc: qcom: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
2016-03-03 17:03 GMT+09:00 Krzysztof Kozlowski <k.kozlow...@samsung.com>:
> The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
> direct dependencies.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
> ---
>  drivers/soc/qcom/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
> index 461b387d03cc..24de48134c15 100644
> --- a/drivers/soc/qcom/Kconfig
> +++ b/drivers/soc/qcom/Kconfig
> @@ -4,6 +4,7 @@
>  config QCOM_GSBI
>  tristate "QCOM General Serial Bus Interface"
>  depends on ARCH_QCOM
> +depends on HAS_IOMEM   # For MFD_SYSCON
>  select MFD_SYSCON

False alarm, no need for the patch (this depends on ARCH_QCOM).

Best regards,
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: [rtc-linux] [RFC 13/15] staging: media: omap4iss: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
2016-03-03 17:03 GMT+09:00 Krzysztof Kozlowski <k.kozlow...@samsung.com>:
> The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
> direct dependencies.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
> ---
>  drivers/staging/media/omap4iss/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/omap4iss/Kconfig 
> b/drivers/staging/media/omap4iss/Kconfig
> index 46183464ee79..7dea072172aa 100644
> --- a/drivers/staging/media/omap4iss/Kconfig
> +++ b/drivers/staging/media/omap4iss/Kconfig
> @@ -2,6 +2,7 @@ config VIDEO_OMAP4
> tristate "OMAP 4 Camera support"
> depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && I2C && ARCH_OMAP4
> depends on HAS_DMA
> +   depends on HAS_IOMEM# For MFD_SYSCON
> select MFD_SYSCON
> select VIDEOBUF2_DMA_CONTIG
> ---help---

False alarm, no need for the patch (this depends on ARCH_OMAP4).

Best regards,
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: [rtc-linux] Re: [RFC 09/15] media: platform: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
2016-03-03 19:57 GMT+09:00 Arnd Bergmann <a...@arndb.de>:
> On Thursday 03 March 2016 17:03:35 Krzysztof Kozlowski wrote:
>> diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
>> index 201f5c296a95..e5931e434fa2 100644
>> --- a/drivers/media/platform/Kconfig
>> +++ b/drivers/media/platform/Kconfig
>> @@ -79,6 +79,7 @@ config VIDEO_OMAP3
>> depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API && ARCH_OMAP3
>> depends on HAS_DMA && OF
>> depends on OMAP_IOMMU
>> +   depends on HAS_IOMEM# For MFD_SYSCON
>> select ARM_DMA_USE_IOMMU
>> select VIDEOBUF2_DMA_CONTIG
>
> This is only built for OMAP3, so we won't get here without HAS_IOMEM

Indeed.

>
>> select MFD_SYSCON
>> diff --git a/drivers/media/platform/exynos4-is/Kconfig 
>> b/drivers/media/platform/exynos4-is/Kconfig
>> index 57d42c6172c5..c4317b99d257 100644
>> --- a/drivers/media/platform/exynos4-is/Kconfig
>> +++ b/drivers/media/platform/exynos4-is/Kconfig
>> @@ -17,6 +17,7 @@ config VIDEO_S5P_FIMC
>> tristate "S5P/EXYNOS4 FIMC/CAMIF camera interface driver"
>> depends on I2C
>> depends on HAS_DMA
>> +   depends on HAS_IOMEM# For MFD_SYSCON
>> select VIDEOBUF2_DMA_CONTIG
>> select V4L2_MEM2MEM_DEV
>
> This  is guarded by HAS_DMA, which implies HAS_IOMEM afaik.

Looking at Kconfigs - no, it is not implied (or am I missing
something)... and sometimes dependency on HAS_IOMEM is next to
HAS_DMA.

BR,
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: [rtc-linux] Re: [RFC 11/15] power: reset: keystone: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
2016-03-03 21:33 GMT+09:00 Sebastian Reichel <s...@kernel.org>:
> Hi,
>
> On Thu, Mar 03, 2016 at 12:00:14PM +0100, Arnd Bergmann wrote:
>> On Thursday 03 March 2016 17:03:37 Krzysztof Kozlowski wrote:
>> > diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
>> > index 0a6408a39c66..0f34846ae80d 100644
>> > --- a/drivers/power/reset/Kconfig
>> > +++ b/drivers/power/reset/Kconfig
>> > @@ -141,6 +141,7 @@ config POWER_RESET_XGENE
>> >  config POWER_RESET_KEYSTONE
>> > bool "Keystone reset driver"
>> > depends on ARCH_KEYSTONE
>> > +   depends on HAS_IOMEM# For MFD_SYSCON
>> > select MFD_SYSCON
>> > help
>> >   Reboot support for the KEYSTONE SoCs.
>> >
>>
>> This is platform specific, but we should probably add || COMPILE_TEST
>> along with the HAS_IOMEM dependency.
>
> Sounds sensible. Will you guys send an updated patch?
>

Sure, I'll make some compile tests and send a v2.

Best regards,
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: [rtc-linux] Re: [RFC 15/15] mfd: syscon: Fix build of missing ioremap on UM

2016-03-03 Thread Krzysztof Kozlowski
2016-03-03 19:50 GMT+09:00 Arnd Bergmann <a...@arndb.de>:
> On Thursday 03 March 2016 17:03:41 Krzysztof Kozlowski wrote:
>> Since commit c89c0114955a ("mfd: syscon: Set regmap max_register in
>> of_syscon_register") the syscon uses ioremap so it fails on COMPILE_TEST
>> without HAS_IOMEM:
>>
>> drivers/mfd/syscon.c: In function ‘of_syscon_register’:
>> drivers/mfd/syscon.c:67:9: error: implicit declaration of function ‘ioremap’ 
>> [-Werror=implicit-function-declaration]
>>   base = ioremap(res.start, resource_size());
>>  ^
>> drivers/mfd/syscon.c:67:7: warning: assignment makes pointer from integer 
>> without a cast [-Wint-conversion]
>>   base = ioremap(res.start, resource_size());
>>^
>> drivers/mfd/syscon.c:109:2: error: implicit declaration of function 
>> ‘iounmap’ [-Werror=implicit-function-declaration]
>>   iounmap(base);
>>
>> When selecting MFD_SYSCON, depend on HAS_IOMEM to avoid unmet direct
>> dependencies.
>>
>> Reported-by: kbuild test robot <l...@intel.com>
>> Fixes: c89c0114955a ("mfd: syscon: Set regmap max_register in 
>> of_syscon_register")
>> Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
>> ---
>
> Thanks for looking into this, the patches all look right to me, but
> I fear we are forever playing catch-up here, as the number of syscon users
> is only growing, and it's not obvious to the average driver developer
> why they have to select this symbol.

Actually I screwed something because entire MFD menuconfig (including
MFD_SYSCON) is already guarded by if HAS_IOMEM.

I was fixing the problem from the end (the build error) and then hit
these unmet direct dependencies (mentioned this in other mail).

I think this patch 15/15 is not needed.

>
> Interestingly, when I try to build an allmodconfig kernel for UML,
> it seems to reject any driver calling ioremap/iounmap but not
> the wrapper functions around that (of_iomap, devm_ioremap,
> devm_ioremap_resource, ...)

The declaration of devm-like functions is always there. However it
should fail during linking stage (see my other patches like for
thermal, nvram etc. this is still in progress because I did not manage
to build allyesconfig on UML yet).

> or the actual accessors that make no
> sense without ioremap (readl, writel, inb, outb, iowrite32, ...).
>
> I've played with this a bit, and arrived at the patch below, is this
> something we want as well?
>
> Arnd
>
>> diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
>> index aa21dc55eb15..2e5b1e525a1d 100644
>> --- a/drivers/mfd/Kconfig
>> +++ b/drivers/mfd/Kconfig
>> @@ -1034,6 +1034,7 @@ config MFD_SUN6I_PRCM
>>
>>  config MFD_SYSCON
>>   bool "System Controller Register R/W Based on Regmap"
>> + depends on HAS_IOMEM
>>   select REGMAP_MMIO
>>   help
>> Select this option to enable accessing system control registers
>>
>
>
>  arch/um/include/asm/io.h   |1 +
>  drivers/char/Kconfig   |3 +++
>  drivers/char/mem.c |   16 
>  drivers/clocksource/Kconfig|3 +++
>  drivers/fmc/Kconfig|1 +
>  drivers/fpga/Kconfig   |1 +
>  drivers/hwtracing/intel_th/Kconfig |1 +
>  drivers/mfd/Kconfig|1 +
>  drivers/misc/altera-stapl/Kconfig  |2 +-
>  drivers/mtd/chips/Kconfig  |4 
>  drivers/mtd/lpddr/Kconfig  |1 +
>  drivers/mtd/maps/Kconfig   |3 ++-
>  drivers/mtd/nand/Kconfig   |2 +-
>  drivers/mtd/spi-nor/Kconfig|1 +
>  drivers/net/can/Kconfig|1 +
>  drivers/net/hamradio/Kconfig   |9 ++---
>  drivers/nvmem/Kconfig  |1 +
>  drivers/phy/Kconfig|9 +++--
>  drivers/power/reset/Kconfig|4 +++-
>  drivers/staging/comedi/Kconfig |6 +-
>  drivers/thermal/Kconfig|   11 +--

For some of these I already started fixing:
https://lkml.org/lkml/2016/3/3/147
http://comments.gmane.org/gmane.linux.kernel/2167664


>  include/linux/irq.h|2 ++
>  include/linux/mtd/cfi.h|2 ++
>  include/linux/mtd/map.h|2 ++
>  kernel/resource.c  |2 ++
>  lib/Kconfig|7 ++-
>  mm/bootmem.c   |4 ++--
>  27 files changed, 85 insertions(+), 15 deletions(-)
>
> diff --git a/arch/um/include/asm/io.h b/arch/um/include/asm/io.h
> new file mode 100644
> index 000..618ff13
> --- /dev/null
> +++ b/arch/um/include/asm

Re: [rtc-linux] Re: [RFC 04/15] irqchip: st: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
2016-03-03 19:53 GMT+09:00 Arnd Bergmann <a...@arndb.de>:
> On Thursday 03 March 2016 17:03:30 Krzysztof Kozlowski wrote:
>>  config ST_IRQCHIP
>> bool
>> select REGMAP
>> +   depends on HAS_IOMEM# For MFD_SYSCON
>> select MFD_SYSCON
>> help
>>   Enables SysCfg Controlled IRQs on STi based platforms.
>>
>
> Not user visible.

Hmmm... you are right (here and in other patches) but why am I getting
all these errors:
warning: (ST_IRQCHIP && HIP04_ETH && STMMAC_PLATFORM && DWMAC_IPQ806X
&& DWMAC_LPC18XX && DWMAC_ROCKCHIP && DWMAC_SOCFPGA && DWMAC_STI &&
TI_CPSW && PINCTRL_ROCKCHIP && PINCTRL_DOVE && POWER_RESET_KEYSTONE &&
S3C2410_WATCHDOG && VIDEO_OMAP3 && VIDEO_S5P_FIMC && USB_XHCI_MTK &&
RTC_DRV_AT91SAM9 && LPC18XX_DMAMUX && VIDEO_OMAP4 && HWSPINLOCK_QCOM
&& ATMEL_ST && QCOM_GSBI && PHY_HI6220_USB) selects MFD_SYSCON which
has unmet direct dependencies (HAS_IOMEM)
?
(ARCH=um, allyesconfig)
Adding depends here (and in other places) really helps... but it
should not have any impact...

Thanks for comments,
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


[RFC 00/15] tree-wide: mfd: syscon: Fix unmet ioremap dependency

2016-03-03 Thread Krzysztof Kozlowski
Hi,

Building allyesconfig on ARCH=um fails with:
   drivers/mfd/syscon.c: In function ‘of_syscon_register’:
   drivers/mfd/syscon.c:67:9: error: implicit declaration of function ‘ioremap’ 
[-Werror=implicit-function-declaration]
  base = ioremap(res.start, resource_size());

Since commit c89c0114955a ("mfd: syscon: Set regmap max_register in
of_syscon_register") the syscon depends on HAS_IOMEM because
it uses the ioremap().

However syscon is often directly selected... so first the dependency on
HAS_IOMEM has to be added to all selecting symbols.

Comments are welcomed whether this is appropriate approach.


The last patch "mfd: syscon: Fix build of missing ioremap on UM" should
enter all other to avoid kbuild complains like:

warning: (ST_IRQCHIP && HIP04_ETH && STMMAC_PLATFORM && DWMAC_IPQ806X &&
DWMAC_LPC18XX && DWMAC_ROCKCHIP && DWMAC_SOCFPGA && DWMAC_STI && TI_CPSW
&& PINCTRL_ROCKCHIP && PINCTRL_DOVE && POWER_RESET_KEYSTONE &&
S3C2410_WATCHDOG && VIDEO_OMAP3 && VIDEO_S5P_FIMC && USB_XHCI_MTK &&
RTC_DRV_AT91SAM9 && LPC18XX_DMAMUX && VIDEO_OMAP4 && HWSPINLOCK_QCOM && ATMEL_ST
&& QCOM_GSBI && PHY_HI6220_USB)
selects MFD_SYSCON which has unmet direct dependencies (HAS_IOMEM)


Best regards,
Krzysztof


Krzysztof Kozlowski (15):
  clocksource: atmel: Add missing MFD_SYSCON dependency on HAS_IOMEM
  dmaengine: nxp: Add missing MFD_SYSCON dependency on HAS_IOMEM
  hwspinlock: qcom: Add missing MFD_SYSCON dependency on HAS_IOMEM
  irqchip: st: Add missing MFD_SYSCON dependency on HAS_IOMEM
  phy: hi6220: Add missing MFD_SYSCON dependency on HAS_IOMEM
  pinctrl: rockchip: Add missing MFD_SYSCON dependency on HAS_IOMEM
  pinctrl: mvebu: Add missing MFD_SYSCON dependency on HAS_IOMEM
  rtc: at91sam9: Add missing MFD_SYSCON dependency on HAS_IOMEM
  media: platform: Add missing MFD_SYSCON dependency on HAS_IOMEM
  net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM
  power: reset: keystone: Add missing MFD_SYSCON dependency on HAS_IOMEM
  soc: qcom: Add missing MFD_SYSCON dependency on HAS_IOMEM
  staging: media: omap4iss: Add missing MFD_SYSCON dependency on
HAS_IOMEM
  usb: xhci: mtk: Add missing MFD_SYSCON dependency on HAS_IOMEM
  mfd: syscon: Fix build of missing ioremap on UM

 drivers/clocksource/Kconfig | 1 +
 drivers/dma/Kconfig | 1 +
 drivers/hwspinlock/Kconfig  | 1 +
 drivers/irqchip/Kconfig | 1 +
 drivers/media/platform/Kconfig  | 1 +
 drivers/media/platform/exynos4-is/Kconfig   | 1 +
 drivers/mfd/Kconfig | 1 +
 drivers/net/ethernet/hisilicon/Kconfig  | 1 +
 drivers/net/ethernet/stmicro/stmmac/Kconfig | 6 ++
 drivers/net/ethernet/ti/Kconfig | 1 +
 drivers/phy/Kconfig | 1 +
 drivers/pinctrl/Kconfig | 1 +
 drivers/pinctrl/mvebu/Kconfig   | 1 +
 drivers/power/reset/Kconfig | 1 +
 drivers/rtc/Kconfig | 1 +
 drivers/soc/qcom/Kconfig| 1 +
 drivers/staging/media/omap4iss/Kconfig  | 1 +
 drivers/usb/host/Kconfig| 1 +
 18 files changed, 23 insertions(+)

-- 
2.5.0

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


[RFC 03/15] hwspinlock: qcom: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/hwspinlock/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hwspinlock/Kconfig b/drivers/hwspinlock/Kconfig
index 73a401662853..5ab2d51dc147 100644
--- a/drivers/hwspinlock/Kconfig
+++ b/drivers/hwspinlock/Kconfig
@@ -21,6 +21,7 @@ config HWSPINLOCK_OMAP
 config HWSPINLOCK_QCOM
tristate "Qualcomm Hardware Spinlock device"
depends on ARCH_QCOM
+   depends on HAS_IOMEM# For MFD_SYSCON
select HWSPINLOCK
select MFD_SYSCON
help
-- 
2.5.0

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


[RFC 01/15] clocksource: atmel: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/clocksource/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index c346be650892..5927944b46e0 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -239,6 +239,7 @@ config ATMEL_PIT
 
 config ATMEL_ST
bool
+   depends on HAS_IOMEM# For MFD_SYSCON
select CLKSRC_OF
select MFD_SYSCON
 
-- 
2.5.0

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


[RFC 04/15] irqchip: st: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/irqchip/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/irqchip/Kconfig b/drivers/irqchip/Kconfig
index 00bbec6eca0b..10775b099daa 100644
--- a/drivers/irqchip/Kconfig
+++ b/drivers/irqchip/Kconfig
@@ -157,6 +157,7 @@ config RENESAS_IRQC
 config ST_IRQCHIP
bool
select REGMAP
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
help
  Enables SysCfg Controlled IRQs on STi based platforms.
-- 
2.5.0

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


[RFC 06/15] pinctrl: rockchip: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/pinctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index fb8200b8e8ec..dc7ab58d4d74 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -131,6 +131,7 @@ config PINCTRL_MESON
 
 config PINCTRL_ROCKCHIP
bool
+   depends on HAS_IOMEM# For MFD_SYSCON
select PINMUX
select GENERIC_PINCONF
select GENERIC_IRQ_CHIP
-- 
2.5.0

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


[RFC 05/15] phy: hi6220: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/phy/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 0124d17bd9fe..cfdb3551a675 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -225,6 +225,7 @@ config PHY_MT65XX_USB3
 config PHY_HI6220_USB
tristate "hi6220 USB PHY support"
depends on (ARCH_HISI && ARM64) || COMPILE_TEST
+   depends on HAS_IOMEM# For MFD_SYSCON
select GENERIC_PHY
select MFD_SYSCON
help
-- 
2.5.0

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


[RFC 02/15] dmaengine: nxp: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/dma/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/dma/Kconfig b/drivers/dma/Kconfig
index c77f214c9466..7fbf96bff280 100644
--- a/drivers/dma/Kconfig
+++ b/drivers/dma/Kconfig
@@ -290,6 +290,7 @@ config LPC18XX_DMAMUX
bool "NXP LPC18xx/43xx DMA MUX for PL080"
depends on ARCH_LPC18XX || COMPILE_TEST
depends on OF && AMBA_PL08X
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
help
  Enable support for DMA on NXP LPC18xx/43xx platforms
-- 
2.5.0

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


[RFC 10/15] net: ethernet: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/net/ethernet/hisilicon/Kconfig  | 1 +
 drivers/net/ethernet/stmicro/stmmac/Kconfig | 6 ++
 drivers/net/ethernet/ti/Kconfig | 1 +
 3 files changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/hisilicon/Kconfig 
b/drivers/net/ethernet/hisilicon/Kconfig
index 74beb1867230..6a9c91781bf9 100644
--- a/drivers/net/ethernet/hisilicon/Kconfig
+++ b/drivers/net/ethernet/hisilicon/Kconfig
@@ -26,6 +26,7 @@ config HIX5HD2_GMAC
 config HIP04_ETH
tristate "HISILICON P04 Ethernet support"
select MARVELL_PHY
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
select HNS_MDIO
---help---
diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig 
b/drivers/net/ethernet/stmicro/stmmac/Kconfig
index cec147d1d34f..d6902bf6e90f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
+++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
@@ -16,6 +16,7 @@ if STMMAC_ETH
 config STMMAC_PLATFORM
tristate "STMMAC Platform bus support"
depends on STMMAC_ETH
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
default y
---help---
@@ -41,6 +42,7 @@ config DWMAC_IPQ806X
tristate "QCA IPQ806x DWMAC support"
default ARCH_QCOM
depends on OF
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
help
  Support for QCA IPQ806X DWMAC Ethernet.
@@ -54,6 +56,7 @@ config DWMAC_LPC18XX
tristate "NXP LPC18xx/43xx DWMAC support"
default ARCH_LPC18XX
depends on OF
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
---help---
  Support for NXP LPC18xx/43xx DWMAC Ethernet.
@@ -73,6 +76,7 @@ config DWMAC_ROCKCHIP
tristate "Rockchip dwmac support"
default ARCH_ROCKCHIP
depends on OF
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
help
  Support for Ethernet controller on Rockchip RK3288 SoC.
@@ -84,6 +88,7 @@ config DWMAC_SOCFPGA
tristate "SOCFPGA dwmac support"
default ARCH_SOCFPGA
depends on OF
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
help
  Support for ethernet controller on Altera SOCFPGA
@@ -96,6 +101,7 @@ config DWMAC_STI
tristate "STi GMAC support"
default ARCH_STI
depends on OF
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
---help---
  Support for ethernet controller on STi SOCs.
diff --git a/drivers/net/ethernet/ti/Kconfig b/drivers/net/ethernet/ti/Kconfig
index e7f0b7d95b65..ec56cebe929d 100644
--- a/drivers/net/ethernet/ti/Kconfig
+++ b/drivers/net/ethernet/ti/Kconfig
@@ -62,6 +62,7 @@ config TI_CPSW_ALE
 config TI_CPSW
tristate "TI CPSW Switch Support"
depends on ARCH_DAVINCI || ARCH_OMAP2PLUS
+   depends on HAS_IOMEM# For MFD_SYSCON
select TI_DAVINCI_CPDMA
select TI_DAVINCI_MDIO
select TI_CPSW_PHY_SEL
-- 
2.5.0

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


[RFC 09/15] media: platform: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/media/platform/Kconfig| 1 +
 drivers/media/platform/exynos4-is/Kconfig | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig
index 201f5c296a95..e5931e434fa2 100644
--- a/drivers/media/platform/Kconfig
+++ b/drivers/media/platform/Kconfig
@@ -79,6 +79,7 @@ config VIDEO_OMAP3
depends on VIDEO_V4L2 && I2C && VIDEO_V4L2_SUBDEV_API && ARCH_OMAP3
depends on HAS_DMA && OF
depends on OMAP_IOMMU
+   depends on HAS_IOMEM# For MFD_SYSCON
select ARM_DMA_USE_IOMMU
select VIDEOBUF2_DMA_CONTIG
select MFD_SYSCON
diff --git a/drivers/media/platform/exynos4-is/Kconfig 
b/drivers/media/platform/exynos4-is/Kconfig
index 57d42c6172c5..c4317b99d257 100644
--- a/drivers/media/platform/exynos4-is/Kconfig
+++ b/drivers/media/platform/exynos4-is/Kconfig
@@ -17,6 +17,7 @@ config VIDEO_S5P_FIMC
tristate "S5P/EXYNOS4 FIMC/CAMIF camera interface driver"
depends on I2C
depends on HAS_DMA
+   depends on HAS_IOMEM# For MFD_SYSCON
select VIDEOBUF2_DMA_CONTIG
select V4L2_MEM2MEM_DEV
select MFD_SYSCON
-- 
2.5.0

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


[RFC 08/15] rtc: at91sam9: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/rtc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 0da40e2e4280..5c530b6b125d 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1302,6 +1302,7 @@ config RTC_DRV_AT91RM9200
 config RTC_DRV_AT91SAM9
tristate "AT91SAM9 RTT as RTC"
depends on ARCH_AT91 || COMPILE_TEST
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
help
  Some AT91SAM9 SoCs provide an RTT (Real Time Timer) block which
-- 
2.5.0

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


[RFC 07/15] pinctrl: mvebu: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/pinctrl/mvebu/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/mvebu/Kconfig b/drivers/pinctrl/mvebu/Kconfig
index 170602407c0d..13685923729c 100644
--- a/drivers/pinctrl/mvebu/Kconfig
+++ b/drivers/pinctrl/mvebu/Kconfig
@@ -7,6 +7,7 @@ config PINCTRL_MVEBU
 
 config PINCTRL_DOVE
bool
+   depends on HAS_IOMEM# For MFD_SYSCON
select PINCTRL_MVEBU
select MFD_SYSCON
 
-- 
2.5.0

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


[RFC 13/15] staging: media: omap4iss: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/staging/media/omap4iss/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/omap4iss/Kconfig 
b/drivers/staging/media/omap4iss/Kconfig
index 46183464ee79..7dea072172aa 100644
--- a/drivers/staging/media/omap4iss/Kconfig
+++ b/drivers/staging/media/omap4iss/Kconfig
@@ -2,6 +2,7 @@ config VIDEO_OMAP4
tristate "OMAP 4 Camera support"
depends on VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API && I2C && ARCH_OMAP4
depends on HAS_DMA
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
select VIDEOBUF2_DMA_CONTIG
---help---
-- 
2.5.0

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


[RFC 11/15] power: reset: keystone: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/power/reset/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/power/reset/Kconfig b/drivers/power/reset/Kconfig
index 0a6408a39c66..0f34846ae80d 100644
--- a/drivers/power/reset/Kconfig
+++ b/drivers/power/reset/Kconfig
@@ -141,6 +141,7 @@ config POWER_RESET_XGENE
 config POWER_RESET_KEYSTONE
bool "Keystone reset driver"
depends on ARCH_KEYSTONE
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
help
  Reboot support for the KEYSTONE SoCs.
-- 
2.5.0

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


[RFC 14/15] usb: xhci: mtk: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/usb/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig
index 8c20ebbc049c..f759a778d606 100644
--- a/drivers/usb/host/Kconfig
+++ b/drivers/usb/host/Kconfig
@@ -45,6 +45,7 @@ config USB_XHCI_PLATFORM
 
 config USB_XHCI_MTK
tristate "xHCI support for Mediatek MT65xx"
+   depends on HAS_IOMEM# For MFD_SYSCON
select MFD_SYSCON
depends on ARCH_MEDIATEK || COMPILE_TEST
---help---
-- 
2.5.0

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


[RFC 15/15] mfd: syscon: Fix build of missing ioremap on UM

2016-03-03 Thread Krzysztof Kozlowski
Since commit c89c0114955a ("mfd: syscon: Set regmap max_register in
of_syscon_register") the syscon uses ioremap so it fails on COMPILE_TEST
without HAS_IOMEM:

drivers/mfd/syscon.c: In function ‘of_syscon_register’:
drivers/mfd/syscon.c:67:9: error: implicit declaration of function ‘ioremap’ 
[-Werror=implicit-function-declaration]
  base = ioremap(res.start, resource_size());
 ^
drivers/mfd/syscon.c:67:7: warning: assignment makes pointer from integer 
without a cast [-Wint-conversion]
  base = ioremap(res.start, resource_size());
   ^
drivers/mfd/syscon.c:109:2: error: implicit declaration of function ‘iounmap’ 
[-Werror=implicit-function-declaration]
  iounmap(base);

When selecting MFD_SYSCON, depend on HAS_IOMEM to avoid unmet direct
dependencies.

Reported-by: kbuild test robot <l...@intel.com>
Fixes: c89c0114955a ("mfd: syscon: Set regmap max_register in 
of_syscon_register")
Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/mfd/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
index aa21dc55eb15..2e5b1e525a1d 100644
--- a/drivers/mfd/Kconfig
+++ b/drivers/mfd/Kconfig
@@ -1034,6 +1034,7 @@ config MFD_SUN6I_PRCM
 
 config MFD_SYSCON
bool "System Controller Register R/W Based on Regmap"
+   depends on HAS_IOMEM
select REGMAP_MMIO
help
  Select this option to enable accessing system control registers
-- 
2.5.0

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


[RFC 12/15] soc: qcom: Add missing MFD_SYSCON dependency on HAS_IOMEM

2016-03-03 Thread Krzysztof Kozlowski
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>
---
 drivers/soc/qcom/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/soc/qcom/Kconfig b/drivers/soc/qcom/Kconfig
index 461b387d03cc..24de48134c15 100644
--- a/drivers/soc/qcom/Kconfig
+++ b/drivers/soc/qcom/Kconfig
@@ -4,6 +4,7 @@
 config QCOM_GSBI
 tristate "QCOM General Serial Bus Interface"
 depends on ARCH_QCOM
+depends on HAS_IOMEM   # For MFD_SYSCON
 select MFD_SYSCON
 help
   Say y here to enable GSBI support.  The GSBI provides control
-- 
2.5.0

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


Re: [PATCH v2 2/7] ARM: dts: exynos4412-odroid*: enable MFC device

2015-12-09 Thread Krzysztof Kozlowski
On 09.12.2015 22:58, Marek Szyprowski wrote:
> Enable support for Multimedia Codec (MFC) device for all Exynos4412-based
> Odroid boards.
> 
> Signed-off-by: Marek Szyprowski 
> ---
>  arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 24 
>  1 file changed, 24 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi 
> b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> index edf0fc8..5825abf 100644
> --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
> @@ -18,6 +18,24 @@
>   stdout-path = _1;
>   };
>  
> + reserved-memory {
> + #address-cells = <1>;
> + #size-cells = <1>;
> + ranges;
> +
> + mfc_left: region@7700 {
> + compatible = "shared-dma-pool";
> + reusable;
> + reg = <0x7700 0x100>;

Doesn't this exceed the memory of Odroid X?

For other Exynos4412 boards the length is 0x80. I am curious: any
particular reason for the difference?

Best regards,
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 v2 2/7] ARM: dts: exynos4412-odroid*: enable MFC device

2015-12-09 Thread Krzysztof Kozlowski
On 10.12.2015 16:44, Krzysztof Kozlowski wrote:
> On 09.12.2015 22:58, Marek Szyprowski wrote:
>> Enable support for Multimedia Codec (MFC) device for all Exynos4412-based

... and one more finding: I think the abbreviation is Multi Format Codec.

BR,
Krzysztof

>> Odroid boards.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
>> ---
>>  arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 24 
>> 
>>  1 file changed, 24 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi 
>> b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
>> index edf0fc8..5825abf 100644
>> --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
>> +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi
>> @@ -18,6 +18,24 @@
>>  stdout-path = _1;
>>  };
>>  
>> +reserved-memory {
>> +#address-cells = <1>;
>> +#size-cells = <1>;
>> +ranges;
>> +
>> +mfc_left: region@7700 {
>> +compatible = "shared-dma-pool";
>> +reusable;
>> +reg = <0x7700 0x100>;
> 
> Doesn't this exceed the memory of Odroid X?
> 
> For other Exynos4412 boards the length is 0x80. I am curious: any
> particular reason for the difference?
> 
> Best regards,
> 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 v2 3/3] [media] include/media: move platform_data to linux/platform_data/media

2015-11-16 Thread Krzysztof Kozlowski
W dniu 16.11.2015 o 20:00, Mauro Carvalho Chehab pisze:
> Let's not mix platform_data headers with the core headers. Instead, let's
> create a subdir at linux/platform_data and move the headers to that
> common place, adding it to MAINTAINERS.
> 
> The headers were moved with:
>   mkdir include/linux/platform_data/media/; git mv 
> include/media/gpio-ir-recv.h include/media/ir-rx51.h 
> include/media/mmp-camera.h include/media/omap1_camera.h 
> include/media/omap4iss.h include/media/s5p_hdmi.h include/media/si4713.h 
> include/media/sii9234.h include/media/smiapp.h include/media/soc_camera.h 
> include/media/soc_camera_platform.h include/media/timb_radio.h 
> include/media/timb_video.h include/linux/platform_data/media/
> 
> And the references fixed with this script:
> MAIN_DIR="linux/platform_data/"
> PREV_DIR="media/"
> DIRS="media/"
> 
> echo "Checking affected files" >&2
> for i in $DIRS; do
>   for j in $(find include/$MAIN_DIR/$i -type f -name '*.h'); do
>n=`basename $j`
>   git grep -l $n
>   done
> done|sort|uniq >files && (
>   echo "Handling files..." >&2;
>   echo "for i in \$(cat files|grep -v Documentation); do cat \$i | \\";
>   (
>   cd include/$MAIN_DIR;
>   for j in $DIRS; do
>   for i in $(ls $j); do
>   echo "perl -ne 's,(include 
> [\\\"\\<])$PREV_DIR($i)([\\\"\\>]),\1$MAIN_DIR$j\2\3,; print \$_' |\\";
>   done;
>   done;
>   echo "cat > a && mv a \$i; done";
>   );
>   echo "Handling documentation..." >&2;
>   echo "for i in MAINTAINERS \$(cat files); do cat \$i | \\";
>   (
>   cd include/$MAIN_DIR;
>   for j in $DIRS; do
>   for i in $(ls $j); do
>   echo "  perl -ne 
> 's,include/$PREV_DIR($i)\b,include/$MAIN_DIR$j\1,; print \$_' |\\";
>   done;
>   done;
>   echo "cat > a && mv a \$i; done"
>   );
> ) >script && . ./script
> 
> Signed-off-by: Mauro Carvalho Chehab <mche...@osg.samsung.com>
> ---
>  Documentation/video4linux/omap4_camera.txt| 2 +-
>  Documentation/video4linux/si4713.txt  | 2 +-
>  MAINTAINERS   | 1 +
>  arch/arm/mach-omap1/include/mach/camera.h | 2 +-
>  arch/arm/mach-omap2/board-rx51-peripherals.c  | 4 ++--
>  arch/arm/plat-samsung/devs.c  | 2 +-

Acked-by: Krzysztof Kozlowski <k.kozlow...@samsung.com>

Best regards,
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 4/4] ARM64: dts: exynos5433: add jpeg node

2015-09-28 Thread Krzysztof Kozlowski
W dniu 28.09.2015 o 20:54, Bartlomiej Zolnierkiewicz pisze:
> 
> Hi,
> 
> On Monday, September 28, 2015 05:52:13 PM Krzysztof Kozlowski wrote:
>> W dniu 21.09.2015 o 18:59, Andrzej Pietrasiewicz pisze:
>>> Hi Hans,
>>>
>>> W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
>>>> On 18-09-15 16:21, Andrzej Pietrasiewicz wrote:
>>>>> From: Marek Szyprowski <m.szyprow...@samsung.com>
>>>>>
>>>>> Add Exynos 5433 jpeg h/w codec node.
>>>>>
>>>>> Signed-off-by: Marek Szyprowski <m.szyprow...@samsung.com>
>>>>> Signed-off-by: Andrzej Pietrasiewicz <andrze...@samsung.com>
>>>>> ---
>>>>>   arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +
>>>>>   1 file changed, 21 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
>>>>> b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
>>>>
>>>> This dtsi file doesn't exist in the media-git tree. What is the story
>>>> here?
>>>>
>>>> Should this go through a different subsystem?
>>>>
>>>> I think the media subsystem can take patches 1-3 and whoever does DT
>>>> patches can
>>>> take this patch, right?
>>>>
>>>
>>> The cover letter explains that the series is rebased onto Mauro's
>>> master with Kukjin's branch merged. The latter does contain
>>> the exynos5433.dtsi. That said, yes, taking patches 1-3 in
>>> media subsystem and leaving DT patch to someone else is the
>>> way to go.
>>
>> Although Kukjin picked Exynos 5433 ARM64 patches but they were not
>> accepted upstream by arm-soc. He rolled it for few releases but:
>> 1. Reason for not accepting by arm-soc was not resolved - there is no DTS.
>> 2. Kukjin did not rebase the branch for 4.4... which maybe means that he
>> wants to drop it?
>> 3. Anyone (but me...) can send Galaxy Note4 (Exynos5433) DTS file based
>> on sources on opensource.samsung.com. The DTS there is for 32-bit but it
>> can be probably easily adjusted for ARM64.
>>
>> All of this means that Device Tree support for this driver can't be
>> merged now and effort for mainlining 5433 may be unfortunately wasted...
> 
> Exynos5433 support is being incrementally merged (clocks, drm, phy,
> pinctrl, thermal and tty support is already in upstream or -next).
> 
> I don't know why DTS changes got stuck in Kukjin's tree (Kukjin,
> could you please explain?) but I think that this shouldn't not stop
> us from continuing Exynos5433 upstreaming effort.

I already explained. There is no DTS, so the pull request was rejected
(pull request for v4.0 I believe).

It was not about adding drivers for 5433's clocks/phy/pinctrl etc. It
was about DTS.

Best regards,
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 4/4] ARM64: dts: exynos5433: add jpeg node

2015-09-28 Thread Krzysztof Kozlowski
W dniu 21.09.2015 o 18:59, Andrzej Pietrasiewicz pisze:
> Hi Hans,
> 
> W dniu 21.09.2015 o 11:50, Hans Verkuil pisze:
>> On 18-09-15 16:21, Andrzej Pietrasiewicz wrote:
>>> From: Marek Szyprowski 
>>>
>>> Add Exynos 5433 jpeg h/w codec node.
>>>
>>> Signed-off-by: Marek Szyprowski 
>>> Signed-off-by: Andrzej Pietrasiewicz 
>>> ---
>>>   arch/arm64/boot/dts/exynos/exynos5433.dtsi | 21 +
>>>   1 file changed, 21 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
>>> b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
>>
>> This dtsi file doesn't exist in the media-git tree. What is the story
>> here?
>>
>> Should this go through a different subsystem?
>>
>> I think the media subsystem can take patches 1-3 and whoever does DT
>> patches can
>> take this patch, right?
>>
> 
> The cover letter explains that the series is rebased onto Mauro's
> master with Kukjin's branch merged. The latter does contain
> the exynos5433.dtsi. That said, yes, taking patches 1-3 in
> media subsystem and leaving DT patch to someone else is the
> way to go.

Although Kukjin picked Exynos 5433 ARM64 patches but they were not
accepted upstream by arm-soc. He rolled it for few releases but:
1. Reason for not accepting by arm-soc was not resolved - there is no DTS.
2. Kukjin did not rebase the branch for 4.4... which maybe means that he
wants to drop it?
3. Anyone (but me...) can send Galaxy Note4 (Exynos5433) DTS file based
on sources on opensource.samsung.com. The DTS there is for 32-bit but it
can be probably easily adjusted for ARM64.

All of this means that Device Tree support for this driver can't be
merged now and effort for mainlining 5433 may be unfortunately wasted...

Best regards,
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


[PATCH] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-10 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof

Krzysztof Kozlowski (7):
  [media] dvb-frontends: Drop owner assignment from i2c_driver
  [media] dvb-frontends: Drop owner assignment from platform_driver
  [media] i2c: Drop owner assignment from i2c_driver
  [media] platform: Drop owner assignment from i2c_driver
  [media] radio: Drop owner assignment from i2c_driver
  [media] tuners: Drop owner assignment from i2c_driver
  [media] Drop owner assignment from i2c_driver

 drivers/media/dvb-frontends/a8293.c  | 1 -
 drivers/media/dvb-frontends/af9033.c | 1 -
 drivers/media/dvb-frontends/au8522_decoder.c | 1 -
 drivers/media/dvb-frontends/m88ds3103.c  | 1 -
 drivers/media/dvb-frontends/rtl2830.c| 1 -
 drivers/media/dvb-frontends/rtl2832.c| 1 -
 drivers/media/dvb-frontends/rtl2832_sdr.c| 1 -
 drivers/media/dvb-frontends/si2168.c | 1 -
 drivers/media/dvb-frontends/sp2.c| 1 -
 drivers/media/dvb-frontends/tda10071.c   | 1 -
 drivers/media/dvb-frontends/ts2020.c | 1 -
 drivers/media/i2c/adv7170.c  | 1 -
 drivers/media/i2c/adv7175.c  | 1 -
 drivers/media/i2c/adv7180.c  | 1 -
 drivers/media/i2c/adv7343.c  | 1 -
 drivers/media/i2c/adv7511.c  | 1 -
 drivers/media/i2c/adv7604.c  | 1 -
 drivers/media/i2c/adv7842.c  | 1 -
 drivers/media/i2c/bt819.c| 1 -
 drivers/media/i2c/bt856.c| 1 -
 drivers/media/i2c/bt866.c| 1 -
 drivers/media/i2c/cs5345.c   | 1 -
 drivers/media/i2c/cs53l32a.c | 1 -
 drivers/media/i2c/cx25840/cx25840-core.c | 1 -
 drivers/media/i2c/ks0127.c   | 1 -
 drivers/media/i2c/m52790.c   | 1 -
 drivers/media/i2c/msp3400-driver.c   | 1 -
 drivers/media/i2c/mt9v011.c  | 1 -
 drivers/media/i2c/ov7640.c   | 1 -
 drivers/media/i2c/ov7670.c   | 1 -
 drivers/media/i2c/saa6588.c  | 1 -
 drivers/media/i2c/saa6752hs.c| 1 -
 drivers/media/i2c/saa7110.c  | 1 -
 drivers/media/i2c/saa7115.c  | 1 -
 drivers/media/i2c/saa7127.c  | 1 -
 drivers/media/i2c/saa717x.c  | 1 -
 drivers/media/i2c/saa7185.c  | 1 -
 drivers/media/i2c/sony-btf-mpx.c | 1 -
 drivers/media/i2c/tda7432.c  | 1 -
 drivers/media/i2c/tda9840.c  | 1 -
 drivers/media/i2c/tea6415c.c | 1 -
 drivers/media/i2c/tea6420.c  | 1 -
 drivers/media/i2c/ths7303.c  | 1 -
 drivers/media/i2c/tvaudio.c  | 1 -
 drivers/media/i2c/tvp5150.c  | 1 -
 drivers/media/i2c/tw9903.c   | 1 -
 drivers/media/i2c/tw9906.c   | 1 -
 drivers/media/i2c/upd64031a.c| 1 -
 drivers/media/i2c/upd64083.c | 1 -
 drivers/media/i2c/vp27smpx.c | 1 -
 drivers/media/i2c/vpx3220.c  | 1 -
 drivers/media/i2c/wm8739.c   | 1 -
 drivers/media/i2c/wm8775.c   | 1 -
 drivers/media/platform/s5p-tv/hdmiphy_drv.c  | 1 -
 drivers/media/platform/s5p-tv/sii9234_drv.c  | 1 -
 drivers/media/radio/radio-tea5764.c  | 1 -
 drivers/media/radio/saa7706h.c   | 1 -
 drivers/media/radio/tef6862.c| 1 -
 drivers/media/tuners/e4000.c | 1 -
 drivers/media/tuners/fc2580.c| 1 -
 drivers/media/tuners/it913x.c| 1 -
 drivers/media/tuners/m88rs6000t.c| 1 -
 drivers/media/tuners/si2157.c| 1 -
 drivers/media/tuners/tda18212.c  | 1 -
 drivers/media/tuners/tua9001.c   | 1 -
 drivers/media/usb/go7007/s2250-board.c   | 1 -
 drivers/media/v4l2-core/tuner-core.c | 1 -
 67 files changed, 67 deletions(-)

-- 
1.9.1

--
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/3] staging: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c 
b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
index 0f524bb7b41d..1f9ba8beb061 100644
--- a/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
+++ b/drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c
@@ -1126,7 +1126,6 @@ MODULE_DEVICE_TABLE(i2c, synaptics_rmi4_id_table);
 static struct i2c_driver synaptics_rmi4_driver = {
.driver = {
.name   =   DRIVER_NAME,
-   .owner  =   THIS_MODULE,
.pm =   synaptics_rmi4_dev_pm_ops,
},
.probe  =   synaptics_rmi4_probe,
-- 
1.9.1

--
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] Drop owner assignment from i2c_driver (and platform left-overs)

2015-07-10 Thread Krzysztof Kozlowski
Hi,


The i2c drivers also do not have to set 'owner' field because
i2c_register_driver() will do it instead.

'owner' is removed from i2c drivers, which I was able to compile
with allyesconfig (arm, arm64, i386, x86_64, ppc64).
Only compile-tested.

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html


Best regards,
Krzysztof


Krzysztof Kozlowski (3):
  staging: iio: Drop owner assignment from i2c_driver
  staging: media: Drop owner assignment from i2c_driver
  staging: Drop owner assignment from i2c_driver

 drivers/staging/iio/addac/adt7316-i2c.c   | 1 -
 drivers/staging/iio/light/isl29018.c  | 1 -
 drivers/staging/iio/light/isl29028.c  | 1 -
 drivers/staging/media/lirc/lirc_zilog.c   | 1 -
 drivers/staging/media/mn88472/mn88472.c   | 1 -
 drivers/staging/media/mn88473/mn88473.c   | 1 -
 drivers/staging/ste_rmi4/synaptics_i2c_rmi4.c | 1 -
 7 files changed, 7 deletions(-)

-- 
1.9.1

--
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/7] [media] platform: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/platform/s5p-tv/hdmiphy_drv.c | 1 -
 drivers/media/platform/s5p-tv/sii9234_drv.c | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/media/platform/s5p-tv/hdmiphy_drv.c 
b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
index c2f2e35642f2..aae652351aa8 100644
--- a/drivers/media/platform/s5p-tv/hdmiphy_drv.c
+++ b/drivers/media/platform/s5p-tv/hdmiphy_drv.c
@@ -315,7 +315,6 @@ MODULE_DEVICE_TABLE(i2c, hdmiphy_id);
 static struct i2c_driver hdmiphy_driver = {
.driver = {
.name   = s5p-hdmiphy,
-   .owner  = THIS_MODULE,
},
.probe  = hdmiphy_probe,
.remove = hdmiphy_remove,
diff --git a/drivers/media/platform/s5p-tv/sii9234_drv.c 
b/drivers/media/platform/s5p-tv/sii9234_drv.c
index db8c17bb4aaa..8d171310af8f 100644
--- a/drivers/media/platform/s5p-tv/sii9234_drv.c
+++ b/drivers/media/platform/s5p-tv/sii9234_drv.c
@@ -397,7 +397,6 @@ MODULE_DEVICE_TABLE(i2c, sii9234_id);
 static struct i2c_driver sii9234_driver = {
.driver = {
.name   = sii9234,
-   .owner  = THIS_MODULE,
.pm = sii9234_pm_ops,
},
.probe  = sii9234_probe,
-- 
1.9.1

--
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/7] [media] dvb-frontends: Drop owner assignment from platform_driver

2015-07-10 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because
platform_driver_register() will set it.

Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/dvb-frontends/rtl2832_sdr.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.c 
b/drivers/media/dvb-frontends/rtl2832_sdr.c
index 7edb885ae9c8..d5b994f17612 100644
--- a/drivers/media/dvb-frontends/rtl2832_sdr.c
+++ b/drivers/media/dvb-frontends/rtl2832_sdr.c
@@ -1538,7 +1538,6 @@ static int rtl2832_sdr_remove(struct platform_device 
*pdev)
 static struct platform_driver rtl2832_sdr_driver = {
.driver = {
.name   = rtl2832_sdr,
-   .owner  = THIS_MODULE,
},
.probe  = rtl2832_sdr_probe,
.remove = rtl2832_sdr_remove,
-- 
1.9.1

--
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/7] [media] dvb-frontends: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/dvb-frontends/a8293.c  | 1 -
 drivers/media/dvb-frontends/af9033.c | 1 -
 drivers/media/dvb-frontends/au8522_decoder.c | 1 -
 drivers/media/dvb-frontends/m88ds3103.c  | 1 -
 drivers/media/dvb-frontends/rtl2830.c| 1 -
 drivers/media/dvb-frontends/rtl2832.c| 1 -
 drivers/media/dvb-frontends/si2168.c | 1 -
 drivers/media/dvb-frontends/sp2.c| 1 -
 drivers/media/dvb-frontends/tda10071.c   | 1 -
 drivers/media/dvb-frontends/ts2020.c | 1 -
 10 files changed, 10 deletions(-)

diff --git a/drivers/media/dvb-frontends/a8293.c 
b/drivers/media/dvb-frontends/a8293.c
index 97ecbe01034c..df3c9758a903 100644
--- a/drivers/media/dvb-frontends/a8293.c
+++ b/drivers/media/dvb-frontends/a8293.c
@@ -234,7 +234,6 @@ MODULE_DEVICE_TABLE(i2c, a8293_id_table);
 
 static struct i2c_driver a8293_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = a8293,
.suppress_bind_attrs = true,
},
diff --git a/drivers/media/dvb-frontends/af9033.c 
b/drivers/media/dvb-frontends/af9033.c
index 59018afaa95f..bc35206a0821 100644
--- a/drivers/media/dvb-frontends/af9033.c
+++ b/drivers/media/dvb-frontends/af9033.c
@@ -1387,7 +1387,6 @@ MODULE_DEVICE_TABLE(i2c, af9033_id_table);
 
 static struct i2c_driver af9033_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = af9033,
},
.probe  = af9033_probe,
diff --git a/drivers/media/dvb-frontends/au8522_decoder.c 
b/drivers/media/dvb-frontends/au8522_decoder.c
index 33aa9410b624..28d7dc2fee34 100644
--- a/drivers/media/dvb-frontends/au8522_decoder.c
+++ b/drivers/media/dvb-frontends/au8522_decoder.c
@@ -820,7 +820,6 @@ MODULE_DEVICE_TABLE(i2c, au8522_id);
 
 static struct i2c_driver au8522_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = au8522,
},
.probe  = au8522_probe,
diff --git a/drivers/media/dvb-frontends/m88ds3103.c 
b/drivers/media/dvb-frontends/m88ds3103.c
index e9b2d2b69b1d..ff31e7a01ca9 100644
--- a/drivers/media/dvb-frontends/m88ds3103.c
+++ b/drivers/media/dvb-frontends/m88ds3103.c
@@ -1495,7 +1495,6 @@ MODULE_DEVICE_TABLE(i2c, m88ds3103_id_table);
 
 static struct i2c_driver m88ds3103_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = m88ds3103,
.suppress_bind_attrs = true,
},
diff --git a/drivers/media/dvb-frontends/rtl2830.c 
b/drivers/media/dvb-frontends/rtl2830.c
index 3d01f4f22aca..b792f305cf15 100644
--- a/drivers/media/dvb-frontends/rtl2830.c
+++ b/drivers/media/dvb-frontends/rtl2830.c
@@ -915,7 +915,6 @@ MODULE_DEVICE_TABLE(i2c, rtl2830_id_table);
 
 static struct i2c_driver rtl2830_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = rtl2830,
},
.probe  = rtl2830_probe,
diff --git a/drivers/media/dvb-frontends/rtl2832.c 
b/drivers/media/dvb-frontends/rtl2832.c
index 822ea4b7a7ff..78b87b260d74 100644
--- a/drivers/media/dvb-frontends/rtl2832.c
+++ b/drivers/media/dvb-frontends/rtl2832.c
@@ -1319,7 +1319,6 @@ MODULE_DEVICE_TABLE(i2c, rtl2832_id_table);
 
 static struct i2c_driver rtl2832_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = rtl2832,
},
.probe  = rtl2832_probe,
diff --git a/drivers/media/dvb-frontends/si2168.c 
b/drivers/media/dvb-frontends/si2168.c
index 25e238c370e5..81788c5a44d8 100644
--- a/drivers/media/dvb-frontends/si2168.c
+++ b/drivers/media/dvb-frontends/si2168.c
@@ -757,7 +757,6 @@ MODULE_DEVICE_TABLE(i2c, si2168_id_table);
 
 static struct i2c_driver si2168_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = si2168,
},
.probe  = si2168_probe,
diff --git a/drivers/media/dvb-frontends/sp2.c 
b/drivers/media/dvb-frontends/sp2.c
index 8fd42767e263..43d47dfcc7b8 100644
--- a/drivers/media/dvb-frontends/sp2.c
+++ b/drivers/media/dvb-frontends/sp2.c
@@ -426,7 +426,6 @@ MODULE_DEVICE_TABLE(i2c, sp2_id);
 
 static struct i2c_driver sp2_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = sp2,
},
.probe  = sp2_probe,
diff --git a/drivers/media/dvb-frontends/tda10071.c 
b/drivers/media/dvb-frontends/tda10071.c
index f6dc6307d35a..2b7d6ca69945 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/media/dvb-frontends/tda10071.c
@@ -1409,7 +1409,6 @@ MODULE_DEVICE_TABLE(i2c, tda10071_id_table);
 
 static struct i2c_driver tda10071_driver = {
.driver

[PATCH 6/7] [media] tuners: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/tuners/e4000.c  | 1 -
 drivers/media/tuners/fc2580.c | 1 -
 drivers/media/tuners/it913x.c | 1 -
 drivers/media/tuners/m88rs6000t.c | 1 -
 drivers/media/tuners/si2157.c | 1 -
 drivers/media/tuners/tda18212.c   | 1 -
 drivers/media/tuners/tua9001.c| 1 -
 7 files changed, 7 deletions(-)

diff --git a/drivers/media/tuners/e4000.c b/drivers/media/tuners/e4000.c
index 03538f88f488..564a000f503e 100644
--- a/drivers/media/tuners/e4000.c
+++ b/drivers/media/tuners/e4000.c
@@ -752,7 +752,6 @@ MODULE_DEVICE_TABLE(i2c, e4000_id_table);
 
 static struct i2c_driver e4000_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = e4000,
.suppress_bind_attrs = true,
},
diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
index 12f916e53150..f4d4665de168 100644
--- a/drivers/media/tuners/fc2580.c
+++ b/drivers/media/tuners/fc2580.c
@@ -632,7 +632,6 @@ MODULE_DEVICE_TABLE(i2c, fc2580_id_table);
 
 static struct i2c_driver fc2580_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = fc2580,
.suppress_bind_attrs = true,
},
diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.c
index a076c87eda7a..5c96da693289 100644
--- a/drivers/media/tuners/it913x.c
+++ b/drivers/media/tuners/it913x.c
@@ -463,7 +463,6 @@ MODULE_DEVICE_TABLE(i2c, it913x_id_table);
 
 static struct i2c_driver it913x_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = it913x,
},
.probe  = it913x_probe,
diff --git a/drivers/media/tuners/m88rs6000t.c 
b/drivers/media/tuners/m88rs6000t.c
index d4c13fe6e7b3..504bfbc4027a 100644
--- a/drivers/media/tuners/m88rs6000t.c
+++ b/drivers/media/tuners/m88rs6000t.c
@@ -729,7 +729,6 @@ MODULE_DEVICE_TABLE(i2c, m88rs6000t_id);
 
 static struct i2c_driver m88rs6000t_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = m88rs6000t,
},
.probe  = m88rs6000t_probe,
diff --git a/drivers/media/tuners/si2157.c b/drivers/media/tuners/si2157.c
index a6245ef379c4..507382160e5e 100644
--- a/drivers/media/tuners/si2157.c
+++ b/drivers/media/tuners/si2157.c
@@ -469,7 +469,6 @@ MODULE_DEVICE_TABLE(i2c, si2157_id_table);
 
 static struct i2c_driver si2157_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = si2157,
},
.probe  = si2157_probe,
diff --git a/drivers/media/tuners/tda18212.c b/drivers/media/tuners/tda18212.c
index d93e0667b46b..7b8068354fea 100644
--- a/drivers/media/tuners/tda18212.c
+++ b/drivers/media/tuners/tda18212.c
@@ -277,7 +277,6 @@ MODULE_DEVICE_TABLE(i2c, tda18212_id);
 
 static struct i2c_driver tda18212_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = tda18212,
},
.probe  = tda18212_probe,
diff --git a/drivers/media/tuners/tua9001.c b/drivers/media/tuners/tua9001.c
index d4f6ca0c4d92..9d70378fe2d3 100644
--- a/drivers/media/tuners/tua9001.c
+++ b/drivers/media/tuners/tua9001.c
@@ -267,7 +267,6 @@ MODULE_DEVICE_TABLE(i2c, tua9001_id_table);
 
 static struct i2c_driver tua9001_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = tua9001,
.suppress_bind_attrs = true,
},
-- 
1.9.1

--
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/7] [media] i2c: Drop owner assignment from i2c_driver

2015-07-10 Thread Krzysztof Kozlowski
i2c_driver does not need to set an owner because i2c_register_driver()
will set it.

Signed-off-by: Krzysztof Kozlowski k.kozlow...@samsung.com

---

The coccinelle script which generated the patch was sent here:
http://www.spinics.net/lists/kernel/msg2029903.html
---
 drivers/media/i2c/adv7170.c  | 1 -
 drivers/media/i2c/adv7175.c  | 1 -
 drivers/media/i2c/adv7180.c  | 1 -
 drivers/media/i2c/adv7343.c  | 1 -
 drivers/media/i2c/adv7511.c  | 1 -
 drivers/media/i2c/adv7604.c  | 1 -
 drivers/media/i2c/adv7842.c  | 1 -
 drivers/media/i2c/bt819.c| 1 -
 drivers/media/i2c/bt856.c| 1 -
 drivers/media/i2c/bt866.c| 1 -
 drivers/media/i2c/cs5345.c   | 1 -
 drivers/media/i2c/cs53l32a.c | 1 -
 drivers/media/i2c/cx25840/cx25840-core.c | 1 -
 drivers/media/i2c/ks0127.c   | 1 -
 drivers/media/i2c/m52790.c   | 1 -
 drivers/media/i2c/msp3400-driver.c   | 1 -
 drivers/media/i2c/mt9v011.c  | 1 -
 drivers/media/i2c/ov7640.c   | 1 -
 drivers/media/i2c/ov7670.c   | 1 -
 drivers/media/i2c/saa6588.c  | 1 -
 drivers/media/i2c/saa6752hs.c| 1 -
 drivers/media/i2c/saa7110.c  | 1 -
 drivers/media/i2c/saa7115.c  | 1 -
 drivers/media/i2c/saa7127.c  | 1 -
 drivers/media/i2c/saa717x.c  | 1 -
 drivers/media/i2c/saa7185.c  | 1 -
 drivers/media/i2c/sony-btf-mpx.c | 1 -
 drivers/media/i2c/tda7432.c  | 1 -
 drivers/media/i2c/tda9840.c  | 1 -
 drivers/media/i2c/tea6415c.c | 1 -
 drivers/media/i2c/tea6420.c  | 1 -
 drivers/media/i2c/ths7303.c  | 1 -
 drivers/media/i2c/tvaudio.c  | 1 -
 drivers/media/i2c/tvp5150.c  | 1 -
 drivers/media/i2c/tw9903.c   | 1 -
 drivers/media/i2c/tw9906.c   | 1 -
 drivers/media/i2c/upd64031a.c| 1 -
 drivers/media/i2c/upd64083.c | 1 -
 drivers/media/i2c/vp27smpx.c | 1 -
 drivers/media/i2c/vpx3220.c  | 1 -
 drivers/media/i2c/wm8739.c   | 1 -
 drivers/media/i2c/wm8775.c   | 1 -
 42 files changed, 42 deletions(-)

diff --git a/drivers/media/i2c/adv7170.c b/drivers/media/i2c/adv7170.c
index f0d3f5a2da46..05f1dc6c72af 100644
--- a/drivers/media/i2c/adv7170.c
+++ b/drivers/media/i2c/adv7170.c
@@ -401,7 +401,6 @@ MODULE_DEVICE_TABLE(i2c, adv7170_id);
 
 static struct i2c_driver adv7170_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = adv7170,
},
.probe  = adv7170_probe,
diff --git a/drivers/media/i2c/adv7175.c b/drivers/media/i2c/adv7175.c
index 321834ba8f57..f554809a51e7 100644
--- a/drivers/media/i2c/adv7175.c
+++ b/drivers/media/i2c/adv7175.c
@@ -455,7 +455,6 @@ MODULE_DEVICE_TABLE(i2c, adv7175_id);
 
 static struct i2c_driver adv7175_driver = {
.driver = {
-   .owner  = THIS_MODULE,
.name   = adv7175,
},
.probe  = adv7175_probe,
diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c
index a493c0b0b5fe..db4a09ac1cea 100644
--- a/drivers/media/i2c/adv7180.c
+++ b/drivers/media/i2c/adv7180.c
@@ -1326,7 +1326,6 @@ static SIMPLE_DEV_PM_OPS(adv7180_pm_ops, adv7180_suspend, 
adv7180_resume);
 
 static struct i2c_driver adv7180_driver = {
.driver = {
-  .owner = THIS_MODULE,
   .name = KBUILD_MODNAME,
   .pm = ADV7180_PM_OPS,
   },
diff --git a/drivers/media/i2c/adv7343.c b/drivers/media/i2c/adv7343.c
index 7c50833e7d17..5f7a3bfcb905 100644
--- a/drivers/media/i2c/adv7343.c
+++ b/drivers/media/i2c/adv7343.c
@@ -529,7 +529,6 @@ MODULE_DEVICE_TABLE(of, adv7343_of_match);
 static struct i2c_driver adv7343_driver = {
.driver = {
.of_match_table = of_match_ptr(adv7343_of_match),
-   .owner  = THIS_MODULE,
.name   = adv7343,
},
.probe  = adv7343_probe,
diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c
index 95bcd4026451..ef198cee8969 100644
--- a/drivers/media/i2c/adv7511.c
+++ b/drivers/media/i2c/adv7511.c
@@ -1576,7 +1576,6 @@ MODULE_DEVICE_TABLE(i2c, adv7511_id);
 
 static struct i2c_driver adv7511_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = adv7511,
},
.probe = adv7511_probe,
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 808360fd6539..ee59f41d9951 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2985,7 +2985,6 @@ static int adv76xx_remove(struct i2c_client *client)
 
 static struct i2c_driver adv76xx_driver = {
.driver = {
-   .owner = THIS_MODULE,
.name = adv7604

  1   2   >