Skip to contentSkip to conversation

fbdev: atyfb: add stubs for aty_{ld,st}_lcd()

PATCH In review Randy Dunlap 3 participants 5 messages Feb 22, 2021 – Feb 24, 2021 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fbdev: atyfb: add stubs for aty_{ld,st}_lcd()

Fix build errors when these functions are not defined.

../drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_power_mgmt':
../drivers/video/fbdev/aty/atyfb_base.c:2002:7: error: implicit declaration of function 'aty_ld_lcd'; did you mean 'aty_ld_8'? [-Werror=implicit-function-declaration]
2002 | pm = aty_ld_lcd(POWER_MANAGEMENT, par);
../drivers/video/fbdev/aty/atyfb_base.c:2004:2: error: implicit declaration of function 'aty_st_lcd'; did you mean 'aty_st_8'? [-Werror=implicit-function-declaration]
2004 | aty_st_lcd(POWER_MANAGEMENT, pm, par);

Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc David Airlie <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/video/fbdev/aty/atyfb_base.c |    9 +++++++++
 1 file changed, 9 insertions(+)
drivers/video/fbdev/aty/atyfb_base.c +9 -0
@@ -175,6 +175,15 @@ u32 aty_ld_lcd(int index, const struct a
 		return aty_ld_le32(LCD_DATA, par);
 	}
 }
+#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
+	 defined(CONFIG_FB_ATY_GENERIC_LCD) */
+void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
+{ }
+
+u32 aty_ld_lcd(int index, const struct atyfb_par *par)
+{
+	return 0;
+}
 #endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
 
 #ifdef CONFIG_FB_ATY_GENERIC_LCD

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw
Quoted 8 lines · Randy Dunlap

Fix build errors when these functions are not defined.

../drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_power_mgmt':
../drivers/video/fbdev/aty/atyfb_base.c:2002:7: error: implicit declaration of function 'aty_ld_lcd'; did you mean 'aty_ld_8'? [-Werror=implicit-function-declaration]
2002 | pm = aty_ld_lcd(POWER_MANAGEMENT, par);
../drivers/video/fbdev/aty/atyfb_base.c:2004:2: error: implicit declaration of function 'aty_st_lcd'; did you mean 'aty_st_8'? [-Werror=implicit-function-declaration]
2004 | aty_st_lcd(POWER_MANAGEMENT, pm, par);

Quoted 9 lines
Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc David Airlie <[email protected]>
Cc Jani Nikula <[email protected]>

stuffed into drm-misc-next-fixes for 5.12, thanks for your patch. -Daniel

Quoted 22 lines
---
 drivers/video/fbdev/aty/atyfb_base.c |    9 +++++++++
 1 file changed, 9 insertions(+)
drivers/video/fbdev/aty/atyfb_base.c +9 -0
@@ -175,6 +175,15 @@ u32 aty_ld_lcd(int index, const struct a
 		return aty_ld_le32(LCD_DATA, par);
 	}
 }
+#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
+	 defined(CONFIG_FB_ATY_GENERIC_LCD) */
+void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
+{ }
+
+u32 aty_ld_lcd(int index, const struct atyfb_par *par)
+{
+	return 0;
+}
 #endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
 
 #ifdef CONFIG_FB_ATY_GENERIC_LCD
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw
In reply to Randy Dunlap
Quoted 23 lines · Randy Dunlap

Fix build errors when these functions are not defined.

../drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_power_mgmt':
../drivers/video/fbdev/aty/atyfb_base.c:2002:7: error: implicit declaration of function 'aty_ld_lcd'; did you mean 'aty_ld_8'? [-Werror=implicit-function-declaration]
2002 | pm = aty_ld_lcd(POWER_MANAGEMENT, par);
../drivers/video/fbdev/aty/atyfb_base.c:2004:2: error: implicit declaration of function 'aty_st_lcd'; did you mean 'aty_st_8'? [-Werror=implicit-function-declaration]
2004 | aty_st_lcd(POWER_MANAGEMENT, pm, par);

Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc David Airlie <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/video/fbdev/aty/atyfb_base.c |    9 +++++++++
 1 file changed, 9 insertions(+)

drivers/video/fbdev/aty/atyfb_base.c u32 aty_ld_lcd(int index, const struct a · line 179

Quoted 5 lines
drivers/video/fbdev/aty/atyfb_base.c +2 -0
@@ -175,6 +175,15 @@ u32 aty_ld_lcd(int index, const struct a
 		return aty_ld_le32(LCD_DATA, par);
 	}
 }
+#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
+	 defined(CONFIG_FB_ATY_GENERIC_LCD) */

A better fix would seem to be to include these functions if CONFIG_PPC_PMAC is enabled. Otherwise the PM code will surely not work correctly. Though I'm not sure if that PPC PM code makes any sense w/o LCD/backlight support anyway.

Quoted 14 lines
drivers/video/fbdev/aty/atyfb_base.c +7 -0
+void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
+{ }
+
+u32 aty_ld_lcd(int index, const struct atyfb_par *par)
+{
+	return 0;
+}
 #endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
 
 #ifdef CONFIG_FB_ATY_GENERIC_LCD

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#3 lore raw
Quoted 21 lines · Ville Syrjälä
Quoted 20 lines · Randy Dunlap

Fix build errors when these functions are not defined.

../drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_power_mgmt':
../drivers/video/fbdev/aty/atyfb_base.c:2002:7: error: implicit declaration of function 'aty_ld_lcd'; did you mean 'aty_ld_8'? [-Werror=implicit-function-declaration]
2002 | pm = aty_ld_lcd(POWER_MANAGEMENT, par);
../drivers/video/fbdev/aty/atyfb_base.c:2004:2: error: implicit declaration of function 'aty_st_lcd'; did you mean 'aty_st_8'? [-Werror=implicit-function-declaration]
2004 | aty_st_lcd(POWER_MANAGEMENT, pm, par);

Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc David Airlie <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/video/fbdev/aty/atyfb_base.c |    9 +++++++++
 1 file changed, 9 insertions(+)
