All of lore.kernel.org
 help / color / mirror / Atom feed
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>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Jason Liu" <jason.hui.liu@nxp.com>,
	"Jens Scharsig" <esw@bus-elektronik.de>,
	"Loic Poulain" <loic.poulain@linaro.org>,
	"Michal Suchanek" <msuchanek@suse.de>,
	"Pali Rohár" <pali@kernel.org>
Subject: [PATCH 13/39] video: Drop VCXK video controller
Date: Wed, 19 Oct 2022 05:23:30 -0600	[thread overview]
Message-ID: <20221019112356.1042065-14-sjg@chromium.org> (raw)
In-Reply-To: <20221019112356.1042065-1-sjg@chromium.org>

This relies on the old LCD implementation which is to be removed. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 board/BuS/eb_cpu5282/eb_cpu5282.c     |  82 -----
 common/stdio.c                        |   2 -
 configs/eb_cpu5282_defconfig          |   1 -
 configs/eb_cpu5282_internal_defconfig |   1 -
 doc/README.bus_vcxk                   |  67 ----
 drivers/video/Kconfig                 |   6 -
 drivers/video/Makefile                |   1 -
 drivers/video/bus_vcxk.c              | 426 --------------------------
 8 files changed, 586 deletions(-)
 delete mode 100644 doc/README.bus_vcxk
 delete mode 100644 drivers/video/bus_vcxk.c

diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c
index b739bc3ca6a..173350b7061 100644
--- a/board/BuS/eb_cpu5282/eb_cpu5282.c
+++ b/board/BuS/eb_cpu5282/eb_cpu5282.c
@@ -21,11 +21,6 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-#if IS_ENABLED(CONFIG_VIDEO_VCXK)
-extern unsigned long display_width;
-extern unsigned long display_height;
-#endif
-
 /*---------------------------------------------------------------------------*/
 
 int checkboard (void)
@@ -184,84 +179,7 @@ void __led_set(led_id_t mask, int state)
 		MCFGPTA_GPTPORT &= ~(1 << 3);
 }
 
-#if IS_ENABLED(CONFIG_VIDEO_VCXK)
-int drv_video_init(void)
-{
-	char *s;
-#ifdef CONFIG_SPLASH_SCREEN
-	unsigned long splash;
-#endif
-	printf("Init Video as ");
-	s = env_get("displaywidth");
-	if (s != NULL)
-		display_width = dectoul(s, NULL);
-	else
-		display_width = 256;
-
-	s = env_get("displayheight");
-	if (s != NULL)
-		display_height = dectoul(s, NULL);
-	else
-		display_height = 256;
-
-	printf("%lu x %lu pixel matrix\n", display_width, display_height);
-
-	MCFCCM_CCR &= ~MCFCCM_CCR_SZEN;
-	MCFGPIO_PEPAR &= ~MCFGPIO_PEPAR_PEPA2;
-
-	vcxk_init(display_width, display_height);
-
-#ifdef CONFIG_SPLASH_SCREEN
-	s = env_get("splashimage");
-	if (s != NULL) {
-		splash = hextoul(s, NULL);
-		vcxk_acknowledge_wait();
-		video_display_bitmap(splash, 0, 0);
-	}
-#endif
-	return 0;
-}
-#endif
-
-/*---------------------------------------------------------------------------*/
-
-#if IS_ENABLED(CONFIG_VIDEO_VCXK)
-int do_brightness(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
-{
-	int rcode = 0;
-	ulong side;
-	ulong bright;
-
-	switch (argc) {
-	case 3:
-		side = dectoul(argv[1], NULL);
-		bright = dectoul(argv[2], NULL);
-		if ((side >= 0) && (side <= 3) &&
-			(bright >= 0) && (bright <= 1000)) {
-			vcxk_setbrightness(side, bright);
-			rcode = 0;
-		} else {
-			printf("parameters out of range\n");
-			printf("Usage:\n%s\n", cmdtp->usage);
-			rcode = 1;
-		}
-		break;
-	default:
-		printf("Usage:\n%s\n", cmdtp->usage);
-		rcode = 1;
-		break;
-	}
-	return rcode;
-}
-
 /*---------------------------------------------------------------------------*/
 
-U_BOOT_CMD(
-	bright,	3,	0,	do_brightness,
-	"sets the display brightness\n",
-	" <side> <0..1000>\n        side: 0/3=both; 1=first; 2=second\n"
-);
-
-#endif
 
 /* EOF EB+MCF-EV123.c */
diff --git a/common/stdio.c b/common/stdio.c
index e316a355fae..a6d8a4b674f 100644
--- a/common/stdio.c
+++ b/common/stdio.c
@@ -369,8 +369,6 @@ int stdio_add_devices(void)
 	} else {
 		if (IS_ENABLED(CONFIG_LCD))
 			drv_lcd_init();
-		if (IS_ENABLED(CONFIG_VIDEO_VCXK))
-			drv_video_init();
 	}
 
 #if defined(CONFIG_KEYBOARD) && !defined(CONFIG_DM_KEYBOARD)
