From: Wang Quanxian Date: Fri, 6 Jul 2012 09:04:27 +0000 (+0800) Subject: Add default mode for NexCom and Crossiville X-Git-Tag: accepted/2.0alpha-wayland/20130424.214608~53 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=6b9ba0784a3253d99a67223a31d61e5f14b4c3e6;p=profile%2Fivi%2Fweston.git Add default mode for NexCom and Crossiville The platform has no EDID information. The mode could not be gotten from emgd driver interfaces. Signed-Off-By Wang Quanxian --- diff --git a/packaging/weston-mode-nextcom.patch b/packaging/weston-mode-nextcom.patch new file mode 100644 index 0000000..f57ad34 --- /dev/null +++ b/packaging/weston-mode-nextcom.patch @@ -0,0 +1,67 @@ +commit 36d106aa5ad0254039557a6f69fbc5ba045a7971 +Author: Wang Quanxian +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 + +diff --git a/src/compositor-drm.c b/src/compositor-drm.c +index 4dffa1d..b0a81be 100644 +--- a/src/compositor-drm.c ++++ b/src/compositor-drm.c +@@ -143,6 +143,16 @@ struct drm_sprite { + uint32_t formats[]; + }; + ++static drmModeModeInfo builtin_800x480 = { ++ 33750, /* clock */ ++ 800, 864, 976, 1088, 0, ++ 480, 486, 494, 517, 0, ++ 59920, ++ DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC, ++ 0, ++ "800x480" ++}; ++ + 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, + drmModeFreeEncoder(encoder); + if (crtc == NULL) + goto err_free; +- crtc_mode = crtc->mode; ++ ++ /* if don't get mode from drm driver, use default 800x480 */ ++ if (crtc->mode.clock != 0) ++ crtc_mode = crtc->mode; ++ + 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); + if (ret) + goto err_free; ++ }else{ ++ for (i = 0; i < connector->count_modes; i++) { ++ ret = drm_output_add_mode(output, &connector->modes[i]); ++ if (ret) ++ goto err_free; ++ } + } + + preferred = NULL; diff --git a/packaging/weston.changes b/packaging/weston.changes index bd27ee6..86cccad 100644 --- a/packaging/weston.changes +++ b/packaging/weston.changes @@ -1,3 +1,8 @@ +* Fri Jul 6 2012 Quanxian Wang 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. + * Wed Jul 04 2012 Rob Bradford 0.94.90@6310503 - Update to latest snapshot diff --git a/packaging/weston.spec b/packaging/weston.spec index f11fba3..8130d3b 100644 --- a/packaging/weston.spec +++ b/packaging/weston.spec @@ -33,6 +33,11 @@ BuildRequires: pam-devel BuildRequires: libjpeg-devel Requires: xkeyboard-config +# +# Special patch for Tizen +# +Patch1: weston-mode-nextcom.patch + %description Weston compositor @@ -47,6 +52,11 @@ Adds a simple cursor theme to the default cursor theme %prep %setup -q -n %{name}-%{version} +# +# Apply patches +# +%patch1 -p1 + %build %autogen --disable-setuid-install