Skip to contentSkip to conversation

weston: improve selection of compositor

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 8 messages Oct 11, 2013 – Oct 12, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 weston: improve selection of compositor

The way the compositor was selected in Config.in was counter-intuitive, because the fbdev backend is selected by default even if a different one is available.

Instead, select the fbdev backend only if no other one was selected by the user.

Also re-ordered the compositor options, putting fbdev last. This is more natural when the user wants to select both backends: after selecting the RPi backend, the fbdev is automatically unselected but the user can move one line down to select it again.

---
 package/weston/Config.in | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
package/weston/Config.in +6 -9
index 4532c28..fd48fb3 100644
@@ -14,6 +14,8 @@ config BR2_PACKAGE_WESTON
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
+	# Make sure at least one compositor is selected.
+	select BR2_PACKAGE_WESTON_FBDEV if !BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 	help
 	  Weston is the reference implementation of a Wayland
 	  compositor, and a useful compositor in its own right.
@@ -24,17 +26,9 @@ config BR2_PACKAGE_WESTON
 
 if BR2_PACKAGE_WESTON
 
-# These two options make sure at least one compositor is selected.
+# Helper to make sure at least one compositor is selected.
 config BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 	bool
-config BR2_PACKAGE_WESTON_NEEDS_ONE_COMPOSITOR
-	def_bool y
-	depends on ! BR2_PACKAGE_WESTON_HAS_COMPOSITOR
-	select BR2_PACKAGE_WESTON_FBDEV
-
-config BR2_PACKAGE_WESTON_FBDEV
-	bool "fbdev compositor"
-	default y
 
 config BR2_PACKAGE_WESTON_RPI
 	bool "RPi compositor"
@@ -45,4 +39,7 @@ config BR2_PACKAGE_WESTON_RPI
 	select BR2_PACKAGE_RPI_USERLAND
 	select BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 
+config BR2_PACKAGE_WESTON_FBDEV
+	bool "fbdev compositor"
+
 endif
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH 2/3 weston: add missing toolchain comments

---
 package/weston/Config.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
package/weston/Config.in +6 -2
index fd48fb3..ea0e87e 100644
@@ -1,5 +1,5 @@
-comment "weston requires udev"
-	depends on !BR2_PACKAGE_UDEV
+comment "weston needs udev and a toolchain w/ threads"
+	depends on !BR2_PACKAGE_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
 
 config BR2_PACKAGE_WESTON
 	bool "weston"
@@ -30,6 +30,10 @@ if BR2_PACKAGE_WESTON
 config BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 	bool
 
+comment "RPi compositor needs a toolchain w/ C++, largefile, threads
+	depends on BR2_arm
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_WESTON_RPI
 	bool "RPi compositor"
 	depends on BR2_arm                      # rpi-userland
Signature · 1 line
1.8.4.rc3
#2 lore raw

PATCH 2/3 weston: add missing toolchain comments

Arnout, All,

On 2013-10-11 23:00 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:

Quoted 10 lines
---
 package/weston/Config.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
package/weston/Config.in +0 -0
index fd48fb3..ea0e87e 100644

package/weston/Config.in line 2

Quoted 4 lines
package/weston/Config.in +2 -2
@@ -1,5 +1,5 @@
-comment "weston requires udev"
-	depends on !BR2_PACKAGE_UDEV
+comment "weston needs udev and a toolchain w/ threads"
+	depends on !BR2_PACKAGE_UDEV || !BR2_TOOLCHAIN_HAS_THREADS

Doh, I just forgot about this... Thanks! :-)

package/weston/Config.in if BR2_PACKAGE_WESTON · line 33

Quoted 7 lines
package/weston/Config.in +1 -0
 config BR2_PACKAGE_WESTON
 	bool "weston"
@@ -30,6 +30,10 @@ if BR2_PACKAGE_WESTON
 config BR2_PACKAGE_WESTON_HAS_COMPOSITOR
 	bool
 
+comment "RPi compositor needs a toolchain w/ C++, largefile, threads

Missing terminating double-quotes.

package/weston/Config.in if BR2_PACKAGE_WESTON · line 39

Quoted 6 lines
package/weston/Config.in +3 -0
+	depends on BR2_arm
+	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
+
 config BR2_PACKAGE_WESTON_RPI
 	bool "RPi compositor"
 	depends on BR2_arm                      # rpi-userland

Otherwise:

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#3 lore raw

PATCH 3/3 weston: add help text for compositor backends

In reply to Arnout Vandecappelle (Essensium/Mind)
---
 package/weston/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/weston/Config.in +4 -0
index ea0e87e..4322aaa 100644
@@ -42,8 +42,12 @@ config BR2_PACKAGE_WESTON_RPI
 	depends on BR2_TOOLCHAIN_HAS_THREADS    # rpi-userland
 	select BR2_PACKAGE_RPI_USERLAND
 	select BR2_PACKAGE_WESTON_HAS_COMPOSITOR
+	help
+	  Compositor backend for the Raspberry Pi.
 
 config BR2_PACKAGE_WESTON_FBDEV
 	bool "fbdev compositor"
+	help
+	  Compositor backend for the Linux framebuffer.
 
 endif
Signature · 1 line
1.8.4.rc3
#4 lore raw

PATCH 3/3 weston: add help text for compositor backends

Arnout, All,

On 2013-10-11 23:00 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:

Quoted 10 lines
---
 package/weston/Config.in | 4 ++++
 1 file changed, 4 insertions(+)
package/weston/Config.in +0 -0
index ea0e87e..4322aaa 100644

package/weston/Config.in config BR2_PACKAGE_WESTON_RPI · line 51

Quoted 10 lines
package/weston/Config.in +4 -0
@@ -42,8 +42,12 @@ config BR2_PACKAGE_WESTON_RPI
 	depends on BR2_TOOLCHAIN_HAS_THREADS    # rpi-userland
 	select BR2_PACKAGE_RPI_USERLAND
 	select BR2_PACKAGE_WESTON_HAS_COMPOSITOR
+	help
+	  Compositor backend for the Raspberry Pi.
 
 config BR2_PACKAGE_WESTON_FBDEV
 	bool "fbdev compositor"
+	help
+	  Compositor backend for the Linux framebuffer.

I am not sure adding such terse help entries is helpfull.

Surely "RPi compositor" is no less explicit than "Compositor backend for the Raspberry Pi". Arguably, the prompt oculd be changed to "Raspberry Pi compositor", which would be as much descriptive as the help entry.

Ditto for fbdev: the prompt is explicit enough, the help entry does not add any value.

If I have to read a help entry, I expect to find more information than the prompt provides. Just repeating the prompt (even in other trerms) is just deceiving IMHO.

So, either we provide hepl entries that actually provide information that can not fit in the prompt, or we do not provide help entries at all.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/3 weston: improve selection of compositor

In reply to Arnout Vandecappelle (Essensium/Mind)

Arnout, All,

On 2013-10-11 23:00 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:

Quoted 6 lines

The way the compositor was selected in Config.in was counter-intuitive, because the fbdev backend is selected by default even if a different one is available.

Instead, select the fbdev backend only if no other one was selected by the user.

Well, that was explictly what I wanted we I did the patch:
- always have at least one compositor
- have fbdev enabled by default, even if another one is selected.

But I agree this can be counter-intuitive to some, so I won't bar this change.

Quoted 4 lines

Also re-ordered the compositor options, putting fbdev last. This is more natural when the user wants to select both backends: after selecting the RPi backend, the fbdev is automatically unselected but the user can move one line down to select it again.

We usually put menu entries in alphabetical order. I understand what you're trying to achieve here, but I'd prefer we be consistent in the menu ordering.

Quoted 11 lines
---
 package/weston/Config.in | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)
package/weston/Config.in +0 -0
index 4532c28..fd48fb3 100644

package/weston/Config.in config BR2_PACKAGE_WESTON · line 18

Quoted 5 lines
package/weston/Config.in +2 -0
@@ -14,6 +14,8 @@ config BR2_PACKAGE_WESTON
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
+	# Make sure at least one compositor is selected.
+	select BR2_PACKAGE_WESTON_FBDEV if !BR2_PACKAGE_WESTON_HAS_COMPOSITOR

Indeed, BR2_PACKAGE_WESTON_NEEDS_ONE_COMPOSITOR is not needed, since we can re-use BR2_PACKAGE_WESTON for the same purpose.

Except for the re-ordering, no problem for me.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#6 lore raw

PATCH 1/3 weston: improve selection of compositor

In reply to Arnout Vandecappelle (Essensium/Mind)

Arnout, All,

I have more wayland/weston changes locally that I'll push over the course of the WE.

So I'll take patches 1 (without the reordering) and 2 (with the quote fix) in my branch.

Depending on further discussion on those three patches, I'll grab whatever we end up settling on.

Thanks you!

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#7 lore raw

PATCH 1/3 weston: improve selection of compositor

Quoted 7 lines · Yann E. MORIN

Arnout, All,

I have more wayland/weston changes locally that I'll push over the course of the WE.

So I'll take patches 1 (without the reordering) and 2 (with the quote fix) in my branch.

OK thanks.

Regards,
Arnout

Quoted 9 lines

Depending on further discussion on those three patches, I'll grab whatever we end up settling on.

Thanks you!

Regards,
Yann E. MORIN.

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F