* [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
@ 2021-02-22 3:28 Randy Dunlap
2021-02-22 16:25 ` Daniel Vetter
2021-02-22 17:44 ` Ville Syrjälä
0 siblings, 2 replies; 5+ messages in thread
From: Randy Dunlap @ 2021-02-22 3:28 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, kernel test robot, linux-fbdev, dri-devel,
Bartlomiej Zolnierkiewicz, Sam Ravnborg, Daniel Vetter,
David Airlie, Jani Nikula
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);
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
---
drivers/video/fbdev/aty/atyfb_base.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb_base.c
+++ linux-next-20210219/drivers/video/fbdev/aty/atyfb_base.c
@@ -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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
2021-02-22 3:28 [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd() Randy Dunlap
@ 2021-02-22 16:25 ` Daniel Vetter
2021-02-22 17:44 ` Ville Syrjälä
1 sibling, 0 replies; 5+ messages in thread
From: Daniel Vetter @ 2021-02-22 16:25 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, kernel test robot, linux-fbdev, dri-devel,
Bartlomiej Zolnierkiewicz, Sam Ravnborg, Daniel Vetter,
David Airlie, Jani Nikula
On Sun, Feb 21, 2021 at 07:28:53PM -0800, Randy Dunlap wrote:
> 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);
>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
stuffed into drm-misc-next-fixes for 5.12, thanks for your patch.
-Daniel
> ---
> drivers/video/fbdev/aty/atyfb_base.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> --- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb_base.c
> +++ linux-next-20210219/drivers/video/fbdev/aty/atyfb_base.c
> @@ -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
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
2021-02-22 3:28 [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd() Randy Dunlap
2021-02-22 16:25 ` Daniel Vetter
@ 2021-02-22 17:44 ` Ville Syrjälä
2021-02-24 19:59 ` Randy Dunlap
1 sibling, 1 reply; 5+ messages in thread
From: Ville Syrjälä @ 2021-02-22 17:44 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, linux-fbdev, kernel test robot,
Bartlomiej Zolnierkiewicz, David Airlie, dri-devel, Sam Ravnborg
On Sun, Feb 21, 2021 at 07:28:53PM -0800, Randy Dunlap wrote:
> 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);
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: kernel test robot <lkp@intel.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: dri-devel@lists.freedesktop.org
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> ---
> drivers/video/fbdev/aty/atyfb_base.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> --- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb_base.c
> +++ linux-next-20210219/drivers/video/fbdev/aty/atyfb_base.c
> @@ -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.
> +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
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
2021-02-22 17:44 ` Ville Syrjälä
@ 2021-02-24 19:59 ` Randy Dunlap
2021-02-24 21:07 ` Ville Syrjälä
0 siblings, 1 reply; 5+ messages in thread
From: Randy Dunlap @ 2021-02-24 19:59 UTC (permalink / raw)
To: Ville Syrjälä
Cc: linux-kernel, linux-fbdev, kernel test robot,
Bartlomiej Zolnierkiewicz, David Airlie, dri-devel, Sam Ravnborg
On 2/22/21 9:44 AM, Ville Syrjälä wrote:
> On Sun, Feb 21, 2021 at 07:28:53PM -0800, Randy Dunlap wrote:
>> 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);
>> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
>> Reported-by: kernel test robot <lkp@intel.com>
>> Cc: linux-fbdev@vger.kernel.org
>> Cc: dri-devel@lists.freedesktop.org
>> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: Jani Nikula <jani.nikula@linux.intel.com>
>> ---
>> drivers/video/fbdev/aty/atyfb_base.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> --- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb_base.c
>> +++ linux-next-20210219/drivers/video/fbdev/aty/atyfb_base.c
>> @@ -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. :)
>> +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.
--
~Randy
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd()
2021-02-24 19:59 ` Randy Dunlap
@ 2021-02-24 21:07 ` Ville Syrjälä
0 siblings, 0 replies; 5+ messages in thread
From: Ville Syrjälä @ 2021-02-24 21:07 UTC (permalink / raw)
To: Randy Dunlap
Cc: linux-kernel, linux-fbdev, kernel test robot,
Bartlomiej Zolnierkiewicz, David Airlie, dri-devel, Sam Ravnborg
On Wed, Feb 24, 2021 at 11:59:45AM -0800, Randy Dunlap wrote:
> On 2/22/21 9:44 AM, Ville Syrjälä wrote:
> > On Sun, Feb 21, 2021 at 07:28:53PM -0800, Randy Dunlap wrote:
> >> 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);
> >> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> >> Reported-by: kernel test robot <lkp@intel.com>
> >> Cc: linux-fbdev@vger.kernel.org
> >> Cc: dri-devel@lists.freedesktop.org
> >> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> >> Cc: Sam Ravnborg <sam@ravnborg.org>
> >> Cc: Daniel Vetter <daniel@ffwll.ch>
> >> Cc: David Airlie <airlied@linux.ie>
> >> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> >> ---
> >> drivers/video/fbdev/aty/atyfb_base.c | 9 +++++++++
> >> 1 file changed, 9 insertions(+)
> >>
> >> --- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb_base.c
> >> +++ linux-next-20210219/drivers/video/fbdev/aty/atyfb_base.c
> >> @@ -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.)
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.
>
>
> 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" :)
>
> >> +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.
> --
> ~Randy
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-02-24 21:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 3:28 [PATCH] fbdev: atyfb: add stubs for aty_{ld,st}_lcd() Randy Dunlap
2021-02-22 16:25 ` Daniel Vetter
2021-02-22 17:44 ` Ville Syrjälä
2021-02-24 19:59 ` Randy Dunlap
2021-02-24 21:07 ` Ville Syrjälä
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).