#define CRT_FB_ADDRESS_ADDRESS 25:0
#define CRT_FB_WIDTH 0x080208
-#define CRT_FB_WIDTH_WIDTH 29:16
-#define CRT_FB_WIDTH_OFFSET 13:0
+#define CRT_FB_WIDTH_WIDTH_SHIFT 16
+#define CRT_FB_WIDTH_WIDTH_MASK (0x3fff << 16)
+#define CRT_FB_WIDTH_OFFSET_MASK 0x3fff
#define CRT_HORIZONTAL_TOTAL 0x08020C
#define CRT_HORIZONTAL_TOTAL_TOTAL_SHIFT 16
POKE32(CRT_FB_ADDRESS, crtc->oScreen);
reg = var->xres * (var->bits_per_pixel >> 3);
/* crtc->channel is not equal to par->index on numeric,be aware of that */
- reg = ALIGN(reg, crtc->line_pad);
-
- POKE32(CRT_FB_WIDTH,
- FIELD_VALUE(0, CRT_FB_WIDTH, WIDTH, reg)|
- FIELD_VALUE(0, CRT_FB_WIDTH, OFFSET, fix->line_length));
+ reg = ALIGN(reg, crtc->line_pad) << CRT_FB_WIDTH_WIDTH_SHIFT;
+ reg &= CRT_FB_WIDTH_WIDTH_MASK;
+ reg |= (fix->line_length & CRT_FB_WIDTH_OFFSET_MASK);
+ POKE32(CRT_FB_WIDTH, reg);
/* SET PIXEL FORMAT */
reg = PEEK32(CRT_DISPLAY_CTRL);