diff options
author | Marek Vasut <marex@denx.de> | 2013-07-30 23:37:59 +0200 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2013-08-10 09:22:52 +0200 |
commit | fd8cf994070df9d7576f429506514bf0bb778afd (patch) | |
tree | 0ef92de807058fbdb4806550bcfa100edc48d38d /drivers/video/cfb_console.c | |
parent | 84f957f80b32b25df64316b6931d6924b83d4b72 (diff) | |
download | u-boot-imx-fd8cf994070df9d7576f429506514bf0bb778afd.zip u-boot-imx-fd8cf994070df9d7576f429506514bf0bb778afd.tar.gz u-boot-imx-fd8cf994070df9d7576f429506514bf0bb778afd.tar.bz2 |
video: Fix cfb_console for 4-bit wide font
The cfb_console can't handle 4-bit wide font properly, since with
4-bit wide font, all 8 bits are drawn. Unbreak the video_drawchars()
function to correctly render 4-bits only on such fonts.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'drivers/video/cfb_console.c')
-rw-r--r-- | drivers/video/cfb_console.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 96ef8f9..c09b7e3 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -452,6 +452,10 @@ static void video_drawchars(int xx, int yy, unsigned char *s, int count) ((u32 *) dest)[0] = (video_font_draw_table8[bits >> 4] & eorx) ^ bgx; + + if (VIDEO_FONT_WIDTH == 4) + continue; + ((u32 *) dest)[1] = (video_font_draw_table8[bits & 15] & eorx) ^ bgx; @@ -477,6 +481,10 @@ static void video_drawchars(int xx, int yy, unsigned char *s, int count) SHORTSWAP32((video_font_draw_table15 [bits >> 4 & 3] & eorx) ^ bgx); + + if (VIDEO_FONT_WIDTH == 4) + continue; + ((u32 *) dest)[2] = SHORTSWAP32((video_font_draw_table15 [bits >> 2 & 3] & eorx) ^ @@ -507,6 +515,10 @@ static void video_drawchars(int xx, int yy, unsigned char *s, int count) SHORTSWAP32((video_font_draw_table16 [bits >> 4 & 3] & eorx) ^ bgx); + + if (VIDEO_FONT_WIDTH == 4) + continue; + ((u32 *) dest)[2] = SHORTSWAP32((video_font_draw_table16 [bits >> 2 & 3] & eorx) ^ @@ -541,6 +553,11 @@ static void video_drawchars(int xx, int yy, unsigned char *s, int count) ((u32 *) dest)[3] = SWAP32((video_font_draw_table32 [bits >> 4][3] & eorx) ^ bgx); + + + if (VIDEO_FONT_WIDTH == 4) + continue; + ((u32 *) dest)[4] = SWAP32((video_font_draw_table32 [bits & 15][0] & eorx) ^ bgx); @@ -576,6 +593,10 @@ static void video_drawchars(int xx, int yy, unsigned char *s, int count) ((u32 *) dest)[2] = (video_font_draw_table24[bits >> 4][2] & eorx) ^ bgx; + + if (VIDEO_FONT_WIDTH == 4) + continue; + ((u32 *) dest)[3] = (video_font_draw_table24[bits & 15][0] & eorx) ^ bgx; |