All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23  3:16 ` Randy Dunlap
  0 siblings, 0 replies; 17+ messages in thread
From: Randy Dunlap @ 2022-11-23  3:16 UTC (permalink / raw)
  To: linux-kernel
  Cc: Randy Dunlap, Masahiro Yamada, Thomas Zimmermann,
	Michal Suchánek, linuxppc-dev, Daniel Vetter, Helge Deller,
	linux-fbdev, dri-devel

Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
When the latter symbol is =m, kconfig downgrades (limits) the 'select's
under FB_OF to modular (=m). This causes undefined symbol references:

powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'

Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
selected FB_CFB_* symbols will become =y instead of =m.

In tristate logic (for DRM_OFDRM), this changes the dependency from
    !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
to (boolean)
    DRM_OFDRM != y == y, allowing the 'select's to cause the
FB_CFB_* symbols to =y instead of =m.

Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Michal Suchánek <msuchanek@suse.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/fbdev/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -455,7 +455,7 @@ config FB_ATARI
 config FB_OF
 	bool "Open Firmware frame buffer device support"
 	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
-	depends on !DRM_OFDRM
+	depends on DRM_OFDRM != y
 	select APERTURE_HELPERS
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23  3:16 ` Randy Dunlap
  0 siblings, 0 replies; 17+ messages in thread
From: Randy Dunlap @ 2022-11-23  3:16 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Masahiro Yamada, Randy Dunlap,
	dri-devel, Daniel Vetter, Michal Suchánek, linuxppc-dev,
	Helge Deller

Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
When the latter symbol is =m, kconfig downgrades (limits) the 'select's
under FB_OF to modular (=m). This causes undefined symbol references:

powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'

Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
selected FB_CFB_* symbols will become =y instead of =m.

In tristate logic (for DRM_OFDRM), this changes the dependency from
    !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
to (boolean)
    DRM_OFDRM != y == y, allowing the 'select's to cause the
FB_CFB_* symbols to =y instead of =m.

Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Michal Suchánek <msuchanek@suse.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/fbdev/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -455,7 +455,7 @@ config FB_ATARI
 config FB_OF
 	bool "Open Firmware frame buffer device support"
 	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
-	depends on !DRM_OFDRM
+	depends on DRM_OFDRM != y
 	select APERTURE_HELPERS
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23  3:16 ` Randy Dunlap
  0 siblings, 0 replies; 17+ messages in thread
From: Randy Dunlap @ 2022-11-23  3:16 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Masahiro Yamada, Randy Dunlap,
	dri-devel, Michal Suchánek, linuxppc-dev, Helge Deller

Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
When the latter symbol is =m, kconfig downgrades (limits) the 'select's
under FB_OF to modular (=m). This causes undefined symbol references:

powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'

Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
selected FB_CFB_* symbols will become =y instead of =m.

In tristate logic (for DRM_OFDRM), this changes the dependency from
    !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
to (boolean)
    DRM_OFDRM != y == y, allowing the 'select's to cause the
FB_CFB_* symbols to =y instead of =m.

Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Michal Suchánek <msuchanek@suse.de>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
 drivers/video/fbdev/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
--- a/drivers/video/fbdev/Kconfig
+++ b/drivers/video/fbdev/Kconfig
@@ -455,7 +455,7 @@ config FB_ATARI
 config FB_OF
 	bool "Open Firmware frame buffer device support"
 	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
-	depends on !DRM_OFDRM
+	depends on DRM_OFDRM != y
 	select APERTURE_HELPERS
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
  2022-11-23  3:16 ` Randy Dunlap
  (?)
