Lines Matching +full:0 +full:x30000

33 #define ATI_DEBUG_HW_CURSOR 0
38 #define DEFAULT_X_PIXMAN 0
61 uint32_t offs = s->regs.crtc_offset & 0x07ffffff; in ati_vga_switch_mode()
62 int stride = (s->regs.crtc_pitch & 0x7ff) * 8; in ati_vga_switch_mode()
63 int bpp = 0; in ati_vga_switch_mode()
66 if (s->regs.crtc_h_total_disp == 0) { in ati_vga_switch_mode()
69 if (s->regs.crtc_v_total_disp == 0) { in ati_vga_switch_mode()
98 vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_ENABLE); in ati_vga_switch_mode()
99 vbe_ioport_write_data(&s->vga, 0, VBE_DISPI_DISABLED); in ati_vga_switch_mode()
108 vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_ENABLE); in ati_vga_switch_mode()
109 vbe_ioport_write_data(&s->vga, 0, VBE_DISPI_ENABLED | in ati_vga_switch_mode()
111 (s->regs.dac_cntl & DAC_8BIT_EN ? VBE_DISPI_8BIT_DAC : 0)); in ati_vga_switch_mode()
116 vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_VIRT_WIDTH); in ati_vga_switch_mode()
117 vbe_ioport_write_data(&s->vga, 0, stride); in ati_vga_switch_mode()
121 vbe_ioport_write_index(&s->vga, 0, in ati_vga_switch_mode()
123 vbe_ioport_write_data(&s->vga, 0, offs % stride / bypp); in ati_vga_switch_mode()
125 vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_Y_OFFSET); in ati_vga_switch_mode()
126 vbe_ioport_write_data(&s->vga, 0, offs / stride); in ati_vga_switch_mode()
136 vbe_ioport_write_index(&s->vga, 0, VBE_DISPI_INDEX_ENABLE); in ati_vga_switch_mode()
137 vbe_ioport_write_data(&s->vga, 0, VBE_DISPI_DISABLED); in ati_vga_switch_mode()
146 int i, j, idx = 0; in ati_cursor_define()
153 (s->regs.cur_hv_offs >> 16) - (s->regs.cur_hv_offs & 0xffff) * 16; in ati_cursor_define()
154 for (i = 0; i < 64; i++) { in ati_cursor_define()
155 for (j = 0; j < 8; j++, idx++) { in ati_cursor_define()
164 &data[512], 1, &data[0]); in ati_cursor_define()
172 int size = (s->regs.crtc_gen_cntl & CRTC2_CUR_EN) ? 64 : 0; in ati_cursor_invalidate()
179 vga->hw_cursor_y != (s->regs.cur_hv_pos & 0xffff) || in ati_cursor_invalidate()
181 (s->regs.cur_hv_offs & 0xffff) * 16) { in ati_cursor_invalidate()
185 vga->hw_cursor_y = s->regs.cur_hv_pos & 0xffff; in ati_cursor_invalidate()
187 (s->regs.cur_hv_offs & 0xffff) * 16; in ati_cursor_invalidate()
212 for (i = 0; i < 8; i++) { in ati_cursor_draw_line()
216 for (j = 0; j < 8; j++, abits <<= 1, xbits <<= 1) { in ati_cursor_draw_line()
219 color = dp[i * 8 + j] ^ 0xffffffff; /* complement */ in ati_cursor_draw_line()
225 s->regs.cur_color0) | 0xff000000; in ati_cursor_draw_line()
243 data &= ~0xf00ULL; in ati_i2c()
271 if (offs == 0 && size == 4) { in ati_reg_read_offs()
281 uint64_t val = 0; in ati_mm_read()
343 val |= vga_ioport_read(&s->vga, VGA_PEL_IW) & 0xff; in ati_mm_read()
360 PCI_BASE_ADDRESS_0, size) & 0xfffffff0; in ati_mm_read()
367 PCI_BASE_ADDRESS_2, size) & 0xfffffff0; in ati_mm_read()
408 case 0xf00 ... 0xfff: in ati_mm_read()
409 val = pci_default_read_config(&s->dev, addr - 0xf00, size); in ati_mm_read()
524 if (offs == 0 && size == 4) { in ati_reg_write_offs()
579 0x000f040fUL : 0xfc080effUL); in ati_mm_write()
596 s->regs.cur_hv_pos & 0xffff, in ati_mm_write()
597 (s->regs.crtc_gen_cntl & CRTC2_CUR_EN) != 0); in ati_mm_write()
626 s->regs.dac_cntl = data & 0xffffe3ff; in ati_mm_write()
645 (addr == GPIO_DVI_DDC && (s->regs.gpio_dvi_ddc & 0x30000))) { in ati_mm_write()
647 s->regs.gpio_dvi_ddc, 0); in ati_mm_write()
659 (addr == GPIO_MONID && (s->regs.gpio_monid & 0x60000)))) { in ati_mm_write()
666 vga_ioport_write(&s->vga, VGA_PEL_IR, (data >> 16) & 0xff); in ati_mm_write()
667 vga_ioport_write(&s->vga, VGA_PEL_IW, data & 0xff); in ati_mm_write()
670 vga_ioport_write(&s->vga, VGA_PEL_IW, data & 0xff); in ati_mm_write()
672 vga_ioport_write(&s->vga, VGA_PEL_IR, data & 0xff); in ati_mm_write()
679 vga_ioport_write(&s->vga, VGA_PEL_D, data & 0xff); in ati_mm_write()
681 vga_ioport_write(&s->vga, VGA_PEL_D, data & 0xff); in ati_mm_write()
683 vga_ioport_write(&s->vga, VGA_PEL_D, data & 0xff); in ati_mm_write()
687 vga_ioport_write(&s->vga, VGA_PEL_D, (data >> 22) & 0xff); in ati_mm_write()
688 vga_ioport_write(&s->vga, VGA_PEL_D, (data >> 12) & 0xff); in ati_mm_write()
689 vga_ioport_write(&s->vga, VGA_PEL_D, (data >> 2) & 0xff); in ati_mm_write()
695 s->regs.crtc_h_total_disp = data & 0x07ff07ff; in ati_mm_write()
698 s->regs.crtc_h_sync_strt_wid = data & 0x17bf1fff; in ati_mm_write()
701 s->regs.crtc_v_total_disp = data & 0x0fff0fff; in ati_mm_write()
704 s->regs.crtc_v_sync_strt_wid = data & 0x9f0fff; in ati_mm_write()
707 s->regs.crtc_offset = data & 0xc7ffffff; in ati_mm_write()
713 s->regs.crtc_pitch = data & 0x07ff07ff; in ati_mm_write()
715 case 0xf00 ... 0xfff: in ati_mm_write()
723 t &= 0x87fffff0; in ati_mm_write()
735 s->regs.cur_hv_pos = t & 0x3fff0fff; in ati_mm_write()
745 s->regs.cur_hv_pos & 0xffff, true); in ati_mm_write()
754 s->regs.cur_hv_offs = t & 0x3f003f; in ati_mm_write()
768 t &= 0xffffff; in ati_mm_write()
782 s->regs.cur_color1 &= 0xffffff; in ati_mm_write()
787 s->regs.dst_offset = data & 0xfffffff0; in ati_mm_write()
789 s->regs.dst_offset = data & 0xfffffc00; in ati_mm_write()
794 s->regs.dst_pitch = data & 0x3fff; in ati_mm_write()
797 s->regs.dst_pitch = data & 0x3ff0; in ati_mm_write()
806 s->regs.dst_width = data & 0x3fff; in ati_mm_write()
810 s->regs.dst_height = data & 0x3fff; in ati_mm_write()
813 s->regs.src_x = data & 0x3fff; in ati_mm_write()
816 s->regs.src_y = data & 0x3fff; in ati_mm_write()
819 s->regs.dst_x = data & 0x3fff; in ati_mm_write()
822 s->regs.dst_y = data & 0x3fff; in ati_mm_write()
826 s->regs.src_offset = (data & 0x1fffff) << 5; in ati_mm_write()
827 s->regs.src_pitch = (data & 0x7fe00000) >> 21; in ati_mm_write()
830 s->regs.src_offset = (data & 0x3fffff) << 10; in ati_mm_write()
831 s->regs.src_pitch = (data & 0x3fc00000) >> 16; in ati_mm_write()
837 s->regs.dst_offset = (data & 0x1fffff) << 5; in ati_mm_write()
838 s->regs.dst_pitch = (data & 0x7fe00000) >> 21; in ati_mm_write()
841 s->regs.dst_offset = (data & 0x3fffff) << 10; in ati_mm_write()
842 s->regs.dst_pitch = (data & 0x3fc00000) >> 16; in ati_mm_write()
847 s->regs.src_x = data & 0x3fff; in ati_mm_write()
848 s->regs.src_y = (data >> 16) & 0x3fff; in ati_mm_write()
851 s->regs.dst_x = data & 0x3fff; in ati_mm_write()
852 s->regs.dst_y = (data >> 16) & 0x3fff; in ati_mm_write()
855 s->regs.dst_width = data & 0x3fff; in ati_mm_write()
856 s->regs.dst_height = (data >> 16) & 0x3fff; in ati_mm_write()
860 s->regs.dp_gui_master_cntl = data & 0xf800000f; in ati_mm_write()
861 s->regs.dp_datatype = (data & 0x0f00) >> 8 | (data & 0x30f0) << 4 | in ati_mm_write()
862 (data & 0x4000) << 16; in ati_mm_write()
863 s->regs.dp_mix = (data & GMC_ROP3_MASK) | (data & 0x7000000) >> 16; in ati_mm_write()
866 s->regs.dst_x = data & 0x3fff; in ati_mm_write()
867 s->regs.dst_width = (data >> 16) & 0x3fff; in ati_mm_write()
871 s->regs.src_y = data & 0x3fff; in ati_mm_write()
872 s->regs.src_x = (data >> 16) & 0x3fff; in ati_mm_write()
875 s->regs.dst_y = data & 0x3fff; in ati_mm_write()
876 s->regs.dst_x = (data >> 16) & 0x3fff; in ati_mm_write()
879 s->regs.dst_height = data & 0x3fff; in ati_mm_write()
880 s->regs.dst_width = (data >> 16) & 0x3fff; in ati_mm_write()
884 s->regs.dst_y = data & 0x3fff; in ati_mm_write()
885 s->regs.dst_height = (data >> 16) & 0x3fff; in ati_mm_write()
889 s->regs.src_offset = data & 0xfffffff0; in ati_mm_write()
891 s->regs.src_offset = data & 0xfffffc00; in ati_mm_write()
896 s->regs.src_pitch = data & 0x3fff; in ati_mm_write()
899 s->regs.src_pitch = data & 0x3ff0; in ati_mm_write()
912 s->regs.dp_datatype = data & 0xe0070f0f; in ati_mm_write()
915 s->regs.dp_mix = data & 0x00ff0700; in ati_mm_write()
922 s->regs.default_offset = data & 0xfffffff0; in ati_mm_write()
925 s->regs.default_offset = (data & 0x3fffff) << 10; in ati_mm_write()
926 s->regs.default_pitch = (data & 0x3fc00000) >> 16; in ati_mm_write()
932 s->regs.default_pitch = data & 0x3fff; in ati_mm_write()
937 s->regs.default_sc_bottom_right = data & 0x3fff3fff; in ati_mm_write()
956 if (s->use_pixman != 0) { in ati_vga_realize()
957 warn_report("x-pixman != 0, not effective without PIXMAN"); in ati_vga_realize()
963 for (i = 0; i < ARRAY_SIZE(ati_model_aliases); i++) { in ati_vga_realize()
977 "only 0x5046 and 0x5159 are supported"); in ati_vga_realize()
994 vga->con = graphic_console_init(DEVICE(s), 0, s->vga.hw_ops, vga); in ati_vga_realize()
1004 i2c_slave_set_address(i2cddc, 0x50); in ati_vga_realize()
1009 "ati.mmregs", 0x4000); in ati_vga_realize()
1011 memory_region_init_alias(&s->io, OBJECT(s), "ati.io", &s->mm, 0, 0x100); in ati_vga_realize()
1013 pci_register_bar(dev, 0, PCI_BASE_ADDRESS_MEM_PREFETCH, &vga->vram); in ati_vga_realize()