Lines Matching defs:ofbi
150 static unsigned omapfb_get_vrfb_offset(const struct omapfb_info *ofbi, int rot)
152 const struct vrfb *vrfb = &ofbi->region->vrfb;
178 static u32 omapfb_get_region_rot_paddr(const struct omapfb_info *ofbi, int rot)
180 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
181 return ofbi->region->vrfb.paddr[rot]
182 + omapfb_get_vrfb_offset(ofbi, rot);
184 return ofbi->region->paddr;
188 static u32 omapfb_get_region_paddr(const struct omapfb_info *ofbi)
190 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
191 return ofbi->region->vrfb.paddr[0];
193 return ofbi->region->paddr;
196 static void __iomem *omapfb_get_region_vaddr(const struct omapfb_info *ofbi)
198 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
199 return ofbi->region->vrfb.vaddr[0];
201 return ofbi->region->vaddr;
443 static int check_fb_size(const struct omapfb_info *ofbi,
446 unsigned long max_frame_size = ofbi->region->size;
450 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
492 struct omapfb_info *ofbi = FB2OFB(fbi);
493 struct omapfb2_mem_region *rg = ofbi->region;
503 if (!rg->size || ofbi->rotation_type != OMAP_DSS_ROT_VRFB)
554 fbi->screen_base = ofbi->region->vrfb.vaddr[0];
556 fix->smem_start = ofbi->region->vrfb.paddr[0];
594 struct omapfb_info *ofbi = FB2OFB(fbi);
595 struct omapfb2_mem_region *rg = ofbi->region;
600 fbi->screen_base = (char __iomem *)omapfb_get_region_vaddr(ofbi);
603 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
623 fix->smem_start = omapfb_get_region_paddr(ofbi);
656 struct omapfb_info *ofbi = FB2OFB(fbi);
662 DBG("check_fb_var %d\n", ofbi->id);
664 WARN_ON(!atomic_read(&ofbi->region->lock_count));
672 for (i = 0; i < ofbi->num_overlays; ++i) {
673 if ((ofbi->overlays[i]->supported_modes & mode) == 0) {
686 if (ofbi->region->size != 0 && check_fb_size(ofbi, var))
801 static void omapfb_calc_addr(const struct omapfb_info *ofbi,
809 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
810 data_start_p = omapfb_get_region_rot_paddr(ofbi, rotation);
812 data_start_p = omapfb_get_region_paddr(ofbi);
814 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
835 struct omapfb_info *ofbi = FB2OFB(fbi);
847 WARN_ON(!atomic_read(&ofbi->region->lock_count));
849 for (i = 0; i < ofbi->num_overlays; i++) {
850 if (ovl != ofbi->overlays[i])
853 rotation = (rotation + ofbi->rotation[i]) % 4;
857 DBG("setup_overlay %d, posx %d, posy %d, outw %d, outh %d\n", ofbi->id,
868 if (ofbi->region->size)
869 omapfb_calc_addr(ofbi, var, fix, rotation, &data_start_p);
880 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
893 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
896 mirror = ofbi->mirror;
903 info.rotation_type = ofbi->rotation_type;
929 struct omapfb_info *ofbi = FB2OFB(fbi);
941 WARN_ON(!atomic_read(&ofbi->region->lock_count));
943 for (i = 0; i < ofbi->num_overlays; i++) {
944 ovl = ofbi->overlays[i];
946 DBG("apply_changes, fb %d, ovl %d\n", ofbi->id, ovl->id);
948 if (ofbi->region->size == 0) {
957 int rotation = (var->rotate + ofbi->rotation[i]) % 4;
1000 struct omapfb_info *ofbi = FB2OFB(fbi);
1005 omapfb_get_mem_region(ofbi->region);
1009 omapfb_put_mem_region(ofbi->region);
1017 struct omapfb_info *ofbi = FB2OFB(fbi);
1022 omapfb_get_mem_region(ofbi->region);
1033 omapfb_put_mem_region(ofbi->region);
1041 struct omapfb_info *ofbi = FB2OFB(fbi);
1057 omapfb_get_mem_region(ofbi->region);
1061 omapfb_put_mem_region(ofbi->region);
1091 struct omapfb_info *ofbi = FB2OFB(fbi);
1098 rg = omapfb_get_mem_region(ofbi->region);
1100 start = omapfb_get_region_paddr(ofbi);
1122 omapfb_put_mem_region(ofbi->region);
1134 /*struct omapfb_info *ofbi = FB2OFB(fbi);*/
1135 /*struct omapfb2_device *fbdev = ofbi->fbdev;*/
1215 struct omapfb_info *ofbi = FB2OFB(fbi);
1216 struct omapfb2_device *fbdev = ofbi->fbdev;
1299 struct omapfb_info *ofbi = FB2OFB(fbi);
1300 struct omapfb2_device *fbdev = ofbi->fbdev;
1303 rg = ofbi->region;
1310 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
1355 struct omapfb_info *ofbi = FB2OFB(fbi);
1356 struct omapfb2_device *fbdev = ofbi->fbdev;
1363 rg = ofbi->region;
1377 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB)
1380 DBG("allocating %lu bytes for fb %d\n", size, ofbi->id);
1393 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
1419 struct omapfb_info *ofbi = FB2OFB(fbi);
1420 struct omapfb2_device *fbdev = ofbi->fbdev;
1446 if (ofbi->rotation_type == OMAP_DSS_ROT_VRFB) {
1552 struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
1554 rg = ofbi->region;
1582 struct omapfb_info *ofbi = FB2OFB(fbi);
1583 struct omapfb2_device *fbdev = ofbi->fbdev;
1584 struct omapfb2_mem_region *rg = ofbi->region;
1621 DBG("initializing fb %d\n", ofbi->id);
1731 struct omapfb_info *ofbi = FB2OFB(fbi);
1738 if (ofbi->region->size == 0) {
1750 int rotation = (var->rotate + ofbi->rotation[0]) % 4;
1876 struct omapfb_info *ofbi;
1887 ofbi = FB2OFB(fbi);
1888 ofbi->fbdev = fbdev;
1889 ofbi->id = i;
1891 ofbi->region = &fbdev->regions[i];
1892 ofbi->region->id = i;
1893 init_rwsem(&ofbi->region->lock);
1896 ofbi->rotation_type = def_vrfb ? OMAP_DSS_ROT_VRFB :
1898 ofbi->mirror = def_mirror;
1907 struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[i]);
1909 ofbi->overlays[0] = fbdev->overlays[i];
1910 ofbi->num_overlays = 1;
1925 struct omapfb_info *ofbi = FB2OFB(fbi);
1927 omapfb_get_mem_region(ofbi->region);
1929 omapfb_put_mem_region(ofbi->region);
1939 struct omapfb_info *ofbi = FB2OFB(fbi);
1941 if (ofbi->region->size == 0)
1962 struct omapfb_info *ofbi = FB2OFB(fbi);
1964 omapfb_get_mem_region(ofbi->region);
1966 omapfb_put_mem_region(ofbi->region);
1976 struct omapfb_info *ofbi = FB2OFB(fbdev->fbs[0]);
1978 if (ofbi->num_overlays > 0) {
1979 struct omap_overlay *ovl = ofbi->overlays[0];