Merge pull request #183 from PabloCastellano/weston

[weston] Added more patches
This commit is contained in:
Martijn Braam 2017-07-18 15:34:38 +02:00 committed by GitHub
commit 69b26e7d48
4 changed files with 85 additions and 12 deletions

View File

@ -1,7 +1,7 @@
From f09498910802a41ddfd4a55a3824bfc31a7db1bd Mon Sep 17 00:00:00 2001
From 77a099b85dea6aac096413f95d02479e75e5df44 Mon Sep 17 00:00:00 2001
From: Pablo Castellano <pablo@anche.no>
Date: Fri, 16 Jun 2017 21:35:34 +0200
Subject: [PATCH] compositor-fbdev: Added parameter --pixman-type
Subject: [PATCH 1/3] compositor-fbdev: Added parameter --pixman-type
This parameter allows to override the weston heuristic in
calculate_pixman_format() and specify a PIXMAN_TYPE_ value.
@ -76,12 +76,12 @@ index e80a504..b7d2c74 100644
+ /* Use pixman type specified by parameter */
+ if (pixman_type != PIXMAN_TYPE_OTHER) {
+ return PIXMAN_FORMAT(vinfo->bits_per_pixel, pixman_type,
+ vinfo->transp.length,
+ vinfo->red.length,
+ vinfo->green.length,
+ vinfo->blue.length);
+ vinfo->transp.length,
+ vinfo->red.length,
+ vinfo->green.length,
+ vinfo->blue.length);
+ }
+
+
/* Work out the format type from the offsets. We only support RGBA and
* ARGB at the moment. */
type = PIXMAN_TYPE_OTHER;
@ -131,7 +131,7 @@ index 8b7d900..268de31 100644
/** Callback used to configure input devices.
*
diff --git a/libweston/compositor.h b/libweston/compositor.h
index 50f7420..74cd832 100644
index 21c4046..fee8de0 100644
--- a/libweston/compositor.h
+++ b/libweston/compositor.h
@@ -235,6 +235,7 @@ struct weston_output {

View File

@ -0,0 +1,40 @@
From cfa2141a88a135968db9db517493e7b0ae7ab722 Mon Sep 17 00:00:00 2001
From: Pablo Castellano <pablo@anche.no>
Date: Mon, 17 Jul 2017 19:55:45 +0200
Subject: [PATCH 2/3] compositor-fbdev: Add support for ABGR
This is needed for Asus grouper (Google Nexus 7 2012)
https://github.com/postmarketOS/pmbootstrap/wiki/asus-grouper-%28Google-Nexus-7-2012%29
---
libweston/compositor-fbdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index b7d2c74..8158841 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -223,8 +223,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->blue.length);
}
- /* Work out the format type from the offsets. We only support RGBA and
- * ARGB at the moment. */
+ /* Work out the format type from the offsets. We only support RGBA,
+ * ARGB and ABGR at the moment. */
type = PIXMAN_TYPE_OTHER;
if ((vinfo->transp.offset >= vinfo->red.offset ||
@@ -236,6 +236,10 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->green.offset >= vinfo->blue.offset &&
vinfo->blue.offset >= vinfo->transp.offset)
type = PIXMAN_TYPE_RGBA;
+ else if (vinfo->transp.offset >= vinfo->blue.offset &&
+ vinfo->blue.offset >= vinfo->green.offset &&
+ vinfo->green.offset >= vinfo->red.offset)
+ type = PIXMAN_TYPE_ABGR;
if (type == PIXMAN_TYPE_OTHER)
return 0;
--
2.7.4

View File

@ -0,0 +1,26 @@
From 764885a2d850600d1e7ca50a54271ba2d42374d0 Mon Sep 17 00:00:00 2001
From: Pablo Castellano <pablo@anche.no>
Date: Mon, 17 Jul 2017 20:04:24 +0200
Subject: [PATCH 3/3] compositor-fbdev: print the pixman type guessed in
calculate_pixman_format()
---
libweston/compositor-fbdev.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libweston/compositor-fbdev.c b/libweston/compositor-fbdev.c
index 8158841..4ee3279 100644
--- a/libweston/compositor-fbdev.c
+++ b/libweston/compositor-fbdev.c
@@ -241,6 +241,8 @@ calculate_pixman_format(struct fb_var_screeninfo *vinfo,
vinfo->green.offset >= vinfo->red.offset)
type = PIXMAN_TYPE_ABGR;
+ weston_log("Type guessed: %i:\n", type);
+
if (type == PIXMAN_TYPE_OTHER)
return 0;
--
2.7.4

View File

@ -7,7 +7,7 @@
pkgname=weston
pkgver=9999
_pkgver=2.0.0
pkgrel=1
pkgrel=2
_libname=lib$pkgname
_libdir=$_libname-${_pkgver%%.*}
pkgdesc="The reference Wayland server"
@ -31,7 +31,13 @@ subpackages="$pkgname-dev $pkgname-doc $subpackages
$pkgname-clients $_libname-desktop:_libd $_libname:libs
$pkgname-xwayland $pkgname-desktop-x11:_x11:noarch
"
source="http://wayland.freedesktop.org/releases/$pkgname-$_pkgver.tar.xz no_0hz_refresh_rate.patch compositor-fbdev-Added-parameter-pixman-type.patch"
source="
http://wayland.freedesktop.org/releases/$pkgname-$_pkgver.tar.xz
no_0hz_refresh_rate.patch
0001-compositor-fbdev-Added-parameter-pixman-type.patch
0002-compositor-fbdev-Add-support-for-ABGR.patch
0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch
"
builddir="$srcdir/$pkgname-$_pkgver"
build() {
@ -127,7 +133,8 @@ _sub() {
mkdir -p "$subpkgdir"/$path || return 1
mv "$pkgdir"/$path/$name "$subpkgdir"/$path
}
sha512sums="085a0ba278932d41b50edd6e89db5df31cd6a1179c6cfe9a8ac5ac64e63b25cfc3da1ad8c587259273c3812593029b803867195e2d82b12b5cdd2588ac59acc6 weston-2.0.0.tar.xz
68d8485eed6a536924a8ebef7e0b45738330c38326fe659443c26d674f9538ec1c66033f83a7971914dcd72bc52333e3f55486c5a01e067e3f5fee8f5b489728 no_0hz_refresh_rate.patch
07d5a41344fe78e41eafd69757c23563d1436283c474402ca892c4129e1d2ca8deb4b27b3261473226848d27e1cfa4192fd7a706d1d9113f1bf855bf8993654d compositor-fbdev-Added-parameter-pixman-type.patch"
2daa68ee19f4e123d7f3148517c2afcd4df0f065815a0e28db38f301260cd833b7170060c46127e65a25021e2d814afb40fc0f2987cbb3ab5cd4f9dae778bc98 0001-compositor-fbdev-Added-parameter-pixman-type.patch
b4da8caa9373c2c23b9955c50b9d682de3ed17bb48974490d111fd366c7b2d0231a0a5b0e55fb6cb1b8d5fd9b435823f3d91ff625984ecfe3b779892f6ae8b08 0002-compositor-fbdev-Add-support-for-ABGR.patch
b5eb741ea8b6fcbd9de95e773fe0bf4ae6588ef57564f97a65aefc6c7ec29f1a01de9764a25672fd7c76c8ff514b497743cbaf279818123041c161c7a1e62bb6 0003-compositor-fbdev-print-the-pixman-type-guessed-in-ca.patch"