Lines Matching +full:display +full:- +full:depth
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
69 unsigned int depth; member
239 video_adapter_t* adp = scp->sc->adp; in am335x_rend_draw()
244 vidd_puts(adp, from, (uint16_t*)sc_vtb_pointer(&scp->vtb, from), count); in am335x_rend_draw()
247 for (i = count; i-- > 0; ++from) { in am335x_rend_draw()
248 c = sc_vtb_getc(&scp->vtb, from); in am335x_rend_draw()
249 a = sc_vtb_geta(&scp->vtb, from) >> 8; in am335x_rend_draw()
263 video_adapter_t* adp = scp->sc->adp; in am335x_rend_draw_cursor()
271 if (scp->curs_attr.height <= 0) in am335x_rend_draw_cursor()
274 if (sc->fb_addr == 0) in am335x_rend_draw_cursor()
277 if (off >= adp->va_info.vi_width * adp->va_info.vi_height) in am335x_rend_draw_cursor()
281 row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; in am335x_rend_draw_cursor()
282 col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; in am335x_rend_draw_cursor()
284 addr = (uint8_t *)sc->fb_addr in am335x_rend_draw_cursor()
285 + (row + sc->ymargin)*(sc->stride) in am335x_rend_draw_cursor()
286 + (sc->depth/8) * (col + sc->xmargin); in am335x_rend_draw_cursor()
288 bytes = sc->depth/8; in am335x_rend_draw_cursor()
291 for (i = 0; i < adp->va_info.vi_cheight; i++) { in am335x_rend_draw_cursor()
292 for (j = 0; j < adp->va_info.vi_cwidth; j++) { in am335x_rend_draw_cursor()
293 switch (sc->depth) { in am335x_rend_draw_cursor()
307 addr += sc->stride; in am335x_rend_draw_cursor()
324 vidd_putm(scp->sc->adp, x, y, mouse_pointer, 0xffffffff, 16, 8); in am335x_rend_draw_mouse()
340 vi = &adp->va_info; in am335x_syscons_update_margins()
342 sc->xmargin = (sc->width - (vi->vi_width * vi->vi_cwidth)) / 2; in am335x_syscons_update_margins()
343 sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight))/2; in am335x_syscons_update_margins()
353 if (ofw_bus_node_is_compatible(child, "ti,am335x-lcd")) in am335x_syscons_find_panel_node()
368 phandle_t display, root; in am335x_syscons_configure() local
371 if (va_sc->initialized) in am335x_syscons_configure()
374 va_sc->width = 0; in am335x_syscons_configure()
375 va_sc->height = 0; in am335x_syscons_configure()
383 if ((root != -1) && in am335x_syscons_configure()
384 (display = am335x_syscons_find_panel_node(root))) { in am335x_syscons_configure()
385 if ((OF_getencprop(display, "panel_width", &cell, in am335x_syscons_configure()
387 va_sc->width = cell; in am335x_syscons_configure()
389 if ((OF_getencprop(display, "panel_height", &cell, in am335x_syscons_configure()
391 va_sc->height = cell; in am335x_syscons_configure()
394 if (va_sc->width == 0) in am335x_syscons_configure()
395 va_sc->width = FB_WIDTH; in am335x_syscons_configure()
396 if (va_sc->height == 0) in am335x_syscons_configure()
397 va_sc->height = FB_HEIGHT; in am335x_syscons_configure()
399 am335x_syscons_init(0, &va_sc->va, 0); in am335x_syscons_configure()
401 va_sc->initialized = 1; in am335x_syscons_configure()
420 vi = &adp->va_info; in am335x_syscons_init()
422 vid_init_struct(adp, "am335x_syscons", -1, unit); in am335x_syscons_init()
424 sc->font = dflt_font_16; in am335x_syscons_init()
425 vi->vi_cheight = AM335X_FONT_HEIGHT; in am335x_syscons_init()
426 vi->vi_cwidth = 8; in am335x_syscons_init()
428 vi->vi_width = sc->width/8; in am335x_syscons_init()
429 vi->vi_height = sc->height/vi->vi_cheight; in am335x_syscons_init()
434 if (vi->vi_width > COL) in am335x_syscons_init()
435 vi->vi_width = COL; in am335x_syscons_init()
436 if (vi->vi_height > ROW) in am335x_syscons_init()
437 vi->vi_height = ROW; in am335x_syscons_init()
439 sc->xmargin = (sc->width - (vi->vi_width * vi->vi_cwidth)) / 2; in am335x_syscons_init()
440 sc->ymargin = (sc->height - (vi->vi_height * vi->vi_cheight))/2; in am335x_syscons_init()
442 adp->va_window = (vm_offset_t) am335x_syscons_static_window; in am335x_syscons_init()
443 adp->va_flags |= V_ADP_FONT /* | V_ADP_COLOR | V_ADP_MODECHANGE */; in am335x_syscons_init()
445 vid_register(&sc->va); in am335x_syscons_init()
453 bcopy(&adp->va_info, info, sizeof(*info)); in am335x_syscons_get_info()
482 sc->font = data; in am335x_syscons_load_font()
557 if (sc && sc->fb_addr) in am335x_syscons_blank_display()
558 memset((void*)sc->fb_addr, 0, sc->fb_size); in am335x_syscons_blank_display()
575 if (offset < sc->stride*sc->height) { in am335x_syscons_mmap()
576 *paddr = sc->fb_paddr + offset; in am335x_syscons_mmap()
594 fb->fb_type = FBTYPE_PCIMISC; in am335x_syscons_ioctl()
595 fb->fb_height = sc->height; in am335x_syscons_ioctl()
596 fb->fb_width = sc->width; in am335x_syscons_ioctl()
597 fb->fb_depth = sc->depth; in am335x_syscons_ioctl()
598 if (sc->depth <= 1 || sc->depth > 8) in am335x_syscons_ioctl()
599 fb->fb_cmsize = 0; in am335x_syscons_ioctl()
601 fb->fb_cmsize = 1 << sc->depth; in am335x_syscons_ioctl()
602 fb->fb_size = sc->fb_size; in am335x_syscons_ioctl()
682 if (sc->fb_addr == 0) in am335x_syscons_putc()
685 row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; in am335x_syscons_putc()
686 col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; in am335x_syscons_putc()
687 p = sc->font + c*AM335X_FONT_HEIGHT; in am335x_syscons_putc()
688 addr = (uint8_t *)sc->fb_addr in am335x_syscons_putc()
689 + (row + sc->ymargin)*(sc->stride) in am335x_syscons_putc()
690 + (sc->depth/8) * (col + sc->xmargin); in am335x_syscons_putc()
696 for (j = 0, k = 7; j < 8; j++, k--) { in am335x_syscons_putc()
702 switch (sc->depth) { in am335x_syscons_putc()
726 addr += (sc->stride); in am335x_syscons_putc()
757 va_sc->fb_addr = vaddr; in am335x_lcd_syscons_setup()
758 va_sc->fb_paddr = paddr; in am335x_lcd_syscons_setup()
759 va_sc->depth = panel->bpp; in am335x_lcd_syscons_setup()
760 va_sc->stride = panel->bpp*panel->panel_width/8; in am335x_lcd_syscons_setup()
762 va_sc->width = panel->panel_width; in am335x_lcd_syscons_setup()
763 va_sc->height = panel->panel_height; in am335x_lcd_syscons_setup()
764 va_sc->fb_size = va_sc->width * va_sc->height in am335x_lcd_syscons_setup()
765 * va_sc->depth/8; in am335x_lcd_syscons_setup()
766 am335x_syscons_update_margins(&va_sc->va); in am335x_lcd_syscons_setup()