Re: [PATCH] ti33x: remove the screen machine feature


Vivien Didelot
 

Hi Denys,

On Fri, 19 Nov 2021 22:02:11 -0500 "Denys Dmytriyenko" <denis@...> wrote:
On Fri, Nov 19, 2021 at 03:15:33PM -0500, Vivien Didelot wrote:
Some distros or image recipes may rely on the presence of the "screen"
machine feature to install graphical front-end applications.

The ti33x SoC has an integrated GPU but does not have a screen per-se,
thus having this feature in the SoC configuration may lead to unwanted
packages being built.

Comment the 'screen' feature and remove it from MACHINE_FEATURES.
Well, 'screen' also implies not just a built-in LCD, but also external screens
connected over HDMI or DVI. There are even remnant MACHINE_GUI_CLASS variables
set in machine configs for either "bigscreen" or "smallscreen", although that
one is no longer used.
I understand what you're saying. The confusion comes from the fact that
some people think about the 'screen' feature as 'the machine has an LCD
_controller_ and/or graphic output port(s)', while others think of it as
'the machine literally has a graphical display'.

IMHO the 'screen' and 'touchscreen' machine features are a software-agnostic
way to describe the usage of a physical graphical display on the end product;

the 'directfb', 'x11' and 'wayland' distro features are a subjective way
to configure the graphical software stack of choice;

and finally the 'gpu' machine feature describes the capability of hardware
accelerated graphical processing.

As an example, a distro can configure the Qt stack and tweak images like this:

DISTRO_FEATURES:append = " directfb"
PACKAGECONFIG_DISTRO:pn-qtbase ?= " \
${@bb.utils.contains('MACHINE_FEATURES', 'gpu', 'eglfs', '', d)} \
${@bb.utils.contains('MACHINE_FEATURES', 'touchscreen', 'libinput tslib', '', d)} \
"
EXTRA_IMAGE_FEATURES ?= " \
${@bb.utils.contains('MACHINE_FEATURES', 'gpu', 'hwcodecs', '', d)} \
${@bb.utils.contains_any('MACHINE_FEATURES', 'screen touchscreen', 'splash', '', d)} \
"

while a generic image recipe or local conf can tweak packages this:

IMAGE_INSTALL:append = " ${@bb.utils.contains_any('MACHINE_FEATURES', 'screen touchscreen', 'qt-kiosk-browser', '', d)}"

The MACHINE_GUI_CLASS actually shares the same concern, it assumes the
presence of a built-in screen of subjective size, which is simply wrong
for machines with an optional graphical display.

All TI platforms with am335x SoC do have screen outputs, but I do understand
there could be headless platforms from other manufacturers with this SoC. The
correct way would be to not completely remove "screen" MACHINE_FEATURE from
the SoC include file, but rather move it to corresponding machine configs that
use it - am335x-evm, beaglebone, etc.
I would say that the 'screen' feature definitely doesn't belong to the SoC
configuration, and it doesn't belong to the machine description neither:

even though I understand it can be handy for beginners, boards like Rpi
and BeagleBone can be used headless and thus removing the feature from the
local configuration to get rid of unwanted configs is likewise cumbersome.

I think it's the user responsibility to specify MACHINE_FEATURES += "screen"
in their local configuration to describe the usage of a graphical display,
especially for machines not shipped with a built-in one.


Best,

Vivien

Join meta-ti@lists.yoctoproject.org to automatically receive all group messages.