1.1 --- a/stage2/jzlcd.h Thu Jun 29 23:26:39 2017 +0200
1.2 +++ b/stage2/jzlcd.h Sat Jul 08 21:06:58 2017 +0200
1.3 @@ -37,9 +37,9 @@
1.4 */
1.5 struct jzfb_info {
1.6 uint32_t cfg; /* panel mode and pin usage etc. */
1.7 - uint32_t w;
1.8 - uint32_t h;
1.9 - uint32_t bpp; /* bit per pixel */
1.10 + uint16_t w;
1.11 + uint16_t h;
1.12 + uint8_t bpp; /* bit per pixel */
1.13 uint32_t fclk; /* frame clk */
1.14 uint32_t hsw; /* hsync width, in pclk */
1.15 uint32_t vsw; /* vsync width, in line count */
1.16 @@ -62,7 +62,7 @@
1.17 /*
1.18 * Jz LCD info
1.19 */
1.20 -struct jz_fb_info {
1.21 +struct jz_mem_info {
1.22
1.23 struct jz_fb_dma_descriptor *fdadr0; /* physical address of frame/palette descriptor */
1.24 struct jz_fb_dma_descriptor *fdadr1; /* physical address of frame descriptor */
1.25 @@ -80,11 +80,8 @@
1.26 * Concise display characteristics with low-level structure reference
1.27 */
1.28 typedef struct vidinfo {
1.29 - uint16_t vl_col; /* Number of columns (i.e. 640) */
1.30 - uint16_t vl_row; /* Number of rows (i.e. 480) */
1.31 - uint8_t vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8 */
1.32 -
1.33 - struct jz_fb_info jz_fb;
1.34 + struct jz_mem_info jz_mem;
1.35 + struct jzfb_info *jz_fb;
1.36 } vidinfo_t;
1.37
1.38 /* Alignment/rounding macros. */
1.39 @@ -92,20 +89,6 @@
1.40 #define ALIGN(x,a) __ALIGN_MASK((x),(typeof(x))(a)-1)
1.41 #define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask))
1.42
1.43 -/* General values for colour depths and framebuffer characteristics. */
1.44 -
1.45 -#define LCD_MONOCHROME 0
1.46 -#define LCD_COLOR2 1
1.47 -#define LCD_COLOR4 2
1.48 -#define LCD_COLOR8 3
1.49 -#define LCD_COLOR16 4
1.50 -#define LCD_COLOR32 5
1.51 -
1.52 -/* Calculate number of bits per pixel and number of colours. */
1.53 -
1.54 -#define NBITS(bit_code) (1 << (bit_code))
1.55 -#define NCOLORS(bit_code) (1 << NBITS(bit_code))
1.56 -
1.57 /* Transfer and display types. */
1.58
1.59 #define MODE_MASK 0x0f