Skip to contentSkip to conversation

video: simplefb: fix rot prop handling

PATCH In review Sam Day 4 participants 4 messages Jun 1 – Oct 22 Framebuffer layer

lore
Share & tools
lore

Sam Day

author
#0 lore raw

PATCH 1/1 video: simplefb: fix rot prop handling

If the simplefb node lacks a rot property (which would be most of them nowadays - it's not actually a valid prop according to kernel's simple-framebuffer schema), then the rot local is left uninitialized. This causes video_post_probe to fail to locate the vidconsoleN device later.

Strangely enough, simplefb has been working fine on arm64 targets. It wasn't until I tried simplefb on my arm32 device (samsung-expressltexx) that this issue manifested. AFAICT, ARM64 doesn't have something like -ftrivial-auto-var-init=zero enabled, so I suspect this has just been working entirely by coincidence until now. Computers are fun.

Fixes 91e9687b49e7 ("video: simplefb: modernise DT parsing")
---
 drivers/video/simplefb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/simplefb.c +1 -1
index 8d0772d4e51..ed8d4170cfc 100644
@@ -19,7 +19,7 @@ static int simple_video_probe(struct udevice *dev)
 	int ret;
 	fdt_addr_t base;
 	fdt_size_t size;
-	u32 width, height, stride, rot;
+	u32 width, height, stride, rot = 0;
 
 	base = dev_read_addr_size(dev, &size);
 	if (base == FDT_ADDR_T_NONE) {

---
base-commit: 30b77f6aa146c96b831cb4ece038130b655b6a41
change-id: 20260601-simplefb-rot-fix-7afa95d24118

Best regards,

Signature · 1 line
Sam Day <[email protected]>
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Sam Day

If the simplefb node lacks a rot property (which would be most of them nowadays - it's not actually a valid prop according to kernel's simple-framebuffer schema), then the rot local is left uninitialized. This causes video_post_probe to fail to locate the vidconsoleN device later.

Quoted 8 lines

Strangely enough, simplefb has been working fine on arm64 targets. It wasn't until I tried simplefb on my arm32 device (samsung-expressltexx) that this issue manifested. AFAICT, ARM64 doesn't have something like -ftrivial-auto-var-init=zero enabled, so I suspect this has just been working entirely by coincidence until now. Computers are fun.

Fixes 91e9687b49e7 ("video: simplefb: modernise DT parsing")
Quoted 23 lines
---
  drivers/video/simplefb.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/simplefb.c +1 -2
index 8d0772d4e51..ed8d4170cfc 100644
@@ -19,7 +19,7 @@ static int simple_video_probe(struct udevice *dev)
  	int ret;
  	fdt_addr_t base;
  	fdt_size_t size;
-	u32 width, height, stride, rot;
+	u32 width, height, stride, rot = 0;
 
  	base = dev_read_addr_size(dev, &size);
  	if (base == FDT_ADDR_T_NONE) {
 
---

base-commit: 30b77f6aa146c96b831cb4ece038130b655b6a41
change-id: 20260601-simplefb-rot-fix-7afa95d24118

Best regards,

Reviewed-by on v1 1/1
#2 lore raw
In reply to Sam Day
Quoted 14 lines · Sam Day

video: simplefb: fix rot prop handling

If the simplefb node lacks a rot property (which would be most of them nowadays - it's not actually a valid prop according to kernel's simple-framebuffer schema), then the rot local is left uninitialized. This causes video_post_probe to fail to locate the vidconsoleN device later.

Strangely enough, simplefb has been working fine on arm64 targets. It wasn't until I tried simplefb on my arm32 device (samsung-expressltexx) that this issue manifested. AFAICT, ARM64 doesn't have something like -ftrivial-auto-var-init=zero enabled, so I suspect this has just been working entirely by coincidence until now. Computers are fun.

Quoted 6 lines
Fixes 91e9687b49e7 ("video: simplefb: modernise DT parsing")

drivers/video/simplefb.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
#3 lore raw
In reply to Sam Day
Quoted 6 lines · Sam Day

If the simplefb node lacks a rot property (which would be most of them nowadays - it's not actually a valid prop according to kernel's simple-framebuffer schema), then the rot local is left uninitialized. This causes video_post_probe to fail to locate the vidconsoleN device later.

Quoted 7 lines

Strangely enough, simplefb has been working fine on arm64 targets. It wasn't until I tried simplefb on my arm32 device (samsung-expressltexx) that this issue manifested. AFAICT, ARM64 doesn't have something like -ftrivial-auto-var-init=zero enabled, so I suspect this has just been working entirely by coincidence until now. Computers are fun.

[...]

Applied to u-boot/main, thanks!

[1/1] video: simplefb: fix rot prop handling

      commit: 50a15eee8b100126ebe07c79af0aa22da1206fd0
Signature · 1 line
Tom