video: offb: Pass actual name in offb_init_palette_hacks
Subsystems (2)
PATCH 1/1 video: offb: Pass actual name in offb_init_palette_hacks
This is a partial revert of commit 5c63e407aaab ("fbdev: Convert to using %pOFn instead of device_node.name"). This is the minimal work to get a Mac Mini G4 back to a bootable state. The function offb_init_palette_hacks would need to handle the case where name has been set to NULL.
--- drivers/video/fbdev/offb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/offb.c +1 -1
@@ -648,7 +648,7 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)/* kludge for valkyrie */ if (strcmp (dp->name,"valkyrie" ) ==0 ) address +=0x1000 ; -offb_init_fb (no_real_node ?"bootx" :NULL , +offb_init_fb (no_real_node ?"bootx" : dp->name, width, height, depth, pitch, address, foreign_endian, no_real_node ?NULL : dp); }
Signature · 1 line
2.19.2
Rob, any comment ?
Quoted 31 lines · Mathieu Malaterre
This is a partial revert of commit
5c63e407aaab("fbdev: Convert to using %pOFn instead of device_node.name"). This is the minimal work to get a Mac Mini G4 back to a bootable state. The functionoffb_init_palette_hackswould need to handle the case wherenamehas been set to NULL.Cc Rob Herring <[email protected]>Fixes 5c63e407aaab ("fbdev: Convert to using %pOFn instead of device_node.name")Cc [email protected] # v4.19+Signed-off-by Mathieu Malaterre <[email protected]>--- drivers/video/fbdev/offb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/video/fbdev/offb.c +1
-2@@ -648,7 +648,7 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)/* kludge for valkyrie */ if (strcmp (dp->name,"valkyrie" ) ==0 ) address +=0x1000 ; -offb_init_fb (no_real_node ?"bootx" :NULL , +offb_init_fb (no_real_node ?"bootx" : dp->name, width, height, depth, pitch, address, foreign_endian, no_real_node ?NULL : dp); } --2.19.2
Patch is far from perfect but was tested also by: Elimar Riesebieter [email protected]
Quoted 19 lines · Mathieu Malaterre
Rob, any comment ?
Quoted 9 lines · Mathieu Malaterre
This is a partial revert of commit
5c63e407aaab("fbdev: Convert to using %pOFn instead of device_node.name"). This is the minimal work to get a Mac Mini G4 back to a bootable state. The functionoffb_init_palette_hackswould need to handle the case wherenamehas been set to NULL.Cc Rob Herring <[email protected]>Fixes 5c63e407aaab ("fbdev: Convert to using %pOFn instead ofdevice_node.name")
Quoted 6 lines
Cc [email protected] # v4.19+Signed-off-by Mathieu Malaterre <[email protected]>--- drivers/video/fbdev/offb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 18 lines
drivers/video/fbdev/offb.c static void __init offb_init_nodriver(struct
Quoted 5 lines
drivers/video/fbdev/offb.c +0
-0@@ -648,7 +648,7 @@ static void __init offb_init_nodriver(struct
device_node*dp, intno_real_node)Quoted 11 lines
drivers/video/fbdev/offb.c +1
-2/* kludge for valkyrie */ if (strcmp (dp->name,"valkyrie" ) ==0 ) address +=0x1000 ; -offb_init_fb (no_real_node ?"bootx" :NULL , +offb_init_fb (no_real_node ?"bootx" : dp->name, width, height, depth, pitch, address, foreign_endian, no_real_node ?NULL : dp); } --2.19.2
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Bartlomiej,
Do you need an Acked-by from Rob, or can you take it in the next round of fixes for v4.20 ?
Just to repeat myself, previous code would call offb_init_palette_hacks(), which in turn would do:
if (dp && !strncmp(name, "ATY,Rage128", 11)) {with name=NULL.
Thanks
Quoted 35 lines · Mathieu Malaterre
Rob, any comment ?
Quoted 31 lines · Mathieu Malaterre
This is a partial revert of commit
5c63e407aaab("fbdev: Convert to using %pOFn instead of device_node.name"). This is the minimal work to get a Mac Mini G4 back to a bootable state. The functionoffb_init_palette_hackswould need to handle the case wherenamehas been set to NULL.Cc Rob Herring <[email protected]>Fixes 5c63e407aaab ("fbdev: Convert to using %pOFn instead of device_node.name")Cc [email protected] # v4.19+Signed-off-by Mathieu Malaterre <[email protected]>--- drivers/video/fbdev/offb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/video/fbdev/offb.c +1
-2@@ -648,7 +648,7 @@ static void __init offb_init_nodriver(struct device_node *dp, int no_real_node)/* kludge for valkyrie */ if (strcmp (dp->name,"valkyrie" ) ==0 ) address +=0x1000 ; -offb_init_fb (no_real_node ?"bootx" :NULL , +offb_init_fb (no_real_node ?"bootx" : dp->name, width, height, depth, pitch, address, foreign_endian, no_real_node ?NULL : dp); } --2.19.2
Quoted 5 lines · Mathieu Malaterre
Bartlomiej,
Do you need an Acked-by from Rob, or can you take it in the next round of fixes for v4.20 ?
Sorry, I missed this.
Quoted 7 lines
Just to repeat myself, previous code would call
offb_init_palette_hacks(), which in turn would do:if (dp && !strncmp(name, "ATY,Rage128", 11)) {with name=NULL.
I prefer to fix this properly using node name helper in offb_init_palette_hacks(). I'll send a patch shortly.
Rob