video: Drop CONFIG_VIDEO_HW_CURSOR

This is not used in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Simon Glass 2016-10-17 20:12:50 -06:00 committed by Tom Rini
parent 1e1a0fb23d
commit a4206575c8
4 changed files with 1 additions and 116 deletions

View File

@ -63,14 +63,6 @@
* character. No blinking is provided.
* Uses the macros CURSOR_SET and
* CURSOR_OFF.
*
* CONFIG_VIDEO_HW_CURSOR: - Uses the hardware cursor capability
* of the graphic chip. Uses the macro
* CURSOR_SET. ATTENTION: If booting an
* OS, the display driver must disable
* the hardware register of the graphic
* chip. Otherwise a blinking field is
* displayed.
*/
#include <common.h>
@ -154,13 +146,8 @@
* CONFIG_VIDEO_SW_CURSOR: Draws a cursor after the last character. No
* blinking is provided. Uses the macros CURSOR_SET
* and CURSOR_OFF.
* CONFIG_VIDEO_HW_CURSOR: Uses the hardware cursor capability of the
* graphic chip. Uses the macro CURSOR_SET.
* ATTENTION: If booting an OS, the display driver
* must disable the hardware register of the graphic
* chip. Otherwise a blinking field is displayed
*/
#if !defined(CONFIG_VIDEO_SW_CURSOR) && !defined(CONFIG_VIDEO_HW_CURSOR)
#if !defined(CONFIG_VIDEO_SW_CURSOR)
/* no Cursor defined */
#define CURSOR_ON
#define CURSOR_OFF
@ -168,10 +155,6 @@
#endif
#if defined(CONFIG_VIDEO_SW_CURSOR)
#if defined(CONFIG_VIDEO_HW_CURSOR)
#error only one of CONFIG_VIDEO_SW_CURSOR or CONFIG_VIDEO_HW_CURSOR can be \
defined
#endif
void console_cursor(int state);
#define CURSOR_ON console_cursor(1)
@ -179,17 +162,6 @@ void console_cursor(int state);
#define CURSOR_SET video_set_cursor()
#endif /* CONFIG_VIDEO_SW_CURSOR */
#ifdef CONFIG_VIDEO_HW_CURSOR
#ifdef CURSOR_ON
#error only one of CONFIG_VIDEO_SW_CURSOR or CONFIG_VIDEO_HW_CURSOR can be \
defined
#endif
#define CURSOR_ON
#define CURSOR_OFF
#define CURSOR_SET video_set_hw_cursor(console_col * VIDEO_FONT_WIDTH, \
(console_row * VIDEO_FONT_HEIGHT) + video_logo_height)
#endif /* CONFIG_VIDEO_HW_CURSOR */
#ifdef CONFIG_VIDEO_LOGO
#ifdef CONFIG_VIDEO_BMP_LOGO
#include <bmp_logo.h>
@ -2056,9 +2028,6 @@ static int video_init(void)
return -1;
video_fb_address = (void *) VIDEO_FB_ADRS;
#ifdef CONFIG_VIDEO_HW_CURSOR
video_init_hw_cursor(VIDEO_FONT_WIDTH, VIDEO_FONT_HEIGHT);
#endif
cfb_do_flush_cache = cfb_fb_is_in_dram() && dcache_status();

View File

@ -804,85 +804,6 @@ video_dump_reg (void)
#endif
#ifdef CONFIG_VIDEO_HW_CURSOR
/***************************************************************
* Set Hardware Cursor in Pixel
*/
void
video_set_hw_cursor (int x, int y)
{
int sig_x = 0, sig_y = 0;
if (x < 0) {
x *= -1;
sig_x = 1;
}
if (y < 0) {
y *= -1;
sig_y = 1;
}
ctWrite_i (CT_XR_O, 0xa4, x & 0xff);
ctWrite_i (CT_XR_O, 0xa5, (x >> 8) & 0x7);
ctWrite_i (CT_XR_O, 0xa6, y & 0xff);
ctWrite_i (CT_XR_O, 0xa7, (y >> 8) & 0x7);
}
/***************************************************************
* Init Hardware Cursor. To know the size of the Cursor,
* we have to know the Font size.
*/
void
video_init_hw_cursor (int font_width, int font_height)
{
unsigned char xr_80;
unsigned long *curs, pattern;
int i;
int cursor_start;
GraphicDevice *pGD = (GraphicDevice *) & ctfb;
cursor_start = pGD->dprBase;
xr_80 = ctRead_i (CT_XR_O, 0x80);
/* set start address */
ctWrite_i (CT_XR_O, 0xa2, (cursor_start >> 8) & 0xf0);
ctWrite_i (CT_XR_O, 0xa3, (cursor_start >> 16) & 0x3f);
/* set cursor shape */
curs = (unsigned long *) cursor_start;
i = 0;
while (i < 0x400) {
curs[i++] = 0xffffffff; /* AND mask */
curs[i++] = 0xffffffff; /* AND mask */
curs[i++] = 0; /* XOR mask */
curs[i++] = 0; /* XOR mask */
/* Transparent */
}
pattern = 0xffffffff >> font_width;
i = 0;
while (i < (font_height * 2)) {
curs[i++] = pattern; /* AND mask */
curs[i++] = pattern; /* AND mask */
curs[i++] = 0; /* XOR mask */
curs[i++] = 0; /* XOR mask */
/* Cursor Color 0 */
}
/* set blink rate */
ctWrite_i (CT_FP_O, 0x19, 0xf);
/* set cursors colors */
xr_80 = ctRead_i (CT_XR_O, 0x80);
xr_80 |= 0x1; /* alternate palette select */
ctWrite_i (CT_XR_O, 0x80, xr_80);
video_set_lut(4, CONFIG_SYS_CONSOLE_FG_COL, CONFIG_SYS_CONSOLE_FG_COL,
CONFIG_SYS_CONSOLE_FG_COL);
/* position 4 is color 0 cursor 0 */
xr_80 &= 0xfe; /* normal palette select */
ctWrite_i (CT_XR_O, 0x80, xr_80);
/* cursor enable */
ctWrite_i (CT_XR_O, 0xa0, 0x91);
xr_80 |= 0x10; /* enable hwcursor */
ctWrite_i (CT_XR_O, 0x80, xr_80);
video_set_hw_cursor (0, 0);
}
#endif /* CONFIG_VIDEO_HW_CURSOR */
/***************************************************************
* Wait for BitBlt ready
*/

View File

@ -88,9 +88,5 @@ void video_set_lut (
unsigned char g, /* green */
unsigned char b /* blue */
);
#ifdef CONFIG_VIDEO_HW_CURSOR
void video_set_hw_cursor(int x, int y); /* x y in pixel */
void video_init_hw_cursor(int font_width, int font_height);
#endif
#endif /*_VIDEO_FB_H_ */

View File

@ -8260,7 +8260,6 @@ CONFIG_VIDEO_CORALP
CONFIG_VIDEO_DA8XX
CONFIG_VIDEO_DT_SIMPLEFB
CONFIG_VIDEO_FONT_4X6
CONFIG_VIDEO_HW_CURSOR
CONFIG_VIDEO_IPUV3
CONFIG_VIDEO_LCD_I2C_BUS
CONFIG_VIDEO_LOGO