diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2017-06-28 16:55:29 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2017-06-30 14:21:21 +0200 |
commit | 4c7e8aa0082fa222ce52f216938f795b3848c105 (patch) | |
tree | 81704715631d7625cc66dacdd31cf34f23c9c399 /patches/glmark2-2017-06-23-g9b1070fe | |
parent | f3ac6873492af7ab5779f580e513721926c5676f (diff) | |
download | ptxdist-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/glmark2-2017-06-23-g9b1070fe')
-rw-r--r-- | patches/glmark2-2017-06-23-g9b1070fe/0001-NativeStateDRM-fix-running-without-current-mode.patch | 52 | ||||
-rw-r--r-- | patches/glmark2-2017-06-23-g9b1070fe/series | 4 |
2 files changed, 56 insertions, 0 deletions
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 |