diff -rupN linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c --- linux.orig/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-17 03:47:11.674388741 +0000 +++ linux/drivers/gpu/drm/panel/panel-elida-kd35t133.c 2024-01-17 04:02:49.500183606 +0000 @@ -107,6 +107,8 @@ static int kd35t133_unprepare(struct drm regulator_disable(ctx->iovcc); regulator_disable(ctx->vdd); + gpiod_set_value_cansleep(ctx->reset_gpio, 1); + ctx->prepared = false; return 0; diff -rupN linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c --- linux.orig/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-17 03:47:11.678388835 +0000 +++ linux/drivers/gpu/drm/panel/panel-newvision-nv3051d.c 2024-01-17 04:02:49.500183606 +0000 @@ -28,6 +28,7 @@ struct nv3051d_panel_info { unsigned int num_modes; u16 width_mm, height_mm; u32 bus_flags; + unsigned long mode_flags; }; struct panel_nv3051d { @@ -385,15 +386,7 @@ static int panel_nv3051d_probe(struct mi dsi->lanes = 4; dsi->format = MIPI_DSI_FMT_RGB888; - dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | - MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET; - - /* - * The panel in the RG351V is identical to the 353P, except it - * requires MIPI_DSI_CLOCK_NON_CONTINUOUS to operate correctly. - */ - if (of_device_is_compatible(dev->of_node, "anbernic,rg351v-panel")) - dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS; + dsi->mode_flags = ctx->panel_info->mode_flags; drm_panel_init(&ctx->panel, &dsi->dev, &panel_nv3051d_funcs, DRM_MODE_CONNECTOR_DSI); @@ -487,10 +480,24 @@ static const struct nv3051d_panel_info n .width_mm = 70, .height_mm = 57, .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET, +}; + +static const struct nv3051d_panel_info nv3051d_rg351v_info = { + .display_modes = nv3051d_rgxx3_modes, + .num_modes = ARRAY_SIZE(nv3051d_rgxx3_modes), + .width_mm = 70, + .height_mm = 57, + .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE, + .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | + MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET | + MIPI_DSI_CLOCK_NON_CONTINUOUS, }; static const struct of_device_id newvision_nv3051d_of_match[] = { { .compatible = "newvision,nv3051d", .data = &nv3051d_rgxx3_info }, + { .compatible = "anbernic,rg351v-panel", .data = &nv3051d_rg351v_info }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, newvision_nv3051d_of_match); diff -rupN linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c linux/drivers/gpu/drm/panel/panel-sitronix-st7703.c --- linux.orig/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-01-17 03:47:11.678388835 +0000 +++ linux/drivers/gpu/drm/panel/panel-sitronix-st7703.c 2024-01-17 04:03:24.432977809 +0000 @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include