diff --git a/configs/eb_cpu5282_defconfig b/configs/eb_cpu5282_defconfig
index b46d1637716..f74139de332 100644
--- a/configs/eb_cpu5282_defconfig
+++ b/configs/eb_cpu5282_defconfig
@@ -53,4 +53,3 @@ CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_MCFUART=y
 CONFIG_SPLASH_SCREEN=y
-CONFIG_VIDEO_VCXK=y
diff --git a/configs/eb_cpu5282_internal_defconfig b/configs/eb_cpu5282_internal_defconfig
index cd0fe911108..6cae31cfa95 100644
--- a/configs/eb_cpu5282_internal_defconfig
+++ b/configs/eb_cpu5282_internal_defconfig
@@ -51,4 +51,3 @@ CONFIG_MCFFEC=y
 CONFIG_MII=y
 CONFIG_MCFUART=y
 CONFIG_SPLASH_SCREEN=y
-CONFIG_VIDEO_VCXK=y
diff --git a/doc/README.bus_vcxk b/doc/README.bus_vcxk
deleted file mode 100644
index aaa1565ddec..00000000000
--- a/doc/README.bus_vcxk
+++ /dev/null
@@ -1,67 +0,0 @@
-SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2008-2009
- * BuS Elektronik GmbH & Co. KG <www.bus-elektronik.de>
- * Jens Scharsig <esw@bus-elektronik.de>
- */
-
-U-Boot vcxk video controller driver
-======================================
-
-By defining CONFIG_VIDEO_VCXK this driver can be used with VC2K, VC4K and
-VC8K devices on following boards:
-
-board           | ARCH          | Vendor
------------------------------------------------------------------------
-EB+CPU5282-T1   | MCF5282       | BuS Elektronik GmbH & Co. KG
-EB+MCF-EVB123   | MCF5282       | BuS Elektronik GmbH & Co. KG
-EB+CPUx9K2      | AT91RM9200    | BuS Elektronik GmbH & Co. KG
-ZLSA            | AT91RM9200    | Ruf Telematik AG
-
-Driver configuration
---------------------
-
-The driver needs some defines to describe the target hardware:
-
-CONFIG_SYS_VCXK_BASE
-
-	base address of VCxK hardware memory
-
-CONFIG_SYS_VCXK_DEFAULT_LINEALIGN
-
-	defines the physical alignment of a pixel row
-
-CONFIG_SYS_VCXK_DOUBLEBUFFERED
-
-	some boards that use vcxk prevent read from framebuffer memory.
-	define this option to enable double buffering (needs 16KiB RAM)
-
-CONFIG_SYS_VCXK_<xxxx>_PIN
-
-	defines the number of the I/O line PIN in the port
-	valid values for <xxxx> are:
-
-		ACKNOWLEDGE
-			describes the acknowledge line from vcxk hardware
-
-		ENABLE
-			describes the enable line to vcxk hardware
-
-		INVERT
-			describes the invert line to vcxk hardware
-
-		RESET
-			describes the reset line to vcxk hardware
-
-		REQUEST
-			describes the request line to vcxk hardware
-
-CONFIG_SYS_VCXK_<xxxx>_PORT
-
-	defines the I/O port which is connected with the line
-	for valid values for <xxxx> see CONFIG_SYS_VCXK_<xxxx>_PIN
-
-CONFIG_SYS_VCXK_<xxxx>_DDR
-
-	defines the register which configures the direction
-	for valid values for <xxxx> see CONFIG_SYS_VCXK_<xxxx>_PIN
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 806011913e6..4576497d428 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -939,10 +939,4 @@ config BMP_32BPP
 	help
 	  Support display of bitmaps file with 32-bit-per-pixel.
 
