• Home
  • Raw
  • Download

Lines Matching refs:fb

152 #define READ_BYTE(fb,reg)		gsc_readb((fb)->info.fix.mmio_start + (reg))  argument
153 #define READ_WORD(fb,reg) gsc_readl((fb)->info.fix.mmio_start + (reg)) argument
159 # define WRITE_BYTE(value,fb,reg) gsc_writeb((value),(fb)->info.fix.mmio_start + (reg)) argument
160 # define WRITE_WORD(value,fb,reg) gsc_writel((value),(fb)->info.fix.mmio_start + (reg)) argument
165 # define WRITE_BYTE(value,fb,reg) do { if (debug_on) \ argument
167 __func__, reg, value, READ_BYTE(fb,reg)); \
168 gsc_writeb((value),(fb)->info.fix.mmio_start + (reg)); } while (0)
169 # define WRITE_WORD(value,fb,reg) do { if (debug_on) \ argument
171 __func__, reg, value, READ_WORD(fb,reg)); \
172 gsc_writel((value),(fb)->info.fix.mmio_start + (reg)); } while (0)
183 SETUP_HW(struct stifb_info *fb) in SETUP_HW() argument
188 stat = READ_BYTE(fb, REG_15b0); in SETUP_HW()
190 stat = READ_BYTE(fb, REG_15b0); in SETUP_HW()
196 SETUP_FB(struct stifb_info *fb) in SETUP_FB() argument
200 SETUP_HW(fb); in SETUP_FB()
201 switch (fb->id) in SETUP_FB()
209 if (fb->info.var.bits_per_pixel == 32) in SETUP_FB()
215 if (fb->info.var.bits_per_pixel == 32) in SETUP_FB()
226 WRITE_WORD(reg10_value, fb, REG_10); in SETUP_FB()
227 WRITE_WORD(0x83000300, fb, REG_14); in SETUP_FB()
228 SETUP_HW(fb); in SETUP_FB()
229 WRITE_BYTE(1, fb, REG_16b1); in SETUP_FB()
233 START_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb) in START_IMAGE_COLORMAP_ACCESS() argument
235 SETUP_HW(fb); in START_IMAGE_COLORMAP_ACCESS()
236 WRITE_WORD(0xBBE0F000, fb, REG_10); in START_IMAGE_COLORMAP_ACCESS()
237 WRITE_WORD(0x03000300, fb, REG_14); in START_IMAGE_COLORMAP_ACCESS()
238 WRITE_WORD(~0, fb, REG_13); in START_IMAGE_COLORMAP_ACCESS()
242 WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color) in WRITE_IMAGE_COLOR() argument
244 SETUP_HW(fb); in WRITE_IMAGE_COLOR()
245 WRITE_WORD(((0x100+index)<<2), fb, REG_3); in WRITE_IMAGE_COLOR()
246 WRITE_WORD(color, fb, REG_4); in WRITE_IMAGE_COLOR()
250 FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb) in FINISH_IMAGE_COLORMAP_ACCESS() argument
252 WRITE_WORD(0x400, fb, REG_2); in FINISH_IMAGE_COLORMAP_ACCESS()
253 if (fb->info.var.bits_per_pixel == 32) { in FINISH_IMAGE_COLORMAP_ACCESS()
254 WRITE_WORD(0x83000100, fb, REG_1); in FINISH_IMAGE_COLORMAP_ACCESS()
256 if (fb->id == S9000_ID_ARTIST || fb->id == CRT_ID_VISUALIZE_EG) in FINISH_IMAGE_COLORMAP_ACCESS()
257 WRITE_WORD(0x80000100, fb, REG_26); in FINISH_IMAGE_COLORMAP_ACCESS()
259 WRITE_WORD(0x80000100, fb, REG_1); in FINISH_IMAGE_COLORMAP_ACCESS()
261 SETUP_FB(fb); in FINISH_IMAGE_COLORMAP_ACCESS()
265 SETUP_RAMDAC(struct stifb_info *fb) in SETUP_RAMDAC() argument
267 SETUP_HW(fb); in SETUP_RAMDAC()
268 WRITE_WORD(0x04000000, fb, 0x1020); in SETUP_RAMDAC()
269 WRITE_WORD(0xff000000, fb, 0x1028); in SETUP_RAMDAC()
273 CRX24_SETUP_RAMDAC(struct stifb_info *fb) in CRX24_SETUP_RAMDAC() argument
275 SETUP_HW(fb); in CRX24_SETUP_RAMDAC()
276 WRITE_WORD(0x04000000, fb, 0x1000); in CRX24_SETUP_RAMDAC()
277 WRITE_WORD(0x02000000, fb, 0x1004); in CRX24_SETUP_RAMDAC()
278 WRITE_WORD(0xff000000, fb, 0x1008); in CRX24_SETUP_RAMDAC()
279 WRITE_WORD(0x05000000, fb, 0x1000); in CRX24_SETUP_RAMDAC()
280 WRITE_WORD(0x02000000, fb, 0x1004); in CRX24_SETUP_RAMDAC()
281 WRITE_WORD(0x03000000, fb, 0x1008); in CRX24_SETUP_RAMDAC()
286 HCRX_SETUP_RAMDAC(struct stifb_info *fb)
288 WRITE_WORD(0xffffffff, fb, REG_32);
293 CRX24_SET_OVLY_MASK(struct stifb_info *fb) in CRX24_SET_OVLY_MASK() argument
295 SETUP_HW(fb); in CRX24_SET_OVLY_MASK()
296 WRITE_WORD(0x13a02000, fb, REG_11); in CRX24_SET_OVLY_MASK()
297 WRITE_WORD(0x03000300, fb, REG_14); in CRX24_SET_OVLY_MASK()
298 WRITE_WORD(0x000017f0, fb, REG_3); in CRX24_SET_OVLY_MASK()
299 WRITE_WORD(0xffffffff, fb, REG_13); in CRX24_SET_OVLY_MASK()
300 WRITE_WORD(0xffffffff, fb, REG_22); in CRX24_SET_OVLY_MASK()
301 WRITE_WORD(0x00000000, fb, REG_23); in CRX24_SET_OVLY_MASK()
305 ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) in ENABLE_DISABLE_DISPLAY() argument
308 SETUP_HW(fb); in ENABLE_DISABLE_DISPLAY()
309 WRITE_WORD(0x06000000, fb, 0x1030); in ENABLE_DISABLE_DISPLAY()
310 WRITE_WORD(value, fb, 0x1038); in ENABLE_DISABLE_DISPLAY()
314 CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) in CRX24_ENABLE_DISABLE_DISPLAY() argument
317 SETUP_HW(fb); in CRX24_ENABLE_DISABLE_DISPLAY()
318 WRITE_WORD(0x01000000, fb, 0x1000); in CRX24_ENABLE_DISABLE_DISPLAY()
319 WRITE_WORD(0x02000000, fb, 0x1004); in CRX24_ENABLE_DISABLE_DISPLAY()
320 WRITE_WORD(value, fb, 0x1008); in CRX24_ENABLE_DISABLE_DISPLAY()
324 ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) in ARTIST_ENABLE_DISABLE_DISPLAY() argument
329 SETUP_HW(fb); in ARTIST_ENABLE_DISABLE_DISPLAY()
331 WRITE_WORD(READ_WORD(fb, DregsMiscVideo) | 0x0A000000, fb, DregsMiscVideo); in ARTIST_ENABLE_DISABLE_DISPLAY()
332 WRITE_WORD(READ_WORD(fb, DregsMiscCtl) | 0x00800000, fb, DregsMiscCtl); in ARTIST_ENABLE_DISABLE_DISPLAY()
334 WRITE_WORD(READ_WORD(fb, DregsMiscVideo) & ~0x0A000000, fb, DregsMiscVideo); in ARTIST_ENABLE_DISABLE_DISPLAY()
335 WRITE_WORD(READ_WORD(fb, DregsMiscCtl) & ~0x00800000, fb, DregsMiscCtl); in ARTIST_ENABLE_DISABLE_DISPLAY()
339 #define GET_ROMTABLE_INDEX(fb) \ argument
340 (READ_BYTE(fb, REG_16b3) - 1)
344 #define IS_24_DEVICE(fb) \ argument
345 (fb->deviceSpecificConfig & HYPER_CONFIG_PLANES_24)
347 #define IS_888_DEVICE(fb) \ argument
348 (!(IS_24_DEVICE(fb)))
350 #define GET_FIFO_SLOTS(fb, cnt, numslots) \ argument
352 cnt = READ_WORD(fb, REG_34); \
387 #define NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, val) \ argument
388 WRITE_WORD(val, fb, REG_14)
390 #define NGLE_QUICK_SET_DST_BM_ACCESS(fb, val) \ argument
391 WRITE_WORD(val, fb, REG_11)
393 #define NGLE_QUICK_SET_CTL_PLN_REG(fb, val) \ argument
394 WRITE_WORD(val, fb, REG_12)
396 #define NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, plnmsk32) \ argument
397 WRITE_WORD(plnmsk32, fb, REG_13)
399 #define NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, fg32) \ argument
400 WRITE_WORD(fg32, fb, REG_35)
402 #define NGLE_SET_TRANSFERDATA(fb, val) \ argument
403 WRITE_WORD(val, fb, REG_8)
405 #define NGLE_SET_DSTXY(fb, val) \ argument
406 WRITE_WORD(val, fb, REG_6)
414 #define NGLE_BINC_SET_DSTADDR(fb, addr) \ argument
415 WRITE_WORD(addr, fb, REG_3)
417 #define NGLE_BINC_SET_SRCADDR(fb, addr) \ argument
418 WRITE_WORD(addr, fb, REG_2)
420 #define NGLE_BINC_SET_DSTMASK(fb, mask) \ argument
421 WRITE_WORD(mask, fb, REG_22)
423 #define NGLE_BINC_WRITE32(fb, data32) \ argument
424 WRITE_WORD(data32, fb, REG_23)
426 #define START_COLORMAPLOAD(fb, cmapBltCtlData32) \ argument
427 WRITE_WORD((cmapBltCtlData32), fb, REG_38)
429 #define SET_LENXY_START_RECFILL(fb, lenxy) \ argument
430 WRITE_WORD(lenxy, fb, REG_9)
433 HYPER_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable) in HYPER_ENABLE_DISABLE_DISPLAY() argument
437 SETUP_HW(fb); in HYPER_ENABLE_DISABLE_DISPLAY()
438 value = READ_WORD(fb, DregsHypMiscVideo); in HYPER_ENABLE_DISABLE_DISPLAY()
443 WRITE_WORD(value, fb, DregsHypMiscVideo); in HYPER_ENABLE_DISABLE_DISPLAY()
456 SETUP_ATTR_ACCESS(struct stifb_info *fb, unsigned BufferNumber) in SETUP_ATTR_ACCESS() argument
458 SETUP_HW(fb); in SETUP_ATTR_ACCESS()
459 WRITE_WORD(0x2EA0D000, fb, REG_11); in SETUP_ATTR_ACCESS()
460 WRITE_WORD(0x23000302, fb, REG_14); in SETUP_ATTR_ACCESS()
461 WRITE_WORD(BufferNumber, fb, REG_12); in SETUP_ATTR_ACCESS()
462 WRITE_WORD(0xffffffff, fb, REG_8); in SETUP_ATTR_ACCESS()
466 SET_ATTR_SIZE(struct stifb_info *fb, int width, int height) in SET_ATTR_SIZE() argument
475 WRITE_WORD(0x00000000, fb, REG_6); in SET_ATTR_SIZE()
476 WRITE_WORD((width<<16) | height, fb, REG_9); in SET_ATTR_SIZE()
477 WRITE_WORD(0x05000000, fb, REG_6); in SET_ATTR_SIZE()
478 WRITE_WORD(0x00040001, fb, REG_9); in SET_ATTR_SIZE()
482 FINISH_ATTR_ACCESS(struct stifb_info *fb) in FINISH_ATTR_ACCESS() argument
484 SETUP_HW(fb); in FINISH_ATTR_ACCESS()
485 WRITE_WORD(0x00000000, fb, REG_12); in FINISH_ATTR_ACCESS()
489 elkSetupPlanes(struct stifb_info *fb) in elkSetupPlanes() argument
491 SETUP_RAMDAC(fb); in elkSetupPlanes()
492 SETUP_FB(fb); in elkSetupPlanes()
496 ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber) in ngleSetupAttrPlanes() argument
498 SETUP_ATTR_ACCESS(fb, BufferNumber); in ngleSetupAttrPlanes()
499 SET_ATTR_SIZE(fb, fb->info.var.xres, fb->info.var.yres); in ngleSetupAttrPlanes()
500 FINISH_ATTR_ACCESS(fb); in ngleSetupAttrPlanes()
501 SETUP_FB(fb); in ngleSetupAttrPlanes()
506 rattlerSetupPlanes(struct stifb_info *fb) in rattlerSetupPlanes() argument
514 CRX24_SETUP_RAMDAC(fb); in rattlerSetupPlanes()
517 saved_id = fb->id; in rattlerSetupPlanes()
518 fb->id = CRX24_OVERLAY_PLANES; in rattlerSetupPlanes()
519 SETUP_FB(fb); in rattlerSetupPlanes()
520 fb->id = saved_id; in rattlerSetupPlanes()
522 for (y = 0; y < fb->info.var.yres; ++y) in rattlerSetupPlanes()
523 memset(fb->info.screen_base + y * fb->info.fix.line_length, in rattlerSetupPlanes()
524 0xff, fb->info.var.xres * fb->info.var.bits_per_pixel/8); in rattlerSetupPlanes()
526 CRX24_SET_OVLY_MASK(fb); in rattlerSetupPlanes()
527 SETUP_FB(fb); in rattlerSetupPlanes()
553 setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length)
561 switch (fb->id)
564 if (fb->var.bits_per_pixel == 8) {
592 setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length) in setHyperLutBltCtl() argument
603 if (fb->info.var.bits_per_pixel == 8) in setHyperLutBltCtl()
615 static void hyperUndoITE(struct stifb_info *fb) in hyperUndoITE() argument
620 NGLE_LOCK(fb); in hyperUndoITE()
622 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 1); in hyperUndoITE()
623 WRITE_WORD(0xffffffff, fb, REG_32); in hyperUndoITE()
628 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7); in hyperUndoITE()
629 NGLE_QUICK_SET_DST_BM_ACCESS(fb, in hyperUndoITE()
632 NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, in hyperUndoITE()
639 NGLE_BINC_SET_DSTADDR(fb, fbAddr); in hyperUndoITE()
640 NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, 0xffffff); in hyperUndoITE()
641 NGLE_BINC_SET_DSTMASK(fb, 0xffffffff); in hyperUndoITE()
644 NGLE_BINC_WRITE32(fb, 0); in hyperUndoITE()
646 NGLE_UNLOCK(fb); in hyperUndoITE()
650 ngleDepth8_ClearImagePlanes(struct stifb_info *fb) in ngleDepth8_ClearImagePlanes() argument
656 ngleDepth24_ClearImagePlanes(struct stifb_info *fb) in ngleDepth24_ClearImagePlanes() argument
662 ngleResetAttrPlanes(struct stifb_info *fb, unsigned int ctlPlaneReg) in ngleResetAttrPlanes() argument
668 NGLE_LOCK(fb); in ngleResetAttrPlanes()
670 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 4); in ngleResetAttrPlanes()
671 NGLE_QUICK_SET_DST_BM_ACCESS(fb, in ngleResetAttrPlanes()
675 NGLE_QUICK_SET_CTL_PLN_REG(fb, ctlPlaneReg); in ngleResetAttrPlanes()
676 NGLE_SET_TRANSFERDATA(fb, 0xffffffff); in ngleResetAttrPlanes()
678 NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, in ngleResetAttrPlanes()
684 packed_len = (fb->info.var.xres << 16) | fb->info.var.yres; in ngleResetAttrPlanes()
685 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 2); in ngleResetAttrPlanes()
686 NGLE_SET_DSTXY(fb, packed_dst); in ngleResetAttrPlanes()
687 SET_LENXY_START_RECFILL(fb, packed_len); in ngleResetAttrPlanes()
697 if (fb->id == S9000_ID_A1659A) { /* ELK_DEVICE_ID */ in ngleResetAttrPlanes()
700 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 2); in ngleResetAttrPlanes()
701 NGLE_SET_DSTXY(fb, packed_dst); in ngleResetAttrPlanes()
703 SET_LENXY_START_RECFILL(fb, packed_len); in ngleResetAttrPlanes()
707 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 1); in ngleResetAttrPlanes()
708 NGLE_QUICK_SET_CTL_PLN_REG(fb, 0); in ngleResetAttrPlanes()
710 NGLE_UNLOCK(fb); in ngleResetAttrPlanes()
714 ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data) in ngleClearOverlayPlanes() argument
720 NGLE_LOCK(fb); in ngleClearOverlayPlanes()
723 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 8); in ngleClearOverlayPlanes()
724 NGLE_QUICK_SET_DST_BM_ACCESS(fb, in ngleClearOverlayPlanes()
728 NGLE_SET_TRANSFERDATA(fb, 0xffffffff); /* Write foreground color */ in ngleClearOverlayPlanes()
730 NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, data); in ngleClearOverlayPlanes()
731 NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, mask); in ngleClearOverlayPlanes()
734 packed_len = (fb->info.var.xres << 16) | fb->info.var.yres; in ngleClearOverlayPlanes()
735 NGLE_SET_DSTXY(fb, packed_dst); in ngleClearOverlayPlanes()
738 NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb, in ngleClearOverlayPlanes()
743 SET_LENXY_START_RECFILL(fb, packed_len); in ngleClearOverlayPlanes()
745 NGLE_UNLOCK(fb); in ngleClearOverlayPlanes()
749 hyperResetPlanes(struct stifb_info *fb, int enable) in hyperResetPlanes() argument
753 NGLE_LOCK(fb); in hyperResetPlanes()
755 if (IS_24_DEVICE(fb)) in hyperResetPlanes()
756 if (fb->info.var.bits_per_pixel == 32) in hyperResetPlanes()
766 if (IS_24_DEVICE(fb)) in hyperResetPlanes()
767 ngleDepth24_ClearImagePlanes(fb); in hyperResetPlanes()
769 ngleDepth8_ClearImagePlanes(fb); in hyperResetPlanes()
773 ngleResetAttrPlanes(fb, controlPlaneReg); in hyperResetPlanes()
776 ngleClearOverlayPlanes(fb, 0xff, 255); in hyperResetPlanes()
781 hyperUndoITE(fb); in hyperResetPlanes()
786 if (IS_24_DEVICE(fb)) in hyperResetPlanes()
787 ngleDepth24_ClearImagePlanes(fb); in hyperResetPlanes()
789 ngleDepth8_ClearImagePlanes(fb); in hyperResetPlanes()
790 ngleResetAttrPlanes(fb, controlPlaneReg); in hyperResetPlanes()
791 ngleClearOverlayPlanes(fb, 0xff, 0); in hyperResetPlanes()
795 hyperUndoITE(fb); in hyperResetPlanes()
796 ngleResetAttrPlanes(fb, controlPlaneReg); in hyperResetPlanes()
800 NGLE_UNLOCK(fb); in hyperResetPlanes()
806 ngleGetDeviceRomData(struct stifb_info *fb) in ngleGetDeviceRomData() argument
820 pPackedDevRomData = fb->ngle_rom; in ngleGetDeviceRomData()
822 SETUP_HW(fb); in ngleGetDeviceRomData()
823 if (fb->id == S9000_ID_ARTIST) { in ngleGetDeviceRomData()
828 pBytePerLongDevDepData = fb->sti->regions[NGLEDEVDEPROM_CRT_REGION]; in ngleGetDeviceRomData()
831 if (fb->id == S9000_ID_TOMCAT) in ngleGetDeviceRomData()
862 SETUP_FB(fb); in ngleGetDeviceRomData()
874 SETUP_HCRX(struct stifb_info *fb) in SETUP_HCRX() argument
879 if (fb->id != S9000_ID_HCRX) in SETUP_HCRX()
883 GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7); in SETUP_HCRX()
885 if (IS_24_DEVICE(fb)) { in SETUP_HCRX()
886 hyperbowl = (fb->info.var.bits_per_pixel == 32) ? in SETUP_HCRX()
891 WRITE_WORD(hyperbowl, fb, REG_40); in SETUP_HCRX()
892 WRITE_WORD(hyperbowl, fb, REG_40); in SETUP_HCRX()
894 WRITE_WORD(HYPERBOWL_MODE2_8_24, fb, REG_39); in SETUP_HCRX()
896 WRITE_WORD(0x014c0148, fb, REG_42); /* Set lut 0 to be the direct color */ in SETUP_HCRX()
897 WRITE_WORD(0x404c4048, fb, REG_43); in SETUP_HCRX()
898 WRITE_WORD(0x034c0348, fb, REG_44); in SETUP_HCRX()
899 WRITE_WORD(0x444c4448, fb, REG_45); in SETUP_HCRX()
904 WRITE_WORD(hyperbowl, fb, REG_40); in SETUP_HCRX()
905 WRITE_WORD(hyperbowl, fb, REG_40); in SETUP_HCRX()
907 WRITE_WORD(0x00000000, fb, REG_42); in SETUP_HCRX()
908 WRITE_WORD(0x00000000, fb, REG_43); in SETUP_HCRX()
909 WRITE_WORD(0x00000000, fb, REG_44); in SETUP_HCRX()
910 WRITE_WORD(0x444c4048, fb, REG_45); in SETUP_HCRX()
921 struct stifb_info *fb = container_of(info, struct stifb_info, info); in stifb_setcolreg() local
933 START_IMAGE_COLORMAP_ACCESS(fb); in stifb_setcolreg()
935 if (unlikely(fb->info.var.grayscale)) { in stifb_setcolreg()
946 if (fb->info.fix.visual == FB_VISUAL_DIRECTCOLOR) { in stifb_setcolreg()
947 struct fb_var_screeninfo *var = &fb->info.var; in stifb_setcolreg()
949 ((u32 *)fb->info.pseudo_palette)[regno] = in stifb_setcolreg()
955 WRITE_IMAGE_COLOR(fb, regno, color); in stifb_setcolreg()
957 if (fb->id == S9000_ID_HCRX) { in stifb_setcolreg()
960 lutBltCtl = setHyperLutBltCtl(fb, in stifb_setcolreg()
963 NGLE_BINC_SET_SRCADDR(fb, in stifb_setcolreg()
966 START_COLORMAPLOAD(fb, lutBltCtl.all); in stifb_setcolreg()
967 SETUP_FB(fb); in stifb_setcolreg()
970 FINISH_IMAGE_COLORMAP_ACCESS(fb); in stifb_setcolreg()
981 struct stifb_info *fb = container_of(info, struct stifb_info, info); in stifb_blank() local
984 switch (fb->id) { in stifb_blank()
986 CRX24_ENABLE_DISABLE_DISPLAY(fb, enable); in stifb_blank()
990 ARTIST_ENABLE_DISABLE_DISPLAY(fb, enable); in stifb_blank()
993 HYPER_ENABLE_DISABLE_DISPLAY(fb, enable); in stifb_blank()
999 ENABLE_DISABLE_DISPLAY(fb, enable); in stifb_blank()
1003 SETUP_FB(fb); in stifb_blank()
1008 stifb_init_display(struct stifb_info *fb) in stifb_init_display() argument
1010 int id = fb->id; in stifb_init_display()
1012 SETUP_FB(fb); in stifb_init_display()
1015 SETUP_HCRX(fb); in stifb_init_display()
1027 hyperResetPlanes(fb, ENABLE); in stifb_init_display()
1030 rattlerSetupPlanes(fb); in stifb_init_display()
1035 elkSetupPlanes(fb); in stifb_init_display()
1043 if (fb->info.var.bits_per_pixel == 32) in stifb_init_display()
1044 ngleSetupAttrPlanes(fb, BUFF1_CMAP3); in stifb_init_display()
1046 ngleSetupAttrPlanes(fb, BUFF1_CMAP0); in stifb_init_display()
1049 ngleClearOverlayPlanes(fb, 0xff, 0); in stifb_init_display()
1053 if (fb->info.var.bits_per_pixel == 32) in stifb_init_display()
1054 ngleSetupAttrPlanes(fb, BUFF1_CMAP3); in stifb_init_display()
1056 ngleSetupAttrPlanes(fb, ARTIST_CMAP0); in stifb_init_display()
1060 stifb_blank(0, (struct fb_info *)fb); /* 0=enable screen */ in stifb_init_display()
1062 SETUP_FB(fb); in stifb_init_display()
1085 struct stifb_info *fb; in stifb_init_fb() local
1091 fb = kzalloc(sizeof(*fb), GFP_ATOMIC); in stifb_init_fb()
1092 if (!fb) { in stifb_init_fb()
1097 info = &fb->info; in stifb_init_fb()
1103 fb->sti = sti; in stifb_init_fb()
1106 fb->id = fb->sti->graphics_id[0]; in stifb_init_fb()
1109 switch (fb->id) { in stifb_init_fb()
1134 dev_name, fb->id); in stifb_init_fb()
1140 xres = sti_onscreen_x(fb->sti); in stifb_init_fb()
1141 yres = sti_onscreen_y(fb->sti); in stifb_init_fb()
1143 ngleGetDeviceRomData(fb); in stifb_init_fb()
1146 fix->mmio_start = REGION_BASE(fb,2); in stifb_init_fb()
1150 switch (fb->id) { in stifb_init_fb()
1155 fb->id = S9000_ID_A1659A; in stifb_init_fb()
1168 xres = fb->ngle_rom.x_size_visible; in stifb_init_fb()
1169 yres = fb->ngle_rom.y_size_visible; in stifb_init_fb()
1170 fb->id = S9000_ID_A1659A; in stifb_init_fb()
1176 memset(&fb->ngle_rom, 0, sizeof(fb->ngle_rom)); in stifb_init_fb()
1177 if ((fb->sti->regions_phys[0] & 0xfc000000) == in stifb_init_fb()
1178 (fb->sti->regions_phys[2] & 0xfc000000)) in stifb_init_fb()
1179 sti_rom_address = F_EXTEND(fb->sti->regions_phys[0]); in stifb_init_fb()
1181 sti_rom_address = F_EXTEND(fb->sti->regions_phys[1]); in stifb_init_fb()
1183 fb->deviceSpecificConfig = gsc_readl(sti_rom_address); in stifb_init_fb()
1184 if (IS_24_DEVICE(fb)) { in stifb_init_fb()
1191 READ_WORD(fb, REG_15); in stifb_init_fb()
1192 SETUP_HW(fb); in stifb_init_fb()
1202 fb->id); in stifb_init_fb()
1209 fb->id); in stifb_init_fb()
1216 fix->smem_start = F_EXTEND(fb->sti->regions_phys[1]); in stifb_init_fb()
1217 fix->smem_len = fb->sti->regions[1].region_desc.length * 4096; in stifb_init_fb()
1219 fix->line_length = (fb->sti->glob_cfg->total_x * bpp) / 8; in stifb_init_fb()
1259 info->screen_base = ioremap_nocache(REGION_BASE(fb,1), fix->smem_len); in stifb_init_fb()
1262 info->pseudo_palette = &fb->pseudo_palette; in stifb_init_fb()
1267 stifb_init_display(fb); in stifb_init_fb()
1281 if (register_framebuffer(&fb->info) < 0) in stifb_init_fb()
1286 fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n", in stifb_init_fb()
1292 fb->id, in stifb_init_fb()
1307 kfree(fb); in stifb_init_fb()