summaryrefslogtreecommitdiffstats
path: root/commands/fbtest.c
Commit message (Collapse)AuthorAgeFilesLines
* commands: set SPDX-License-Identifier for files without license statementAhmad Fatoum2022-01-051-0/+2
| | | | | | | | | | In absence of a dual licensing statement, this is GPL-2.0-only as the barebox project as a whole. Add a SPDX-License-Identifier to make this clear. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-2-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* treewide: replace strerror(-PTR_ERR(errno)) with %pe format specifierAhmad Fatoum2020-09-291-3/+2
| | | | | | | | | 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>
* commands: don't use stale errno when calling fb_openAhmad Fatoum2019-06-131-2/+3
| | | | | | | | | | | fb_open returns a pointer and doesn't populate errno, which will result in a stale errno being evaluated by perror() on failure. Fix this by using strerror with the proper argument instead at call sites. While at it, correct the message prefix typo (s/fb_open/fb_open/). Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fbtest: add gradients patternNikita Yushchenko2017-10-161-2/+108
| | | | | | | | | | | | This pattern draws red, green, blue, and white color gradients, together with 3 anchor rectangles in corners. To be used with automated screen testing via computer vision methods. Suggested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Tested-by: Chris Healy <[1]cphealy@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fbtest: add solid patternNikita Yushchenko2017-10-161-2/+12
| | | | | | | | | | This just fills entire screen with single color, as passed in -c argument in RRGGBB format. Suggested-by: Chris Healy <cphealy@gmail.com> Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com> Tested-by: Chris Healy <[1]cphealy@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fb: introduce flush for virtual framebufferBastian Stender2017-02-281-0/+1
| | | | | | | | | | | Some drivers need an explicit sync method to flush the virtual framebuffer to the display. It is called fb_flush(). fb_flush() gets called on fbc_putc, on fb_close and in the pattern cycle in the fbtest command. Signed-off-by: Bastian Stender <bst@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* commands: exit on invalid optionEnrico Jorns2016-09-161-0/+2
| | | | | | | | | | Barebox commands should not perform any action and return 0 if an invalid parameter was given. This might cause undetected unintended behvaior when calling commands with wrong options, either manually or from a script. Signed-off-by: Enrico Jorns <ejo@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* GUI: Add fbtest commandAndrey Smirnov2016-06-301-0/+201
Add 'fbtest' - a command to produce test patterns on a screen Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>