Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panel: sitronix-st7789v: avoid hardcoding panel size

Move the panel size information to the mode struct, so
that different panel sizes can be specified depending
on the panel type.

Reviewed-by: Michael Riesch <michael.riesch@wolfvision.net>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230714013756.1546769-10-sre@kernel.org

authored by

Sebastian Reichel and committed by
Neil Armstrong
4098d186 9b4454fa

+4 -2
+4 -2
drivers/gpu/drm/panel/panel-sitronix-st7789v.c
··· 163 163 .vsync_start = 320 + 8, 164 164 .vsync_end = 320 + 8 + 4, 165 165 .vtotal = 320 + 8 + 4 + 4, 166 + .width_mm = 61, 167 + .height_mm = 103, 166 168 }; 167 169 168 170 static const struct st7789_panel_info default_panel = { ··· 190 188 mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; 191 189 drm_mode_probed_add(connector, mode); 192 190 193 - connector->display_info.width_mm = 61; 194 - connector->display_info.height_mm = 103; 191 + connector->display_info.width_mm = ctx->info->mode->width_mm; 192 + connector->display_info.height_mm = ctx->info->mode->height_mm; 195 193 196 194 return 1; 197 195 }