Re: lima, panfrost: multiple definition of `of_devfreq_cooling_register_power'

2020-04-04 Thread Martin Blumenstingl
On Thu, Apr 2, 2020 at 9:46 AM Thomas Zimmermann  wrote:
>
> Hi Martin
>
> Am 02.04.20 um 09:39 schrieb Martin Blumenstingl:
> > Hi Thomas,
> >
> > On Thu, Apr 2, 2020 at 9:26 AM Thomas Zimmermann  
> > wrote:
> >>
> >> Hi,
> >>
> >> building lima and panfrost drivers from drm-tip, I currently get the
> >> following linker error
> >>
> >>   > make clean
> >>   > make
> >>   [...]
> >>   LD  vmlinux.o
> >>   arm-suse-linux-gnueabi-ld: drivers/gpu/drm/panfrost
> >> /panfrost_devfreq.o: in function
> >> `of_devfreq_cooling_register_power':
> >>   panfrost_devfreq.c:(.text+0x18c): multiple definition of
> >> `of_devfreq_cooling_register_power'; drivers/gpu/drm/lima
> >> /lima_devfreq.o:lima_devfreq.c:(.text+0x1a0): first defined here
> >>   make[1]: *** [/home/tzimmermann/Projekte/linux/Makefile:1078: vmlinux]
> >> Error 1
> >>   make[1]: Leaving directory '/home/tzimmermann/Projekte/linux/build-
> >> arm'
> >>   make: *** [Makefile:180: sub-make] Error 2
> > can you please try building again with the attached patch?
>
> Yes, fixes the bug. Thanks for responding quickly.
I just sent a fix to the correct mailing lists: [0]
it would be awesome if you could give it your "Tested-by"


Regards
Martin


[0] https://lore.kernel.org/patchwork/patch/1220292/
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: lima, panfrost: multiple definition of `of_devfreq_cooling_register_power'

2020-04-03 Thread Martin Blumenstingl
Hi Thomas,

On Thu, Apr 2, 2020 at 9:26 AM Thomas Zimmermann  wrote:
>
> Hi,
>
> building lima and panfrost drivers from drm-tip, I currently get the
> following linker error
>
>   > make clean
>   > make
>   [...]
>   LD  vmlinux.o
>   arm-suse-linux-gnueabi-ld: drivers/gpu/drm/panfrost
> /panfrost_devfreq.o: in function
> `of_devfreq_cooling_register_power':
>   panfrost_devfreq.c:(.text+0x18c): multiple definition of
> `of_devfreq_cooling_register_power'; drivers/gpu/drm/lima
> /lima_devfreq.o:lima_devfreq.c:(.text+0x1a0): first defined here
>   make[1]: *** [/home/tzimmermann/Projekte/linux/Makefile:1078: vmlinux]
> Error 1
>   make[1]: Leaving directory '/home/tzimmermann/Projekte/linux/build-
> arm'
>   make: *** [Makefile:180: sub-make] Error 2
can you please try building again with the attached patch?

> Seems related to
>
>   commit 1996970773a323533e1cc1b6b97f00a95d675f32
>   Author: Martin Blumenstingl 
>   Date:   Thu Mar 19 21:34:27 2020 +0100
>
> drm/lima: Add optional devfreq and cooling device support
>
> https://cgit.freedesktop.org/drm/drm-tip/commit/?id=1996970773a323533e1cc1b6b97f00a95d675f32
it's also possible that this was originally caused by a76caf55e5b356
("thermal: Add devfreq cooling") and that my commit only exposes this
bug


Thank you in advance!
Regards
Martin
diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index a06a9fb35d72..94a487e05d35 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -107,18 +107,22 @@ opp-81600 {
 			opp-microvolt = <875000>;
 		};
 		opp-100800 {
+			status = "disabled";
 			opp-hz = /bits/ 64 <100800>;
 			opp-microvolt = <925000>;
 		};
 		opp-12 {
+			status = "disabled";
 			opp-hz = /bits/ 64 <12>;
 			opp-microvolt = <975000>;
 		};
 		opp-141600 {
+			status = "disabled";
 			opp-hz = /bits/ 64 <141600>;
 			opp-microvolt = <1025000>;
 		};
 		opp-160800 {
+			status = "disabled";
 			opp-hz = /bits/ 64 <160800>;
 			opp-microvolt = <110>;
 		};
@@ -144,19 +148,23 @@ opp-182142857 {
 		opp-31875 {
 			opp-hz = /bits/ 64 <31875>;
 			opp-microvolt = <115>;
+			status = "disabled";
 		};
 		opp-42500 {
 			opp-hz = /bits/ 64 <42500>;
 			opp-microvolt = <115>;
+			status = "disabled";
 		};
 		opp-51000 {
 			opp-hz = /bits/ 64 <51000>;
 			opp-microvolt = <115>;
+			status = "disabled";
 		};
 		opp-63750 {
 			opp-hz = /bits/ 64 <63750>;
 			opp-microvolt = <115>;
 			turbo-mode;
+			status = "disabled";
 		};
 	};
 
diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index 2b49a6bb8718..eaf4d61e5043 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -349,7 +349,6 @@ vpu: vpu@10 {
 			nvmem-cell-names = "cvbs_trimming";
 			#address-cells = <1>;
 			#size-cells = <0>;
-			status = "disabled";
 
 			/* CVBS VDAC output port */
 			cvbs_vdac_port: port@0 {
diff --git a/include/linux/devfreq_cooling.h b/include/linux/devfreq_cooling.h
index 4635f95000a4..79a6e37a1d6f 100644
--- a/include/linux/devfreq_cooling.h
+++ b/include/linux/devfreq_cooling.h
@@ -75,7 +75,7 @@ void devfreq_cooling_unregister(struct thermal_cooling_device *dfc);
 
 #else /* !CONFIG_DEVFREQ_THERMAL */
 
-struct thermal_cooling_device *
+static inline struct thermal_cooling_device *
 of_devfreq_cooling_register_power(struct device_node *np, struct devfreq *df,
   struct devfreq_cooling_power *dfc_power)
 {
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: lima, panfrost: multiple definition of `of_devfreq_cooling_register_power'

2020-04-02 Thread Thomas Zimmermann
Hi Martin

Am 02.04.20 um 09:39 schrieb Martin Blumenstingl:
> Hi Thomas,
> 
> On Thu, Apr 2, 2020 at 9:26 AM Thomas Zimmermann  wrote:
>>
>> Hi,
>>
>> building lima and panfrost drivers from drm-tip, I currently get the
>> following linker error
>>
>>   > make clean
>>   > make
>>   [...]
>>   LD  vmlinux.o
>>   arm-suse-linux-gnueabi-ld: drivers/gpu/drm/panfrost
>> /panfrost_devfreq.o: in function
>> `of_devfreq_cooling_register_power':
>>   panfrost_devfreq.c:(.text+0x18c): multiple definition of
>> `of_devfreq_cooling_register_power'; drivers/gpu/drm/lima
>> /lima_devfreq.o:lima_devfreq.c:(.text+0x1a0): first defined here
>>   make[1]: *** [/home/tzimmermann/Projekte/linux/Makefile:1078: vmlinux]
>> Error 1
>>   make[1]: Leaving directory '/home/tzimmermann/Projekte/linux/build-
>> arm'
>>   make: *** [Makefile:180: sub-make] Error 2
> can you please try building again with the attached patch?

Yes, fixes the bug. Thanks for responding quickly.

> 
>> Seems related to
>>
>>   commit 1996970773a323533e1cc1b6b97f00a95d675f32
>>   Author: Martin Blumenstingl 
>>   Date:   Thu Mar 19 21:34:27 2020 +0100
>>
>> drm/lima: Add optional devfreq and cooling device support
>>
>> https://cgit.freedesktop.org/drm/drm-tip/commit/?id=1996970773a323533e1cc1b6b97f00a95d675f32
> it's also possible that this was originally caused by a76caf55e5b356
> ("thermal: Add devfreq cooling") and that my commit only exposes this
> bug

True. This must have been an oversight in the original patch, as the
other placeholder functions have their static inline declared already.

Best regards
Thomas

> 
> 
> Thank you in advance!
> Regards
> Martin
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer



signature.asc
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel