This option should not have the SYS_ in it. Drop it so it fits in with the
other video options.
Also simplify the alignment code in gunzip_bmp(), since malloc() always
returns a 32-bit-aligned pointer.
Signed-off-by: Simon Glass <sjg@chromium.org>
The bmp command already has a way to centre the image. Using this CONFIG
option to also centre it makes it impossible to control where images are
placed on the screen. Drop the extra check.
Simplify the Kconfig file we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
By default several types of splash locations are supported and the
user can select one of them through environment var (splashsource).
However the devpart is still hardcoded and we cannot change it from
the environment.
This patch add the support of "splashdevpart" which allow the user to
set the devpart though this environment variable.
Example: image located in splashscreen partition (MMC as raw)
```
splashsource=mmc_raw
splashdevpart=0#splashscreen
```
Signed-off-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
The user has now the choice to specify the splash location in the MMC
as a raw storage.
Signed-off-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
This is not as simple as it seems. Add a function to provide it so that
the upcoming menu feature can space lines out correctly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a new 'font' command which allows the fonts to be listed as well as
selecting a different font and size.
Allow the test to run on sandbox, where multiple font/size combinations
are supported, as well as sandbox_flattree, where they are not.
Signed-off-by: Simon Glass <sjg@chromium.org>
This is enabled for LCD but not for VIDEO. Enable it since it is useful
to be able to clear the screen and adds very little code.
Signed-off-by: Simon Glass <sjg@chromium.org>
It is useful to be able to support multiple fonts. Add a function to
handle this as well as one to list the available fonts.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present the truetype console supports only a single font and size. It
is useful to be able to support different combinations. As a first step,
move the metrics into there own structure and allow having multiple
metrics.
Signed-off-by: Simon Glass <sjg@chromium.org>
Put this check into a function so we can use it elsewhere. Also drop the
macros which do the same thing but are not actually used.
Signed-off-by: Simon Glass <sjg@chromium.org>
Generalise the video_clear() function to allow filling with a different
colour.
Tidy up the comments while we are here.
Signed-off-by: Simon Glass <sjg@chromium.org>
This is actually a panel, not a video device. Rename the option, move it
into the right place and make it depend on PANEL.
Signed-off-by: Simon Glass <sjg@chromium.org>
Move these commands and the implementation to the cmd/ directory, which is
where most commands are kept.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
[agust: keep vidconsole_position_cursor() in vidconsole uclass]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Add an exported function which allows the cursor position to be set to
pixel granularity. Make use of this in the existing code.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present these are attached to vidconsole which means that the video
uclass requires that a console is enabled. This is not the intention.
The colours are a reasonable way of indexing common colours in any case,
so move them to the video uclass instead.
Rename vid_console_color() to video_index_to_colour() now that it is more
generic. Also fix the inconsistent spelling in these functions.
Signed-off-by: Simon Glass <sjg@chromium.org>
The wrong fields are pulled out of the timings here so the values
programmed into the DSI_VID_HSA_LINES/DSI_VID_HBP_LINES and
DSI_VID_VSA_LINES/DSI_VID_VBP_LINES registers are swapped.
Use the right fields so that the correct values are programmed.
Fixes: d4f7ea83fc ("video: add MIPI DSI host controller bridge")
Signed-off-by: John Keeping <john@metanate.com>
Various minor changes to core dm and sandbox
-----BEGIN PGP SIGNATURE-----
iQFFBAABCgAvFiEEslwAIq+Gp8wWVbYnfxc6PpAIreYFAmNdrCIRHHNqZ0BjaHJv
bWl1bS5vcmcACgkQfxc6PpAIreYdDQgAgCbj2sRZaQkYLeXh37EUcvLpJjwIUAyv
GFkiPhCEEJ37ll89aRNac8lSJ6ZMG71HDouDfNFdWKJY50TJ35C5Dg4fS8AYudM9
T3n9iRCPdL8KMmmQgznlSXhQ2Na18gy4FSBwGQnZwbggmABtlvkYE5AYHzKunR4+
DehAOdpN6yHtMj0PMaJPM53atjGO2WqftD/96sGJT2RLCnXeBrwjI4zZJYFzXdw3
dDKQN6qE121Jn9YjxysCQQKE+QgVC3hR5B5mFscox+8pAB87CTR9FfIBenqoZ2dg
wDHWJcPMq8rEgdKdK2aXtKbLY/Rj4kMxEZCsjPWt2v1U3AoVZx+0/g==
=VbI+
-----END PGP SIGNATURE-----
Merge tag 'dm-pull-29oct22' of https://source.denx.de/u-boot/custodians/u-boot-dm
Fix pylibfdt warnings and use setuptools to build
Various minor changes to core dm and sandbox
When probing a device fails NULL pointer is returned, and following
devices in uclass list cannot be iterated. Skip to next device on error
instead.
With that the only condition under which these simple iteration
functions return error is when the dm is not initialized at uclass_get
time. This is not all that interesting, change return type to void.
Fixes: 6494d708bf ("dm: Add base driver model support")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
uclass_first_device/uclass_next_device return value will be removed,
don't use it.
With the current implementation dev is equivalent to !ret. It is
redundant to check both, ret check can be replaced with dev check, and
ret check inside the iteration is dead code.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
device_probe returns early when the device is already activated.
Add a note to the documentation that it can be used on already activated
devices.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
The distutils package is deprecated. The upstream libfdt repo uses
setuptools for building the pylibfdt module, so bring in that code,
suitably modified for U-Boot. Also bring in the README.
The modifications include setting the version correctly, making use of
the environment variables provided by the Makefile and various tweaks
to the directories.
Note that the version omits the minus character at the start of
EXTRAVERSION, since this creates a warning. The build is really just used
within U-Boot itself, so it doesn't matter too much if the version matches
upstream, or exactly matches U-Boot.
Signed-off-by: Simon Glass <sjg@chromium.org>
The sandbox64 variant is currently building the sandbox thermal driver
but not the corresponding uclass driver. This results in the sandbox64
variant not booting with the test device tree. Enable building the
thermal uclass for the sandbox64 variant as well.
Also enable the temperature command to allow the test to be run on the
sandbox64 variant.
Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Adding support to symlink an image packaged using binman.
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Currently sandbox configuration defautls to 64bit and there is no
automation for building 32bit sandbox on 32bit hosts.
Use _LP64 macro as heuristic for detecting 64bit targets.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
This is needed in the platforms that use "ranges" node property for
address translation in their dts for TPL.
Signed-off-by: William Zhang <william.zhang@broadcom.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Python 3.10 requires defining PY_SSIZE_T_CLEAN. This will be fixed in
swig 4.10 but it is not clear when it will be released. There was a
warning since python 3.8.
Link: https://github.com/swig/swig/pull/2277
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
python does not like the u-boot- prefix in the version, drop it.
/usr/lib/python3.10/site-packages/setuptools/dist.py:544: UserWarning:
The version specified ('u-boot-2022.10') is an invalid version, this may
not work as expected with newer versions of setuptools, pip, and PyPI.
Please see PEP 440 for more details.
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
This path does not seem to be present in clang-14 for some reason. Relax
the regular expression so that the test works, at least for non-LTO.
Signed-off-by: Simon Glass <sjg@chromium.org>
The call to device_bind_with_driver_data() passes id->data but if
the entry has no of_match then the id has not been set by the selected
driver.
Normally this passes unnoticed since a previous driver likely had an
of_match value, so the id is set to that. Of course it is not correct
to pass the id->data from a different driver.
With clang-14 the driver ordering is such that the id is never actually
set in the 'bind /usb@1 usb_ether' line in test_bind_unbind_with_node()
thus causing a crash.
Fix this by passing 0 if the of_match for a driver does not exist.
Signed-off-by: Simon Glass <sjg@chromium.org>
Matching anything that just happens to have the sought-for label as a
prefix is wrong. For example, if the board designer has designated 10
lines for debug purposes, named "debug1" through "debug10", and we are
looking up "debug1", if debug10 happens to be met first during the
iteration we'd wrongly return that.
In theory, this can break existing users that could rely on this
quirk, but OTOH keeping the current broken semantics can cause a lot
of grief for people hitting this in the future and not understanding
why they don't find the line they expect. Considering how few in-tree
defconfigs currently set DM_GPIO_LOOKUP_LABEL (ignoring sandbox, only
four "real" boards), let's fix it before the use becomes more
widespread.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>