1.1 --- a/stage2/lcd.c Mon Jun 08 00:35:35 2015 +0200
1.2 +++ b/stage2/lcd.c Mon Jun 08 00:56:31 2015 +0200
1.3 @@ -41,29 +41,17 @@
1.4 return addr;
1.5 }
1.6
1.7 -#define N_BLK_VERT 2
1.8 -#define N_BLK_HOR 3
1.9 -
1.10 -static int test_colors[N_BLK_HOR * N_BLK_VERT] = {
1.11 - 0x00ff0000, 0x0000ff00, 0x00ffff00,
1.12 - 0x000000ff, 0x00ff00ff, 0x0000ffff,
1.13 -};
1.14 -
1.15 static void test_pattern(void *lcd_base)
1.16 {
1.17 unsigned short v_max = panel_info.vl_row;
1.18 unsigned short h_max = panel_info.vl_col;
1.19 - unsigned short v_step = (v_max + N_BLK_VERT - 1) / N_BLK_VERT;
1.20 - unsigned short h_step = (h_max + N_BLK_HOR - 1) / N_BLK_HOR;
1.21 unsigned short v, h;
1.22 - unsigned char *pix = (unsigned char *)lcd_base;
1.23 + u32 *pix = (u32 *)lcd_base;
1.24
1.25 - /* WARNING: Code silently assumes 8bit/pixel */
1.26 - for (v = 0; v < v_max; ++v) {
1.27 - unsigned char iy = v / v_step;
1.28 - for (h = 0; h < h_max; ++h) {
1.29 - unsigned char ix = N_BLK_HOR * iy + h / h_step;
1.30 - *pix++ = test_colors[ix];
1.31 + /* WARNING: Code silently assumes 32 bit/pixel */
1.32 + for (v = 0; v < v_max; v += 1) {
1.33 + for (h = 0; h < h_max; h += 1) {
1.34 + *pix++ = 0x0000ff00;
1.35 }
1.36 }
1.37 }