struct drm_display_mode *native_mode = &amdgpu_encoder->native_mode;
int i;
int n;
- static const struct mode_size {
+ struct mode_size {
+ char name[DRM_DISPLAY_MODE_LEN];
int w;
int h;
} common_modes[] = {
- { 640, 480},
- { 800, 600},
- {1024, 768},
- {1280, 720},
- {1280, 800},
- {1280, 1024},
- {1440, 900},
- {1680, 1050},
- {1600, 1200},
- {1920, 1080},
- {1920, 1200}
+ { "640x480", 640, 480},
+ { "800x600", 800, 600},
+ { "1024x768", 1024, 768},
+ { "1280x720", 1280, 720},
+ { "1280x800", 1280, 800},
+ {"1280x1024", 1280, 1024},
+ { "1440x900", 1440, 900},
+ {"1680x1050", 1680, 1050},
+ {"1600x1200", 1600, 1200},
+ {"1920x1080", 1920, 1080},
+ {"1920x1200", 1920, 1200}
};
n = ARRAY_SIZE(common_modes);
mode = drm_cvt_mode(dev, common_modes[i].w, common_modes[i].h, 60, false, false, false);
if (!mode)
return;
+ strscpy(mode->name, common_modes[i].name, DRM_DISPLAY_MODE_LEN);
drm_mode_probed_add(connector, mode);
}