summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorLucas Stach <l.stach@pengutronix.de>2017-06-28 16:55:29 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-06-30 14:21:21 +0200
commit4c7e8aa0082fa222ce52f216938f795b3848c105 (patch)
tree81704715631d7625cc66dacdd31cf34f23c9c399 /patches
parentf3ac6873492af7ab5779f580e513721926c5676f (diff)
downloadptxdist-4c7e8aa0082fa222ce52f216938f795b3848c105.tar.gz
ptxdist-4c7e8aa0082fa222ce52f216938f795b3848c105.tar.xz
glmark2: version bump to g9b1070fe
Also fix the DRM backend to be able to run without a currently set mode. Patch is on its way to upstream: https://github.com/glmark2/glmark2/pull/34 Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches')
-rw-r--r--patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch28
-rw-r--r--patches/glmark2-2017-02-10-g7215c0f/series4
-rw-r--r--patches/glmark2-2017-06-23-g9b1070fe/0001-NativeStateDRM-fix-running-without-current-mode.patch52
-rw-r--r--patches/glmark2-2017-06-23-g9b1070fe/series4
4 files changed, 56 insertions, 32 deletions
diff --git a/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch b/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
deleted file mode 100644
index 7d51f60ee..000000000
--- a/patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Markus Niebel <Markus.Niebel@tq-group.com>
-Date: Tue, 7 Mar 2017 13:53:33 +0100
-Subject: [PATCH] NativeStateDRM: add imx-drm driver support
-
-originated from buildroot commit a10b15ebeb5fd82fdb0530d485095f5800103a49
-
-glmark2: add imx-drm driver support
-Upstream status: pending
-https://github.com/glmark2/glmark2/pull/29
-
-Signed-off-by: Markus Niebel <Markus.Niebel@tq-group.com>
-Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
----
- src/native-state-drm.cpp | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp
-index 4df75ec7d083..454a24d898ff 100644
---- a/src/native-state-drm.cpp
-+++ b/src/native-state-drm.cpp
-@@ -201,6 +201,7 @@ NativeStateDRM::init()
- // driver (udev?).
- static const char* drm_modules[] = {
- "i915",
-+ "imx-drm",
- "nouveau",
- "radeon",
- "vmgfx",
diff --git a/patches/glmark2-2017-02-10-g7215c0f/series b/patches/glmark2-2017-02-10-g7215c0f/series
deleted file mode 100644
index 1dca4163a..000000000
--- a/patches/glmark2-2017-02-10-g7215c0f/series
+++ /dev/null
@@ -1,4 +0,0 @@
-# generated by git-ptx-patches
-#tag:base --start-number 1
-0001-NativeStateDRM-add-imx-drm-driver-support.patch
-# 27ab3043da80e4352b323add9aec4bcd - git-ptx-patches magic
diff --git a/patches/glmark2-2017-06-23-g9b1070fe/0001-NativeStateDRM-fix-running-without-current-mode.patch b/patches/glmark2-2017-06-23-g9b1070fe/0001-NativeStateDRM-fix-running-without-current-mode.patch
new file mode 100644
index 000000000..e92ba8bbf
--- /dev/null
+++ b/patches/glmark2-2017-06-23-g9b1070fe/0001-NativeStateDRM-fix-running-without-current-mode.patch
@@ -0,0 +1,52 @@
+From: Lucas Stach <l.stach@pengutronix.de>
+Date: Wed, 31 May 2017 15:41:07 +0200
+Subject: [PATCH] NativeStateDRM: fix running without current mode
+
+If there is no current mode set (likely if framebuffer emulation is
+disabled), we need to work out the connector->encoder->crtc chain on
+our own.
+
+Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
+---
+ src/native-state-drm.cpp | 19 +++++++++++++++----
+ 1 file changed, 15 insertions(+), 4 deletions(-)
+
+diff --git a/src/native-state-drm.cpp b/src/native-state-drm.cpp
+index 5f4699fa1ba7..a8421276cc35 100644
+--- a/src/native-state-drm.cpp
++++ b/src/native-state-drm.cpp
+@@ -267,10 +267,16 @@ NativeStateDRM::init()
+
+ // Find a suitable encoder
+ for (int e = 0; e < resources_->count_encoders; e++) {
++ int found = 0;
+ encoder_ = drmModeGetEncoder(fd_, resources_->encoders[e]);
+- if (encoder_ && encoder_->encoder_id == connector_->encoder_id) {
+- break;
++ for (int ce = 0; e < connector_->count_encoders; ce++) {
++ if (encoder_ && encoder_->encoder_id == connector_->encoders[ce]) {
++ found = 1;
++ break;
++ }
+ }
++ if (found)
++ break;
+ drmModeFreeEncoder(encoder_);
+ encoder_ = 0;
+ }
+@@ -286,8 +292,13 @@ NativeStateDRM::init()
+
+ crtc_ = drmModeGetCrtc(fd_, encoder_->crtc_id);
+ if (!crtc_) {
+- Log::error("Failed to get current CRTC\n");
+- return false;
++ /* if there is no current CRTC, make sure to attach a suitable one */
++ for (int c = 0; c < resources_->count_crtcs; c++) {
++ if (encoder_->possible_crtcs & (1 << c)) {
++ encoder_->crtc_id = resources_->crtcs[c];
++ break;
++ }
++ }
+ }
+
+ signal(SIGINT, &NativeStateDRM::quit_handler);
diff --git a/patches/glmark2-2017-06-23-g9b1070fe/series b/patches/glmark2-2017-06-23-g9b1070fe/series
new file mode 100644
index 000000000..2b7a2d620
--- /dev/null
+++ b/patches/glmark2-2017-06-23-g9b1070fe/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-NativeStateDRM-fix-running-without-current-mode.patch
+# 6f3b43a54eafd138290a38a8422ca602 - git-ptx-patches magic