Quoted 13 lines

drivers/video/fbdev/aty/atyfb_base.c u32 aty_ld_lcd(int index, const struct a · line 179

Quoted 8 lines
drivers/video/fbdev/aty/atyfb_base.c +2 -0
@@ -175,6 +175,15 @@ u32 aty_ld_lcd(int index, const struct a
 		return aty_ld_le32(LCD_DATA, par);
 	}
 }
+#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
+	 defined(CONFIG_FB_ATY_GENERIC_LCD) */

A better fix would seem to be to include these functions if CONFIG_PPC_PMAC is enabled. Otherwise the PM code will surely not work correctly. Though I'm not sure if that PPC PM code makes any sense w/o LCD/backlight support anyway.

Hi Ville,

I tried this:

-#if defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_GENERIC_LCD) || \
-defined(CONFIG_FB_ATY_BACKLIGHT)
+#if defined(CONFIG_PPC_PMAC)

in both atyfb_base.c and atyfb.h, but then there is a build error in mach64_ct.c when PPC_PMAC is not enabled but FB_ATY_GENERIC_LCD is enabled. [mach64_ct.c is the only other user of aty_{ld,st}_lcd()]

or did you mean adding CONFIG_PPC_PMAC to that longish #if list? (that's not how I understood your comment.)

I'll gladly step away and let you submit patches for this. :)

Quoted 11 lines
Quoted 11 lines
drivers/video/fbdev/aty/atyfb_base.c +7 -0
+void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
+{ }
+
+u32 aty_ld_lcd(int index, const struct atyfb_par *par)
+{
+	return 0;
+}
 #endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
 
 #ifdef CONFIG_FB_ATY_GENERIC_LCD

_______________________________________________

thanks.

Signature · 6 lines
~Randy

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw
Quoted 44 lines · Randy Dunlap
Quoted 21 lines · Ville Syrjälä
Quoted 20 lines · Randy Dunlap

Fix build errors when these functions are not defined.

../drivers/video/fbdev/aty/atyfb_base.c: In function 'aty_power_mgmt':
../drivers/video/fbdev/aty/atyfb_base.c:2002:7: error: implicit declaration of function 'aty_ld_lcd'; did you mean 'aty_ld_8'? [-Werror=implicit-function-declaration]
2002 | pm = aty_ld_lcd(POWER_MANAGEMENT, par);
../drivers/video/fbdev/aty/atyfb_base.c:2004:2: error: implicit declaration of function 'aty_st_lcd'; did you mean 'aty_st_8'? [-Werror=implicit-function-declaration]
2004 | aty_st_lcd(POWER_MANAGEMENT, pm, par);

Cc Bartlomiej Zolnierkiewicz <[email protected]>
Cc Sam Ravnborg <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc David Airlie <[email protected]>
Cc Jani Nikula <[email protected]>
---
 drivers/video/fbdev/aty/atyfb_base.c |    9 +++++++++
 1 file changed, 9 insertions(+)
Quoted 13 lines

drivers/video/fbdev/aty/atyfb_base.c u32 aty_ld_lcd(int index, const struct a · line 179

Quoted 8 lines
drivers/video/fbdev/aty/atyfb_base.c +2 -0
@@ -175,6 +175,15 @@ u32 aty_ld_lcd(int index, const struct a
 		return aty_ld_le32(LCD_DATA, par);
 	}
 }
+#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) \
+	 defined(CONFIG_FB_ATY_GENERIC_LCD) */

A better fix would seem to be to include these functions if CONFIG_PPC_PMAC is enabled. Otherwise the PM code will surely not work correctly. Though I'm not sure if that PPC PM code makes any sense w/o LCD/backlight support anyway.

Hi Ville,

I tried this:

(quoted diff) +1 -2
-#if defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_GENERIC_LCD) || \
-defined(CONFIG_FB_ATY_BACKLIGHT)
+#if defined(CONFIG_PPC_PMAC)
Quoted 6 lines

in both atyfb_base.c and atyfb.h, but then there is a build error in mach64_ct.c when PPC_PMAC is not enabled but FB_ATY_GENERIC_LCD is enabled. [mach64_ct.c is the only other user of aty_{ld,st}_lcd()]

or did you mean adding CONFIG_PPC_PMAC to that longish #if list? (that's not how I understood your comment.)

Yeah, I meant adding ||PPC_PMAC to the existing set of conditions. You definitely need to have this stuff for the LCD/backlight support on !PPC_PMAC as well.

Quoted 3 lines

I'll gladly step away and let you submit patches for this. :)

I don't have any powerbook/etc. hw to test this so couldn't really add any extra value. Just have vague memories of touching this stuff long ago so figured I'd provide my "expertise" :)

Quoted 17 lines
Quoted 10 lines
Quoted 10 lines
drivers/video/fbdev/aty/atyfb_base.c +7 -0
+void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
+{ }
+
+u32 aty_ld_lcd(int index, const struct atyfb_par *par)
+{
+	return 0;
+}
 #endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
 
Quoted 2 lines
Quoted 2 lines
drivers/video/fbdev/aty/atyfb_base.c +0 -0
 #ifdef CONFIG_FB_ATY_GENERIC_LCD

_______________________________________________

thanks.

Signature · 1 line
~Randy
Signature · 6 lines
Ville Syrjälä
Intel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel