}
DRM_DEBUG_KMS("\n");
- max_width = fb_helper->fb->width;
- max_height = fb_helper->fb->height;
+ /* Use max size from mode_config instead of fb size to enable inclusion
+ * of higher resolution modes for external display.
+ * Local display is configured with fb size.
+ */
+ max_width = fb_helper->dev->mode_config.max_width;
+ max_height = fb_helper->dev->mode_config.max_height;
+
bpp_sel = fb_helper->fb->bits_per_pixel;
count = drm_fb_helper_probe_connector_modes(fb_helper, max_width,
struct psb_fbdev * psb_fbdev = (struct psb_fbdev *)helper;
int new_fb = 0;
int ret;
+ struct drm_device *dev = helper->dev;
+ struct drm_display_mode *dsi_mode = NULL;
DRM_DEBUG("%s\n", __FUNCTION__);
+ /* Mode management between local and external displays:
+ * Frame buffer and surface dimensions will always be equal to
+ * local display mode value.
+ */
+
+ if (sizes != NULL) {
+ /* local display desired mode */
+ dsi_mode = helper->crtc_info[0].desired_mode;
+ if (dsi_mode) {
+ DRM_INFO("setting fb and surface dimensions to %dx%d\n",
+ dsi_mode->hdisplay, dsi_mode->vdisplay);
+ sizes->fb_width = dsi_mode->hdisplay;
+ sizes->fb_height = dsi_mode->vdisplay;
+ sizes->surface_width = dsi_mode->hdisplay;
+ sizes->surface_height = dsi_mode->vdisplay;
+ }
+ }
+
if(!helper->fb) {
ret = psbfb_create(psb_fbdev, sizes);
if(ret) {