mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] glmark2: version bump to g9b1070fe
Date: Wed, 28 Jun 2017 16:55:29 +0200	[thread overview]
Message-ID: <20170628145529.15039-1-l.stach@pengutronix.de> (raw)

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>
---
 ...NativeStateDRM-add-imx-drm-driver-support.patch | 28 ------------
 patches/glmark2-2017-02-10-g7215c0f/series         |  4 --
 ...StateDRM-fix-running-without-current-mode.patch | 52 ++++++++++++++++++++++
 patches/glmark2-2017-06-23-g9b1070fe/series        |  4 ++
 rules/glmark2.make                                 |  4 +-
 5 files changed, 58 insertions(+), 34 deletions(-)
 delete mode 100644 patches/glmark2-2017-02-10-g7215c0f/0001-NativeStateDRM-add-imx-drm-driver-support.patch
 delete mode 100644 patches/glmark2-2017-02-10-g7215c0f/series
 create mode 100644 patches/glmark2-2017-06-23-g9b1070fe/0001-NativeStateDRM-fix-running-without-current-mode.patch
 create mode 100644 patches/glmark2-2017-06-23-g9b1070fe/series

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 7d51f60ee916..000000000000
--- 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 1dca4163a6ad..000000000000
--- 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 000000000000..e92ba8bbf686
--- /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 000000000000..2b7a2d620993
--- /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
diff --git a/rules/glmark2.make b/rules/glmark2.make
index 11f5d6b6cd9b..4ab073dc9d2c 100644
--- a/rules/glmark2.make
+++ b/rules/glmark2.make
@@ -17,8 +17,8 @@ PACKAGES-$(PTXCONF_GLMARK2) += glmark2
 # Paths and names
 #
 # No tags: use a fake descriptive commit-ish to include the date
-GLMARK2_VERSION	:= 2017-02-10-g7215c0f
-GLMARK2_MD5	:= 215d7687a561fe356bc460765ab85ae1
+GLMARK2_VERSION	:= 2017-06-23-g9b1070fe
+GLMARK2_MD5	:= 108815396d54fbb97b78e639f59a0df0
 GLMARK2		:= glmark2-$(GLMARK2_VERSION)
 GLMARK2_SUFFIX	:= tar.xz
 GLMARK2_URL	:= https://github.com/glmark2/glmark2.git;tag=$(GLMARK2_VERSION)
-- 
2.11.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

                 reply	other threads:[~2017-06-28 14:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170628145529.15039-1-l.stach@pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox