From 4d8087badfc4dd9f8ff0f52f185c01fc5318a11e Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 13 Jun 2026 13:47:35 -0400 Subject: [PATCH] fix: apply DSI burst mode fix as kernel patch overlay --- hosts/uconsole-cm5/configuration.nix | 10 ++++++++ .../patches/0008-dsi-burst-fix.patch | 23 +++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 hosts/uconsole-cm5/patches/0008-dsi-burst-fix.patch diff --git a/hosts/uconsole-cm5/configuration.nix b/hosts/uconsole-cm5/configuration.nix index 5a1b679..c5a7c6d 100644 --- a/hosts/uconsole-cm5/configuration.nix +++ b/hosts/uconsole-cm5/configuration.nix @@ -25,4 +25,14 @@ # Firmware hardware.enableRedistributableFirmware = true; + + # DSI burst mode fix: remove SYNC_PULSE flag from CWU50 panel driver + # BURST and SYNC_PULSE are mutually exclusive per MIPI DSI spec; + # having both set causes display corruption on CM5 + boot.kernelPatches = lib.mkAfter [ + { + name = "0008-dsi-burst-fix"; + patch = ./patches/0008-dsi-burst-fix.patch; + } + ]; } diff --git a/hosts/uconsole-cm5/patches/0008-dsi-burst-fix.patch b/hosts/uconsole-cm5/patches/0008-dsi-burst-fix.patch new file mode 100644 index 0000000..03786ad --- /dev/null +++ b/hosts/uconsole-cm5/patches/0008-dsi-burst-fix.patch @@ -0,0 +1,23 @@ +diff --git a/drivers/gpu/drm/panel/panel-cwu50.c b/drivers/gpu/drm/panel/panel-cwu50.c +index 1111111..2222222 100644 +--- a/drivers/gpu/drm/panel/panel-cwu50.c ++++ b/drivers/gpu/drm/panel/panel-cwu50.c +@@ -1072,7 +1072,7 @@ static int cwu50_probe(struct mipi_dsi_device *dsi) + + dsi->lanes = 4; + dsi->format = MIPI_DSI_FMT_RGB888; +- dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | MIPI_DSI_MODE_VIDEO_SYNC_PULSE; ++ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST; + + ctx->id_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_IN); + if (IS_ERR(ctx->id_gpio)) { +@@ -1706,7 +1706,7 @@ static int cwu50_cm3_probe(struct mipi_dsi_device *dsi) + dsi->lanes = 4; + dsi->format = MIPI_DSI_FMT_RGB888; + dsi->mode_flags = MIPI_DSI_MODE_VIDEO | +- MIPI_DSI_MODE_VIDEO_BURST | +- MIPI_DSI_MODE_VIDEO_SYNC_PULSE; ++ MIPI_DSI_MODE_VIDEO_BURST; + + ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); + if (IS_ERR(ctx->reset_gpio)) {