H A D | omap_dmm_tiler.c | 805 static void fill_map(char **map, int xdiv, int ydiv, struct tcm_area *a, fill_map() argument 810 for (x = a->p0.x / xdiv; x <= a->p1.x / xdiv; x++) fill_map() 815 static void fill_map_pt(char **map, int xdiv, int ydiv, struct tcm_pt *p, fill_map_pt() argument 818 map[p->y / ydiv][p->x / xdiv] = c; fill_map_pt() 821 static char read_map_pt(char **map, int xdiv, int ydiv, struct tcm_pt *p) read_map_pt() argument 823 return map[p->y / ydiv][p->x / xdiv]; read_map_pt() 826 static int map_width(int xdiv, int x0, int x1) map_width() argument 828 return (x1 / xdiv) - (x0 / xdiv) + 1; map_width() 831 static void text_map(char **map, int xdiv, char *nice, int yd, int x0, int x1) text_map() argument 833 char *p = map[yd] + (x0 / xdiv); text_map() 834 int w = (map_width(xdiv, x0, x1) - strlen(nice)) / 2; text_map() 842 static void map_1d_info(char **map, int xdiv, int ydiv, char *nice, map_1d_info() argument 847 text_map(map, xdiv, nice, (a->p0.y + a->p1.y) / 2 / ydiv, 0, map_1d_info() 850 if (strlen(nice) < map_width(xdiv, a->p0.x, 256 - 1)) map_1d_info() 851 text_map(map, xdiv, nice, a->p0.y / ydiv, map_1d_info() 852 a->p0.x + xdiv, 256 - 1); map_1d_info() 853 else if (strlen(nice) < map_width(xdiv, 0, a->p1.x)) map_1d_info() 854 text_map(map, xdiv, nice, a->p1.y / ydiv, map_1d_info() 855 0, a->p1.y - xdiv); map_1d_info() 856 } else if (strlen(nice) + 1 < map_width(xdiv, a->p0.x, a->p1.x)) { map_1d_info() 857 text_map(map, xdiv, nice, a->p0.y / ydiv, a->p0.x, a->p1.x); map_1d_info() 861 static void map_2d_info(char **map, int xdiv, int ydiv, char *nice, map_2d_info() argument 865 if (strlen(nice) + 1 < map_width(xdiv, a->p0.x, a->p1.x)) map_2d_info() 866 text_map(map, xdiv, nice, (a->p0.y + a->p1.y) / 2 / ydiv, map_2d_info() 872 int xdiv = 2, ydiv = 1; tiler_map_show() local 893 w_adj = omap_dmm->container_width / xdiv; tiler_map_show() 915 fill_map(map, xdiv, ydiv, &block->area, tiler_map_show() 921 map_2d_info(map, xdiv, ydiv, nice, tiler_map_show() 924 bool start = read_map_pt(map, xdiv, tiler_map_show() 926 bool end = read_map_pt(map, xdiv, ydiv, tiler_map_show() 930 fill_map(map, xdiv, ydiv, &a, tiler_map_show() 932 fill_map_pt(map, xdiv, ydiv, tiler_map_show() 935 fill_map_pt(map, xdiv, ydiv, tiler_map_show() 938 map_1d_info(map, xdiv, ydiv, nice, tiler_map_show()
|