Lines Matching refs:win
45 #define VIDOSD_A(win) (VIDOSD_BASE + 0x00 + (win) * 16) argument
46 #define VIDOSD_B(win) (VIDOSD_BASE + 0x04 + (win) * 16) argument
51 #define VIDOSD_C(win) (VIDOSD_BASE + 0x08 + (win) * 16) argument
53 #define VIDOSD_D(win) (VIDOSD_BASE + 0x0C + (win) * 16) argument
55 #define VIDWnALPHA0(win) (VIDW_ALPHA + 0x00 + (win) * 8) argument
56 #define VIDWnALPHA1(win) (VIDW_ALPHA + 0x04 + (win) * 8) argument
58 #define VIDWx_BUF_START(win, buf) (VIDW_BUF_START(buf) + (win) * 8) argument
59 #define VIDWx_BUF_START_S(win, buf) (VIDW_BUF_START_S(buf) + (win) * 8) argument
60 #define VIDWx_BUF_END(win, buf) (VIDW_BUF_END(buf) + (win) * 8) argument
61 #define VIDWx_BUF_SIZE(win, buf) (VIDW_BUF_SIZE(buf) + (win) * 4) argument
337 static void fimd_enable_video_output(struct fimd_context *ctx, unsigned int win, in fimd_enable_video_output() argument
340 u32 val = readl(ctx->regs + WINCON(win)); in fimd_enable_video_output()
347 writel(val, ctx->regs + WINCON(win)); in fimd_enable_video_output()
351 unsigned int win, in fimd_enable_shadow_channel_path() argument
357 val |= SHADOWCON_CHx_ENABLE(win); in fimd_enable_shadow_channel_path()
359 val &= ~SHADOWCON_CHx_ENABLE(win); in fimd_enable_shadow_channel_path()
367 unsigned int win, ch_enabled = 0; in fimd_clear_channels() local
381 for (win = 0; win < WINDOWS_NR; win++) { in fimd_clear_channels()
382 u32 val = readl(ctx->regs + WINCON(win)); in fimd_clear_channels()
385 fimd_enable_video_output(ctx, win, false); in fimd_clear_channels()
388 fimd_enable_shadow_channel_path(ctx, win, in fimd_clear_channels()
595 static void fimd_win_set_bldeq(struct fimd_context *ctx, unsigned int win, in fimd_win_set_bldeq() argument
618 fimd_set_bits(ctx, BLENDEQx(win), mask, val); in fimd_win_set_bldeq()
621 static void fimd_win_set_bldmod(struct fimd_context *ctx, unsigned int win, in fimd_win_set_bldmod() argument
639 fimd_set_bits(ctx, WINCON(win), WINCONx_BLEND_MODE_MASK, val); in fimd_win_set_bldmod()
648 writel(val, ctx->regs + VIDOSD_C(win)); in fimd_win_set_bldmod()
652 writel(val, ctx->regs + VIDWnALPHA0(win)); in fimd_win_set_bldmod()
656 writel(val, ctx->regs + VIDWnALPHA1(win)); in fimd_win_set_bldmod()
662 static void fimd_win_set_pixfmt(struct fimd_context *ctx, unsigned int win, in fimd_win_set_pixfmt() argument
665 struct exynos_drm_plane plane = ctx->planes[win]; in fimd_win_set_pixfmt()
682 if (ctx->driver_data->has_limited_fmt && !win) { in fimd_win_set_pixfmt()
725 writel(WIN_RGB_ORDER_REVERSE, ctx->regs + WIN_RGB_ORDER(win)); in fimd_win_set_pixfmt()
728 writel(WIN_RGB_ORDER_FORWARD, ctx->regs + WIN_RGB_ORDER(win)); in fimd_win_set_pixfmt()
744 fimd_set_bits(ctx, WINCON(win), ~WINCONx_BLEND_MODE_MASK, val); in fimd_win_set_pixfmt()
747 if (win != 0) { in fimd_win_set_pixfmt()
748 fimd_win_set_bldmod(ctx, win, alpha, pixel_alpha); in fimd_win_set_pixfmt()
749 fimd_win_set_bldeq(ctx, win, alpha, pixel_alpha); in fimd_win_set_pixfmt()
753 static void fimd_win_set_colkey(struct fimd_context *ctx, unsigned int win) in fimd_win_set_colkey() argument
762 writel(keycon0, ctx->regs + WKEYCON0_BASE(win)); in fimd_win_set_colkey()
763 writel(keycon1, ctx->regs + WKEYCON1_BASE(win)); in fimd_win_set_colkey()
774 unsigned int win, bool protect) in fimd_shadow_protect_win() argument
790 bits = SHADOWCON_WINx_PROTECT(win); in fimd_shadow_protect_win()
840 unsigned int win = plane->index; in fimd_update_plane() local
853 writel(val, ctx->regs + VIDWx_BUF_START(win, 0)); in fimd_update_plane()
858 writel(val, ctx->regs + VIDWx_BUF_END(win, 0)); in fimd_update_plane()
873 writel(val, ctx->regs + VIDWx_BUF_SIZE(win, 0)); in fimd_update_plane()
880 writel(val, ctx->regs + VIDOSD_A(win)); in fimd_update_plane()
892 writel(val, ctx->regs + VIDOSD_B(win)); in fimd_update_plane()
899 if (win != 3 && win != 4) { in fimd_update_plane()
900 u32 offset = VIDOSD_D(win); in fimd_update_plane()
901 if (win == 0) in fimd_update_plane()
902 offset = VIDOSD_C(win); in fimd_update_plane()
910 fimd_win_set_pixfmt(ctx, win, fb, state->src.w); in fimd_update_plane()
913 if (win != 0) in fimd_update_plane()
914 fimd_win_set_colkey(ctx, win); in fimd_update_plane()
916 fimd_enable_video_output(ctx, win, true); in fimd_update_plane()
919 fimd_enable_shadow_channel_path(ctx, win, true); in fimd_update_plane()
929 unsigned int win = plane->index; in fimd_disable_plane() local
934 fimd_enable_video_output(ctx, win, false); in fimd_disable_plane()
937 fimd_enable_shadow_channel_path(ctx, win, false); in fimd_disable_plane()