From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Anatolij Gustschin <agust@denx.de>,
Simon Glass <sjg@chromium.org>,
Matthias Brugger <mbrugger@suse.com>,
Ovidiu Panait <ovidiu.panait@windriver.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Patrick Delaunay <patrick.delaunay@foss.st.com>,
Rui Miguel Silva <rui.silva@linaro.org>,
Stefan Roese <sr@denx.de>, Thomas Huth <thuth@redhat.com>
Subject: [PATCH 05/39] video: lcd: Drop console rotation
Date: Wed, 19 Oct 2022 05:23:22 -0600 [thread overview]
Message-ID: <20221019112356.1042065-6-sjg@chromium.org> (raw)
In-Reply-To: <20221019112356.1042065-1-sjg@chromium.org>
This option is not used in U-Boot anymore. Drop it option and the
associated implementation.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
README | 21 ----
common/Makefile | 1 -
common/lcd_console_rotation.c | 194 ----------------------------------
3 files changed, 216 deletions(-)
delete mode 100644 common/lcd_console_rotation.c
diff --git a/README b/README
index 186f1f9a5ff..ec492f9926c 100644
--- a/README
+++ b/README
@@ -823,27 +823,6 @@ The following options need to be configured:
here, since it is cheaper to change data cache settings on
a per-section basis.
-
- CONFIG_LCD_ROTATION
-
- Sometimes, for example if the display is mounted in portrait
- mode or even if it's mounted landscape but rotated by 180degree,
- we need to rotate our content of the display relative to the
- framebuffer, so that user can read the messages which are
- printed out.
- Once CONFIG_LCD_ROTATION is defined, the lcd_console will be
- initialized with a given rotation from "vl_rot" out of
- "vidinfo_t" which is provided by the board specific code.
- The value for vl_rot is coded as following (matching to
- fbcon=rotate:<n> linux-kernel commandline):
- 0 = no rotation respectively 0 degree
- 1 = 90 degree rotation
- 2 = 180 degree rotation
- 3 = 270 degree rotation
-
- If CONFIG_LCD_ROTATION is not defined, the console will be
- initialized with 0degree rotation.
-
- MII/PHY support:
CONFIG_PHY_CLOCK_FREQ (ppc4xx)
diff --git a/common/Makefile b/common/Makefile
index 1d56c9f2895..d3175b7a854 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -38,7 +38,6 @@ obj-$(CONFIG_SPLASH_SOURCE) += splash_source.o
ifndef CONFIG_DM_VIDEO
obj-$(CONFIG_LCD) += lcd.o lcd_console.o
endif
-obj-$(CONFIG_LCD_ROTATION) += lcd_console_rotation.o
obj-$(CONFIG_MENU) += menu.o
obj-$(CONFIG_UPDATE_COMMON) += update.o
obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
diff --git a/common/lcd_console_rotation.c b/common/lcd_console_rotation.c
deleted file mode 100644
index a5f5c6da7be..00000000000
--- a/common/lcd_console_rotation.c
+++ /dev/null
@@ -1,194 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2015
- * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
- */
-
-#include <common.h>
-#include <lcd.h>
-#include <video_font.h> /* Get font data, width and height */
-
-static void lcd_putc_xy90(struct console_t *pcons, ushort x, ushort y, char c)
-{
- int fg_color = lcd_getfgcolor();
- int bg_color = lcd_getbgcolor();
- int col, i;
-
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- (x+1) * pcons->lcdsizex -
- y;
-
- uchar msk = 0x80;
- uchar *pfont = video_fontdata + c * VIDEO_FONT_HEIGHT;
- for (col = 0; col < VIDEO_FONT_WIDTH; ++col) {
- for (i = 0; i < VIDEO_FONT_HEIGHT; ++i)
- *dst-- = (*(pfont + i) & msk) ? fg_color : bg_color;
- msk >>= 1;
- dst += (pcons->lcdsizex + VIDEO_FONT_HEIGHT);
- }
-}
-
-static inline void console_setrow90(struct console_t *pcons, u32 row, int clr)
-{
- int i, j;
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- pcons->lcdsizex -
- row*VIDEO_FONT_HEIGHT+1;
-
- for (j = 0; j < pcons->lcdsizey; j++) {
- for (i = 0; i < VIDEO_FONT_HEIGHT; i++)
- *dst-- = clr;
- dst += (pcons->lcdsizex + VIDEO_FONT_HEIGHT);
- }
-}
-
-static inline void console_moverow90(struct console_t *pcons,
- u32 rowdst, u32 rowsrc)
-{
- int i, j;
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- pcons->lcdsizex -
- (rowdst*VIDEO_FONT_HEIGHT+1);
-
- fbptr_t *src = (fbptr_t *)pcons->fbbase +
- pcons->lcdsizex -
- (rowsrc*VIDEO_FONT_HEIGHT+1);
-
- for (j = 0; j < pcons->lcdsizey; j++) {
- for (i = 0; i < VIDEO_FONT_HEIGHT; i++)
- *dst-- = *src--;
- src += (pcons->lcdsizex + VIDEO_FONT_HEIGHT);
- dst += (pcons->lcdsizex + VIDEO_FONT_HEIGHT);
- }
-}
-static void lcd_putc_xy180(struct console_t *pcons, ushort x, ushort y, char c)
-{
- int fg_color = lcd_getfgcolor();
- int bg_color = lcd_getbgcolor();
- int i, row;
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- pcons->lcdsizex +
- pcons->lcdsizey * pcons->lcdsizex -
- y * pcons->lcdsizex -
- (x+1);
-
- for (row = 0; row < VIDEO_FONT_HEIGHT; row++) {
- uchar bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row];
-
- for (i = 0; i < VIDEO_FONT_WIDTH; ++i) {
- *dst-- = (bits & 0x80) ? fg_color : bg_color;
- bits <<= 1;
- }
- dst -= (pcons->lcdsizex - VIDEO_FONT_WIDTH);
- }
-}
-
-static inline void console_setrow180(struct console_t *pcons, u32 row, int clr)
-{
- int i;
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- (pcons->rows-row-1) * VIDEO_FONT_HEIGHT *
- pcons->lcdsizex;
-
- for (i = 0; i < (VIDEO_FONT_HEIGHT * pcons->lcdsizex); i++)
- *dst++ = clr;
-}
-
-static inline void console_moverow180(struct console_t *pcons,
- u32 rowdst, u32 rowsrc)
-{
- int i;
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- (pcons->rows-rowdst-1) * VIDEO_FONT_HEIGHT *
- pcons->lcdsizex;
-
- fbptr_t *src = (fbptr_t *)pcons->fbbase +
- (pcons->rows-rowsrc-1) * VIDEO_FONT_HEIGHT *
- pcons->lcdsizex;
-
- for (i = 0; i < (VIDEO_FONT_HEIGHT * pcons->lcdsizex); i++)
- *dst++ = *src++;
-}
-
-static void lcd_putc_xy270(struct console_t *pcons, ushort x, ushort y, char c)
-{
- int fg_color = lcd_getfgcolor();
- int bg_color = lcd_getbgcolor();
- int i, col;
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- pcons->lcdsizey * pcons->lcdsizex -
- (x+1) * pcons->lcdsizex +
- y;
-
- uchar msk = 0x80;
- uchar *pfont = video_fontdata + c * VIDEO_FONT_HEIGHT;
- for (col = 0; col < VIDEO_FONT_WIDTH; ++col) {
- for (i = 0; i < VIDEO_FONT_HEIGHT; ++i)
- *dst++ = (*(pfont + i) & msk) ? fg_color : bg_color;
- msk >>= 1;
- dst -= (pcons->lcdsizex + VIDEO_FONT_HEIGHT);
- }
-}
-
-static inline void console_setrow270(struct console_t *pcons, u32 row, int clr)
-{
- int i, j;
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- row*VIDEO_FONT_HEIGHT;
-
- for (j = 0; j < pcons->lcdsizey; j++) {
- for (i = 0; i < VIDEO_FONT_HEIGHT; i++)
- *dst++ = clr;
- dst += (pcons->lcdsizex - VIDEO_FONT_HEIGHT);
- }
-}
-
-static inline void console_moverow270(struct console_t *pcons,
- u32 rowdst, u32 rowsrc)
-{
- int i, j;
- fbptr_t *dst = (fbptr_t *)pcons->fbbase +
- rowdst*VIDEO_FONT_HEIGHT;
-
- fbptr_t *src = (fbptr_t *)pcons->fbbase +
- rowsrc*VIDEO_FONT_HEIGHT;
-
- for (j = 0; j < pcons->lcdsizey; j++) {
- for (i = 0; i < VIDEO_FONT_HEIGHT; i++)
- *dst++ = *src++;
- src += (pcons->lcdsizex - VIDEO_FONT_HEIGHT);
- dst += (pcons->lcdsizex - VIDEO_FONT_HEIGHT);
- }
-}
-
-static void console_calc_rowcol_rot(struct console_t *pcons)
-{
- if (pcons->lcdrot == 1 || pcons->lcdrot == 3)
- console_calc_rowcol(pcons, pcons->lcdsizey, pcons->lcdsizex);
- else
- console_calc_rowcol(pcons, pcons->lcdsizex, pcons->lcdsizey);
-}
-
-void lcd_init_console_rot(struct console_t *pcons)
-{
- if (pcons->lcdrot == 0) {
- return;
- } else if (pcons->lcdrot == 1) {
- pcons->fp_putc_xy = &lcd_putc_xy90;
- pcons->fp_console_moverow = &console_moverow90;
- pcons->fp_console_setrow = &console_setrow90;
- } else if (pcons->lcdrot == 2) {
- pcons->fp_putc_xy = &lcd_putc_xy180;
- pcons->fp_console_moverow = &console_moverow180;
- pcons->fp_console_setrow = &console_setrow180;
- } else if (pcons->lcdrot == 3) {
- pcons->fp_putc_xy = &lcd_putc_xy270;
- pcons->fp_console_moverow = &console_moverow270;
- pcons->fp_console_setrow = &console_setrow270;
- } else {
- printf("%s: invalid framebuffer rotation (%d)!\n",
- __func__, pcons->lcdrot);
- return;
- }
- console_calc_rowcol_rot(pcons);
-}
--
2.38.0.413.g74048e4d9e-goog
next prev parent reply other threads:[~2022-10-19 11:26 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 11:23 [PATCH 00/39] lcd: Drop old LCD support Simon Glass
2022-10-19 11:23 ` [PATCH 01/39] video: Split SPLASH_SCREEN_ALIGN from bmp command Simon Glass
2022-10-19 11:23 ` [PATCH 02/39] Convert CONFIG_HIDE_LOGO_VERSION to Kconfig Simon Glass
2022-10-19 11:23 ` [PATCH 03/39] video: Rename CONFIG_SYS_VIDEO_LOGO_MAX_SIZE Simon Glass
2022-10-19 11:23 ` [PATCH 04/39] Convert CONFIG_VIDEO_LOGO_MAX_SIZE to Kconfig Simon Glass
2022-10-19 11:23 ` Simon Glass [this message]
2022-10-19 11:23 ` [PATCH 06/39] video: Drop CONFIG_LCD_ALIGNMENT Simon Glass
2022-10-19 11:23 ` [PATCH 07/39] video: Drop CONFIG_LCD_MENU Simon Glass
2022-10-19 11:23 ` [PATCH 08/39] video: Drop CONFIG_LCD_INFO_BELOW_LOGO Simon Glass
2022-10-19 11:23 ` [PATCH 09/39] video: Drop CONFIG_LCD_INFO Simon Glass
2022-10-19 11:23 ` [PATCH 10/39] video: Move bmp_display() prototype to video.h Simon Glass
2022-10-19 11:23 ` [PATCH 11/39] api: Drop LCD implementation Simon Glass
2022-10-19 11:23 ` [PATCH 13/39] video: Drop VCXK video controller Simon Glass
2022-10-19 11:23 ` [PATCH 14/39] BuR: Drop old LCD code Simon Glass
2022-10-19 11:23 ` [PATCH 16/39] video: atmel: Drop pre-DM parts of video driver Simon Glass
2022-10-19 11:23 ` [PATCH 17/39] video: Drop ld9040 driver Simon Glass
2022-10-19 11:23 ` [PATCH 19/39] treewide: Stop enabling CONFIG_LCD Simon Glass
2022-10-19 11:23 ` [PATCH 20/39] video: Drop atmel LCD code Simon Glass
2022-10-19 11:23 ` [PATCH 21/39] video: samsung: Drop old " Simon Glass
2022-10-19 11:23 ` [PATCH 23/39] compulab: " Simon Glass
2022-10-19 11:23 ` [PATCH 24/39] tegra: " Simon Glass
2022-10-19 11:23 ` [PATCH 25/39] BuR: ronetix: siemens: " Simon Glass
2022-10-19 11:23 ` [PATCH 26/39] video: cmd: " Simon Glass
2022-10-19 11:23 ` [PATCH 27/39] efi: " Simon Glass
2022-10-19 11:23 ` [PATCH 28/39] video: Drop remaining references to CONFIG_LCD Simon Glass
2022-10-19 11:23 ` [PATCH 29/39] fdt: Drop support for LCD fixup in simplefb Simon Glass
2022-10-19 11:23 ` [PATCH 30/39] video: Drop LCD_BPP Simon Glass
2022-10-19 11:23 ` [PATCH 31/39] video: Drop CONFIG_VIDEO Simon Glass
2022-10-19 11:23 ` [PATCH 32/39] " Simon Glass
2022-10-19 11:23 ` [PATCH 33/39] video: Drop CONFIG_LCD Simon Glass
2022-10-19 11:23 ` [PATCH 34/39] video: Drop use of the lcd header file Simon Glass
2022-10-19 11:23 ` [PATCH 35/39] video: Drop common LCD implementation Simon Glass
2022-10-19 11:23 ` [PATCH 36/39] video: Drop SPLASHIMAGE_CALLBACK Simon Glass
2022-10-19 11:23 ` [PATCH 37/39] video: Make all video options depend on DM_VIDEO Simon Glass
2022-10-19 11:23 ` [PATCH 38/39] pci: Drop test for DM_VIDEO Simon Glass
2022-10-19 11:23 ` [PATCH 39/39] video: Rename CONFIG_DM_VIDEO to CONFIG_VIDEO Simon Glass
2022-10-19 17:06 ` [PATCH 00/39] lcd: Drop old LCD support Tim Harvey
2022-10-19 17:52 ` Simon Glass
2022-10-25 21:48 ` Tim Harvey
2022-10-31 13:47 ` Anatolij Gustschin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221019112356.1042065-6-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=agust@denx.de \
--cc=mbrugger@suse.com \
--cc=ovidiu.panait@windriver.com \
--cc=patrice.chotard@foss.st.com \
--cc=patrick.delaunay@foss.st.com \
--cc=rui.silva@linaro.org \
--cc=sr@denx.de \
--cc=thuth@redhat.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.