| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
"GPL-2.0-only" was introduced in SPDX 2.0, and the old identifier
"GPL-2.0" is now considered deprecated; see <https://spdx.org/licenses>.
Fixes: 28f4a6a4df76f0f1581d (2021-10-30, "drivers: add missing SPDX-License-Identifier")
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Link: https://lore.barebox.org/20211117113851.2022669-2-rhi@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
| |
The split between <efi.h> and <efi/efi.h> is confusing: The former
contains universal definitions, while the latter contains barebox
utilities on top. To make the distinction clear, rename <efi/efi.h>
to <efi/efi-payload.h> as it's used for EFI payloads.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211122084732.2597109-14-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds the suitable SPDX-License-Identifier to all files in drivers/
that previously lacked one.
To aid manual inspection, following heuristics can be used:
* No changes outside of comments/whitespace:
git show -U0 HEAD | rg -v '^(@@|diff|index)|[-+]([-+]|//|#|[\s/]\*)'
* -or-later come in pairs:
git show --inter-hunk-context=19 HEAD | \
perl -0777 -F'/^@/gm' -ne 'for (@F) { @m = /later/g; print if @m & 1 }'
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20211030175632.2276077-4-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Printing the framebuffer base is unnecessary because it's already
contained in the dev_printf prefix. Make the message shorter
and only print it on success.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210824095119.15907-2-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Video drivers should initialize fb_info->mode, so device parameters for
mode and enable/disable can function as expected. This wasn't done in
the simplefb driver so far, fix this.
This also lets us drop some initialization of the fb_info, because it
can be calculated from the mode. The very verbose mode info print
can be dropped as well, because it's now available in devinfo.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210824095119.15907-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The bcm2835 framebuffer driver was broken, because the address of video
buffer allocated for us by the GPU and returned through mailbox was
used without converting it back to ARM address space. That unconverted
address was also in the range of peripheral addresses, which caused
other issues later on due to it being filled with garbage data.
The offset by which to convert the address back can vary by device,
so the value is read from devicetree 'dma-ranges' for somewhat portable
operation.
This fix was tested on Raspberry PI B+ and Raspberry PI 3B+.
Signed-off-by: Daniel Brát <danek.brat@gmail.com>
Link: https://lore.barebox.org/20210907072915.18451-1-danek.brat@gmail.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
So far, only sdlfb and efi associated the framebuffer device they
register with the hardware device providing it.
Follow suit for all other frame buffers. This enables devinfo
to display parentage.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210527124453.22710-1-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In Linux the ops in struct clk_ops take a struct clk_hw * argument
instead of a struct clk * argument as in barebox. With this taking
new clk drivers from Linux requires a lot of mechanical conversions.
Instead of doing this over and over again swallow the pill once and
convert the existing barebox code over to clk_hw.
The implementation is a little different from Linux. In Linux struct clk
is only known to the core clock code. In barebox struct clk is
publically known and it is embedded into struct clk_hw. This allows
us to still use struct clk members in the clock drivers which we
currently still need, because otherwise this patch would be even
bigger.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210602095507.24609-5-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Linux has a clk_register() function with a different semantics than
barebox. Rename this function to bclk_register() so that we later
can introduce a clk_register() function with the same semantics as
Linux.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20210602095507.24609-4-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix spelling error that prevented us from getting
the atmel,lcd-wiring-mode
The Bindings mandate the use of BRG.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|/
|
|
|
|
|
|
|
| |
Like other device id tables across tree, the last element is expected to
be zeroed to act as sentinel. Fix the omission.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Link: https://lore.pengutronix.de/20210410104807.2078535-1-ahmad@a3f.at
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
barebox has support to fix up a framebuffer it has set up as simplefb
into the device tree of a kernel it boots. Add the counterpart to this,
so barebox itself can reuse an already set up frame buffer.
This is done to support the framebuffer device on the tinyemu RISC-V
machine.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
SDL 2.0 has been released more than 7 years ago and should be available
everywhere. Replace barebox's SDL 1.2 with SDL 2.0 instead:
- better maintained
- At least on Debian, you can't install x86_64 and i386 libsdl-dev at
the same time, which makes a quick use of CONFIG_SANDBOX_LINUX_I386
harder as the user needs to reinstall libraries. With SDL 2.0, it
works
- SDL 2.0 has easier audio API, which will be used in a later commit
- Wayland support for sandbox video driver
Port to SDL 2.0 and as we touch everything anyway, rename the
sdl_ functions to start with sdl_video_ to differentiate from upcoming
sdl_sound_.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
print_hex_dump in barebox always prints a hex dump. Most users use
it for debugging though, so import Linux helpers to do so to cut
down on the #ifdef DEBUG.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
|
| |
<asm-generic/div64.h> isn't meant for direct usage as <asm/div64.h> may
override this on a per-architecture basis. We don't do that currently,
but in the future we might. Include the <linux/math64.h> instead.
No functional change.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
The information on the color mode is only populated at framebuffer
enable time. At probe time, it's all zero, so it's useless to print it
out. Drop it.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All SVGA devices in Qemu, except for Cirrus, support the bochs display
interface, which is very easy to set up. Add a driver for it.
This has been tested with:
PCI: qemu-system-mips(el) -device VGA + barebox qemu-malta_defconfig
ISA: qemu-system-x86_64 -device isa-vga + barebox efi_defconfig
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
For non-i2c EDID use, drivers will want to verify the EDID header. We
already have a function for this, but internal linkage. Change this and
while at it change the type to a more appropriate type.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
| |
Users can already populate fb_info::edid_data for cases where the EDID
doesn't come via an i2c controller managed by barebox.
Only thing missing is to be able to compile without i2c, thus drop
the dependency.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
So far fb.enable only reflected whether the fb was enabled/disabled via
device parameter. Enabling/disabling the fb via ioctl left the
parameter untouched. Remedy this.
While at it, have setting of fb.enable if the underlying
fb_enable/fb_disable fails as well.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using %pe instead of PTR_ERR has the benefit of being less verbose and
less error-prone (no negation necessary) while potentially reducing
code size. Make use of it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
strerrorp() is only used along with printf. We now have a format
specifier for printing error pointers directly, so use that and
remove strerrorp.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| | |
We have several macros for a oneline driver registration. Add some
missing and use them consistently where possible througout the tree.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The driver has a couple of issues in how it handles match data:
- First use of dev_get_drvdata is superfluous as result is unused
- Second use of dev_get_drvdata stores a sizeof(const void *)
into an enum typed object
- hdmi->dev_type contains a truncated pointer to a struct
dw_hdmi_data and compares it with an enum, which will always fail
Fix these and while it, refactor the code a bit to get rid of
dw_hdmi_data, whose only other member is unused.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
| |
The regulator id should be given without the "-supply" suffix else the
core is searching for "vbat-supply-supply".
Fixes: bf8f62d334 ("video/ssd1307fb: add support for VBAT")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Video devices propagate ioctls down the pipeline by calling vpl_ioctl
themselves. This also happens when propagating VPL_PREPARE.
simple-panel doesn't have anything special to do in VPL_PREPARE, so
it returned -ENOSYS so far. This leads vpl_ioctl to fail, which in
turn is propagated back through the pipeline.
For devices with multiple endpoints, vpl_ioctl passes the ioctl
to each one of them. An early exit by a simple-panel can thus cause
other endpoints to not prepare themselves leading to display
issues.
Fix this by having the simple panel ignore ioctls that aren't relevant
to it.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
"fsl,imx-parallel-display"-compatible devices are supposed to support
two bindings to query the connected LCD's parameters:
- A display timings sub node
- A of_graph pointing to a panel or a bridge
So far only the first was supported. Mimic what LDB is already doing, so
we support both.
Unlike LDB, if both are specified, the display timings node takes
precedence. This is to maintain backwards compatibility.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
| |
The reset GPIO polarity was hardcoded as active low. Honour the polarity
flags given in the device tree instead.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
backlight_register allocates a new backlight device. Populating the
device's parent field with the hardware device gives us more
informational devinfo output.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| | |
pwm_backlight.max_value is unused anywhere. Drop it.
Signed-off-by: Ahmad Fatoum <ahmad@a3f.at>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
| |
| |
| |
| |
| |
| |
| |
| | |
The CREDITS file was removed from barebox in 2015 by commit 6570288f2d97
("Remove the CREDITS file"). Remove references to it from several files.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|/
|
|
|
|
|
|
|
|
| |
On error, a goto may jump over the initialization of vmem and free the
uninitialized value during clean up. Fix this.
Found by compiling the code with clang.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
Both reset GPIO and regulator are optional as per the binding and the
driver can work without if we ignore their absence. Do so.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
regulator_{enable,disable} are already no-ops when the parameter is
NULL. Drop the NULL checks thusly.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
info->priv is dereferenced before a valid value has been set leading to
a NULL pointer dereference in the probe function. Fix this.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
pwm_backlight->period is assigned pwm_get_period(pwm), which is the same
value just a few lines earlier. Remove the superfluous reassignment.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
These settings used to be specified per-mode. But the device tree
bindings have these two values attached to the display and not to each
mode. Also for the supported boards it doesn't matter as they all only
have a single mode.
This is preparatory work to add devicetree support for the imxfb driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
| |
of_get_display_timings() returns NULL on failure, not an error pointer.
Fixes: 16fd24847d7a ("video: stmfb: Add device tree support")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the potentially endianness-changing readl, writel and siblings
directly. They looks prettier and are the correct thing to do, as
even if the CPU is in big-endian mode, the peripherals are little-endian.
Unlike Linux, barebox readl,writel are the same Linux'
{readl,writel}_relaxed (they don't imply memory barriers)
and thus there shouldn't be any functional change.
Patch was generated by a mass search and replace. I looked it over,
adjust some whitespace and further verified by reviewing the output of
git diff HEAD~1 --word-diff | \
perl -pe 's/\[-(.*?)__raw_/{+$1/; s/-\]\{\+/+}{+/;' \
-e 's/(\{\+.*?\+\})\1/__ALL_IS_WELL__/' | grep '+}{+'
which filters out the common case of lines where a single
__raw_{readT,writeT} had its __raw_ prefix stripped without any
further changes.
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Tested-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
|
|
|
|
|
| |
Based on Linux commit 8636a1f9677db4f883f29a072f401303acfc2edd
This will be needed when you sync Kconfig with Linux 5.0 or later.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|