@@ -312,15 +312,14 @@ static int boe_th101mb31ig002_get_modes(struct drm_panel *panel,
struct boe_th101mb31ig002 *ctx = container_of(panel,
struct boe_th101mb31ig002,
panel);
+ const struct drm_display_mode *desc_mode = ctx->desc->modes;
struct drm_display_mode *mode;
- mode = drm_mode_duplicate(connector->dev,
- &boe_th101mb31ig002_default_mode);
+ mode = drm_mode_duplicate(connector->dev, desc_mode);
if (!mode) {
dev_err(panel->dev, "Failed to add mode %ux%u@%u\n",
- boe_th101mb31ig002_default_mode.hdisplay,
- boe_th101mb31ig002_default_mode.vdisplay,
- drm_mode_vrefresh(&boe_th101mb31ig002_default_mode));
+ desc_mode->hdisplay, desc_mode->vdisplay,
+ drm_mode_vrefresh(desc_mode));
return -ENOMEM;
}