@ 2022-11-23  8:02   ` Thomas Zimmermann
  -1 siblings, 0 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2022-11-23  8:02 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: Masahiro Yamada, Michal Suchánek, linuxppc-dev,
	Daniel Vetter, Helge Deller, linux-fbdev, dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 2258 bytes --]


Am 23.11.22 um 04:16 schrieb Randy Dunlap:
> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
> under FB_OF to modular (=m). This causes undefined symbol references:
> 
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'
> 
> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
> selected FB_CFB_* symbols will become =y instead of =m.
> 
> In tristate logic (for DRM_OFDRM), this changes the dependency from
>      !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
> to (boolean)
>      DRM_OFDRM != y == y, allowing the 'select's to cause the
> FB_CFB_* symbols to =y instead of =m.
> 
> Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Michal Suchánek <msuchanek@suse.de>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Helge Deller <deller@gmx.de>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/video/fbdev/Kconfig |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -455,7 +455,7 @@ config FB_ATARI
>   config FB_OF
>   	bool "Open Firmware frame buffer device support"
>   	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
> -	depends on !DRM_OFDRM
> +	depends on DRM_OFDRM != y
>   	select APERTURE_HELPERS
>   	select FB_CFB_FILLRECT
>   	select FB_CFB_COPYAREA

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23  8:02   ` Thomas Zimmermann
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2022-11-23  8:02 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: linux-fbdev, Masahiro Yamada, dri-devel, Michal Suchánek,
	linuxppc-dev, Helge Deller


[-- Attachment #1.1: Type: text/plain, Size: 2258 bytes --]


Am 23.11.22 um 04:16 schrieb Randy Dunlap:
> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
> under FB_OF to modular (=m). This causes undefined symbol references:
> 
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'
> 
> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
> selected FB_CFB_* symbols will become =y instead of =m.
> 
> In tristate logic (for DRM_OFDRM), this changes the dependency from
>      !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
> to (boolean)
>      DRM_OFDRM != y == y, allowing the 'select's to cause the
> FB_CFB_* symbols to =y instead of =m.
> 
> Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Michal Suchánek <msuchanek@suse.de>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Helge Deller <deller@gmx.de>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/video/fbdev/Kconfig |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -455,7 +455,7 @@ config FB_ATARI
>   config FB_OF
>   	bool "Open Firmware frame buffer device support"
>   	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
> -	depends on !DRM_OFDRM
> +	depends on DRM_OFDRM != y
>   	select APERTURE_HELPERS
>   	select FB_CFB_FILLRECT
>   	select FB_CFB_COPYAREA

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23  8:02   ` Thomas Zimmermann
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2022-11-23  8:02 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: linux-fbdev, Masahiro Yamada, dri-devel, Daniel Vetter,
	Michal Suchánek, linuxppc-dev, Helge Deller


[-- Attachment #1.1: Type: text/plain, Size: 2258 bytes --]


Am 23.11.22 um 04:16 schrieb Randy Dunlap:
> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
> under FB_OF to modular (=m). This causes undefined symbol references:
> 
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'
> 
> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
> selected FB_CFB_* symbols will become =y instead of =m.
> 
> In tristate logic (for DRM_OFDRM), this changes the dependency from
>      !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
> to (boolean)
>      DRM_OFDRM != y == y, allowing the 'select's to cause the
> FB_CFB_* symbols to =y instead of =m.
> 
> Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> Cc: Thomas Zimmermann <tzimmermann@suse.de>
> Cc: Michal Suchánek <msuchanek@suse.de>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: Helge Deller <deller@gmx.de>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>   drivers/video/fbdev/Kconfig |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -455,7 +455,7 @@ config FB_ATARI
>   config FB_OF
>   	bool "Open Firmware frame buffer device support"
>   	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
> -	depends on !DRM_OFDRM
> +	depends on DRM_OFDRM != y
>   	select APERTURE_HELPERS
>   	select FB_CFB_FILLRECT
>   	select FB_CFB_COPYAREA

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
  2022-11-23  8:02   ` Thomas Zimmermann
  (?)
@ 2022-11-23  8:38     ` Michal Suchánek
  -1 siblings, 0 replies; 17+ messages in thread
From: Michal Suchánek @ 2022-11-23  8:38 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: Randy Dunlap, linux-kernel, Masahiro Yamada, linuxppc-dev,
	Daniel Vetter, Helge Deller, linux-fbdev, dri-devel

On Wed, Nov 23, 2022 at 09:02:54AM +0100, Thomas Zimmermann wrote:
> 
> Am 23.11.22 um 04:16 schrieb Randy Dunlap:
> > Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
> > When the latter symbol is =m, kconfig downgrades (limits) the 'select's
> > under FB_OF to modular (=m). This causes undefined symbol references:
> > 
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'
> > 
> > Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
> > selected FB_CFB_* symbols will become =y instead of =m.
> > 
> > In tristate logic (for DRM_OFDRM), this changes the dependency from
> >      !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
> > to (boolean)
> >      DRM_OFDRM != y == y, allowing the 'select's to cause the
> > FB_CFB_* symbols to =y instead of =m.
> > 
> > Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > Cc: Michal Suchánek <msuchanek@suse.de>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Helge Deller <deller@gmx.de>
> > Cc: linux-fbdev@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> 
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

Tested-by: Michal Suchánek <msuchanek@suse.de>

> 
> > ---
> >   drivers/video/fbdev/Kconfig |    2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> > --- a/drivers/video/fbdev/Kconfig
> > +++ b/drivers/video/fbdev/Kconfig
> > @@ -455,7 +455,7 @@ config FB_ATARI
> >   config FB_OF
> >   	bool "Open Firmware frame buffer device support"
> >   	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
> > -	depends on !DRM_OFDRM
> > +	depends on DRM_OFDRM != y
> >   	select APERTURE_HELPERS
> >   	select FB_CFB_FILLRECT
> >   	select FB_CFB_COPYAREA
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Ivo Totev




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23  8:38     ` Michal Suchánek
  0 siblings, 0 replies; 17+ messages in thread
From: Michal Suchánek @ 2022-11-23  8:38 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: linux-fbdev, Masahiro Yamada, Randy Dunlap, linux-kernel,
	dri-devel, linuxppc-dev, Helge Deller

On Wed, Nov 23, 2022 at 09:02:54AM +0100, Thomas Zimmermann wrote:
> 
> Am 23.11.22 um 04:16 schrieb Randy Dunlap:
> > Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
> > When the latter symbol is =m, kconfig downgrades (limits) the 'select's
> > under FB_OF to modular (=m). This causes undefined symbol references:
> > 
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'
> > 
> > Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
> > selected FB_CFB_* symbols will become =y instead of =m.
> > 
> > In tristate logic (for DRM_OFDRM), this changes the dependency from
> >      !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
> > to (boolean)
> >      DRM_OFDRM != y == y, allowing the 'select's to cause the
> > FB_CFB_* symbols to =y instead of =m.
> > 
> > Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > Cc: Michal Suchánek <msuchanek@suse.de>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Helge Deller <deller@gmx.de>
> > Cc: linux-fbdev@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> 
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

Tested-by: Michal Suchánek <msuchanek@suse.de>

> 
> > ---
> >   drivers/video/fbdev/Kconfig |    2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> > --- a/drivers/video/fbdev/Kconfig
> > +++ b/drivers/video/fbdev/Kconfig
> > @@ -455,7 +455,7 @@ config FB_ATARI
> >   config FB_OF
> >   	bool "Open Firmware frame buffer device support"
> >   	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
> > -	depends on !DRM_OFDRM
> > +	depends on DRM_OFDRM != y
> >   	select APERTURE_HELPERS
> >   	select FB_CFB_FILLRECT
> >   	select FB_CFB_COPYAREA
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Ivo Totev




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23  8:38     ` Michal Suchánek
  0 siblings, 0 replies; 17+ messages in thread
From: Michal Suchánek @ 2022-11-23  8:38 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: linux-fbdev, Masahiro Yamada, Randy Dunlap, linux-kernel,
	dri-devel, Daniel Vetter, linuxppc-dev, Helge Deller

On Wed, Nov 23, 2022 at 09:02:54AM +0100, Thomas Zimmermann wrote:
> 
> Am 23.11.22 um 04:16 schrieb Randy Dunlap:
> > Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
> > When the latter symbol is =m, kconfig downgrades (limits) the 'select's
> > under FB_OF to modular (=m). This causes undefined symbol references:
> > 
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillrect'
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): undefined reference to `cfb_copyarea'
> > powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): undefined reference to `cfb_imageblit'
> > 
> > Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
> > selected FB_CFB_* symbols will become =y instead of =m.
> > 
> > In tristate logic (for DRM_OFDRM), this changes the dependency from
> >      !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
> > to (boolean)
> >      DRM_OFDRM != y == y, allowing the 'select's to cause the
> > FB_CFB_* symbols to =y instead of =m.
> > 
> > Fixes: c8a17756c425 ("drm/ofdrm: Add ofdrm for Open Firmware framebuffers")
> > Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> > Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
> > Cc: Thomas Zimmermann <tzimmermann@suse.de>
> > Cc: Michal Suchánek <msuchanek@suse.de>
> > Cc: linuxppc-dev@lists.ozlabs.org
> > Cc: Daniel Vetter <daniel@ffwll.ch>
> > Cc: Helge Deller <deller@gmx.de>
> > Cc: linux-fbdev@vger.kernel.org
> > Cc: dri-devel@lists.freedesktop.org
> 
> Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

Tested-by: Michal Suchánek <msuchanek@suse.de>

> 
> > ---
> >   drivers/video/fbdev/Kconfig |    2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> > --- a/drivers/video/fbdev/Kconfig
> > +++ b/drivers/video/fbdev/Kconfig
> > @@ -455,7 +455,7 @@ config FB_ATARI
> >   config FB_OF
> >   	bool "Open Firmware frame buffer device support"
> >   	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
> > -	depends on !DRM_OFDRM
> > +	depends on DRM_OFDRM != y
> >   	select APERTURE_HELPERS
> >   	select FB_CFB_FILLRECT
> >   	select FB_CFB_COPYAREA
> 
> -- 
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Maxfeldstr. 5, 90409 Nürnberg, Germany
> (HRB 36809, AG Nürnberg)
> Geschäftsführer: Ivo Totev




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
  2022-11-23  3:16 ` Randy Dunlap
@ 2022-11-23  9:08   ` Arnd Bergmann
  -1 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2022-11-23  9:08 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Masahiro Yamada, dri-devel,
	Daniel Vetter, Michal Suchanek, linuxppc-dev, Helge Deller

On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote:
> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
> under FB_OF to modular (=m). This causes undefined symbol references:
>
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): 
> undefined reference to `cfb_fillrect'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): 
> undefined reference to `cfb_copyarea'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): 
> undefined reference to `cfb_imageblit'
>
> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
> selected FB_CFB_* symbols will become =y instead of =m.
>
> In tristate logic (for DRM_OFDRM), this changes the dependency from
>     !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
> to (boolean)
>     DRM_OFDRM != y == y, allowing the 'select's to cause the
> FB_CFB_* symbols to =y instead of =m.
>

Is it actually a useful configuration to have OFDRM=m and
FB_OF=y though? I would expect in that case that the OFDRM
driver never binds to a device because it's already owned
by FB_OF.

> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -455,7 +455,7 @@ config FB_ATARI
>  config FB_OF
>  	bool "Open Firmware frame buffer device support"
>  	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
> -	depends on !DRM_OFDRM
> +	depends on DRM_OFDRM != y
>  	select APERTURE_HELPERS

I would instead make this 'depends on DRM_OFDRM=n', which
completely eliminates configs that have both driver enabled.

A nicer change would be to make FB_OF a tristate symbol,
which makes it possible to load one of the two modules if
both are enabled =m, while only allowing one of them to
be =y if the other is completely disabled. It looks like
offb was originally written to be usable as a loadable module,
but Kconfig has prevented this since at least the start of
the git history.

     Arnd

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23  9:08   ` Arnd Bergmann
  0 siblings, 0 replies; 17+ messages in thread
From: Arnd Bergmann @ 2022-11-23  9:08 UTC (permalink / raw)
  To: Randy Dunlap, linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Masahiro Yamada, dri-devel,
	Michal Suchanek, linuxppc-dev, Helge Deller

On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote:
> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
> under FB_OF to modular (=m). This causes undefined symbol references:
>
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): 
> undefined reference to `cfb_fillrect'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): 
> undefined reference to `cfb_copyarea'
> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): 
> undefined reference to `cfb_imageblit'
>
> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
> selected FB_CFB_* symbols will become =y instead of =m.
>
> In tristate logic (for DRM_OFDRM), this changes the dependency from
>     !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
> to (boolean)
>     DRM_OFDRM != y == y, allowing the 'select's to cause the
> FB_CFB_* symbols to =y instead of =m.
>

Is it actually a useful configuration to have OFDRM=m and
FB_OF=y though? I would expect in that case that the OFDRM
driver never binds to a device because it's already owned
by FB_OF.

> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
> --- a/drivers/video/fbdev/Kconfig
> +++ b/drivers/video/fbdev/Kconfig
> @@ -455,7 +455,7 @@ config FB_ATARI
>  config FB_OF
>  	bool "Open Firmware frame buffer device support"
>  	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
> -	depends on !DRM_OFDRM
> +	depends on DRM_OFDRM != y
>  	select APERTURE_HELPERS

I would instead make this 'depends on DRM_OFDRM=n', which
completely eliminates configs that have both driver enabled.

A nicer change would be to make FB_OF a tristate symbol,
which makes it possible to load one of the two modules if
both are enabled =m, while only allowing one of them to
be =y if the other is completely disabled. It looks like
offb was originally written to be usable as a loadable module,
but Kconfig has prevented this since at least the start of
the git history.

     Arnd

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
  2022-11-23  9:08   ` Arnd Bergmann
@ 2022-11-23 10:02     ` Randy Dunlap
  -1 siblings, 0 replies; 17+ messages in thread
From: Randy Dunlap @ 2022-11-23 10:02 UTC (permalink / raw)
  To: Arnd Bergmann, linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Masahiro Yamada, dri-devel,
	Michal Suchanek, linuxppc-dev, Helge Deller

Hi Arnd,

On 11/23/22 01:08, Arnd Bergmann wrote:
> On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote:
>> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
>> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
>> under FB_OF to modular (=m). This causes undefined symbol references:
>>
>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): 
>> undefined reference to `cfb_fillrect'
>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): 
>> undefined reference to `cfb_copyarea'
>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): 
>> undefined reference to `cfb_imageblit'
>>
>> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
>> selected FB_CFB_* symbols will become =y instead of =m.
>>
>> In tristate logic (for DRM_OFDRM), this changes the dependency from
>>     !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
>> to (boolean)
>>     DRM_OFDRM != y == y, allowing the 'select's to cause the
>> FB_CFB_* symbols to =y instead of =m.
>>
> 
> Is it actually a useful configuration to have OFDRM=m and
> FB_OF=y though? I would expect in that case that the OFDRM
> driver never binds to a device because it's already owned
> by FB_OF.
> 
>> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
>> --- a/drivers/video/fbdev/Kconfig
>> +++ b/drivers/video/fbdev/Kconfig
>> @@ -455,7 +455,7 @@ config FB_ATARI
>>  config FB_OF
>>  	bool "Open Firmware frame buffer device support"
>>  	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
>> -	depends on !DRM_OFDRM
>> +	depends on DRM_OFDRM != y
>>  	select APERTURE_HELPERS
> 
> I would instead make this 'depends on DRM_OFDRM=n', which
> completely eliminates configs that have both driver enabled.

Yep, that works for me. Thanks.

Thomas, Michal, are you OK with that change?

> A nicer change would be to make FB_OF a tristate symbol,
> which makes it possible to load one of the two modules if
> both are enabled =m, while only allowing one of them to
> be =y if the other is completely disabled. It looks like
> offb was originally written to be usable as a loadable module,
> but Kconfig has prevented this since at least the start of
> the git history.

-- 
~Randy

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23 10:02     ` Randy Dunlap
  0 siblings, 0 replies; 17+ messages in thread
From: Randy Dunlap @ 2022-11-23 10:02 UTC (permalink / raw)
  To: Arnd Bergmann, linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Masahiro Yamada, dri-devel,
	Daniel Vetter, Michal Suchanek, linuxppc-dev, Helge Deller

Hi Arnd,

On 11/23/22 01:08, Arnd Bergmann wrote:
> On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote:
>> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
>> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
>> under FB_OF to modular (=m). This causes undefined symbol references:
>>
>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): 
>> undefined reference to `cfb_fillrect'
>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): 
>> undefined reference to `cfb_copyarea'
>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): 
>> undefined reference to `cfb_imageblit'
>>
>> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
>> selected FB_CFB_* symbols will become =y instead of =m.
>>
>> In tristate logic (for DRM_OFDRM), this changes the dependency from
>>     !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
>> to (boolean)
>>     DRM_OFDRM != y == y, allowing the 'select's to cause the
>> FB_CFB_* symbols to =y instead of =m.
>>
> 
> Is it actually a useful configuration to have OFDRM=m and
> FB_OF=y though? I would expect in that case that the OFDRM
> driver never binds to a device because it's already owned
> by FB_OF.
> 
>> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
>> --- a/drivers/video/fbdev/Kconfig
>> +++ b/drivers/video/fbdev/Kconfig
>> @@ -455,7 +455,7 @@ config FB_ATARI
>>  config FB_OF
>>  	bool "Open Firmware frame buffer device support"
>>  	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
>> -	depends on !DRM_OFDRM
>> +	depends on DRM_OFDRM != y
>>  	select APERTURE_HELPERS
> 
> I would instead make this 'depends on DRM_OFDRM=n', which
> completely eliminates configs that have both driver enabled.

Yep, that works for me. Thanks.

Thomas, Michal, are you OK with that change?

> A nicer change would be to make FB_OF a tristate symbol,
> which makes it possible to load one of the two modules if
> both are enabled =m, while only allowing one of them to
> be =y if the other is completely disabled. It looks like
> offb was originally written to be usable as a loadable module,
> but Kconfig has prevented this since at least the start of
> the git history.

-- 
~Randy

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
  2022-11-23 10:02     ` Randy Dunlap
@ 2022-11-23 10:23       ` Thomas Zimmermann
  -1 siblings, 0 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2022-11-23 10:23 UTC (permalink / raw)
  To: Randy Dunlap, Arnd Bergmann, linux-kernel
  Cc: linux-fbdev, Masahiro Yamada, dri-devel, Michal Suchanek,
	linuxppc-dev, Helge Deller


[-- Attachment #1.1: Type: text/plain, Size: 2601 bytes --]

Hi

Am 23.11.22 um 11:02 schrieb Randy Dunlap:
> Hi Arnd,
> 
> On 11/23/22 01:08, Arnd Bergmann wrote:
>> On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote:
>>> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
>>> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
>>> under FB_OF to modular (=m). This causes undefined symbol references:
>>>
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58):
>>> undefined reference to `cfb_fillrect'
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60):
>>> undefined reference to `cfb_copyarea'
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68):
>>> undefined reference to `cfb_imageblit'
>>>
>>> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
>>> selected FB_CFB_* symbols will become =y instead of =m.
>>>
>>> In tristate logic (for DRM_OFDRM), this changes the dependency from
>>>      !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
>>> to (boolean)
>>>      DRM_OFDRM != y == y, allowing the 'select's to cause the
>>> FB_CFB_* symbols to =y instead of =m.
>>>
>>
>> Is it actually a useful configuration to have OFDRM=m and
>> FB_OF=y though? I would expect in that case that the OFDRM
>> driver never binds to a device because it's already owned
>> by FB_OF.
>>
>>> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
>>> --- a/drivers/video/fbdev/Kconfig
>>> +++ b/drivers/video/fbdev/Kconfig
>>> @@ -455,7 +455,7 @@ config FB_ATARI
>>>   config FB_OF
>>>   	bool "Open Firmware frame buffer device support"
>>>   	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
>>> -	depends on !DRM_OFDRM
>>> +	depends on DRM_OFDRM != y
>>>   	select APERTURE_HELPERS
>>
>> I would instead make this 'depends on DRM_OFDRM=n', which
>> completely eliminates configs that have both driver enabled.
> 
> Yep, that works for me. Thanks.
> 
> Thomas, Michal, are you OK with that change?

Yes.

> 
>> A nicer change would be to make FB_OF a tristate symbol,
>> which makes it possible to load one of the two modules if
>> both are enabled =m, while only allowing one of them to
>> be =y if the other is completely disabled. It looks like
>> offb was originally written to be usable as a loadable module,
>> but Kconfig has prevented this since at least the start of
>> the git history.
> 

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23 10:23       ` Thomas Zimmermann
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Zimmermann @ 2022-11-23 10:23 UTC (permalink / raw)
  To: Randy Dunlap, Arnd Bergmann, linux-kernel
  Cc: linux-fbdev, Masahiro Yamada, dri-devel, Daniel Vetter,
	Michal Suchanek, linuxppc-dev, Helge Deller


[-- Attachment #1.1: Type: text/plain, Size: 2601 bytes --]

Hi

Am 23.11.22 um 11:02 schrieb Randy Dunlap:
> Hi Arnd,
> 
> On 11/23/22 01:08, Arnd Bergmann wrote:
>> On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote:
>>> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
>>> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
>>> under FB_OF to modular (=m). This causes undefined symbol references:
>>>
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58):
>>> undefined reference to `cfb_fillrect'
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60):
>>> undefined reference to `cfb_copyarea'
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68):
>>> undefined reference to `cfb_imageblit'
>>>
>>> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
>>> selected FB_CFB_* symbols will become =y instead of =m.
>>>
>>> In tristate logic (for DRM_OFDRM), this changes the dependency from
>>>      !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
>>> to (boolean)
>>>      DRM_OFDRM != y == y, allowing the 'select's to cause the
>>> FB_CFB_* symbols to =y instead of =m.
>>>
>>
>> Is it actually a useful configuration to have OFDRM=m and
>> FB_OF=y though? I would expect in that case that the OFDRM
>> driver never binds to a device because it's already owned
>> by FB_OF.
>>
>>> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
>>> --- a/drivers/video/fbdev/Kconfig
>>> +++ b/drivers/video/fbdev/Kconfig
>>> @@ -455,7 +455,7 @@ config FB_ATARI
>>>   config FB_OF
>>>   	bool "Open Firmware frame buffer device support"
>>>   	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
>>> -	depends on !DRM_OFDRM
>>> +	depends on DRM_OFDRM != y
>>>   	select APERTURE_HELPERS
>>
>> I would instead make this 'depends on DRM_OFDRM=n', which
>> completely eliminates configs that have both driver enabled.
> 
> Yep, that works for me. Thanks.
> 
> Thomas, Michal, are you OK with that change?

Yes.

> 
>> A nicer change would be to make FB_OF a tristate symbol,
>> which makes it possible to load one of the two modules if
>> both are enabled =m, while only allowing one of them to
>> be =y if the other is completely disabled. It looks like
>> offb was originally written to be usable as a loadable module,
>> but Kconfig has prevented this since at least the start of
>> the git history.
> 

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

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
  2022-11-23 10:02     ` Randy Dunlap
@ 2022-11-23 16:35       ` Randy Dunlap
  -1 siblings, 0 replies; 17+ messages in thread
From: Randy Dunlap @ 2022-11-23 16:35 UTC (permalink / raw)
  To: Arnd Bergmann, linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Masahiro Yamada, dri-devel,
	Daniel Vetter, Michal Suchanek, linuxppc-dev, Helge Deller



On 11/23/22 02:02, Randy Dunlap wrote:
> Hi Arnd,
> 
> On 11/23/22 01:08, Arnd Bergmann wrote:
>> On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote:
>>> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
>>> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
>>> under FB_OF to modular (=m). This causes undefined symbol references:
>>>
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): 
>>> undefined reference to `cfb_fillrect'
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): 
>>> undefined reference to `cfb_copyarea'
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): 
>>> undefined reference to `cfb_imageblit'
>>>
>>> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
>>> selected FB_CFB_* symbols will become =y instead of =m.
>>>
>>> In tristate logic (for DRM_OFDRM), this changes the dependency from
>>>     !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
>>> to (boolean)
>>>     DRM_OFDRM != y == y, allowing the 'select's to cause the
>>> FB_CFB_* symbols to =y instead of =m.
>>>
>>
>> Is it actually a useful configuration to have OFDRM=m and
>> FB_OF=y though? I would expect in that case that the OFDRM
>> driver never binds to a device because it's already owned
>> by FB_OF.
>>
>>> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
>>> --- a/drivers/video/fbdev/Kconfig
>>> +++ b/drivers/video/fbdev/Kconfig
>>> @@ -455,7 +455,7 @@ config FB_ATARI
>>>  config FB_OF
>>>  	bool "Open Firmware frame buffer device support"
>>>  	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
>>> -	depends on !DRM_OFDRM
>>> +	depends on DRM_OFDRM != y
>>>  	select APERTURE_HELPERS
>>
>> I would instead make this 'depends on DRM_OFDRM=n', which
>> completely eliminates configs that have both driver enabled.
> 
> Yep, that works for me. Thanks.
> 
> Thomas, Michal, are you OK with that change?
> 
>> A nicer change would be to make FB_OF a tristate symbol,
>> which makes it possible to load one of the two modules if
>> both are enabled =m, while only allowing one of them to
>> be =y if the other is completely disabled. It looks like
>> offb was originally written to be usable as a loadable module,
>> but Kconfig has prevented this since at least the start of
>> the git history.

ISTM that a distro would prefer to have both DFM_OFDRM and
FB_OF as tristate symbols that could both be built as loadable
modules, as Arnd describes above.
I'll look into that.

-- 
~Randy

^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m
@ 2022-11-23 16:35       ` Randy Dunlap
  0 siblings, 0 replies; 17+ messages in thread
From: Randy Dunlap @ 2022-11-23 16:35 UTC (permalink / raw)
  To: Arnd Bergmann, linux-kernel
  Cc: linux-fbdev, Thomas Zimmermann, Masahiro Yamada, dri-devel,
	Michal Suchanek, linuxppc-dev, Helge Deller



On 11/23/22 02:02, Randy Dunlap wrote:
> Hi Arnd,
> 
> On 11/23/22 01:08, Arnd Bergmann wrote:
>> On Wed, Nov 23, 2022, at 04:16, Randy Dunlap wrote:
>>> Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m.
>>> When the latter symbol is =m, kconfig downgrades (limits) the 'select's
>>> under FB_OF to modular (=m). This causes undefined symbol references:
>>>
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): 
>>> undefined reference to `cfb_fillrect'
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x60): 
>>> undefined reference to `cfb_copyarea'
>>> powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x68): 
>>> undefined reference to `cfb_imageblit'
>>>
>>> Fix this by allowing FB_OF any time that DRM_OFDRM != y so that the
>>> selected FB_CFB_* symbols will become =y instead of =m.
>>>
>>> In tristate logic (for DRM_OFDRM), this changes the dependency from
>>>     !DRM_OFDRM	== 2 - 1 == 1 => modular only (or disabled)
>>> to (boolean)
>>>     DRM_OFDRM != y == y, allowing the 'select's to cause the
>>> FB_CFB_* symbols to =y instead of =m.
>>>
>>
>> Is it actually a useful configuration to have OFDRM=m and
>> FB_OF=y though? I would expect in that case that the OFDRM
>> driver never binds to a device because it's already owned
>> by FB_OF.
>>
>>> diff -- a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig
>>> --- a/drivers/video/fbdev/Kconfig
>>> +++ b/drivers/video/fbdev/Kconfig
>>> @@ -455,7 +455,7 @@ config FB_ATARI
>>>  config FB_OF
>>>  	bool "Open Firmware frame buffer device support"
>>>  	depends on (FB = y) && PPC && (!PPC_PSERIES || PCI)
>>> -	depends on !DRM_OFDRM
>>> +	depends on DRM_OFDRM != y
>>>  	select APERTURE_HELPERS
>>
>> I would instead make this 'depends on DRM_OFDRM=n', which
>> completely eliminates configs that have both driver enabled.
> 
> Yep, that works for me. Thanks.
> 
> Thomas, Michal, are you OK with that change?
> 
>> A nicer change would be to make FB_OF a tristate symbol,
>> which makes it possible to load one of the two modules if
>> both are enabled =m, while only allowing one of them to
>> be =y if the other is completely disabled. It looks like
>> offb was originally written to be usable as a loadable module,
>> but Kconfig has prevented this since at least the start of
>> the git history.

ISTM that a distro would prefer to have both DFM_OFDRM and
FB_OF as tristate symbols that could both be built as loadable
modules, as Arnd describes above.
I'll look into that.

-- 
~Randy

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-11-23 16:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-23  3:16 [PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m Randy Dunlap
2022-11-23  3:16 ` Randy Dunlap
2022-11-23  3:16 ` Randy Dunlap
2022-11-23  8:02 ` Thomas Zimmermann
2022-11-23  8:02   ` Thomas Zimmermann
2022-11-23  8:02   ` Thomas Zimmermann
2022-11-23  8:38   ` Michal Suchánek
2022-11-23  8:38     ` Michal Suchánek
2022-11-23  8:38     ` Michal Suchánek
2022-11-23  9:08 ` Arnd Bergmann
2022-11-23  9:08   ` Arnd Bergmann
2022-11-23 10:02   ` Randy Dunlap
2022-11-23 10:02     ` Randy Dunlap
2022-11-23 10:23     ` Thomas Zimmermann
2022-11-23 10:23       ` Thomas Zimmermann
2022-11-23 16:35     ` Randy Dunlap
2022-11-23 16:35       ` Randy Dunlap

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.