diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2010-03-02 10:41:42 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2010-03-02 18:38:34 +0100 |
commit | 5a1d574bbad4cb28f4e50fe771f865e246280600 (patch) | |
tree | e224ea5d5616e588c3ae65bf4858ac0465b19e6b /recipes | |
parent | 36550d9fa84a8f29b1018027da06e289a253fc2d (diff) |
linux-openmoko-2.6.32: add last 2 patches from DRM branch"
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'recipes')
3 files changed, 134 insertions, 1 deletions
diff --git a/recipes/linux/linux-openmoko-2.6.32/0012-Report-all-FB-modes-given-by-the-lower-levels.patch b/recipes/linux/linux-openmoko-2.6.32/0012-Report-all-FB-modes-given-by-the-lower-levels.patch new file mode 100644 index 0000000000..ac19dbd5d2 --- /dev/null +++ b/recipes/linux/linux-openmoko-2.6.32/0012-Report-all-FB-modes-given-by-the-lower-levels.patch @@ -0,0 +1,102 @@ +From f8448d2b08c1e2cfd0faba0e3f3c4c58e4ecaa9f Mon Sep 17 00:00:00 2001 +From: Thomas White <taw@bitwiz.org.uk> +Date: Mon, 1 Mar 2010 22:02:26 +0100 +Subject: [PATCH 12/13] Report all FB modes given by the lower levels + +Signed-off-by: Thomas White <taw@bitwiz.org.uk> +Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> +--- + drivers/mfd/glamo/glamo-display.c | 70 +++++++++++++++++++++---------------- + 1 files changed, 40 insertions(+), 30 deletions(-) + +diff --git a/drivers/mfd/glamo/glamo-display.c b/drivers/mfd/glamo/glamo-display.c +index a384c8b..bc3a2ea 100644 +--- a/drivers/mfd/glamo/glamo-display.c ++++ b/drivers/mfd/glamo/glamo-display.c +@@ -456,43 +456,53 @@ static void glamo_connector_destroy(struct drm_connector *connector) + + static int glamo_connector_get_modes(struct drm_connector *connector) + { +- struct drm_display_mode *mode; + struct glamo_fb_platform_data *fb_info; + struct glamo_output *goutput = to_glamo_output(connector); + struct glamodrm_handle *gdrm = goutput->gdrm; ++ int i; + + /* Dig out the record which will tell us about the hardware */ + fb_info = gdrm->glamo_core->pdata->fb_data; + +- mode = drm_mode_create(connector->dev); +- if (!mode) +- return 0; +- /* Fill in 'mode' here */ +- mode->type = DRM_MODE_TYPE_DEFAULT | DRM_MODE_TYPE_PREFERRED; +- +- /* Convert framebuffer timings into KMS timings */ +- mode->clock = 1000000000UL / fb_info->modes[0].pixclock; /* ps -> kHz */ +- mode->clock *= 1000; /* kHz -> Hz */ +- mode->hdisplay = fb_info->modes[0].xres; +- mode->hsync_start = fb_info->modes[0].right_margin + mode->hdisplay; +- mode->hsync_end = mode->hsync_start + fb_info->modes[0].hsync_len; +- mode->htotal = mode->hsync_end + fb_info->modes[0].left_margin; +- mode->hskew = 0; +- +- mode->vdisplay = fb_info->modes[0].yres; +- mode->vsync_start = fb_info->modes[0].lower_margin + mode->vdisplay; +- mode->vsync_end = mode->vsync_start + fb_info->modes[0].vsync_len; +- mode->vtotal = mode->vsync_end + fb_info->modes[0].upper_margin; +- mode->vscan = 0; +- +- /* Physical size */ +- mode->width_mm = fb_info->width; +- mode->height_mm = fb_info->height; +- +- drm_mode_set_name(mode); +- drm_mode_probed_add(connector, mode); +- +- return 1; /* one mode, for now */ ++ for ( i=0; i<fb_info->num_modes; i++ ) { ++ ++ struct drm_display_mode *mode; ++ ++ mode = drm_mode_create(connector->dev); ++ if ( !mode ) continue; ++ ++ mode->type = DRM_MODE_TYPE_DEFAULT | DRM_MODE_TYPE_PREFERRED; ++ ++ /* Convert framebuffer timings into KMS timings. ++ * First: ps -> kHz */ ++ mode->clock = 1000000000UL / fb_info->modes[i].pixclock; ++ mode->clock *= 1000; /* then kHz -> Hz */ ++ mode->hdisplay = fb_info->modes[i].xres; ++ mode->hsync_start = fb_info->modes[i].right_margin ++ + mode->hdisplay; ++ mode->hsync_end = mode->hsync_start ++ + fb_info->modes[i].hsync_len; ++ mode->htotal = mode->hsync_end + fb_info->modes[i].left_margin; ++ mode->hskew = 0; ++ ++ mode->vdisplay = fb_info->modes[i].yres; ++ mode->vsync_start = fb_info->modes[i].lower_margin ++ + mode->vdisplay; ++ mode->vsync_end = mode->vsync_start ++ + fb_info->modes[i].vsync_len; ++ mode->vtotal = mode->vsync_end + fb_info->modes[i].upper_margin; ++ mode->vscan = 0; ++ ++ /* Physical size */ ++ mode->width_mm = fb_info->width; ++ mode->height_mm = fb_info->height; ++ ++ drm_mode_set_name(mode); ++ drm_mode_probed_add(connector, mode); ++ ++ } ++ ++ return fb_info->num_modes; + } + + +-- +1.7.0 + diff --git a/recipes/linux/linux-openmoko-2.6.32/0013-Change-connector-type-to-LVDS.patch b/recipes/linux/linux-openmoko-2.6.32/0013-Change-connector-type-to-LVDS.patch new file mode 100644 index 0000000000..1b8c653607 --- /dev/null +++ b/recipes/linux/linux-openmoko-2.6.32/0013-Change-connector-type-to-LVDS.patch @@ -0,0 +1,29 @@ +From 3f1154d1b763f981791ad54987e61d31bde43ec7 Mon Sep 17 00:00:00 2001 +From: Thomas White <taw@bitwiz.org.uk> +Date: Mon, 1 Mar 2010 22:07:57 +0100 +Subject: [PATCH 13/13] Change connector type to LVDS + +Not certain that this exactly describes what it is, and too lazy to check, but for sure +it's a better description than "Unknown". + +Signed-off-by: Thomas White <taw@bitwiz.org.uk> +--- + drivers/mfd/glamo/glamo-display.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/drivers/mfd/glamo/glamo-display.c b/drivers/mfd/glamo/glamo-display.c +index bc3a2ea..5f04697 100644 +--- a/drivers/mfd/glamo/glamo-display.c ++++ b/drivers/mfd/glamo/glamo-display.c +@@ -795,7 +795,7 @@ int glamo_display_init(struct drm_device *dev) + + /* Initialise the connector */ + drm_connector_init(dev, connector, &glamo_connector_funcs, +- DRM_MODE_CONNECTOR_Unknown); ++ DRM_MODE_CONNECTOR_LVDS); + drm_sysfs_connector_add(connector); + connector->interlace_allowed = 0; + connector->doublescan_allowed = 0; +-- +1.7.0 + diff --git a/recipes/linux/linux-openmoko-2.6.32_git.bb b/recipes/linux/linux-openmoko-2.6.32_git.bb index 52988280dd..c4369ac506 100644 --- a/recipes/linux/linux-openmoko-2.6.32_git.bb +++ b/recipes/linux/linux-openmoko-2.6.32_git.bb @@ -8,7 +8,7 @@ KERNEL_RELEASE="2.6.32.9" SRCREV = "14be1091928fcce66812a85129768fb253b36420" OEV = "oe1" PV = "${KERNEL_RELEASE}-${OEV}+gitr${SRCREV}" -PR = "r2" +PR = "r3" SRC_URI = "\ git://git.openmoko.org/git/kernel.git;protocol=git;branch=om-gta02-2.6.32 \ @@ -28,6 +28,8 @@ SRC_URI = "\ file://0009-A-couple-of-GEM-refcounting-fixes.patch;patch=1 \ file://0010-Simplify-the-JBT6k74-driver.patch;patch=1 \ file://0011-Don-t-choke-if-userspace-provides-a-pixel-clock-valu.patch;patch=1 \ + file://0012-Report-all-FB-modes-given-by-the-lower-levels.patch;patch=1 \ + file://0013-Change-connector-type-to-LVDS.patch;patch=1 \ " SRC_URI[stablepatch.md5sum] = "7f615dd3b4a3b19fb86e479996a2deb5" |