Lines Matching +full:5 +full:w
64 #define NUM_OF_WINDOWS 5
109 #define IS_PALETTIZED_MODE(w) (w->wincon & 0xC) argument
111 #define WIN_BPP_MODE(w) ((w->wincon >> 2) & 0xF) argument
112 #define WIN_BPP_MODE_WITH_ALPHA(w) \ argument
113 (WIN_BPP_MODE(w) == 0xD || WIN_BPP_MODE(w) == 0xE)
117 #define FIMD_WINDOW_PROTECTED(s, w) ((s) & (1 << (10 + (w)))) argument
284 void (*draw_line)(Exynos4210fimdWindow *w, uint8_t *src, uint8_t *dst,
286 uint32_t (*get_alpha)(Exynos4210fimdWindow *w, uint32_t pix_a);
327 Exynos4210fimdWindow window[5]; /* Window-specific registers */
393 DEF_PIXEL_TO_RGB_A1(pixel_a555_to_rgb, 5, 5, 5)
395 DEF_PIXEL_TO_RGB_A1(pixel_a665_to_rgb, 6, 6, 5)
414 DEF_PIXEL_TO_RGB_A0(pixel_565_to_rgb, 5, 6, 5)
415 DEF_PIXEL_TO_RGB_A0(pixel_555_to_rgb, 5, 5, 5)
460 /* Special case for (5+1, 5+1, 5+1) mode. Data bit 15 is common LSB
466 pixel >>= 5; in pixel_1555_to_rgb()
468 pixel >>= 5; in pixel_1555_to_rgb()
499 [5] = pixel_888_to_rgb,
587 static uint32_t fimd_get_alpha_pix(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_pix() argument
593 fimd_get_alpha_pix_extlow(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_pix_extlow() argument
599 fimd_get_alpha_pix_exthigh(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_pix_exthigh() argument
604 static uint32_t fimd_get_alpha_mult(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_mult() argument
606 return fimd_mult_each_byte(pix_a, w->alpha_val[0]); in fimd_get_alpha_mult()
609 static uint32_t fimd_get_alpha_mult_ext(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_mult_ext() argument
612 EXTEND_UPPER_HALFBYTE(w->alpha_val[0])); in fimd_get_alpha_mult_ext()
615 static uint32_t fimd_get_alpha_aen(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_aen() argument
617 return w->alpha_val[pix_a]; in fimd_get_alpha_aen()
620 static uint32_t fimd_get_alpha_aen_ext(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_aen_ext() argument
622 return EXTEND_UPPER_HALFBYTE(w->alpha_val[pix_a]); in fimd_get_alpha_aen_ext()
625 static uint32_t fimd_get_alpha_sel(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_sel() argument
627 return w->alpha_val[(w->wincon & FIMD_WINCON_ALPHA_SEL) ? 1 : 0]; in fimd_get_alpha_sel()
630 static uint32_t fimd_get_alpha_sel_ext(Exynos4210fimdWindow *w, uint32_t pix_a) in fimd_get_alpha_sel_ext() argument
632 return EXTEND_UPPER_HALFBYTE(w->alpha_val[(w->wincon & in fimd_get_alpha_sel_ext()
639 Exynos4210fimdWindow *w = &s->window[win]; in fimd_update_get_alpha() local
642 if (w->wincon & FIMD_WINCON_BLD_PIX) { in fimd_update_get_alpha()
643 if ((w->wincon & FIMD_WINCON_ALPHA_SEL) && WIN_BPP_MODE_WITH_ALPHA(w)) { in fimd_update_get_alpha()
645 if (w->wincon & FIMD_WINCON_ALPHA_MUL) { in fimd_update_get_alpha()
646 w->get_alpha = alpha_is_8bit ? in fimd_update_get_alpha()
649 w->get_alpha = alpha_is_8bit ? in fimd_update_get_alpha()
653 if (IS_PALETTIZED_MODE(w) && in fimd_update_get_alpha()
656 w->get_alpha = alpha_is_8bit ? in fimd_update_get_alpha()
660 w->get_alpha = alpha_is_8bit ? in fimd_update_get_alpha()
665 w->get_alpha = alpha_is_8bit ? fimd_get_alpha_sel : in fimd_update_get_alpha()
670 /* Blends current window's (w) pixel (foreground pixel *ret) with background
676 exynos4210_fimd_blend_pixel(Exynos4210fimdWindow *w, rgba p_bg, rgba *ret) in exynos4210_fimd_blend_pixel() argument
691 if (w->keycon[0] & FIMD_WKEYCON0_KEYEN) { in exynos4210_fimd_blend_pixel()
692 uint32_t colorkey = (w->keycon[1] & in exynos4210_fimd_blend_pixel()
693 ~(w->keycon[0] & FIMD_WKEYCON0_COMPKEY)) & FIMD_WKEYCON0_COMPKEY; in exynos4210_fimd_blend_pixel()
695 if ((w->keycon[0] & FIMD_WKEYCON0_DIRCON) && in exynos4210_fimd_blend_pixel()
696 (bg_color & ~(w->keycon[0] & FIMD_WKEYCON0_COMPKEY)) == colorkey) { in exynos4210_fimd_blend_pixel()
698 if (w->keycon[0] & FIMD_WKEYCON0_KEYBLEN) { in exynos4210_fimd_blend_pixel()
699 alpha_fg = w->keyalpha; in exynos4210_fimd_blend_pixel()
708 } else if ((w->keycon[0] & FIMD_WKEYCON0_DIRCON) == 0 && in exynos4210_fimd_blend_pixel()
709 (fg_color & ~(w->keycon[0] & FIMD_WKEYCON0_COMPKEY)) == colorkey) { in exynos4210_fimd_blend_pixel()
711 if (w->keycon[0] & FIMD_WKEYCON0_KEYBLEN) { in exynos4210_fimd_blend_pixel()
712 alpha_fg = w->keyalpha; in exynos4210_fimd_blend_pixel()
725 switch ((w->blendeq >> i * 6) & FIMD_BLENDEQ_COEF_MASK) { in exynos4210_fimd_blend_pixel()
741 case 5: in exynos4210_fimd_blend_pixel()
745 blend_param[i] = w->alpha_val[0]; in exynos4210_fimd_blend_pixel()
783 static void glue(draw_line_palette_, N)(Exynos4210fimdWindow *w, uint8_t *src, \
786 int width = w->rightbot_x - w->lefttop_x + 1; \
788 uint8_t swap = (w->wincon & FIMD_WINCON_SWAP) >> FIMD_WINCON_SWAP_SHIFT; \
797 w->pixel_to_rgb(w->palette[(data >> ((N) * i)) & \
799 p.a = w->get_alpha(w, p.a); \
802 exynos4210_fimd_blend_pixel(w, p_old, &p); \
812 static void glue(draw_line_, N)(Exynos4210fimdWindow *w, uint8_t *src, \
815 int width = w->rightbot_x - w->lefttop_x + 1; \
817 uint8_t swap = (w->wincon & FIMD_WINCON_SWAP) >> FIMD_WINCON_SWAP_SHIFT; \
826 w->pixel_to_rgb((data >> ((N) * i)) & ((1ULL << (N)) - 1), &p); \
827 p.a = w->get_alpha(w, p.a); \
830 exynos4210_fimd_blend_pixel(w, p_old, &p); \
847 static void draw_line_mapcolor(Exynos4210fimdWindow *w, uint8_t *src, in draw_line_mapcolor() argument
852 int width = w->rightbot_x - w->lefttop_x + 1; in draw_line_mapcolor()
853 uint32_t map_color = w->winmap & FIMD_WINMAP_COLOR_MASK; in draw_line_mapcolor()
857 p.a = w->get_alpha(w, p.a); in draw_line_mapcolor()
860 exynos4210_fimd_blend_pixel(w, p_old, &p); in draw_line_mapcolor()
942 /* Parse BPPMODE_F = WINCON1[5:2] bits */
945 Exynos4210fimdWindow *w = &s->window[win]; in exynos4210_fimd_update_win_bppmode() local
947 if (w->winmap & FIMD_WINMAP_EN) { in exynos4210_fimd_update_win_bppmode()
948 w->draw_line = draw_line_mapcolor; in exynos4210_fimd_update_win_bppmode()
952 switch (WIN_BPP_MODE(w)) { in exynos4210_fimd_update_win_bppmode()
954 w->draw_line = draw_line_palette_1; in exynos4210_fimd_update_win_bppmode()
955 w->pixel_to_rgb = in exynos4210_fimd_update_win_bppmode()
959 w->draw_line = draw_line_palette_2; in exynos4210_fimd_update_win_bppmode()
960 w->pixel_to_rgb = in exynos4210_fimd_update_win_bppmode()
964 w->draw_line = draw_line_palette_4; in exynos4210_fimd_update_win_bppmode()
965 w->pixel_to_rgb = in exynos4210_fimd_update_win_bppmode()
969 w->draw_line = draw_line_palette_8; in exynos4210_fimd_update_win_bppmode()
970 w->pixel_to_rgb = in exynos4210_fimd_update_win_bppmode()
974 w->draw_line = draw_line_8; in exynos4210_fimd_update_win_bppmode()
975 w->pixel_to_rgb = pixel_a232_to_rgb; in exynos4210_fimd_update_win_bppmode()
977 case 5: in exynos4210_fimd_update_win_bppmode()
978 w->draw_line = draw_line_16; in exynos4210_fimd_update_win_bppmode()
979 w->pixel_to_rgb = pixel_565_to_rgb; in exynos4210_fimd_update_win_bppmode()
982 w->draw_line = draw_line_16; in exynos4210_fimd_update_win_bppmode()
983 w->pixel_to_rgb = pixel_a555_to_rgb; in exynos4210_fimd_update_win_bppmode()
986 w->draw_line = draw_line_16; in exynos4210_fimd_update_win_bppmode()
987 w->pixel_to_rgb = pixel_1555_to_rgb; in exynos4210_fimd_update_win_bppmode()
990 w->draw_line = draw_line_32; in exynos4210_fimd_update_win_bppmode()
991 w->pixel_to_rgb = pixel_666_to_rgb; in exynos4210_fimd_update_win_bppmode()
994 w->draw_line = draw_line_32; in exynos4210_fimd_update_win_bppmode()
995 w->pixel_to_rgb = pixel_a665_to_rgb; in exynos4210_fimd_update_win_bppmode()
998 w->draw_line = draw_line_32; in exynos4210_fimd_update_win_bppmode()
999 w->pixel_to_rgb = pixel_a666_to_rgb; in exynos4210_fimd_update_win_bppmode()
1002 w->draw_line = draw_line_32; in exynos4210_fimd_update_win_bppmode()
1003 w->pixel_to_rgb = pixel_888_to_rgb; in exynos4210_fimd_update_win_bppmode()
1006 w->draw_line = draw_line_32; in exynos4210_fimd_update_win_bppmode()
1007 w->pixel_to_rgb = pixel_a887_to_rgb; in exynos4210_fimd_update_win_bppmode()
1010 w->draw_line = draw_line_32; in exynos4210_fimd_update_win_bppmode()
1011 if ((w->wincon & FIMD_WINCON_BLD_PIX) && (w->wincon & in exynos4210_fimd_update_win_bppmode()
1013 w->pixel_to_rgb = pixel_8888_to_rgb; in exynos4210_fimd_update_win_bppmode()
1015 w->pixel_to_rgb = pixel_a888_to_rgb; in exynos4210_fimd_update_win_bppmode()
1019 w->draw_line = draw_line_16; in exynos4210_fimd_update_win_bppmode()
1020 if ((w->wincon & FIMD_WINCON_BLD_PIX) && (w->wincon & in exynos4210_fimd_update_win_bppmode()
1022 w->pixel_to_rgb = pixel_4444_to_rgb; in exynos4210_fimd_update_win_bppmode()
1024 w->pixel_to_rgb = pixel_a444_to_rgb; in exynos4210_fimd_update_win_bppmode()
1028 w->draw_line = draw_line_16; in exynos4210_fimd_update_win_bppmode()
1029 w->pixel_to_rgb = pixel_555_to_rgb; in exynos4210_fimd_update_win_bppmode()
1048 case 5: in exynos4210_fimd_get_bppmode()
1049 return "16 bpp (non-palettized, R:5-G:6-B:5)"; in exynos4210_fimd_get_bppmode()
1051 return "16 bpp (non-palettized, A:1-R:5-G:5-B:5)"; in exynos4210_fimd_get_bppmode()
1053 return "16 bpp (non-palettized, I :1-R:5-G:5-B:5)"; in exynos4210_fimd_get_bppmode()
1057 return "Unpacked 18bpp (non-palettized,A:1-R:6-G:6-B:5)"; in exynos4210_fimd_get_bppmode()
1069 return "Unpacked 15 bpp (non-palettized R:5-G:5-B:5)"; in exynos4210_fimd_get_bppmode()
1078 Exynos4210fimdWindow *w = &s->window[win_num]; in exynos4210_fimd_trace_bppmode() local
1080 if (w->winmap & FIMD_WINMAP_EN) { in exynos4210_fimd_trace_bppmode()
1082 win_num, w->winmap & 0xFFFFFF); in exynos4210_fimd_trace_bppmode()
1086 if ((val != 0xFFFFFFFF) && ((w->wincon >> 2) & 0xF) == ((val >> 2) & 0xF)) { in exynos4210_fimd_trace_bppmode()
1100 static inline int fimd_get_buffer_id(Exynos4210fimdWindow *w) in fimd_get_buffer_id() argument
1102 switch (w->wincon & FIMD_WINCON_BUFSTATUS) { in fimd_get_buffer_id()
1125 Exynos4210fimdWindow *w = &s->window[win]; in fimd_update_memory_section() local
1128 if (!s->enabled || !(w->wincon & FIMD_WINCON_ENWIN) || in fimd_update_memory_section()
1133 if (w->host_fb_addr) { in fimd_update_memory_section()
1134 cpu_physical_memory_unmap(w->host_fb_addr, w->fb_len, 0, 0); in fimd_update_memory_section()
1135 w->host_fb_addr = NULL; in fimd_update_memory_section()
1136 w->fb_len = 0; in fimd_update_memory_section()
1139 fb_start_addr = w->buf_start[fimd_get_buffer_id(w)]; in fimd_update_memory_section()
1141 w->fb_len = fb_mapped_len = (w->virtpage_width + w->virtpage_offsize) * in fimd_update_memory_section()
1142 (w->rightbot_y - w->lefttop_y + 1); in fimd_update_memory_section()
1147 if (w->mem_section.mr) { in fimd_update_memory_section()
1148 memory_region_set_log(w->mem_section.mr, false, DIRTY_MEMORY_VGA); in fimd_update_memory_section()
1149 memory_region_unref(w->mem_section.mr); in fimd_update_memory_section()
1152 w->mem_section = memory_region_find(s->fbmem, fb_start_addr, w->fb_len); in fimd_update_memory_section()
1153 assert(w->mem_section.mr); in fimd_update_memory_section()
1154 assert(w->mem_section.offset_within_address_space == fb_start_addr); in fimd_update_memory_section()
1156 win, fb_start_addr, w->fb_len); in fimd_update_memory_section()
1158 if (int128_get64(w->mem_section.size) != w->fb_len || in fimd_update_memory_section()
1159 !memory_region_is_ram(w->mem_section.mr)) { in fimd_update_memory_section()
1166 w->host_fb_addr = cpu_physical_memory_map(fb_start_addr, &fb_mapped_len, in fimd_update_memory_section()
1168 if (!w->host_fb_addr) { in fimd_update_memory_section()
1174 if (fb_mapped_len != w->fb_len) { in fimd_update_memory_section()
1178 cpu_physical_memory_unmap(w->host_fb_addr, fb_mapped_len, 0, 0); in fimd_update_memory_section()
1181 memory_region_set_log(w->mem_section.mr, true, DIRTY_MEMORY_VGA); in fimd_update_memory_section()
1186 memory_region_unref(w->mem_section.mr); in fimd_update_memory_section()
1187 w->mem_section.mr = NULL; in fimd_update_memory_section()
1188 w->mem_section.size = int128_zero(); in fimd_update_memory_section()
1189 w->host_fb_addr = NULL; in fimd_update_memory_section()
1190 w->fb_len = 0; in fimd_update_memory_section()
1196 unsigned w; in exynos4210_fimd_enable() local
1198 for (w = 0; w < NUM_OF_WINDOWS; w++) { in exynos4210_fimd_enable()
1199 fimd_update_memory_section(s, w); in exynos4210_fimd_enable()
1270 Exynos4210fimdWindow *w; in exynos4210_fimd_update() local
1291 w = &s->window[i]; in exynos4210_fimd_update()
1292 if ((w->wincon & FIMD_WINCON_ENWIN) && w->host_fb_addr) { in exynos4210_fimd_update()
1293 scrn_height = w->rightbot_y - w->lefttop_y + 1; in exynos4210_fimd_update()
1294 scrn_width = w->virtpage_width; in exynos4210_fimd_update()
1296 inc_size = scrn_width + w->virtpage_offsize; in exynos4210_fimd_update()
1297 host_fb_addr = w->host_fb_addr; in exynos4210_fimd_update()
1298 fb_line_addr = w->mem_section.offset_within_region; in exynos4210_fimd_update()
1299 snap = memory_region_snapshot_and_clear_dirty(w->mem_section.mr, in exynos4210_fimd_update()
1303 is_dirty = memory_region_snapshot_get_dirty(w->mem_section.mr, in exynos4210_fimd_update()
1311 w->draw_line(w, host_fb_addr, s->ifb + in exynos4210_fimd_update()
1312 w->lefttop_x * RGBA_SIZE + (w->lefttop_y + line) * in exynos4210_fimd_update()
1349 unsigned w; in exynos4210_fimd_reset() local
1354 for (w = 0; w < NUM_OF_WINDOWS; w++) { in exynos4210_fimd_reset()
1355 memset(&s->window[w], 0, sizeof(Exynos4210fimdWindow)); in exynos4210_fimd_reset()
1356 s->window[w].blendeq = 0xC2; in exynos4210_fimd_reset()
1357 exynos4210_fimd_update_win_bppmode(s, w); in exynos4210_fimd_reset()
1358 exynos4210_fimd_trace_bppmode(s, w, 0xFFFFFFFF); in exynos4210_fimd_reset()
1359 fimd_update_get_alpha(s, w); in exynos4210_fimd_reset()
1379 unsigned w, i; in exynos4210_fimd_write() local
1409 w = (offset - FIMD_WINCON_START) >> 2; in exynos4210_fimd_write()
1411 i = fimd_get_buffer_id(&s->window[w]); in exynos4210_fimd_write()
1412 old_value = s->window[w].wincon; in exynos4210_fimd_write()
1414 (s->window[w].wincon & FIMD_WINCON_ROMASK); in exynos4210_fimd_write()
1415 if (w == 0) { in exynos4210_fimd_write()
1419 exynos4210_fimd_trace_bppmode(s, w, val); in exynos4210_fimd_write()
1435 s->window[w].wincon = val; in exynos4210_fimd_write()
1436 exynos4210_fimd_update_win_bppmode(s, w); in exynos4210_fimd_write()
1437 fimd_update_get_alpha(s, w); in exynos4210_fimd_write()
1438 if ((i != fimd_get_buffer_id(&s->window[w])) || in exynos4210_fimd_write()
1439 (!(old_value & FIMD_WINCON_ENWIN) && (s->window[w].wincon & in exynos4210_fimd_write()
1441 fimd_update_memory_section(s, w); in exynos4210_fimd_write()
1447 for (w = 0; w < NUM_OF_WINDOWS; w++) { in exynos4210_fimd_write()
1448 if (FIMD_WINDOW_PROTECTED(old_value, w) && in exynos4210_fimd_write()
1449 !FIMD_WINDOW_PROTECTED(s->shadowcon, w)) { in exynos4210_fimd_write()
1450 fimd_update_memory_section(s, w); in exynos4210_fimd_write()
1458 w = (offset - FIMD_VIDOSD_START) >> 4; in exynos4210_fimd_write()
1462 old_value = s->window[w].lefttop_y; in exynos4210_fimd_write()
1463 s->window[w].lefttop_x = (val >> FIMD_VIDOSD_HOR_SHIFT) & in exynos4210_fimd_write()
1465 s->window[w].lefttop_y = (val >> FIMD_VIDOSD_VER_SHIFT) & in exynos4210_fimd_write()
1467 if (s->window[w].lefttop_y != old_value) { in exynos4210_fimd_write()
1468 fimd_update_memory_section(s, w); in exynos4210_fimd_write()
1472 old_value = s->window[w].rightbot_y; in exynos4210_fimd_write()
1473 s->window[w].rightbot_x = (val >> FIMD_VIDOSD_HOR_SHIFT) & in exynos4210_fimd_write()
1475 s->window[w].rightbot_y = (val >> FIMD_VIDOSD_VER_SHIFT) & in exynos4210_fimd_write()
1477 if (s->window[w].rightbot_y != old_value) { in exynos4210_fimd_write()
1478 fimd_update_memory_section(s, w); in exynos4210_fimd_write()
1482 if (w == 0) { in exynos4210_fimd_write()
1483 s->window[w].osdsize = val; in exynos4210_fimd_write()
1485 s->window[w].alpha_val[0] = in exynos4210_fimd_write()
1488 (s->window[w].alpha_val[0] & FIMD_VIDALPHA_ALPHA_LOWER); in exynos4210_fimd_write()
1489 s->window[w].alpha_val[1] = in exynos4210_fimd_write()
1491 (s->window[w].alpha_val[1] & FIMD_VIDALPHA_ALPHA_LOWER); in exynos4210_fimd_write()
1495 if (w != 1 && w != 2) { in exynos4210_fimd_write()
1501 s->window[w].osdsize = val; in exynos4210_fimd_write()
1506 w = (offset - FIMD_VIDWADD0_START) >> 3; in exynos4210_fimd_write()
1508 if (i == fimd_get_buffer_id(&s->window[w]) && in exynos4210_fimd_write()
1509 s->window[w].buf_start[i] != val) { in exynos4210_fimd_write()
1510 s->window[w].buf_start[i] = val; in exynos4210_fimd_write()
1511 fimd_update_memory_section(s, w); in exynos4210_fimd_write()
1514 s->window[w].buf_start[i] = val; in exynos4210_fimd_write()
1517 w = (offset - FIMD_VIDWADD1_START) >> 3; in exynos4210_fimd_write()
1519 s->window[w].buf_end[i] = val; in exynos4210_fimd_write()
1522 w = (offset - FIMD_VIDWADD2_START) >> 2; in exynos4210_fimd_write()
1523 if (((val & FIMD_VIDWADD2_PAGEWIDTH) != s->window[w].virtpage_width) || in exynos4210_fimd_write()
1525 s->window[w].virtpage_offsize)) { in exynos4210_fimd_write()
1526 s->window[w].virtpage_width = val & FIMD_VIDWADD2_PAGEWIDTH; in exynos4210_fimd_write()
1527 s->window[w].virtpage_offsize = in exynos4210_fimd_write()
1529 fimd_update_memory_section(s, w); in exynos4210_fimd_write()
1540 w = ((offset - FIMD_WKEYCON_START) >> 3) + 1; in exynos4210_fimd_write()
1542 s->window[w].keycon[i] = val; in exynos4210_fimd_write()
1545 w = ((offset - FIMD_WKEYALPHA_START) >> 2) + 1; in exynos4210_fimd_write()
1546 s->window[w].keyalpha = val; in exynos4210_fimd_write()
1552 w = (offset - FIMD_WINMAP_START) >> 2; in exynos4210_fimd_write()
1553 old_value = s->window[w].winmap; in exynos4210_fimd_write()
1554 s->window[w].winmap = val; in exynos4210_fimd_write()
1557 exynos4210_fimd_update_win_bppmode(s, w); in exynos4210_fimd_write()
1558 exynos4210_fimd_trace_bppmode(s, w, 0xFFFFFFFF); in exynos4210_fimd_write()
1566 for (w = 0; w < NUM_OF_WINDOWS; w++) { in exynos4210_fimd_write()
1567 exynos4210_fimd_update_win_bppmode(s, w); in exynos4210_fimd_write()
1568 fimd_update_get_alpha(s, w); in exynos4210_fimd_write()
1603 w = ((offset - FIMD_VIDWALPHA_START) >> 3); in exynos4210_fimd_write()
1605 if (w == 0) { in exynos4210_fimd_write()
1606 s->window[w].alpha_val[i] = val; in exynos4210_fimd_write()
1608 s->window[w].alpha_val[i] = (val & FIMD_VIDALPHA_ALPHA_LOWER) | in exynos4210_fimd_write()
1609 (s->window[w].alpha_val[i] & FIMD_VIDALPHA_ALPHA_UPPER); in exynos4210_fimd_write()
1619 for (w = 0; w < NUM_OF_WINDOWS; w++) { in exynos4210_fimd_write()
1620 fimd_update_get_alpha(s, w); in exynos4210_fimd_write()
1637 w = (offset - FIMD_VIDW0ADD0_B2) >> 3; in exynos4210_fimd_write()
1638 if (fimd_get_buffer_id(&s->window[w]) == 2 && in exynos4210_fimd_write()
1639 s->window[w].buf_start[2] != val) { in exynos4210_fimd_write()
1640 s->window[w].buf_start[2] = val; in exynos4210_fimd_write()
1641 fimd_update_memory_section(s, w); in exynos4210_fimd_write()
1644 s->window[w].buf_start[2] = val; in exynos4210_fimd_write()
1668 w = (offset - FIMD_PAL_MEM_START) >> 10; in exynos4210_fimd_write()
1670 s->window[w].palette[i] = val; in exynos4210_fimd_write()
1674 w = (offset - FIMD_PALMEM_AL_START) >> 10; in exynos4210_fimd_write()
1676 s->window[w].palette[i] = val; in exynos4210_fimd_write()
1689 int w, i; in exynos4210_fimd_read() local
1706 w = (offset - FIMD_VIDOSD_START) >> 4; in exynos4210_fimd_read()
1710 ret = ((s->window[w].lefttop_x & FIMD_VIDOSD_COORD_MASK) << in exynos4210_fimd_read()
1712 (s->window[w].lefttop_y & FIMD_VIDOSD_COORD_MASK); in exynos4210_fimd_read()
1715 ret = ((s->window[w].rightbot_x & FIMD_VIDOSD_COORD_MASK) << in exynos4210_fimd_read()
1717 (s->window[w].rightbot_y & FIMD_VIDOSD_COORD_MASK); in exynos4210_fimd_read()
1720 if (w == 0) { in exynos4210_fimd_read()
1721 ret = s->window[w].osdsize; in exynos4210_fimd_read()
1723 ret = (pack_upper_4(s->window[w].alpha_val[0]) << in exynos4210_fimd_read()
1725 pack_upper_4(s->window[w].alpha_val[1]); in exynos4210_fimd_read()
1729 if (w != 1 && w != 2) { in exynos4210_fimd_read()
1735 ret = s->window[w].osdsize; in exynos4210_fimd_read()
1740 w = (offset - FIMD_VIDWADD0_START) >> 3; in exynos4210_fimd_read()
1742 return s->window[w].buf_start[i]; in exynos4210_fimd_read()
1744 w = (offset - FIMD_VIDWADD1_START) >> 3; in exynos4210_fimd_read()
1746 return s->window[w].buf_end[i]; in exynos4210_fimd_read()
1748 w = (offset - FIMD_VIDWADD2_START) >> 2; in exynos4210_fimd_read()
1749 return s->window[w].virtpage_width | (s->window[w].virtpage_offsize << in exynos4210_fimd_read()
1754 w = ((offset - FIMD_WKEYCON_START) >> 3) + 1; in exynos4210_fimd_read()
1756 return s->window[w].keycon[i]; in exynos4210_fimd_read()
1758 w = ((offset - FIMD_WKEYALPHA_START) >> 2) + 1; in exynos4210_fimd_read()
1759 return s->window[w].keyalpha; in exynos4210_fimd_read()
1786 w = ((offset - FIMD_VIDWALPHA_START) >> 3); in exynos4210_fimd_read()
1788 return s->window[w].alpha_val[i] & in exynos4210_fimd_read()
1789 (w == 0 ? 0xFFFFFF : FIMD_VIDALPHA_ALPHA_LOWER); in exynos4210_fimd_read()
1816 w = (offset - FIMD_PAL_MEM_START) >> 10; in exynos4210_fimd_read()
1818 return s->window[w].palette[i]; in exynos4210_fimd_read()
1821 w = (offset - FIMD_PALMEM_AL_START) >> 10; in exynos4210_fimd_read()
1823 return s->window[w].palette[i]; in exynos4210_fimd_read()
1845 int w; in exynos4210_fimd_load() local
1851 for (w = 0; w < NUM_OF_WINDOWS; w++) { in exynos4210_fimd_load()
1852 exynos4210_fimd_update_win_bppmode(s, w); in exynos4210_fimd_load()
1853 fimd_update_get_alpha(s, w); in exynos4210_fimd_load()
1854 fimd_update_memory_section(s, w); in exynos4210_fimd_load()
1917 VMSTATE_STRUCT_ARRAY(window, Exynos4210fimdState, 5, 1,