diff mbox series

drm: renesas: rz-du: Fix redefinition errors related to rzg2l_du_vsp_*()

Message ID 20240222095630.85949-1-biju.das.jz@bp.renesas.com (mailing list archive)
State Superseded
Delegated to: Kieran Bingham
Headers show
Series drm: renesas: rz-du: Fix redefinition errors related to rzg2l_du_vsp_*() | expand

Commit Message

Biju Das Feb. 22, 2024, 9:56 a.m. UTC
Fix the redefinition errors for the below functions on x86 by replacing
CONFIG_DRM_RCAR_VSP->IS_ENABLED(CONFIG_VIDEO_RENESAS_VSP1) and adding
EXPORT_SYMBOL_GPL for all:
 1) rzg2l_du_vsp_init()
 2) rzg2l_du_vsp_enable()
 3) rzg2l_du_vsp_disable()
 4) rzg2l_du_vsp_atomic_flush()
 5) rzg2l_du_vsp_get_drm_plane()

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/linux-next/20240222124610.383e1ce3@canb.auug.org.au/T/#u
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
---
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c | 5 +++++
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Maxime Ripard Feb. 22, 2024, 10:14 a.m. UTC | #1
Hi,

Thanks for working on this

On Thu, Feb 22, 2024 at 09:56:30AM +0000, Biju Das wrote:
> Fix the redefinition errors for the below functions on x86 by replacing
> CONFIG_DRM_RCAR_VSP->IS_ENABLED(CONFIG_VIDEO_RENESAS_VSP1) and adding
> EXPORT_SYMBOL_GPL for all:
>  1) rzg2l_du_vsp_init()
>  2) rzg2l_du_vsp_enable()
>  3) rzg2l_du_vsp_disable()
>  4) rzg2l_du_vsp_atomic_flush()
>  5) rzg2l_du_vsp_get_drm_plane()

This really should be two patches: you're fixing some symbols not being
exported (because they need to be called by what other module?) and then
fixing the redefinition error you're mentionning in the title.

Maxime
Biju Das Feb. 22, 2024, 10:20 a.m. UTC | #2
Hi Maxime Ripard,

> -----Original Message-----
> From: Maxime Ripard <mripard@kernel.org>
> Sent: Thursday, February 22, 2024 10:14 AM
> Subject: Re: [PATCH] drm: renesas: rz-du: Fix redefinition errors related
> to rzg2l_du_vsp_*()
> 
> Hi,
> 
> Thanks for working on this
> 
> On Thu, Feb 22, 2024 at 09:56:30AM +0000, Biju Das wrote:
> > Fix the redefinition errors for the below functions on x86 by
> > replacing
> > CONFIG_DRM_RCAR_VSP->IS_ENABLED(CONFIG_VIDEO_RENESAS_VSP1) and adding
> > EXPORT_SYMBOL_GPL for all:
> >  1) rzg2l_du_vsp_init()
> >  2) rzg2l_du_vsp_enable()
> >  3) rzg2l_du_vsp_disable()
> >  4) rzg2l_du_vsp_atomic_flush()
> >  5) rzg2l_du_vsp_get_drm_plane()
> 
> This really should be two patches: you're fixing some symbols not being
> exported (because they need to be called by what other module?) and then
> fixing the redefinition error you're mentionning in the title.

OK, Will do.

Cheers,
Biju
Geert Uytterhoeven Feb. 22, 2024, 10:33 a.m. UTC | #3
Hi Biju,

On Thu, Feb 22, 2024 at 10:56 AM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Fix the redefinition errors for the below functions on x86 by replacing

Not just on x86, I assume?

Gr{oetje,eeting}s,

                        Geert
Biju Das Feb. 22, 2024, 10:56 a.m. UTC | #4
Hi Maxime Ripard,

> -----Original Message-----
> From: Maxime Ripard <mripard@kernel.org>
> Sent: Thursday, February 22, 2024 10:14 AM
> Subject: Re: [PATCH] drm: renesas: rz-du: Fix redefinition errors related
> to rzg2l_du_vsp_*()
> 
> Hi,
> 
> Thanks for working on this
> 
> On Thu, Feb 22, 2024 at 09:56:30AM +0000, Biju Das wrote:
> > Fix the redefinition errors for the below functions on x86 by
> > replacing
> > CONFIG_DRM_RCAR_VSP->IS_ENABLED(CONFIG_VIDEO_RENESAS_VSP1) and adding
> > EXPORT_SYMBOL_GPL for all:
> >  1) rzg2l_du_vsp_init()
> >  2) rzg2l_du_vsp_enable()
> >  3) rzg2l_du_vsp_disable()
> >  4) rzg2l_du_vsp_atomic_flush()
> >  5) rzg2l_du_vsp_get_drm_plane()
> 
> This really should be two patches: you're fixing some symbols not being
> exported (because they need to be called by what other module?) 

I Just realized that ,this export symbols are not required as they are used
within the single module. So no need to export. 

So, I will send a single patch with fixing redefinition error.

Cheers,
Biju
diff mbox series

Patch

diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
index 0ae6331d6430..d0e597fb1459 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.c
@@ -57,11 +57,13 @@  void rzg2l_du_vsp_enable(struct rzg2l_du_crtc *crtc)
 
 	vsp1_du_setup_lif(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
 }
+EXPORT_SYMBOL_GPL(rzg2l_du_vsp_enable);
 
 void rzg2l_du_vsp_disable(struct rzg2l_du_crtc *crtc)
 {
 	vsp1_du_setup_lif(crtc->vsp->vsp, crtc->vsp_pipe, NULL);
 }
+EXPORT_SYMBOL_GPL(rzg2l_du_vsp_disable);
 
 void rzg2l_du_vsp_atomic_flush(struct rzg2l_du_crtc *crtc)
 {
@@ -72,6 +74,7 @@  void rzg2l_du_vsp_atomic_flush(struct rzg2l_du_crtc *crtc)
 
 	vsp1_du_atomic_flush(crtc->vsp->vsp, crtc->vsp_pipe, &cfg);
 }
+EXPORT_SYMBOL_GPL(rzg2l_du_vsp_atomic_flush);
 
 struct drm_plane *rzg2l_du_vsp_get_drm_plane(struct rzg2l_du_crtc *crtc,
 					     unsigned int pipe_index)
@@ -88,6 +91,7 @@  struct drm_plane *rzg2l_du_vsp_get_drm_plane(struct rzg2l_du_crtc *crtc,
 
 	return plane ? plane : ERR_PTR(-EINVAL);
 }
+EXPORT_SYMBOL_GPL(rzg2l_du_vsp_get_drm_plane);
 
 static const u32 rzg2l_du_vsp_formats[] = {
 	DRM_FORMAT_RGB332,
@@ -347,3 +351,4 @@  int rzg2l_du_vsp_init(struct rzg2l_du_vsp *vsp, struct device_node *np,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(rzg2l_du_vsp_init);
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.h b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.h
index 12d98f04bf89..322eb80dcbaf 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_vsp.h
@@ -54,7 +54,7 @@  to_rzg2l_vsp_plane_state(struct drm_plane_state *state)
 	return container_of(state, struct rzg2l_du_vsp_plane_state, state);
 }
 
-#ifdef CONFIG_DRM_RCAR_VSP
+#if IS_ENABLED(CONFIG_VIDEO_RENESAS_VSP1)
 int rzg2l_du_vsp_init(struct rzg2l_du_vsp *vsp, struct device_node *np,
 		      unsigned int crtcs);
 void rzg2l_du_vsp_enable(struct rzg2l_du_crtc *crtc);