* [PATCH] drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h
@ 2023-11-22 22:18 Arnd Bergmann
2023-11-22 22:30 ` Randy Dunlap
2023-11-23 1:27 ` Heiko Stuebner
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-11-22 22:18 UTC (permalink / raw)
To: Sandy Huang, Heiko Stübner, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Daniel Vetter, Johan Jonker
Cc: Arnd Bergmann, Kees Cook, Douglas Anderson, Azeem Shaikh,
Uwe Kleine-König, dri-devel, linux-arm-kernel,
linux-rockchip, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Without this header, the newly added code fails to build:
drivers/gpu/drm/rockchip/rk3066_hdmi.c: In function 'rk3066_hdmi_encoder_enable':
drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:22: error: implicit declaration of function 'drm_atomic_get_new_connector_state'; did you mean 'drm_atomic_helper_connector_reset'? [-Werror=implicit-function-declaration]
397 | conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_atomic_helper_connector_reset
drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:20: error: assignment to 'struct drm_connector_state *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
397 | conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector);
| ^
drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:22: error: implicit declaration of function 'drm_atomic_get_new_crtc_state'; did you mean 'drm_atomic_helper_swap_state'? [-Werror=implicit-function-declaration]
401 | crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_atomic_helper_swap_state
drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:20: error: assignment to 'struct drm_crtc_state *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
401 | crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
| ^
Fixes: ae3436a5e7c2 ("drm/rockchip: rk3066_hdmi: Switch encoder hooks to atomic")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/rockchip/rk3066_hdmi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/rockchip/rk3066_hdmi.c b/drivers/gpu/drm/rockchip/rk3066_hdmi.c
index 0e7aae341960..7d561c5a650f 100644
--- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c
+++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c
@@ -4,6 +4,7 @@
* Zheng Yang <zhengyang@rock-chips.com>
*/
+#include <drm/drm_atomic.h>
#include <drm/drm_edid.h>
#include <drm/drm_of.h>
#include <drm/drm_probe_helper.h>
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h
2023-11-22 22:18 [PATCH] drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h Arnd Bergmann
@ 2023-11-22 22:30 ` Randy Dunlap
2023-11-23 1:27 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Randy Dunlap @ 2023-11-22 22:30 UTC (permalink / raw)
To: Arnd Bergmann, Sandy Huang, Heiko Stübner, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter,
Johan Jonker
Cc: Arnd Bergmann, Kees Cook, Douglas Anderson, Azeem Shaikh,
Uwe Kleine-König, dri-devel, linux-arm-kernel,
linux-rockchip, linux-kernel
On 11/22/23 14:18, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Without this header, the newly added code fails to build:
>
> drivers/gpu/drm/rockchip/rk3066_hdmi.c: In function 'rk3066_hdmi_encoder_enable':
> drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:22: error: implicit declaration of function 'drm_atomic_get_new_connector_state'; did you mean 'drm_atomic_helper_connector_reset'? [-Werror=implicit-function-declaration]
> 397 | conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | drm_atomic_helper_connector_reset
> drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:20: error: assignment to 'struct drm_connector_state *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
> 397 | conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector);
> | ^
> drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:22: error: implicit declaration of function 'drm_atomic_get_new_crtc_state'; did you mean 'drm_atomic_helper_swap_state'? [-Werror=implicit-function-declaration]
> 401 | crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | drm_atomic_helper_swap_state
> drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:20: error: assignment to 'struct drm_crtc_state *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
> 401 | crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
> | ^
>
> Fixes: ae3436a5e7c2 ("drm/rockchip: rk3066_hdmi: Switch encoder hooks to atomic")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org> # build-tested
Thanks.
> ---
> drivers/gpu/drm/rockchip/rk3066_hdmi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/rockchip/rk3066_hdmi.c b/drivers/gpu/drm/rockchip/rk3066_hdmi.c
> index 0e7aae341960..7d561c5a650f 100644
> --- a/drivers/gpu/drm/rockchip/rk3066_hdmi.c
> +++ b/drivers/gpu/drm/rockchip/rk3066_hdmi.c
> @@ -4,6 +4,7 @@
> * Zheng Yang <zhengyang@rock-chips.com>
> */
>
> +#include <drm/drm_atomic.h>
> #include <drm/drm_edid.h>
> #include <drm/drm_of.h>
> #include <drm/drm_probe_helper.h>
--
~Randy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h
2023-11-22 22:18 [PATCH] drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h Arnd Bergmann
2023-11-22 22:30 ` Randy Dunlap
@ 2023-11-23 1:27 ` Heiko Stuebner
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2023-11-23 1:27 UTC (permalink / raw)
To: Sandy Huang, Thomas Zimmermann, Arnd Bergmann, Maxime Ripard,
Maarten Lankhorst, Daniel Vetter, Johan Jonker, David Airlie
Cc: Heiko Stuebner, dri-devel, Azeem Shaikh, linux-arm-kernel,
Douglas Anderson, linux-kernel, Kees Cook, Arnd Bergmann,
Uwe Kleine-König, linux-rockchip
On Wed, 22 Nov 2023 23:18:29 +0100, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Without this header, the newly added code fails to build:
>
> drivers/gpu/drm/rockchip/rk3066_hdmi.c: In function 'rk3066_hdmi_encoder_enable':
> drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:22: error: implicit declaration of function 'drm_atomic_get_new_connector_state'; did you mean 'drm_atomic_helper_connector_reset'? [-Werror=implicit-function-declaration]
> 397 | conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | drm_atomic_helper_connector_reset
> drivers/gpu/drm/rockchip/rk3066_hdmi.c:397:20: error: assignment to 'struct drm_connector_state *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
> 397 | conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector);
> | ^
> drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:22: error: implicit declaration of function 'drm_atomic_get_new_crtc_state'; did you mean 'drm_atomic_helper_swap_state'? [-Werror=implicit-function-declaration]
> 401 | crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | drm_atomic_helper_swap_state
> drivers/gpu/drm/rockchip/rk3066_hdmi.c:401:20: error: assignment to 'struct drm_crtc_state *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion]
> 401 | crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc);
> | ^
>
> [...]
Applied, thanks!
[1/1] drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h
commit: f4814c20d14ca168382e8887c768f290e4a2a861
Very puzzling, I did testbuild with the atomic conversion in place
and also re-did it again to before applying this patch and didn't get
the mentioned error - not sure what I might have done differently to
create a dufferent reszkt,
In any case, I applied the fix.
Best regards,
--
Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-23 1:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22 22:18 [PATCH] drm/rockchip: rk3066_hdmi: include drm/drm_atomic.h Arnd Bergmann
2023-11-22 22:30 ` Randy Dunlap
2023-11-23 1:27 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox