Skip to contentSkip to conversation

fbdev: simplefb: limit its use to DRM_SIMPLEDRM=n

PATCH In review Randy Dunlap 2 participants 3 messages Jul 19, 2021 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fbdev: simplefb: limit its use to DRM_SIMPLEDRM=n

When DRM_SIMPLEDRM=m, all of FB_CFB_{FILLRECT,COPYAREA,IMAGEBLIT} are =m, causing undefined references in fbdev/simplefb.o.

By restricting FB_SIMPLEFB to be set only when DRM_SIMPLEDRM is not set, the FB_CFB_* symbols are =y and the build completes without these undefined references.

IOW, really "disable simplefb if simpledrm has been selected".

or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x2c): undefined reference to `cfb_fillrect'
or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x30): undefined reference to `cfb_copyarea'
or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x34): undefined reference to `cfb_imageblit'

Fixes 11e8f5fd223b ("drm: Add simpledrm driver")
Cc Hans de Goede <[email protected]>
Cc Thomas Zimmermann <[email protected]>
---
 drivers/video/fbdev/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/Kconfig +1 -1
@@ -2192,7 +2192,7 @@ config FB_HYPERV
 
 config FB_SIMPLE
 	bool "Simple framebuffer support"
-	depends on (FB = y) && !DRM_SIMPLEDRM
+	depends on (FB = y) && DRM_SIMPLEDRM=n
 	select FB_CFB_FILLRECT
 	select FB_CFB_COPYAREA
 	select FB_CFB_IMAGEBLIT
#1 lore raw

Hi Randy,

Quoted 1 line · Randy Dunlap

When DRM_SIMPLEDRM=m, all of FB_CFB_{FILLRECT,COPYAREA,IMAGEBLIT} are =m,

Why does that happen?
FB_SIMPLE does select FB_CFB_*, so all of the latter should be builtin? Do I need my morning coffee? I'm about to fetch it...

Quoted 7 lines

causing undefined references in fbdev/simplefb.o.

By restricting FB_SIMPLEFB to be set only when DRM_SIMPLEDRM is not set, the FB_CFB_* symbols are =y and the build completes without these undefined references.

IOW, really "disable simplefb if simpledrm has been selected".

That does make sense, regardless of my question above ;-)

Quoted 10 lines

or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x2c): undefined reference to `cfb_fillrect'
or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x30): undefined reference to `cfb_copyarea'
or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x34): undefined reference to `cfb_imageblit'

Fixes 11e8f5fd223b ("drm: Add simpledrm driver")

drivers/video/fbdev/Kconfig config FB_HYPERV · line 2198

Quoted 8 lines
drivers/video/fbdev/Kconfig +1 -1
@@ -2192,7 +2192,7 @@ config FB_HYPERV
 
 config FB_SIMPLE
        bool "Simple framebuffer support"
-       depends on (FB = y) && !DRM_SIMPLEDRM
+       depends on (FB = y) && DRM_SIMPLEDRM=n
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#2 lore raw
Quoted 8 lines · Geert Uytterhoeven

Hi Randy,

Quoted 1 line · Randy Dunlap

When DRM_SIMPLEDRM=m, all of FB_CFB_{FILLRECT,COPYAREA,IMAGEBLIT} are =m,

Why does that happen?
FB_SIMPLE does select FB_CFB_*, so all of the latter should be builtin? Do I need my morning coffee? I'm about to fetch it...

Hi Geert,

I have no idea why this happens. It feels like a kconfig bug to me.

Quoted 33 lines
Quoted 7 lines

causing undefined references in fbdev/simplefb.o.

By restricting FB_SIMPLEFB to be set only when DRM_SIMPLEDRM is not set, the FB_CFB_* symbols are =y and the build completes without these undefined references.

IOW, really "disable simplefb if simpledrm has been selected".

That does make sense, regardless of my question above ;-)

Quoted 10 lines

or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x2c): undefined reference to `cfb_fillrect'
or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x30): undefined reference to `cfb_copyarea'
or1k-linux-ld: drivers/video/fbdev/simplefb.o:(.rodata+0x34): undefined reference to `cfb_imageblit'

Fixes 11e8f5fd223b ("drm: Add simpledrm driver")

drivers/video/fbdev/Kconfig config FB_HYPERV · line 2198

Quoted 8 lines
drivers/video/fbdev/Kconfig +1 -1
@@ -2192,7 +2192,7 @@ config FB_HYPERV
 
 config FB_SIMPLE
        bool "Simple framebuffer support"
-       depends on (FB = y) && !DRM_SIMPLEDRM
+       depends on (FB = y) && DRM_SIMPLEDRM=n
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
        select FB_CFB_IMAGEBLIT

Gr{oetje,eeting}s,

Geert

Signature · 1 line
~Randy