Lines Matching refs:window
40 struct tegra_dc_window window; in tegra_plane_update() local
43 memset(&window, 0, sizeof(window)); in tegra_plane_update()
44 window.src.x = src_x >> 16; in tegra_plane_update()
45 window.src.y = src_y >> 16; in tegra_plane_update()
46 window.src.w = src_w >> 16; in tegra_plane_update()
47 window.src.h = src_h >> 16; in tegra_plane_update()
48 window.dst.x = crtc_x; in tegra_plane_update()
49 window.dst.y = crtc_y; in tegra_plane_update()
50 window.dst.w = crtc_w; in tegra_plane_update()
51 window.dst.h = crtc_h; in tegra_plane_update()
52 window.format = tegra_dc_format(fb->pixel_format); in tegra_plane_update()
53 window.bits_per_pixel = fb->bits_per_pixel; in tegra_plane_update()
58 window.base[i] = bo->paddr + fb->offsets[i]; in tegra_plane_update()
66 if (fb->pitches[i] != window.stride[1]) in tegra_plane_update()
69 window.stride[i] = fb->pitches[i]; in tegra_plane_update()
73 return tegra_dc_setup_window(dc, p->index, &window); in tegra_plane_update()
420 const struct tegra_dc_window *window) in tegra_dc_setup_window() argument
430 yuv = tegra_dc_format_is_yuv(window->format, &planar); in tegra_dc_setup_window()
432 bpp = window->bits_per_pixel / 8; in tegra_dc_setup_window()
439 tegra_dc_writel(dc, window->format, DC_WIN_COLOR_DEPTH); in tegra_dc_setup_window()
442 value = V_POSITION(window->dst.y) | H_POSITION(window->dst.x); in tegra_dc_setup_window()
445 value = V_SIZE(window->dst.h) | H_SIZE(window->dst.w); in tegra_dc_setup_window()
448 h_offset = window->src.x * bpp; in tegra_dc_setup_window()
449 v_offset = window->src.y; in tegra_dc_setup_window()
450 h_size = window->src.w * bpp; in tegra_dc_setup_window()
451 v_size = window->src.h; in tegra_dc_setup_window()
463 h_dda = compute_dda_inc(window->src.w, window->dst.w, false, bpp); in tegra_dc_setup_window()
464 v_dda = compute_dda_inc(window->src.h, window->dst.h, true, bpp); in tegra_dc_setup_window()
469 h_dda = compute_initial_dda(window->src.x); in tegra_dc_setup_window()
470 v_dda = compute_initial_dda(window->src.y); in tegra_dc_setup_window()
478 tegra_dc_writel(dc, window->base[0], DC_WINBUF_START_ADDR); in tegra_dc_setup_window()
481 tegra_dc_writel(dc, window->base[1], DC_WINBUF_START_ADDR_U); in tegra_dc_setup_window()
482 tegra_dc_writel(dc, window->base[2], DC_WINBUF_START_ADDR_V); in tegra_dc_setup_window()
483 value = window->stride[1] << 16 | window->stride[0]; in tegra_dc_setup_window()
486 tegra_dc_writel(dc, window->stride[0], DC_WIN_LINE_STRIDE); in tegra_dc_setup_window()
506 } else if (window->bits_per_pixel < 24) { in tegra_dc_setup_window()
581 struct tegra_dc_window window; in tegra_crtc_mode_set() local
614 memset(&window, 0, sizeof(window)); in tegra_crtc_mode_set()
615 window.src.x = 0; in tegra_crtc_mode_set()
616 window.src.y = 0; in tegra_crtc_mode_set()
617 window.src.w = mode->hdisplay; in tegra_crtc_mode_set()
618 window.src.h = mode->vdisplay; in tegra_crtc_mode_set()
619 window.dst.x = 0; in tegra_crtc_mode_set()
620 window.dst.y = 0; in tegra_crtc_mode_set()
621 window.dst.w = mode->hdisplay; in tegra_crtc_mode_set()
622 window.dst.h = mode->vdisplay; in tegra_crtc_mode_set()
623 window.format = tegra_dc_format(crtc->fb->pixel_format); in tegra_crtc_mode_set()
624 window.bits_per_pixel = crtc->fb->bits_per_pixel; in tegra_crtc_mode_set()
625 window.stride[0] = crtc->fb->pitches[0]; in tegra_crtc_mode_set()
626 window.base[0] = bo->paddr; in tegra_crtc_mode_set()
628 err = tegra_dc_setup_window(dc, 0, &window); in tegra_crtc_mode_set()