From: Thomas Zimmermann <tzimmermann@suse.de> Date: 2024-03-06 12:29:44
After cleaning up <linux/fb.h> in commit 11b4eedfc87d ("fbdev: Do
not include <linux/backlight.h> in header"), building with
CONFIG_PMAC_BACKLIGHT=y returns errors about missing declarations.
Patches 1 and 2 resolve the errors. Patch 1 has been reviewed at [1].
Patch 3 removes another dependency between backlight and fbdev code.
Compile tested with ppc6xx_defconfig.
v3:
* add Fixes tag and fix typos in patch 3
v2:
* via-pmu-backlight: fix build errors
* powerpc: resolve dependency between fbdev and backlight
[1] https://patchwork.freedesktop.org/series/130661/
Thomas Zimmermann (3):
fbdev/chipsfb: Include <linux/backlight.h>
macintosh/via-pmu-backlight: Include <linux/backlight.h>
arch/powerpc: Remove <linux/fb.h> from backlight code
arch/powerpc/include/asm/backlight.h | 5 ++--
arch/powerpc/platforms/powermac/backlight.c | 26 ---------------------
drivers/macintosh/via-pmu-backlight.c | 1 +
drivers/video/fbdev/chipsfb.c | 1 +
4 files changed, 4 insertions(+), 29 deletions(-)
--
2.44.0
From: Thomas Zimmermann <tzimmermann@suse.de> Date: 2024-03-06 12:29:44
Fix builds with CONFIG_PMAC_BACKLIGHT=y. The include statement for
the backlight header has recently been removed from <linux/fb.h>.
Reported-by: Naresh Kamboju <redacted>
Closes: https://lore.kernel.org/dri-devel/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header")
Reviewed-by: Jani Nikula <redacted>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jani Nikula <redacted>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/video/fbdev/chipsfb.c | 1 +
1 file changed, 1 insertion(+)
From: Thomas Zimmermann <tzimmermann@suse.de> Date: 2024-03-06 12:29:45
Fix builds with CONFIG_PMAC_BACKLIGHT=y. The include statement for the
backlight header has recently been removed from <linux/fb.h>. Add it to
via-pmu-backlight.c to get the necessary symbols.
Reported-by: Naresh Kamboju <redacted>
Closes: https://lore.kernel.org/dri-devel/CA+G9fYsAk5TbqqxFC2W4oHLGA0CbTHMxbeq8QayFXTU75YiueA@mail.gmail.com/
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: 11b4eedfc87d ("fbdev: Do not include <linux/backlight.h> in header")
Reviewed-by: Jani Nikula <redacted>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jani Nikula <redacted>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
---
drivers/macintosh/via-pmu-backlight.c | 1 +
1 file changed, 1 insertion(+)
From: Thomas Zimmermann <tzimmermann@suse.de> Date: 2024-03-06 12:29:45
Replace <linux/fb.h> with a forward declaration in <asm/backlight.h> to
resolve an unnecessary dependency. Remove pmac_backlight_curve_lookup()
and struct fb_info from source and header files. The function and the
framebuffer struct are unused. No functional changes.
v3:
* Add Fixes tag (Christophe)
* fix typos in commit message (Jani)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: d565dd3b0824 ("[PATCH] powerpc: More via-pmu backlight fixes")
Reviewed-by: Jani Nikula <redacted>
---
arch/powerpc/include/asm/backlight.h | 5 ++--
arch/powerpc/platforms/powermac/backlight.c | 26 ---------------------
2 files changed, 2 insertions(+), 29 deletions(-)
@@ -10,15 +10,14 @@#define __ASM_POWERPC_BACKLIGHT_H#ifdef __KERNEL__-#include<linux/fb.h>#include<linux/mutex.h>+structbacklight_device;+/* For locking instructions, see the implementation file */externstructbacklight_device*pmac_backlight;externstructmutexpmac_backlight_mutex;-externintpmac_backlight_curve_lookup(structfb_info*info,intvalue);-externintpmac_has_backlight_type(constchar*type);externvoidpmac_backlight_key(intdirection);
@@ -72,31 +71,6 @@ int pmac_has_backlight_type(const char *type)return0;}-intpmac_backlight_curve_lookup(structfb_info*info,intvalue)-{-intlevel=(FB_BACKLIGHT_LEVELS-1);--if(info&&info->bl_dev){-inti,max=0;--/* Look for biggest value */-for(i=0;i<FB_BACKLIGHT_LEVELS;i++)-max=max((int)info->bl_curve[i],max);--/* Look for nearest value */-for(i=0;i<FB_BACKLIGHT_LEVELS;i++){-intdiff=abs(info->bl_curve[i]-value);-if(diff<max){-max=diff;-level=i;-}-}--}--returnlevel;-}-staticvoidpmac_backlight_key_worker(structwork_struct*work){if(atomic_read(&kernel_backlight_disabled))
From: Thomas Zimmermann <tzimmermann@suse.de> Date: 2024-03-07 08:59:44
If there are no further comments, I'm going to merge this patchset in time for today's PR of drm-misc-next-fixes.
Am 06.03.24 um 13:28 schrieb Thomas Zimmermann:
After cleaning up <linux/fb.h> in commit 11b4eedfc87d ("fbdev: Do
not include <linux/backlight.h> in header"), building with
CONFIG_PMAC_BACKLIGHT=y returns errors about missing declarations.
Patches 1 and 2 resolve the errors. Patch 1 has been reviewed at [1].
Patch 3 removes another dependency between backlight and fbdev code.
Compile tested with ppc6xx_defconfig.
v3:
* add Fixes tag and fix typos in patch 3
v2:
* via-pmu-backlight: fix build errors
* powerpc: resolve dependency between fbdev and backlight
[1] https://patchwork.freedesktop.org/series/130661/
Thomas Zimmermann (3):
fbdev/chipsfb: Include <linux/backlight.h>
macintosh/via-pmu-backlight: Include <linux/backlight.h>
arch/powerpc: Remove <linux/fb.h> from backlight code
arch/powerpc/include/asm/backlight.h | 5 ++--
arch/powerpc/platforms/powermac/backlight.c | 26 ---------------------
drivers/macintosh/via-pmu-backlight.c | 1 +
drivers/video/fbdev/chipsfb.c | 1 +
4 files changed, 4 insertions(+), 29 deletions(-)
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
From: Michael Ellerman <mpe@ellerman.id.au> Date: 2024-03-07 10:33:06
Thomas Zimmermann [off-list ref] writes:
Replace <linux/fb.h> with a forward declaration in <asm/backlight.h> to
resolve an unnecessary dependency. Remove pmac_backlight_curve_lookup()
and struct fb_info from source and header files. The function and the
framebuffer struct are unused. No functional changes.
v3:
* Add Fixes tag (Christophe)
* fix typos in commit message (Jani)
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Fixes: d565dd3b0824 ("[PATCH] powerpc: More via-pmu backlight fixes")
Reviewed-by: Jani Nikula <redacted>
---
arch/powerpc/include/asm/backlight.h | 5 ++--
arch/powerpc/platforms/powermac/backlight.c | 26 ---------------------
2 files changed, 2 insertions(+), 29 deletions(-)
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
cheers