Lines Matching refs:win

43 #define VIDOSD_A(win)		(VIDOSD_BASE + 0x00 + (win) * 16)  argument
44 #define VIDOSD_B(win) (VIDOSD_BASE + 0x04 + (win) * 16) argument
49 #define VIDOSD_C(win) (VIDOSD_BASE + 0x08 + (win) * 16) argument
51 #define VIDOSD_D(win) (VIDOSD_BASE + 0x0C + (win) * 16) argument
53 #define VIDWnALPHA0(win) (VIDW_ALPHA + 0x00 + (win) * 8) argument
54 #define VIDWnALPHA1(win) (VIDW_ALPHA + 0x04 + (win) * 8) argument
56 #define VIDWx_BUF_START(win, buf) (VIDW_BUF_START(buf) + (win) * 8) argument
57 #define VIDWx_BUF_START_S(win, buf) (VIDW_BUF_START_S(buf) + (win) * 8) argument
58 #define VIDWx_BUF_END(win, buf) (VIDW_BUF_END(buf) + (win) * 8) argument
59 #define VIDWx_BUF_SIZE(win, buf) (VIDW_BUF_SIZE(buf) + (win) * 4) argument
319 static void fimd_enable_video_output(struct fimd_context *ctx, unsigned int win, in fimd_enable_video_output() argument
322 u32 val = readl(ctx->regs + WINCON(win)); in fimd_enable_video_output()
329 writel(val, ctx->regs + WINCON(win)); in fimd_enable_video_output()
333 unsigned int win, in fimd_enable_shadow_channel_path() argument
339 val |= SHADOWCON_CHx_ENABLE(win); in fimd_enable_shadow_channel_path()
341 val &= ~SHADOWCON_CHx_ENABLE(win); in fimd_enable_shadow_channel_path()
349 unsigned int win, ch_enabled = 0; in fimd_clear_channels() local
363 for (win = 0; win < WINDOWS_NR; win++) { in fimd_clear_channels()
364 u32 val = readl(ctx->regs + WINCON(win)); in fimd_clear_channels()
367 fimd_enable_video_output(ctx, win, false); in fimd_clear_channels()
370 fimd_enable_shadow_channel_path(ctx, win, in fimd_clear_channels()
577 static void fimd_win_set_bldeq(struct fimd_context *ctx, unsigned int win, in fimd_win_set_bldeq() argument
600 fimd_set_bits(ctx, BLENDEQx(win), mask, val); in fimd_win_set_bldeq()
603 static void fimd_win_set_bldmod(struct fimd_context *ctx, unsigned int win, in fimd_win_set_bldmod() argument
621 fimd_set_bits(ctx, WINCON(win), WINCONx_BLEND_MODE_MASK, val); in fimd_win_set_bldmod()
630 writel(val, ctx->regs + VIDOSD_C(win)); in fimd_win_set_bldmod()
634 writel(val, ctx->regs + VIDWnALPHA0(win)); in fimd_win_set_bldmod()
638 writel(val, ctx->regs + VIDWnALPHA1(win)); in fimd_win_set_bldmod()
644 static void fimd_win_set_pixfmt(struct fimd_context *ctx, unsigned int win, in fimd_win_set_pixfmt() argument
647 struct exynos_drm_plane plane = ctx->planes[win]; in fimd_win_set_pixfmt()
664 if (ctx->driver_data->has_limited_fmt && !win) { in fimd_win_set_pixfmt()
710 fimd_set_bits(ctx, WINCON(win), ~WINCONx_BLEND_MODE_MASK, val); in fimd_win_set_pixfmt()
713 if (win != 0) { in fimd_win_set_pixfmt()
714 fimd_win_set_bldmod(ctx, win, alpha, pixel_alpha); in fimd_win_set_pixfmt()
715 fimd_win_set_bldeq(ctx, win, alpha, pixel_alpha); in fimd_win_set_pixfmt()
719 static void fimd_win_set_colkey(struct fimd_context *ctx, unsigned int win) in fimd_win_set_colkey() argument
728 writel(keycon0, ctx->regs + WKEYCON0_BASE(win)); in fimd_win_set_colkey()
729 writel(keycon1, ctx->regs + WKEYCON1_BASE(win)); in fimd_win_set_colkey()
740 unsigned int win, bool protect) in fimd_shadow_protect_win() argument
756 bits = SHADOWCON_WINx_PROTECT(win); in fimd_shadow_protect_win()
806 unsigned int win = plane->index; in fimd_update_plane() local
819 writel(val, ctx->regs + VIDWx_BUF_START(win, 0)); in fimd_update_plane()
824 writel(val, ctx->regs + VIDWx_BUF_END(win, 0)); in fimd_update_plane()
839 writel(val, ctx->regs + VIDWx_BUF_SIZE(win, 0)); in fimd_update_plane()
846 writel(val, ctx->regs + VIDOSD_A(win)); in fimd_update_plane()
858 writel(val, ctx->regs + VIDOSD_B(win)); in fimd_update_plane()
865 if (win != 3 && win != 4) { in fimd_update_plane()
866 u32 offset = VIDOSD_D(win); in fimd_update_plane()
867 if (win == 0) in fimd_update_plane()
868 offset = VIDOSD_C(win); in fimd_update_plane()
876 fimd_win_set_pixfmt(ctx, win, fb, state->src.w); in fimd_update_plane()
879 if (win != 0) in fimd_update_plane()
880 fimd_win_set_colkey(ctx, win); in fimd_update_plane()
882 fimd_enable_video_output(ctx, win, true); in fimd_update_plane()
885 fimd_enable_shadow_channel_path(ctx, win, true); in fimd_update_plane()
895 unsigned int win = plane->index; in fimd_disable_plane() local
900 fimd_enable_video_output(ctx, win, false); in fimd_disable_plane()
903 fimd_enable_shadow_channel_path(ctx, win, false); in fimd_disable_plane()