Bug fix CrownBay resolution issue
authorWang Quanxian <quanxian.wang@intel.com>
Fri, 6 Jul 2012 11:25:50 +0000 (19:25 +0800)
committerOssama Othman <ossama.othman@intel.com>
Fri, 19 Apr 2013 22:59:49 +0000 (15:59 -0700)
  Use the first mode as preferred mode in weston

Signed-Off-By Quanxian Wang <quanxian.wang@intel.com>

packaging/weston-mode-nextcom.patch
packaging/weston.changes

index f57ad34..4520c2b 100644 (file)
@@ -1,15 +1,5 @@
-commit 36d106aa5ad0254039557a6f69fbc5ba045a7971
-Author: Wang Quanxian <quanxian.wang@intel.com>
-Date:   Fri Jul 6 15:53:08 2012 +0800
-
-    Add default mode for NexCom and Crossiville
-       The platform has no EDID information. The mode could not be gotten
-       from drm interfaces.
-    
-    Signed-Off-By Wang Quanxian <quanxian.wang@intel.com>
-
 diff --git a/src/compositor-drm.c b/src/compositor-drm.c
-index 4dffa1d..b0a81be 100644
+index 4dffa1d..6239f91 100644
 --- a/src/compositor-drm.c
 +++ b/src/compositor-drm.c
 @@ -143,6 +143,16 @@ struct drm_sprite {
@@ -29,16 +19,7 @@ index 4dffa1d..b0a81be 100644
  static int
  surface_is_primary(struct weston_compositor *ec, struct weston_surface *es)
  {
-@@ -1294,7 +1304,7 @@ create_output_for_connector(struct drm_compositor *ec,
-       struct drm_mode *drm_mode, *next;
-       struct weston_mode *m, *preferred, *current;
-       drmModeEncoder *encoder;
--      drmModeModeInfo crtc_mode;
-+      drmModeModeInfo crtc_mode = builtin_800x480;
-       drmModeCrtc *crtc;
-       int i, ret;
-@@ -1344,13 +1354,23 @@ create_output_for_connector(struct drm_compositor *ec,
+@@ -1344,13 +1354,30 @@ create_output_for_connector(struct drm_compositor *ec,
        drmModeFreeEncoder(encoder);
        if (crtc == NULL)
                goto err_free;
@@ -46,14 +27,21 @@ index 4dffa1d..b0a81be 100644
 +
 +      /* if don't get mode from drm driver, use default 800x480 */
 +        if (crtc->mode.clock != 0)
++      {
 +              crtc_mode = crtc->mode;
++      } else {
++              if (connector->count_modes == 0)
++                      crtc_mode = builtin_800x480;
++              else
++                      crtc_mode = connector->modes[0];
++      }
 +
        drmModeFreeCrtc(crtc);
  
 -      for (i = 0; i < connector->count_modes; i++) {
 -              ret = drm_output_add_mode(output, &connector->modes[i]);
 +      if (connector->count_modes == 0) {
-+              ret = drm_output_add_mode(output, &builtin_800x480);
++              ret = drm_output_add_mode(output, &crtc_mode);
                if (ret)
                        goto err_free;
 +      }else{
index 86cccad..a7e030c 100644 (file)
@@ -1,4 +1,8 @@
 * Fri Jul  6 2012 Quanxian Wang <quanxian.wang@intel.com> 0.94.90@6310503
+- Bug fix CrownBay resolution issue
+  Use the first mode as preferred mode in weston
+
+* Fri Jul  6 2012 Quanxian Wang <quanxian.wang@intel.com> 0.94.90@6310503
 - Add default mode for NexCom and Crossiville
   The platform has no EDID information. The mode could not be gotten
   from drm interfaces.