-config VIDEO_VCXK
-	bool "Enable VCXK video controller driver support"
-	help
-	  This enables VCXK driver which can be used with VC2K, VC4K
-	  and VC8K devices on various boards from BuS Elektronik GmbH.
-
 endmenu
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 7019b263963..28e8a783531 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -64,7 +64,6 @@ obj-$(CONFIG_VIDEO_DSI_HOST_SANDBOX) += sandbox_dsi_host.o
 obj-$(CONFIG_VIDEO_SANDBOX_SDL) += sandbox_sdl.o
 obj-$(CONFIG_VIDEO_SIMPLE) += simplefb.o
 obj-$(CONFIG_VIDEO_TEGRA20) += tegra.o
-obj-$(CONFIG_VIDEO_VCXK) += bus_vcxk.o
 obj-$(CONFIG_VIDEO_VESA) += vesa.o
 obj-$(CONFIG_VIDEO_SEPS525) += seps525.o
 obj-$(CONFIG_VIDEO_ZYNQMP_DPSUB) += zynqmp_dpsub.o
diff --git a/drivers/video/bus_vcxk.c b/drivers/video/bus_vcxk.c
deleted file mode 100644
index 3863662d9f6..00000000000
--- a/drivers/video/bus_vcxk.c
+++ /dev/null
@@ -1,426 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0+
-/*
- * (C) Copyright 2005-2009
- * Jens Scharsig @ BuS Elektronik GmbH & Co. KG, <esw@bus-elektronik.de>
- */
-
-#include <common.h>
-#include <bmp_layout.h>
-#include <log.h>
-#include <asm/io.h>
-
-vu_char  *vcxk_bws      = ((vu_char *) (CONFIG_SYS_VCXK_BASE));
-vu_short *vcxk_bws_word = ((vu_short *)(CONFIG_SYS_VCXK_BASE));
-vu_long  *vcxk_bws_long = ((vu_long *) (CONFIG_SYS_VCXK_BASE));
-
-#ifdef CONFIG_AT91RM9200
-	#include <asm/arch/hardware.h>
-	#include <asm/arch/at91_pio.h>
-
-	#ifndef VCBITMASK
-		#define VCBITMASK(bitno)	(0x0001 << (bitno % 16))
-	#endif
-at91_pio_t *pio = (at91_pio_t *) AT91_PIO_BASE;
-#define VCXK_INIT_PIN(PORT, PIN, DDR, I0O1) \
-	do { \
-		writel(PIN, &pio->PORT.per); \
-		writel(PIN, &pio->PORT.DDR); \
-		writel(PIN, &pio->PORT.mddr); \
-		if (!I0O1) \
-			writel(PIN, &pio->PORT.puer); \
-	} while (0);
-
-#define VCXK_SET_PIN(PORT, PIN)	writel(PIN, &pio->PORT.sodr);
-#define VCXK_CLR_PIN(PORT, PIN)	writel(PIN, &pio->PORT.codr);
-
-#define VCXK_ACKNOWLEDGE	\
-	(!(readl(&pio->CONFIG_SYS_VCXK_ACKNOWLEDGE_PORT.pdsr) & \
-			CONFIG_SYS_VCXK_ACKNOWLEDGE_PIN))
-#elif defined(CONFIG_MCF52x2)
-	#include <asm/m5282.h>
-	#ifndef VCBITMASK
-		#define VCBITMASK(bitno) (0x8000 >> (bitno % 16))
-	#endif
-
-	#define VCXK_INIT_PIN(PORT, PIN, DDR, I0O1) \
-		if (I0O1) DDR |= PIN; else DDR &= ~PIN;
-
-	#define VCXK_SET_PIN(PORT, PIN)	PORT |= PIN;
-	#define VCXK_CLR_PIN(PORT, PIN)	PORT &= ~PIN;
-
-	#define VCXK_ACKNOWLEDGE \
-		(!(CONFIG_SYS_VCXK_ACKNOWLEDGE_PORT &	\
-			CONFIG_SYS_VCXK_ACKNOWLEDGE_PIN))
-
-#else
-	#error no vcxk support for selected ARCH
-#endif
-
-#define VCXK_DISABLE\
-	VCXK_SET_PIN(CONFIG_SYS_VCXK_ENABLE_PORT, CONFIG_SYS_VCXK_ENABLE_PIN)
-#define VCXK_ENABLE\
-	VCXK_CLR_PIN(CONFIG_SYS_VCXK_ENABLE_PORT, CONFIG_SYS_VCXK_ENABLE_PIN)
-
-#ifndef CONFIG_SYS_VCXK_DOUBLEBUFFERED
-	#define VCXK_BWS(x, data)		vcxk_bws[x] = data;
-	#define VCXK_BWS_WORD_SET(x, mask)	vcxk_bws_word[x] |= mask;
-	#define VCXK_BWS_WORD_CLEAR(x, mask)	vcxk_bws_word[x] &= ~mask;
-	#define VCXK_BWS_LONG(x, data)		vcxk_bws_long[x] = data;
-#else
-	u_char double_bws[16384];
-	u_short *double_bws_word;
-	u_long  *double_bws_long;
-	#define VCXK_BWS(x,data)	\
-		double_bws[x] = data; vcxk_bws[x] = data;
-	#define VCXK_BWS_WORD_SET(x,mask)	\
-		double_bws_word[x] |= mask;	\
-		vcxk_bws_word[x] = double_bws_word[x];
-	#define VCXK_BWS_WORD_CLEAR(x,mask)	\
-		double_bws_word[x] &= ~mask;	\
-		vcxk_bws_word[x] = double_bws_word[x];
-	#define VCXK_BWS_LONG(x,data) \
-		double_bws_long[x] = data; vcxk_bws_long[x] = data;
-#endif
-
-#define VC4K16_Bright1	vcxk_bws_word[0x20004 / 2]
-#define VC4K16_Bright2	vcxk_bws_word[0x20006 / 2]
-#define VC2K_Bright	vcxk_bws[0x8000]
-#define VC8K_BrightH	vcxk_bws[0xC000]
-#define VC8K_BrightL	vcxk_bws[0xC001]
-
-vu_char VC4K16;
-
-u_long display_width;
-u_long display_height;
-u_long display_bwidth;
-
-ulong search_vcxk_driver(void);
-void vcxk_cls(void);
-void vcxk_setbrightness(unsigned int side, short brightness);
-int vcxk_request(void);
-int vcxk_acknowledge_wait(void);
-void vcxk_clear(void);
-
-/*
- ****f* bus_vcxk/vcxk_init
- * FUNCTION
- * initialalize Video Controller
- * PARAMETERS
- * width	visible display width in pixel
- * height	visible display height  in pixel
- ***
- */
-
-int vcxk_init(unsigned long width, unsigned long height)
-{
-#ifdef CONFIG_SYS_VCXK_RESET_PORT
-	VCXK_INIT_PIN(CONFIG_SYS_VCXK_RESET_PORT,
-		CONFIG_SYS_VCXK_RESET_PIN, CONFIG_SYS_VCXK_RESET_DDR, 1)
-	VCXK_SET_PIN(CONFIG_SYS_VCXK_RESET_PORT, CONFIG_SYS_VCXK_RESET_PIN);
-#endif
-
-#ifdef CONFIG_SYS_VCXK_DOUBLEBUFFERED
-	double_bws_word  = (u_short *)double_bws;
-	double_bws_long  = (u_long *)double_bws;
-	debug("%px %px %px\n", double_bws, double_bws_word, double_bws_long);
-#endif
-	display_width  = width;
-	display_height = height;
-#if (CONFIG_SYS_VCXK_DEFAULT_LINEALIGN == 4)
-	display_bwidth = ((width + 31) / 8) & ~0x3;
-#elif (CONFIG_SYS_VCXK_DEFAULT_LINEALIGN == 2)
-	display_bwidth = ((width + 15) / 8) & ~0x1;
-#else
-	#error CONFIG_SYS_VCXK_DEFAULT_LINEALIGN is invalid
-#endif
-	debug("linesize ((%ld + 15) / 8 & ~0x1) = %ld\n",
-		display_width, display_bwidth);
-
-#ifdef CONFIG_SYS_VCXK_AUTODETECT
-	VC4K16 = 0;
-	vcxk_bws_long[1] = 0x0;
-	vcxk_bws_long[1] = 0x55AAAA55;
-	vcxk_bws_long[5] = 0x0;
-	if (vcxk_bws_long[1] == 0x55AAAA55)
-		VC4K16 = 1;
-#else
-	VC4K16 = 1;
-	debug("No autodetect: use vc4k\n");
-#endif
-
-	VCXK_INIT_PIN(CONFIG_SYS_VCXK_INVERT_PORT,
-		CONFIG_SYS_VCXK_INVERT_PIN, CONFIG_SYS_VCXK_INVERT_DDR, 1)
-	VCXK_SET_PIN(CONFIG_SYS_VCXK_INVERT_PORT, CONFIG_SYS_VCXK_INVERT_PIN)
-
-	VCXK_SET_PIN(CONFIG_SYS_VCXK_REQUEST_PORT, CONFIG_SYS_VCXK_REQUEST_PIN);
-	VCXK_INIT_PIN(CONFIG_SYS_VCXK_REQUEST_PORT,
-		CONFIG_SYS_VCXK_REQUEST_PIN, CONFIG_SYS_VCXK_REQUEST_DDR, 1)
-
-	VCXK_INIT_PIN(CONFIG_SYS_VCXK_ACKNOWLEDGE_PORT,
-		CONFIG_SYS_VCXK_ACKNOWLEDGE_PIN,
-		CONFIG_SYS_VCXK_ACKNOWLEDGE_DDR, 0)
-
-	VCXK_DISABLE;
-	VCXK_INIT_PIN(CONFIG_SYS_VCXK_ENABLE_PORT,
-		CONFIG_SYS_VCXK_ENABLE_PIN, CONFIG_SYS_VCXK_ENABLE_DDR, 1)
-
-	vcxk_cls();
-	vcxk_cls();	/* clear second/hidden page */
-
-	vcxk_setbrightness(3, 1000);
-	VCXK_ENABLE;
-	return 1;
-}
-
-/*
- ****f* bus_vcxk/vcxk_setpixel
- * FUNCTION
- * set the pixel[x,y] with the given color
- * PARAMETER
- * x		pixel colum
- * y		pixel row
- * color	<0x40 off/black
- *			>0x40 on
- ***
- */
-
-void vcxk_setpixel(int x, int y, unsigned long color)
-{
-	vu_short dataptr;
-
-	if ((x < display_width) && (y < display_height)) {
-		dataptr = ((x / 16)) + (y * (display_bwidth >> 1));
-
-		color = ((color >> 16) & 0xFF) |
-			    ((color >> 8) & 0xFF) | (color & 0xFF);
-
-		if (color > 0x40) {
-			VCXK_BWS_WORD_SET(dataptr, VCBITMASK(x));
-		} else {
-			VCXK_BWS_WORD_CLEAR(dataptr, VCBITMASK(x));
-		}
-	}
-}
-
-/*
- ****f* bus_vcxk/vcxk_loadimage
- * FUNCTION
- * copies a binary image to display memory
- ***
- */
-
-void vcxk_loadimage(ulong source)
-{
-	int cnt;
-	vcxk_acknowledge_wait();
-	if (VC4K16) {
-		for (cnt = 0; cnt < (16384 / 4); cnt++) {
-			VCXK_BWS_LONG(cnt, (*(ulong *) source));
-			source = source + 4;
-		}
-	} else {
-		for (cnt = 0; cnt < 16384; cnt++) {
-			VCXK_BWS_LONG(cnt*2, (*(vu_char *) source));
-			source++;
-		}
-	}
-	vcxk_request();
-}
-
-/*
- ****f* bus_vcxk/vcxk_cls
- * FUNCTION
- * clear the display
- ***
- */
-
-void vcxk_cls(void)
-{
-	vcxk_acknowledge_wait();
-	vcxk_clear();
-	vcxk_request();
-}
-
-/*
- ****f* bus_vcxk/vcxk_clear(void)
- * FUNCTION
- * clear the display memory
- ***
- */
-
-void vcxk_clear(void)
-{
-	int cnt;
-
-	for (cnt = 0; cnt < (16384 / 4); cnt++) {
-		VCXK_BWS_LONG(cnt, 0)
-	}
-}
-
-/*
- ****f* bus_vcxk/vcxk_setbrightness
- * FUNCTION
- * set the display brightness
- * PARAMETER
- * side	1	set front side brightness
- *		2	set back  side brightness
- *		3	set brightness for both sides
- * brightness 0..1000
- ***
- */
-
-void vcxk_setbrightness(unsigned int side, short brightness)
-{
-	if (VC4K16) {
-		if ((side == 0) || (side & 0x1))
-			VC4K16_Bright1 = brightness + 23;
-		if ((side == 0) || (side & 0x2))
-			VC4K16_Bright2 = brightness + 23;
-	} else	{
-		VC2K_Bright = (brightness >> 4) + 2;
-		VC8K_BrightH = (brightness + 23) >> 8;
-		VC8K_BrightL = (brightness + 23) & 0xFF;
-	}
-}
-
-/*
- ****f* bus_vcxk/vcxk_request
- * FUNCTION
- * requests viewing of display memory
- ***
- */
-
-int vcxk_request(void)
-{
-	VCXK_CLR_PIN(CONFIG_SYS_VCXK_REQUEST_PORT,
-		CONFIG_SYS_VCXK_REQUEST_PIN)
-	VCXK_SET_PIN(CONFIG_SYS_VCXK_REQUEST_PORT,
-		CONFIG_SYS_VCXK_REQUEST_PIN);
-	return 1;
-}
-
-/*
- ****f* bus_vcxk/vcxk_acknowledge_wait
- * FUNCTION
- * wait for acknowledge viewing requests
- ***
- */
-
-int vcxk_acknowledge_wait(void)
-{
-	while (VCXK_ACKNOWLEDGE)
-		;
-	return 1;
-}
-
-/*
- ****f* bus_vcxk/vcxk_draw_mono
- * FUNCTION
- * copies a monochrom bitmap (BMP-Format) from given memory
- * PARAMETER
- * dataptr	pointer to bitmap
- * x		output bitmap @ columne
- * y		output bitmap @ row
- ***
- */
-
-void vcxk_draw_mono(unsigned char *dataptr, unsigned long linewidth,
-	unsigned long  cp_width, unsigned long cp_height)
-{
-	unsigned char *lineptr;
-	unsigned long xcnt, ycnt;
-
-	for (ycnt = cp_height; ycnt > 0; ycnt--) {
-		lineptr	= dataptr;
-		for (xcnt = 0; xcnt < cp_width; xcnt++) {
-			if ((*lineptr << (xcnt % 8)) & 0x80)
-				vcxk_setpixel(xcnt, ycnt - 1, 0xFFFFFF);
-			else
-				vcxk_setpixel(xcnt, ycnt-1, 0);
-
-			if ((xcnt % 8) == 7)
-				lineptr++;
-		} /* endfor xcnt */
-		dataptr = dataptr + linewidth;
-	} /* endfor ycnt */
-}
-
-/*
- ****f* bus_vcxk/vcxk_display_bitmap
- * FUNCTION
- * copies a bitmap (BMP-Format) to the given position
- * PARAMETER
- * addr		pointer to bitmap
- * x		output bitmap @ columne
- * y		output bitmap @ row
- ***
- */
-
-int vcxk_display_bitmap(ulong addr, int x, int y)
-{
-	struct bmp_image *bmp;
-	unsigned long width;
-	unsigned long height;
-	unsigned long bpp;
-
-	unsigned long lw;
-
-	unsigned long c_width;
-	unsigned long c_height;
-	unsigned char *dataptr;
-
-	bmp = (struct bmp_image *)addr;
-	if ((bmp->header.signature[0] == 'B') &&
-	    (bmp->header.signature[1] == 'M')) {
-		width        = le32_to_cpu(bmp->header.width);
-		height       = le32_to_cpu(bmp->header.height);
-		bpp          = le16_to_cpu(bmp->header.bit_count);
-
-		dataptr = (unsigned char *) bmp +
-				le32_to_cpu(bmp->header.data_offset);
-
-		if (display_width < (width + x))
-			c_width = display_width - x;
-		else
-			c_width = width;
-		if (display_height < (height + y))
-			c_height = display_height - y;
-		else
-			c_height = height;
-
-		lw = (((width + 7) / 8) + 3) & ~0x3;
-
-		if (c_height < height)
-			dataptr = dataptr + lw * (height - c_height);
-		switch (bpp) {
-		case 1:
-			vcxk_draw_mono(dataptr, lw, c_width, c_height);
-			break;
-		default:
-			printf("Error: %ld bit per pixel "
-				"not supported by VCxK\n", bpp);
-			return 0;
-		}
-	} else	{
-		printf("Error: no valid bmp at %lx\n", (ulong) bmp);
-		return 0;
-	}
-	return 1;
-}
-
-/*
- ****f* bus_vcxk/video_display_bitmap
- ***
- */
-
-int video_display_bitmap(ulong addr, int x, int y)
-{
-	vcxk_acknowledge_wait();
-	if (vcxk_display_bitmap(addr, x, y)) {
-		vcxk_request();
-		return 0;
-	}
-	return 1;
-}
-
-/* EOF */
-- 
2.38.0.413.g74048e4d9e-goog


  parent reply	other threads:[~2022-10-19 11:27 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 ` [PATCH 05/39] video: lcd: Drop console rotation Simon Glass
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 ` Simon Glass [this message]
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-14-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=agust@denx.de \
    --cc=esw@bus-elektronik.de \
    --cc=jason.hui.liu@nxp.com \
    --cc=loic.poulain@linaro.org \
    --cc=msuchanek@suse.de \
    --cc=pali@kernel.org \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.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.