Lines Matching refs:dinfo
67 int intelfbhw_get_chipset(struct pci_dev *pdev, struct intelfb_info *dinfo) in intelfbhw_get_chipset() argument
70 if (!pdev || !dinfo) in intelfbhw_get_chipset()
75 dinfo->name = "Intel(R) 830M"; in intelfbhw_get_chipset()
76 dinfo->chipset = INTEL_830M; in intelfbhw_get_chipset()
77 dinfo->mobile = 1; in intelfbhw_get_chipset()
78 dinfo->pll_index = PLLS_I8xx; in intelfbhw_get_chipset()
81 dinfo->name = "Intel(R) 845G"; in intelfbhw_get_chipset()
82 dinfo->chipset = INTEL_845G; in intelfbhw_get_chipset()
83 dinfo->mobile = 0; in intelfbhw_get_chipset()
84 dinfo->pll_index = PLLS_I8xx; in intelfbhw_get_chipset()
87 dinfo->mobile = 1; in intelfbhw_get_chipset()
88 dinfo->name = "Intel(R) 854"; in intelfbhw_get_chipset()
89 dinfo->chipset = INTEL_854; in intelfbhw_get_chipset()
93 dinfo->mobile = 1; in intelfbhw_get_chipset()
94 dinfo->pll_index = PLLS_I8xx; in intelfbhw_get_chipset()
99 dinfo->name = "Intel(R) 855GME"; in intelfbhw_get_chipset()
100 dinfo->chipset = INTEL_855GME; in intelfbhw_get_chipset()
103 dinfo->name = "Intel(R) 855GM"; in intelfbhw_get_chipset()
104 dinfo->chipset = INTEL_855GM; in intelfbhw_get_chipset()
107 dinfo->name = "Intel(R) 852GME"; in intelfbhw_get_chipset()
108 dinfo->chipset = INTEL_852GME; in intelfbhw_get_chipset()
111 dinfo->name = "Intel(R) 852GM"; in intelfbhw_get_chipset()
112 dinfo->chipset = INTEL_852GM; in intelfbhw_get_chipset()
115 dinfo->name = "Intel(R) 852GM/855GM"; in intelfbhw_get_chipset()
116 dinfo->chipset = INTEL_85XGM; in intelfbhw_get_chipset()
121 dinfo->name = "Intel(R) 865G"; in intelfbhw_get_chipset()
122 dinfo->chipset = INTEL_865G; in intelfbhw_get_chipset()
123 dinfo->mobile = 0; in intelfbhw_get_chipset()
124 dinfo->pll_index = PLLS_I8xx; in intelfbhw_get_chipset()
127 dinfo->name = "Intel(R) 915G"; in intelfbhw_get_chipset()
128 dinfo->chipset = INTEL_915G; in intelfbhw_get_chipset()
129 dinfo->mobile = 0; in intelfbhw_get_chipset()
130 dinfo->pll_index = PLLS_I9xx; in intelfbhw_get_chipset()
133 dinfo->name = "Intel(R) 915GM"; in intelfbhw_get_chipset()
134 dinfo->chipset = INTEL_915GM; in intelfbhw_get_chipset()
135 dinfo->mobile = 1; in intelfbhw_get_chipset()
136 dinfo->pll_index = PLLS_I9xx; in intelfbhw_get_chipset()
139 dinfo->name = "Intel(R) 945G"; in intelfbhw_get_chipset()
140 dinfo->chipset = INTEL_945G; in intelfbhw_get_chipset()
141 dinfo->mobile = 0; in intelfbhw_get_chipset()
142 dinfo->pll_index = PLLS_I9xx; in intelfbhw_get_chipset()
145 dinfo->name = "Intel(R) 945GM"; in intelfbhw_get_chipset()
146 dinfo->chipset = INTEL_945GM; in intelfbhw_get_chipset()
147 dinfo->mobile = 1; in intelfbhw_get_chipset()
148 dinfo->pll_index = PLLS_I9xx; in intelfbhw_get_chipset()
151 dinfo->name = "Intel(R) 945GME"; in intelfbhw_get_chipset()
152 dinfo->chipset = INTEL_945GME; in intelfbhw_get_chipset()
153 dinfo->mobile = 1; in intelfbhw_get_chipset()
154 dinfo->pll_index = PLLS_I9xx; in intelfbhw_get_chipset()
157 dinfo->name = "Intel(R) 965G"; in intelfbhw_get_chipset()
158 dinfo->chipset = INTEL_965G; in intelfbhw_get_chipset()
159 dinfo->mobile = 0; in intelfbhw_get_chipset()
160 dinfo->pll_index = PLLS_I9xx; in intelfbhw_get_chipset()
163 dinfo->name = "Intel(R) 965GM"; in intelfbhw_get_chipset()
164 dinfo->chipset = INTEL_965GM; in intelfbhw_get_chipset()
165 dinfo->mobile = 1; in intelfbhw_get_chipset()
166 dinfo->pll_index = PLLS_I9xx; in intelfbhw_get_chipset()
282 int intelfbhw_check_non_crt(struct intelfb_info *dinfo) in intelfbhw_check_non_crt() argument
313 int intelfbhw_validate_mode(struct intelfb_info *dinfo, in intelfbhw_validate_mode() argument
329 if (tmp > dinfo->fb.size) { in intelfbhw_validate_mode()
332 BtoKB(tmp), BtoKB(dinfo->fb.size)); in intelfbhw_validate_mode()
385 struct intelfb_info *dinfo = GET_DINFO(info); in intelfbhw_pan_display() local
399 offset = (yoffset * dinfo->pitch) + in intelfbhw_pan_display()
402 offset += dinfo->fb.offset << 12; in intelfbhw_pan_display()
404 dinfo->vsync.pan_offset = offset; in intelfbhw_pan_display()
406 !intelfbhw_enable_irq(dinfo)) in intelfbhw_pan_display()
407 dinfo->vsync.pan_display = 1; in intelfbhw_pan_display()
409 dinfo->vsync.pan_display = 0; in intelfbhw_pan_display()
419 struct intelfb_info *dinfo = GET_DINFO(info); in intelfbhw_do_blank() local
439 DBG_MSG("cursor_on is %d\n", dinfo->cursor_on); in intelfbhw_do_blank()
441 if (dinfo->cursor_on) { in intelfbhw_do_blank()
443 intelfbhw_cursor_hide(dinfo); in intelfbhw_do_blank()
445 intelfbhw_cursor_show(dinfo); in intelfbhw_do_blank()
446 dinfo->cursor_on = 1; in intelfbhw_do_blank()
448 dinfo->cursor_blanked = blank; in intelfbhw_do_blank()
499 void intelfbhw_setcolreg(struct intelfb_info *dinfo, unsigned regno, in intelfbhw_setcolreg() argument
503 u32 palette_reg = (dinfo->pipe == PIPE_A) ? in intelfbhw_setcolreg()
518 int intelfbhw_read_hw_state(struct intelfb_info *dinfo, in intelfbhw_read_hw_state() argument
527 if (!hw || !dinfo) in intelfbhw_read_hw_state()
684 static void intelfbhw_get_p1p2(struct intelfb_info *dinfo, int dpll, in intelfbhw_get_p1p2() argument
689 if (IS_I9XX(dinfo)) { in intelfbhw_get_p1p2()
712 void intelfbhw_print_hw_state(struct intelfb_info *dinfo, in intelfbhw_print_hw_state() argument
717 int index = dinfo->pll_index; in intelfbhw_print_hw_state()
731 intelfbhw_get_p1p2(dinfo, hw->vga_pd, &p1, &p2); in intelfbhw_print_hw_state()
742 intelfbhw_get_p1p2(dinfo, hw->vga_pd, &p1, &p2); in intelfbhw_print_hw_state()
759 intelfbhw_get_p1p2(dinfo, hw->dpll_a, &p1, &p2); in intelfbhw_print_hw_state()
770 intelfbhw_get_p1p2(dinfo, hw->dpll_a, &p1, &p2); in intelfbhw_print_hw_state()
1040 int intelfbhw_mode_to_hw(struct intelfb_info *dinfo, in intelfbhw_mode_to_hw() argument
1115 if (calc_pll_params(dinfo->pll_index, clock_target, &m1, &m2, in intelfbhw_mode_to_hw()
1137 if (IS_I9XX(dinfo)) { in intelfbhw_mode_to_hw()
1248 hw->disp_a_stride = dinfo->pitch; in intelfbhw_mode_to_hw()
1254 hw->disp_a_base += dinfo->fb.offset << 12; in intelfbhw_mode_to_hw()
1257 stride_alignment = IS_I9XX(dinfo) ? STRIDE_ALIGNMENT_I9XX : in intelfbhw_mode_to_hw()
1277 int intelfbhw_program_mode(struct intelfb_info *dinfo, in intelfbhw_program_mode() argument
1300 dinfo->pipe = intelfbhw_active_pipe(hw); in intelfbhw_program_mode()
1302 if (dinfo->pipe == PIPE_B) { in intelfbhw_program_mode()
1429 switch (dinfo->info->var.vmode & (FB_VMODE_INTERLACED | in intelfbhw_program_mode()
1450 if (dinfo->pdev->device == PCI_DEVICE_ID_INTEL_830M) { in intelfbhw_program_mode()
1482 static void refresh_ring(struct intelfb_info *dinfo);
1483 static void reset_state(struct intelfb_info *dinfo);
1484 static void do_flush(struct intelfb_info *dinfo);
1486 static u32 get_ring_space(struct intelfb_info *dinfo) in get_ring_space() argument
1490 if (dinfo->ring_tail >= dinfo->ring_head) in get_ring_space()
1491 ring_space = dinfo->ring.size - in get_ring_space()
1492 (dinfo->ring_tail - dinfo->ring_head); in get_ring_space()
1494 ring_space = dinfo->ring_head - dinfo->ring_tail; in get_ring_space()
1504 static int wait_ring(struct intelfb_info *dinfo, int n) in wait_ring() argument
1515 while (dinfo->ring_space < n) { in wait_ring()
1516 dinfo->ring_head = INREG(PRI_RING_HEAD) & RING_HEAD_MASK; in wait_ring()
1517 dinfo->ring_space = get_ring_space(dinfo); in wait_ring()
1519 if (dinfo->ring_head != last_head) { in wait_ring()
1521 last_head = dinfo->ring_head; in wait_ring()
1527 reset_state(dinfo); in wait_ring()
1528 refresh_ring(dinfo); in wait_ring()
1529 do_flush(dinfo); in wait_ring()
1534 dinfo->ring_space, n); in wait_ring()
1537 dinfo->ring_lockup = 1; in wait_ring()
1546 static void do_flush(struct intelfb_info *dinfo) in do_flush() argument
1554 void intelfbhw_do_sync(struct intelfb_info *dinfo) in intelfbhw_do_sync() argument
1560 if (!dinfo->accel) in intelfbhw_do_sync()
1568 do_flush(dinfo); in intelfbhw_do_sync()
1569 wait_ring(dinfo, dinfo->ring.size - RING_MIN_FREE); in intelfbhw_do_sync()
1570 dinfo->ring_space = dinfo->ring.size - RING_MIN_FREE; in intelfbhw_do_sync()
1573 static void refresh_ring(struct intelfb_info *dinfo) in refresh_ring() argument
1579 dinfo->ring_head = INREG(PRI_RING_HEAD) & RING_HEAD_MASK; in refresh_ring()
1580 dinfo->ring_tail = INREG(PRI_RING_TAIL) & RING_TAIL_MASK; in refresh_ring()
1581 dinfo->ring_space = get_ring_space(dinfo); in refresh_ring()
1584 static void reset_state(struct intelfb_info *dinfo) in reset_state() argument
1602 refresh_ring(dinfo); in reset_state()
1603 intelfbhw_do_sync(dinfo); in reset_state()
1614 void intelfbhw_2d_stop(struct intelfb_info *dinfo) in intelfbhw_2d_stop() argument
1618 dinfo->accel, dinfo->ring_active); in intelfbhw_2d_stop()
1621 if (!dinfo->accel) in intelfbhw_2d_stop()
1624 dinfo->ring_active = 0; in intelfbhw_2d_stop()
1625 reset_state(dinfo); in intelfbhw_2d_stop()
1633 void intelfbhw_2d_start(struct intelfb_info *dinfo) in intelfbhw_2d_start() argument
1637 dinfo->accel, dinfo->ring_active); in intelfbhw_2d_start()
1640 if (!dinfo->accel) in intelfbhw_2d_start()
1648 OUTREG(PRI_RING_START, dinfo->ring.physical & RING_START_MASK); in intelfbhw_2d_start()
1650 ((dinfo->ring.size - GTT_PAGE_SIZE) & RING_LENGTH_MASK) | in intelfbhw_2d_start()
1652 refresh_ring(dinfo); in intelfbhw_2d_start()
1653 dinfo->ring_active = 1; in intelfbhw_2d_start()
1657 void intelfbhw_do_fillrect(struct intelfb_info *dinfo, u32 x, u32 y, u32 w, in intelfbhw_do_fillrect() argument
1668 br09 = dinfo->fb_start + (y * pitch + x * (bpp / 8)); in intelfbhw_do_fillrect()
1696 DBG_MSG("ring = 0x%08x, 0x%08x (%d)\n", dinfo->ring_head, in intelfbhw_do_fillrect()
1697 dinfo->ring_tail, dinfo->ring_space); in intelfbhw_do_fillrect()
1702 intelfbhw_do_bitblt(struct intelfb_info *dinfo, u32 curx, u32 cury, in intelfbhw_do_bitblt() argument
1713 br09 = dinfo->fb_start; in intelfbhw_do_bitblt()
1715 br12 = dinfo->fb_start; in intelfbhw_do_bitblt()
1747 int intelfbhw_do_drawglyph(struct intelfb_info *dinfo, u32 fg, u32 bg, u32 w, in intelfbhw_do_drawglyph() argument
1784 br09 = dinfo->fb_start; in intelfbhw_do_drawglyph()
1836 void intelfbhw_cursor_init(struct intelfb_info *dinfo) in intelfbhw_cursor_init() argument
1844 if (dinfo->mobile || IS_I9XX(dinfo)) { in intelfbhw_cursor_init()
1845 if (!dinfo->cursor.physical) in intelfbhw_cursor_init()
1853 OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.physical); in intelfbhw_cursor_init()
1860 OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.offset << 12); in intelfbhw_cursor_init()
1867 void intelfbhw_cursor_hide(struct intelfb_info *dinfo) in intelfbhw_cursor_hide() argument
1875 dinfo->cursor_on = 0; in intelfbhw_cursor_hide()
1876 if (dinfo->mobile || IS_I9XX(dinfo)) { in intelfbhw_cursor_hide()
1877 if (!dinfo->cursor.physical) in intelfbhw_cursor_hide()
1884 OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.physical); in intelfbhw_cursor_hide()
1892 void intelfbhw_cursor_show(struct intelfb_info *dinfo) in intelfbhw_cursor_show() argument
1900 dinfo->cursor_on = 1; in intelfbhw_cursor_show()
1902 if (dinfo->cursor_blanked) in intelfbhw_cursor_show()
1905 if (dinfo->mobile || IS_I9XX(dinfo)) { in intelfbhw_cursor_show()
1906 if (!dinfo->cursor.physical) in intelfbhw_cursor_show()
1913 OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.physical); in intelfbhw_cursor_show()
1921 void intelfbhw_cursor_setpos(struct intelfb_info *dinfo, int x, int y) in intelfbhw_cursor_setpos() argument
1939 if (IS_I9XX(dinfo)) in intelfbhw_cursor_setpos()
1940 OUTREG(CURSOR_A_BASEADDR, dinfo->cursor.physical); in intelfbhw_cursor_setpos()
1943 void intelfbhw_cursor_setcolor(struct intelfb_info *dinfo, u32 bg, u32 fg) in intelfbhw_cursor_setcolor() argument
1955 void intelfbhw_cursor_load(struct intelfb_info *dinfo, int width, int height, in intelfbhw_cursor_load() argument
1958 u8 __iomem *addr = (u8 __iomem *)dinfo->cursor.virtual; in intelfbhw_cursor_load()
1966 if (!dinfo->cursor.virtual) in intelfbhw_cursor_load()
1984 void intelfbhw_cursor_reset(struct intelfb_info *dinfo) in intelfbhw_cursor_reset() argument
1986 u8 __iomem *addr = (u8 __iomem *)dinfo->cursor.virtual; in intelfbhw_cursor_reset()
1993 if (!dinfo->cursor.virtual) in intelfbhw_cursor_reset()
2008 struct intelfb_info *dinfo = dev_id; in intelfbhw_irq() local
2010 spin_lock(&dinfo->int_lock); in intelfbhw_irq()
2013 if (dinfo->info->var.vmode & FB_VMODE_INTERLACED) in intelfbhw_irq()
2019 spin_unlock(&dinfo->int_lock); in intelfbhw_irq()
2027 if (dinfo->vsync.pan_display) { in intelfbhw_irq()
2028 dinfo->vsync.pan_display = 0; in intelfbhw_irq()
2029 OUTREG(DSPABASE, dinfo->vsync.pan_offset); in intelfbhw_irq()
2032 dinfo->vsync.count++; in intelfbhw_irq()
2033 wake_up_interruptible(&dinfo->vsync.wait); in intelfbhw_irq()
2035 spin_unlock(&dinfo->int_lock); in intelfbhw_irq()
2040 int intelfbhw_enable_irq(struct intelfb_info *dinfo) in intelfbhw_enable_irq() argument
2043 if (!test_and_set_bit(0, &dinfo->irq_flags)) { in intelfbhw_enable_irq()
2044 if (request_irq(dinfo->pdev->irq, intelfbhw_irq, IRQF_SHARED, in intelfbhw_enable_irq()
2045 "intelfb", dinfo)) { in intelfbhw_enable_irq()
2046 clear_bit(0, &dinfo->irq_flags); in intelfbhw_enable_irq()
2050 spin_lock_irq(&dinfo->int_lock); in intelfbhw_enable_irq()
2054 spin_lock_irq(&dinfo->int_lock); in intelfbhw_enable_irq()
2056 if (dinfo->info->var.vmode & FB_VMODE_INTERLACED) in intelfbhw_enable_irq()
2065 spin_unlock_irq(&dinfo->int_lock); in intelfbhw_enable_irq()
2069 void intelfbhw_disable_irq(struct intelfb_info *dinfo) in intelfbhw_disable_irq() argument
2071 if (test_and_clear_bit(0, &dinfo->irq_flags)) { in intelfbhw_disable_irq()
2072 if (dinfo->vsync.pan_display) { in intelfbhw_disable_irq()
2073 dinfo->vsync.pan_display = 0; in intelfbhw_disable_irq()
2074 OUTREG(DSPABASE, dinfo->vsync.pan_offset); in intelfbhw_disable_irq()
2076 spin_lock_irq(&dinfo->int_lock); in intelfbhw_disable_irq()
2082 spin_unlock_irq(&dinfo->int_lock); in intelfbhw_disable_irq()
2084 free_irq(dinfo->pdev->irq, dinfo); in intelfbhw_disable_irq()
2088 int intelfbhw_wait_for_vsync(struct intelfb_info *dinfo, u32 pipe) in intelfbhw_wait_for_vsync() argument
2096 vsync = &dinfo->vsync; in intelfbhw_wait_for_vsync()
2102 ret = intelfbhw_enable_irq(dinfo); in intelfbhw_wait_for_vsync()