WIP (temporary): cyan band after video_clear in video_post_probe

This commit is contained in:
vhaudiquet
2026-08-30 14:47:16 +02:00
parent 1fb1f5f95e
commit 46283a7722
+35 -21
View File
@@ -632,12 +632,35 @@ void video_set_white_on_black(struct udevice *dev, bool white_on_black)
}
}
/* TEMPORARY bring-up diagnostics (krane Round 20) — do not upstream:
* paint a band into the live depthcharge scanout. */
static void krane_diag_band(u32 y0, u32 rows, u32 color)
{
u32 base = readl((void __iomem *)0x14008f40);
u32 *p, n = rows * 1200, i;
if (base < 0x40000000)
return;
if (dcache_status())
mmu_map_region(base, 0x8ca000, false);
p = (u32 *)(uintptr_t)(base + (u64)y0 * 4800);
for (i = 0; i < n; i++)
p[i] = color;
if (dcache_status())
flush_dcache_range((uintptr_t)p, (uintptr_t)(p + n));
}
/* end TEMPORARY diagnostics */
/* Set up the display ready for use */
static int video_post_probe(struct udevice *dev)
{
struct video_uc_plat *plat = dev_get_uclass_plat(dev);
struct video_uc_priv *uc_priv = uclass_get_priv(dev->uclass);
struct video_priv *priv = dev_get_uclass_priv(dev);
char name[30], drv[15], *str;
const char *drv_name = drv;
struct udevice *cons;
@@ -676,7 +699,14 @@ static int video_post_probe(struct udevice *dev)
priv->white_on_black = CONFIG_IS_ENABLED(SYS_WHITE_ON_BLACK);
/* Set up colors */
if (!CONFIG_IS_ENABLED(NO_FB_CLEAR))
video_clear(dev);
/* TEMPORARY bring-up diagnostics (krane Round 20) — do not upstream:
* cyan band right after the clear: if visible, the clear and the
* fb mapping work and death happened later in this function. */
krane_diag_band(260, 60, 0x00ffff00);
/* end TEMPORARY diagnostics */
video_set_default_colors(dev, false);
if (!CONFIG_IS_ENABLED(NO_FB_CLEAR))
@@ -740,26 +770,10 @@ static int video_post_probe(struct udevice *dev)
uc_priv->cyc_active = true;
}
/* TEMPORARY bring-up diagnostics (krane Round 19) — do not upstream:
* paint a white band right after the vidconsole is up, so a crash
* between the framebuffer clear and the banner can be seen. */
{
u32 base = readl((void __iomem *)0x14008f40);
if (base >= 0x40000000) {
u32 *p;
int i;
if (dcache_status())
mmu_map_region(base, 0x8ca000, false);
p = (u32 *)(uintptr_t)(base + 200 * 4800);
for (i = 0; i < 60 * 1200; i++)
p[i] = 0x00ffffff;
if (dcache_status())
flush_dcache_range((uintptr_t)p,
(uintptr_t)(p + 60 * 1200));
}
}
/* TEMPORARY bring-up diagnostics (krane Round 20) — do not upstream:
* paint a white band once the vidconsole is up, so a death between
* the framebuffer clear and the banner can be localized. */
krane_diag_band(200, 60, 0x00ffffff);
/* end TEMPORARY diagnostics */
return 0;