From 476a5f57fd5565fcb6f3354b2e893d2b06aae20b Mon Sep 17 00:00:00 2001 From: TOKITA Hiroshi Date: Tue, 11 Apr 2023 22:09:34 +0900 Subject: [PATCH] fb: cfb_shell: correct invert command implementation Fix the wrong calculation for inverting implemented by commit 70685875059f ("fb: cfb: support inverting with coordinates that do not align with the tile") Remove the cfb_invert_area() calling. Signed-off-by: TOKITA Hiroshi --- subsys/fb/cfb_shell.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/subsys/fb/cfb_shell.c b/subsys/fb/cfb_shell.c index 0d70c02af23..b6d246f78fb 100644 --- a/subsys/fb/cfb_shell.c +++ b/subsys/fb/cfb_shell.c @@ -375,17 +375,9 @@ static int cmd_invert(const struct shell *sh, size_t argc, char *argv[]) } if (argc == 1) { - uint8_t width = cfb_get_display_parameter(dev, CFB_DISPLAY_WIDTH); - uint8_t height = cfb_get_display_parameter(dev, CFB_DISPLAY_HEIGH); - - err = cfb_invert_area(dev, 0, 0, width, height); - if (err) { - shell_error(sh, "Error inverting area"); - return err; - } - err = cfb_framebuffer_invert(dev); if (err) { + shell_error(sh, "Error inverting Framebuffer"); return err; } } else if (argc == 5) { @@ -406,11 +398,6 @@ static int cmd_invert(const struct shell *sh, size_t argc, char *argv[]) return 0; } - if (err) { - shell_error(sh, "Error inverting Framebuffer"); - return err; - } - cfb_framebuffer_finalize(dev); shell_print(sh, "Framebuffer Inverted");