Thread (40 messages) 40 messages, 5 authors, 2023-11-09

Re: [PATCH 02/22] fb: atmel_lcdfb: Stop using platform_driver_probe()

From: Uwe Kleine-König <hidden>
Date: 2023-11-08 21:53:05
Also in: dri-devel, linux-arm-kernel, llvm

On Wed, Nov 08, 2023 at 10:24:09PM +0100, Helge Deller wrote:
On 11/8/23 22:00, Uwe Kleine-König wrote:
quoted
On Wed, Nov 08, 2023 at 11:48:05AM -0700, Nathan Chancellor wrote:
quoted
diff --git a/drivers/video/fbdev/atmel_lcdfb.c b/drivers/video/fbdev/atmel_lcdfb.c
index 88c75ae7d315..9e391e5eaf9d 100644
--- a/drivers/video/fbdev/atmel_lcdfb.c
+++ b/drivers/video/fbdev/atmel_lcdfb.c
@@ -220,7 +220,7 @@ static inline void atmel_lcdfb_power_control(struct atmel_lcdfb_info *sinfo, int
  	}
  }

-static const struct fb_fix_screeninfo atmel_lcdfb_fix __initconst = {
+static const struct fb_fix_screeninfo atmel_lcdfb_fix = {
  	.type		= FB_TYPE_PACKED_PIXELS,
  	.visual		= FB_VISUAL_TRUECOLOR,
  	.xpanstep	= 0,
I wonder if this was broken already before my patch. atmel_lcdfb_probe()
does

	info->fix = atmel_lcdfb_fix;

and unless I miss something (this is well possible) that is used e.g. in
atmel_lcdfb_set_par() -> atmel_lcdfb_update_dma(). So atmel_lcdfb_fix
should better not live in .init memory?! Someone with more knowledge
about fbdev might want to take a look and decide if this justifies a
separate fix that should then be backported to stable, too?!
I don't think a backport this is necessary.
The "__initconst" atmel_lcdfb_fix struct was only copied in the
"__init" atmel_lcdfb_probe() function.
So, both were dropped at the same time in older kernels.
But info and so info->fix live longer than the probe function, don't
they? So a call to atmel_lcdfb_update_dma() should better not happen
when .init is already discarded, right?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help