mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] glmark2: add patch to prefer 8bpc EGL configs from upstream
@ 2020-10-26 14:54 Lucas Stach
  2020-10-30 12:02 ` [ptxdist] [APPLIED] " Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Lucas Stach @ 2020-10-26 14:54 UTC (permalink / raw)
  To: ptxdist

This is picked from the glmark2 git master branch. Without this patch glmark
would go for the highest bpc EGL config supported by the EGL implementation,
which is in many cass not displayable, breaking the DRM backend.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 ...-RGBA-component-widths-larger-than-8.patch | 32 +++++++++++++++++++
 patches/glmark2-2020.04/series                |  3 +-
 2 files changed, 34 insertions(+), 1 deletion(-)
 create mode 100644 patches/glmark2-2020.04/0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch

diff --git a/patches/glmark2-2020.04/0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch b/patches/glmark2-2020.04/0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch
new file mode 100644
index 000000000000..490c4815c6a8
--- /dev/null
+++ b/patches/glmark2-2020.04/0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch
@@ -0,0 +1,32 @@
+From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
+Date: Mon, 13 Jul 2020 11:16:28 +0300
+Subject: [PATCH] drm: Don't prefer RGBA component widths larger than 8
+
+Don't prefer RGBA component widths larger than 8, since they are
+unlikely to be what the users want or properly supported for display.
+Such widths can still be used, but only if explicitly requested.
+
+Fixes #125
+---
+ src/gl-visual-config.cpp | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/gl-visual-config.cpp b/src/gl-visual-config.cpp
+index dbd87d2a3c3c..013cc646356b 100644
+--- a/src/gl-visual-config.cpp
++++ b/src/gl-visual-config.cpp
+@@ -108,6 +108,14 @@ GLVisualConfig::score_component(int component, int target, int scale) const
+         /* Reward exact matches with the maximum per component score */
+         score = MAXIMUM_COMPONENT_SCORE;
+     }
++    else if (component > 8 && target <= 8 && scale > 1)
++    {
++        /* Penalize RGBA component widths larger than 8, since they are
++         * unlikely to be what the users want or properly supported for
++         * display. Such widths can still be used, but only if explicitly
++         * requested. */
++        score = UNACCEPTABLE_COMPONENT_PENALTY;
++    }
+     else
+     {
+         /* 
diff --git a/patches/glmark2-2020.04/series b/patches/glmark2-2020.04/series
index c7415054f2f3..48cf812dbee7 100644
--- a/patches/glmark2-2020.04/series
+++ b/patches/glmark2-2020.04/series
@@ -1,4 +1,5 @@
 # generated by git-ptx-patches
 #tag:base --start-number 1
 0001-Build-Fix-Python-3-incompatibility.patch
-# 6f94baa0134364a7f817abb600ce0eb2  - git-ptx-patches magic
+0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch
+# 1ffb9f179a40f263a2758a123744c53e  - git-ptx-patches magic
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [APPLIED] glmark2: add patch to prefer 8bpc EGL configs from upstream
  2020-10-26 14:54 [ptxdist] [PATCH] glmark2: add patch to prefer 8bpc EGL configs from upstream Lucas Stach
@ 2020-10-30 12:02 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2020-10-30 12:02 UTC (permalink / raw)
  To: ptxdist; +Cc: Lucas Stach

Thanks, applied as 9b8e3b18943b5457bc5c49fbbf95123ca94e4c79.

Michael

[sent from post-receive hook]

On Fri, 30 Oct 2020 13:02:38 +0100, Lucas Stach <l.stach@pengutronix.de> wrote:
> This is picked from the glmark2 git master branch. Without this patch glmark
> would go for the highest bpc EGL config supported by the EGL implementation,
> which is in many cass not displayable, breaking the DRM backend.
> 
> Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
> Message-Id: <20201026145414.5174-1-l.stach@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/patches/glmark2-2020.04/0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch b/patches/glmark2-2020.04/0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch
> new file mode 100644
> index 000000000000..490c4815c6a8
> --- /dev/null
> +++ b/patches/glmark2-2020.04/0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch
> @@ -0,0 +1,32 @@
> +From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
> +Date: Mon, 13 Jul 2020 11:16:28 +0300
> +Subject: [PATCH] drm: Don't prefer RGBA component widths larger than 8
> +
> +Don't prefer RGBA component widths larger than 8, since they are
> +unlikely to be what the users want or properly supported for display.
> +Such widths can still be used, but only if explicitly requested.
> +
> +Fixes #125
> +---
> + src/gl-visual-config.cpp | 8 ++++++++
> + 1 file changed, 8 insertions(+)
> +
> +diff --git a/src/gl-visual-config.cpp b/src/gl-visual-config.cpp
> +index dbd87d2a3c3c..013cc646356b 100644
> +--- a/src/gl-visual-config.cpp
> ++++ b/src/gl-visual-config.cpp
> +@@ -108,6 +108,14 @@ GLVisualConfig::score_component(int component, int target, int scale) const
> +         /* Reward exact matches with the maximum per component score */
> +         score = MAXIMUM_COMPONENT_SCORE;
> +     }
> ++    else if (component > 8 && target <= 8 && scale > 1)
> ++    {
> ++        /* Penalize RGBA component widths larger than 8, since they are
> ++         * unlikely to be what the users want or properly supported for
> ++         * display. Such widths can still be used, but only if explicitly
> ++         * requested. */
> ++        score = UNACCEPTABLE_COMPONENT_PENALTY;
> ++    }
> +     else
> +     {
> +         /* 
> diff --git a/patches/glmark2-2020.04/series b/patches/glmark2-2020.04/series
> index c7415054f2f3..48cf812dbee7 100644
> --- a/patches/glmark2-2020.04/series
> +++ b/patches/glmark2-2020.04/series
> @@ -1,4 +1,5 @@
>  # generated by git-ptx-patches
>  #tag:base --start-number 1
>  0001-Build-Fix-Python-3-incompatibility.patch
> -# 6f94baa0134364a7f817abb600ce0eb2  - git-ptx-patches magic
> +0002-drm-Don-t-prefer-RGBA-component-widths-larger-than-8.patch
> +# 1ffb9f179a40f263a2758a123744c53e  - git-ptx-patches magic

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-30 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 14:54 [ptxdist] [PATCH] glmark2: add patch to prefer 8bpc EGL configs from upstream Lucas Stach
2020-10-30 12:02 ` [ptxdist] [APPLIED] " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox