[PATCH 3/3] GUI: Add fbtest command
Antony Pavlov
antonynpavlov at gmail.com
Wed Jun 22 03:57:35 PDT 2016
On Tue, 21 Jun 2016 21:39:29 -0700
Andrey Smirnov <andrew.smirnov at gmail.com> wrote:
> Add 'fbtest' - a command to produce test patterns on a screen
>
> Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
> Signed-off-by: Andrey Gusakov <andrey.gusakov at cogentembedded.com>
> ---
> commands/Kconfig | 9 +++
> commands/Makefile | 1 +
> commands/fbtest.c | 187 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 197 insertions(+)
> create mode 100644 commands/fbtest.c
>
> diff --git a/commands/Kconfig b/commands/Kconfig
> index 880cd45..107cc3e 100644
> --- a/commands/Kconfig
> +++ b/commands/Kconfig
> @@ -1417,6 +1417,15 @@ config CMD_SPLASH
> -b COLOR background color in 0xttrrggbb
> -o render offscreen
>
> +config CMD_FBTEST
> + bool
> + depends on VIDEO
> + select 2D_PRIMITIVES
> + prompt "FB test"
> + help
> + Framebuffer test command that allows to produce a number of
> + test patterns on the screen.
> +
> config CMD_READLINE
> tristate
> prompt "readline"
> diff --git a/commands/Makefile b/commands/Makefile
> index b8c07f3..5a899ab 100644
> --- a/commands/Makefile
> +++ b/commands/Makefile
> @@ -57,6 +57,7 @@ obj-$(CONFIG_CMD_HELP) += help.o
> obj-$(CONFIG_CMD_LSMOD) += lsmod.o
> obj-$(CONFIG_CMD_INSMOD) += insmod.o
> obj-$(CONFIG_CMD_SPLASH) += splash.o
> +obj-$(CONFIG_CMD_FBTEST) += fbtest.o
> obj-$(CONFIG_USB_GADGET_DFU) += dfu.o
> obj-$(CONFIG_USB_GADGET_SERIAL) += usbserial.o
> obj-$(CONFIG_CMD_GPIO) += gpio.o
> diff --git a/commands/fbtest.c b/commands/fbtest.c
> new file mode 100644
> index 0000000..cf80274
> --- /dev/null
> +++ b/commands/fbtest.c
> @@ -0,0 +1,187 @@
> +#include <common.h>
> +#include <command.h>
> +#include <errno.h>
> +#include <malloc.h>
> +#include <getopt.h>
> +#include <fb.h>
> +#include <gui/graphic_utils.h>
> +#include <gui/2d-primitives.h>
> +#include <linux/gcd.h>
> +
> +unsigned long int_sqrt(unsigned long x);
the int_sqrt() function is defined in the drivers/video/edid.c file.
To use it we have to keep CONFIG_DRIVER_VIDEO_EDID enabled.
But I have see no measures on enabling CONFIG_DRIVER_VIDEO_EDID in your patch.
Have I missed something?
Can we move int_sqrt() in a separate C library file,
so edid.c and fbtest.c can both use it?
--
Best regards,
Antony Pavlov
More information about the barebox
mailing list