# \[PATCH -next v2\] fbdev: atyfb: use LCD management functions for PPC\_PMAC also

- Status: LANDED (b266409310c6 · 2021-03-11 10:11)
- Landed in mainline as b266409310c6 on 2021-03-11.
- List: linux-fbdev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-fbdev/2021/02/6280254/t

## \[PATCH -next v2\] fbdev: atyfb: use LCD management functions for PPC\_PMAC also

- From: Randy Dunlap \<rdunlap@infradead.org\>
- Date: 2021-02-26 17:31:00 
- Message: https://ratatoskr.run/linux-fbdev/2021/02/6280254.md

```text
Include PPC_PMAC in the configs that use aty_ld_lcd() and
aty_st_lcd() implementations so that the PM code may work
correctly for PPC_PMAC.

Suggested-by: Ville Syrjälä <redacted>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Daniel Vetter <redacted>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: <redacted>
Cc: <redacted>
Cc: Bartlomiej Zolnierkiewicz <redacted>
Cc: Sam Ravnborg <redacted>
Cc: David Airlie <redacted>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
---
Daniel- We also need this patch:
https://lore.kernel.org/dri-devel/20210224215528.822-1-rdunlap@infradead.org/
to fix a kernel test robot build error.

v2: send the correct version of this patch (thanks, Ville)

 drivers/video/fbdev/aty/atyfb_base.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb_base.c
+++ linux-next-20210219/drivers/video/fbdev/aty/atyfb_base.c
@@ -133,7 +133,7 @@
 #define PRINTKE(fmt, args...)	printk(KERN_ERR "atyfb: " fmt, ## args)
 
 #if defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_GENERIC_LCD) || \
-defined(CONFIG_FB_ATY_BACKLIGHT)
+defined(CONFIG_FB_ATY_BACKLIGHT) || defined (CONFIG_PPC_PMAC)
 static const u32 lt_lcd_regs[] = {
 	CNFG_PANEL_LG,
 	LCD_GEN_CNTL_LG,
@@ -175,8 +175,8 @@ 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) */
+#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) ||
+	 defined(CONFIG_FB_ATY_GENERIC_LCD) || defined(CONFIG_PPC_PMAC) */
 void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
 { }
 
@@ -184,7 +184,8 @@ u32 aty_ld_lcd(int index, const struct a
 {
 	return 0;
 }
-#endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
+#endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) ||
+	  defined (CONFIG_FB_ATY_GENERIC_LCD) || defined(CONFIG_PPC_PMAC) */
 
 #ifdef CONFIG_FB_ATY_GENERIC_LCD
 /*
```

## Re: \[PATCH -next v2\] fbdev: atyfb: use LCD management functions for PPC\_PMAC also

- From: Ville Syrjälä \<hidden\>
- Date: 2021-03-03 19:28:13 
- Message: https://ratatoskr.run/linux-fbdev/2021/03/6287128.md

```text
On Fri, Feb 26, 2021 at 09:30:08AM -0800, Randy Dunlap wrote:
> Include PPC_PMAC in the configs that use aty_ld_lcd() and
> aty_st_lcd() implementations so that the PM code may work
> correctly for PPC_PMAC.
> 
> Suggested-by: Ville Syrjälä <redacted>
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Daniel Vetter <redacted>
> Cc: Nick Desaulniers <ndesaulniers@google.com>
> Cc: <redacted>
> Cc: <redacted>
> Cc: Bartlomiej Zolnierkiewicz <redacted>
> Cc: Sam Ravnborg <redacted>
> Cc: David Airlie <redacted>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> ---
> Daniel- We also need this patch:
> https://lore.kernel.org/dri-devel/20210224215528.822-1-rdunlap@infradead.org/
> to fix a kernel test robot build error.
> 
> v2: send the correct version of this patch (thanks, Ville)

Both patches pushed to drm-misc-fixes. Thanks.

> 
>  drivers/video/fbdev/aty/atyfb_base.c |    9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> --- linux-next-20210219.orig/drivers/video/fbdev/aty/atyfb_base.c
> +++ linux-next-20210219/drivers/video/fbdev/aty/atyfb_base.c
> @@ -133,7 +133,7 @@
>  #define PRINTKE(fmt, args...)	printk(KERN_ERR "atyfb: " fmt, ## args)
>  
>  #if defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_GENERIC_LCD) || \
> -defined(CONFIG_FB_ATY_BACKLIGHT)
> +defined(CONFIG_FB_ATY_BACKLIGHT) || defined (CONFIG_PPC_PMAC)
>  static const u32 lt_lcd_regs[] = {
>  	CNFG_PANEL_LG,
>  	LCD_GEN_CNTL_LG,
> @@ -175,8 +175,8 @@ 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) */
> +#else /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) ||
> +	 defined(CONFIG_FB_ATY_GENERIC_LCD) || defined(CONFIG_PPC_PMAC) */
>  void aty_st_lcd(int index, u32 val, const struct atyfb_par *par)
>  { }
>  
> @@ -184,7 +184,8 @@ u32 aty_ld_lcd(int index, const struct a
>  {
>  	return 0;
>  }
> -#endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined (CONFIG_FB_ATY_GENERIC_LCD) */
> +#endif /* defined(CONFIG_PMAC_BACKLIGHT) || defined(CONFIG_FB_ATY_BACKLIGHT) ||
> +	  defined (CONFIG_FB_ATY_GENERIC_LCD) || defined(CONFIG_PPC_PMAC) */
>  
>  #ifdef CONFIG_FB_ATY_GENERIC_LCD
>  /*

-- 
Ville Syrjälä
Intel
```
