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

drm/panel: boe-th101mb31ig002 : using drm_connector_helper_get_modes_fixed()

Use public functions( drm_connector_helper_get_modes_fixed()) to
get porch parameters.

Signed-off-by: Zhaoxiong Lv <lvzhaoxiong@huaqin.corp-partner.google.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240723062615.14796-3-lvzhaoxiong@huaqin.corp-partner.google.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240723062615.14796-3-lvzhaoxiong@huaqin.corp-partner.google.com

authored by

Zhaoxiong Lv and committed by
Neil Armstrong
70889913 c60ca14b

+2 -17
+2 -17
drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
··· 16 16 #include <drm/drm_mipi_dsi.h> 17 17 #include <drm/drm_modes.h> 18 18 #include <drm/drm_panel.h> 19 + #include <drm/drm_probe_helper.h> 19 20 20 21 struct boe_th101mb31ig002; 21 22 ··· 314 313 struct boe_th101mb31ig002, 315 314 panel); 316 315 const struct drm_display_mode *desc_mode = ctx->desc->modes; 317 - struct drm_display_mode *mode; 318 - 319 - mode = drm_mode_duplicate(connector->dev, desc_mode); 320 - if (!mode) { 321 - dev_err(panel->dev, "Failed to add mode %ux%u@%u\n", 322 - desc_mode->hdisplay, desc_mode->vdisplay, 323 - drm_mode_vrefresh(desc_mode)); 324 - return -ENOMEM; 325 - } 326 - 327 - drm_mode_set_name(mode); 328 316 329 317 connector->display_info.bpc = 8; 330 - connector->display_info.width_mm = mode->width_mm; 331 - connector->display_info.height_mm = mode->height_mm; 332 - 333 318 /* 334 319 * TODO: Remove once all drm drivers call 335 320 * drm_connector_set_orientation_from_panel() 336 321 */ 337 322 drm_connector_set_panel_orientation(connector, ctx->orientation); 338 323 339 - drm_mode_probed_add(connector, mode); 340 - 341 - return 1; 324 + return drm_connector_helper_get_modes_fixed(connector, desc_mode); 342 325 } 343 326 344 327 static enum drm_panel_orientation