ofb               613 drivers/video/fbdev/pxafb.c static void overlay1fb_setup(struct pxafb_layer *ofb)
ofb               615 drivers/video/fbdev/pxafb.c 	int size = ofb->fb.fix.line_length * ofb->fb.var.yres_virtual;
ofb               616 drivers/video/fbdev/pxafb.c 	unsigned long start = ofb->video_mem_phys;
ofb               617 drivers/video/fbdev/pxafb.c 	setup_frame_dma(ofb->fbi, DMA_OV1, PAL_NONE, start, size);
ofb               623 drivers/video/fbdev/pxafb.c static void overlay1fb_enable(struct pxafb_layer *ofb)
ofb               625 drivers/video/fbdev/pxafb.c 	int enabled = lcd_readl(ofb->fbi, OVL1C1) & OVLxC1_OEN;
ofb               626 drivers/video/fbdev/pxafb.c 	uint32_t fdadr1 = ofb->fbi->fdadr[DMA_OV1] | (enabled ? 0x1 : 0);
ofb               628 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, enabled ? FBR1 : FDADR1, fdadr1);
ofb               629 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, OVL1C2, ofb->control[1]);
ofb               630 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, OVL1C1, ofb->control[0] | OVLxC1_OEN);
ofb               633 drivers/video/fbdev/pxafb.c static void overlay1fb_disable(struct pxafb_layer *ofb)
ofb               637 drivers/video/fbdev/pxafb.c 	if (!(lcd_readl(ofb->fbi, OVL1C1) & OVLxC1_OEN))
ofb               640 drivers/video/fbdev/pxafb.c 	lccr5 = lcd_readl(ofb->fbi, LCCR5);
ofb               642 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, OVL1C1, ofb->control[0] & ~OVLxC1_OEN);
ofb               644 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, LCSR1, LCSR1_BS(1));
ofb               645 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, LCCR5, lccr5 & ~LCSR1_BS(1));
ofb               646 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, FBR1, ofb->fbi->fdadr[DMA_OV1] | 0x3);
ofb               648 drivers/video/fbdev/pxafb.c 	if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0)
ofb               651 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, LCCR5, lccr5);
ofb               654 drivers/video/fbdev/pxafb.c static void overlay2fb_setup(struct pxafb_layer *ofb)
ofb               656 drivers/video/fbdev/pxafb.c 	int size, div = 1, pfor = NONSTD_TO_PFOR(ofb->fb.var.nonstd);
ofb               657 drivers/video/fbdev/pxafb.c 	unsigned long start[3] = { ofb->video_mem_phys, 0, 0 };
ofb               660 drivers/video/fbdev/pxafb.c 		size = ofb->fb.fix.line_length * ofb->fb.var.yres_virtual;
ofb               661 drivers/video/fbdev/pxafb.c 		setup_frame_dma(ofb->fbi, DMA_OV2_Y, -1, start[0], size);
ofb               663 drivers/video/fbdev/pxafb.c 		size = ofb->fb.var.xres_virtual * ofb->fb.var.yres_virtual;
ofb               671 drivers/video/fbdev/pxafb.c 		setup_frame_dma(ofb->fbi, DMA_OV2_Y,  -1, start[0], size);
ofb               672 drivers/video/fbdev/pxafb.c 		setup_frame_dma(ofb->fbi, DMA_OV2_Cb, -1, start[1], size / div);
ofb               673 drivers/video/fbdev/pxafb.c 		setup_frame_dma(ofb->fbi, DMA_OV2_Cr, -1, start[2], size / div);
ofb               677 drivers/video/fbdev/pxafb.c static void overlay2fb_enable(struct pxafb_layer *ofb)
ofb               679 drivers/video/fbdev/pxafb.c 	int pfor = NONSTD_TO_PFOR(ofb->fb.var.nonstd);
ofb               680 drivers/video/fbdev/pxafb.c 	int enabled = lcd_readl(ofb->fbi, OVL2C1) & OVLxC1_OEN;
ofb               681 drivers/video/fbdev/pxafb.c 	uint32_t fdadr2 = ofb->fbi->fdadr[DMA_OV2_Y]  | (enabled ? 0x1 : 0);
ofb               682 drivers/video/fbdev/pxafb.c 	uint32_t fdadr3 = ofb->fbi->fdadr[DMA_OV2_Cb] | (enabled ? 0x1 : 0);
ofb               683 drivers/video/fbdev/pxafb.c 	uint32_t fdadr4 = ofb->fbi->fdadr[DMA_OV2_Cr] | (enabled ? 0x1 : 0);
ofb               686 drivers/video/fbdev/pxafb.c 		lcd_writel(ofb->fbi, enabled ? FBR2 : FDADR2, fdadr2);
ofb               688 drivers/video/fbdev/pxafb.c 		lcd_writel(ofb->fbi, enabled ? FBR2 : FDADR2, fdadr2);
ofb               689 drivers/video/fbdev/pxafb.c 		lcd_writel(ofb->fbi, enabled ? FBR3 : FDADR3, fdadr3);
ofb               690 drivers/video/fbdev/pxafb.c 		lcd_writel(ofb->fbi, enabled ? FBR4 : FDADR4, fdadr4);
ofb               692 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, OVL2C2, ofb->control[1]);
ofb               693 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, OVL2C1, ofb->control[0] | OVLxC1_OEN);
ofb               696 drivers/video/fbdev/pxafb.c static void overlay2fb_disable(struct pxafb_layer *ofb)
ofb               700 drivers/video/fbdev/pxafb.c 	if (!(lcd_readl(ofb->fbi, OVL2C1) & OVLxC1_OEN))
ofb               703 drivers/video/fbdev/pxafb.c 	lccr5 = lcd_readl(ofb->fbi, LCCR5);
ofb               705 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, OVL2C1, ofb->control[0] & ~OVLxC1_OEN);
ofb               707 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, LCSR1, LCSR1_BS(2));
ofb               708 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, LCCR5, lccr5 & ~LCSR1_BS(2));
ofb               709 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, FBR2, ofb->fbi->fdadr[DMA_OV2_Y]  | 0x3);
ofb               710 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, FBR3, ofb->fbi->fdadr[DMA_OV2_Cb] | 0x3);
ofb               711 drivers/video/fbdev/pxafb.c 	lcd_writel(ofb->fbi, FBR4, ofb->fbi->fdadr[DMA_OV2_Cr] | 0x3);
ofb               713 drivers/video/fbdev/pxafb.c 	if (wait_for_completion_timeout(&ofb->branch_done, 1 * HZ) == 0)
ofb               732 drivers/video/fbdev/pxafb.c 	struct pxafb_layer *ofb = container_of(info, struct pxafb_layer, fb);
ofb               738 drivers/video/fbdev/pxafb.c 	if (ofb->usage++ == 0) {
ofb               741 drivers/video/fbdev/pxafb.c 		fb_blank(&ofb->fbi->fb, FB_BLANK_UNBLANK);
ofb               750 drivers/video/fbdev/pxafb.c 	struct pxafb_layer *ofb = container_of(info, struct pxafb_layer, fb);
ofb               752 drivers/video/fbdev/pxafb.c 	if (ofb->usage == 1) {
ofb               753 drivers/video/fbdev/pxafb.c 		ofb->ops->disable(ofb);
ofb               754 drivers/video/fbdev/pxafb.c 		ofb->fb.var.height	= -1;
ofb               755 drivers/video/fbdev/pxafb.c 		ofb->fb.var.width	= -1;
ofb               756 drivers/video/fbdev/pxafb.c 		ofb->fb.var.xres = ofb->fb.var.xres_virtual = 0;
ofb               757 drivers/video/fbdev/pxafb.c 		ofb->fb.var.yres = ofb->fb.var.yres_virtual = 0;
ofb               759 drivers/video/fbdev/pxafb.c 		ofb->usage--;
ofb               767 drivers/video/fbdev/pxafb.c 	struct pxafb_layer *ofb = container_of(info, struct pxafb_layer, fb);
ofb               768 drivers/video/fbdev/pxafb.c 	struct fb_var_screeninfo *base_var = &ofb->fbi->fb.var;
ofb               780 drivers/video/fbdev/pxafb.c 	if (ofb->id == OVERLAY1 && pfor != 0)
ofb               816 drivers/video/fbdev/pxafb.c static int overlayfb_check_video_memory(struct pxafb_layer *ofb)
ofb               818 drivers/video/fbdev/pxafb.c 	struct fb_var_screeninfo *var = &ofb->fb.var;
ofb               830 drivers/video/fbdev/pxafb.c 	ofb->fb.fix.line_length = var->xres_virtual * bpp / 8;
ofb               832 drivers/video/fbdev/pxafb.c 	size = PAGE_ALIGN(ofb->fb.fix.line_length * var->yres_virtual);
ofb               834 drivers/video/fbdev/pxafb.c 	if (ofb->video_mem) {
ofb               835 drivers/video/fbdev/pxafb.c 		if (ofb->video_mem_size >= size)
ofb               843 drivers/video/fbdev/pxafb.c 	struct pxafb_layer *ofb = container_of(info, struct pxafb_layer, fb);
ofb               847 drivers/video/fbdev/pxafb.c 	ret = overlayfb_check_video_memory(ofb);
ofb               856 drivers/video/fbdev/pxafb.c 	ofb->control[0] = OVLxC1_PPL(var->xres) | OVLxC1_LPO(var->yres) |
ofb               858 drivers/video/fbdev/pxafb.c 	ofb->control[1] = OVLxC2_XPOS(xpos) | OVLxC2_YPOS(ypos);
ofb               860 drivers/video/fbdev/pxafb.c 	if (ofb->id == OVERLAY2)
ofb               861 drivers/video/fbdev/pxafb.c 		ofb->control[1] |= OVL2C2_PFOR(pfor);
ofb               863 drivers/video/fbdev/pxafb.c 	ofb->ops->setup(ofb);
ofb               864 drivers/video/fbdev/pxafb.c 	ofb->ops->enable(ofb);
ofb               876 drivers/video/fbdev/pxafb.c static void init_pxafb_overlay(struct pxafb_info *fbi, struct pxafb_layer *ofb,
ofb               879 drivers/video/fbdev/pxafb.c 	sprintf(ofb->fb.fix.id, "overlay%d", id + 1);
ofb               881 drivers/video/fbdev/pxafb.c 	ofb->fb.fix.type		= FB_TYPE_PACKED_PIXELS;
ofb               882 drivers/video/fbdev/pxafb.c 	ofb->fb.fix.xpanstep		= 0;
ofb               883 drivers/video/fbdev/pxafb.c 	ofb->fb.fix.ypanstep		= 1;
ofb               885 drivers/video/fbdev/pxafb.c 	ofb->fb.var.activate		= FB_ACTIVATE_NOW;
ofb               886 drivers/video/fbdev/pxafb.c 	ofb->fb.var.height		= -1;
ofb               887 drivers/video/fbdev/pxafb.c 	ofb->fb.var.width		= -1;
ofb               888 drivers/video/fbdev/pxafb.c 	ofb->fb.var.vmode		= FB_VMODE_NONINTERLACED;
ofb               890 drivers/video/fbdev/pxafb.c 	ofb->fb.fbops			= &overlay_fb_ops;
ofb               891 drivers/video/fbdev/pxafb.c 	ofb->fb.flags			= FBINFO_FLAG_DEFAULT;
ofb               892 drivers/video/fbdev/pxafb.c 	ofb->fb.node			= -1;
ofb               893 drivers/video/fbdev/pxafb.c 	ofb->fb.pseudo_palette		= NULL;
ofb               895 drivers/video/fbdev/pxafb.c 	ofb->id = id;
ofb               896 drivers/video/fbdev/pxafb.c 	ofb->ops = &ofb_ops[id];
ofb               897 drivers/video/fbdev/pxafb.c 	ofb->usage = 0;
ofb               898 drivers/video/fbdev/pxafb.c 	ofb->fbi = fbi;
ofb               899 drivers/video/fbdev/pxafb.c 	init_completion(&ofb->branch_done);
ofb               911 drivers/video/fbdev/pxafb.c 					  struct pxafb_layer *ofb)
ofb               916 drivers/video/fbdev/pxafb.c 	ofb->video_mem = alloc_pages_exact(PAGE_ALIGN(pxafb->video_mem_size),
ofb               918 drivers/video/fbdev/pxafb.c 	if (ofb->video_mem == NULL)
ofb               921 drivers/video/fbdev/pxafb.c 	ofb->video_mem_phys = virt_to_phys(ofb->video_mem);
ofb               922 drivers/video/fbdev/pxafb.c 	ofb->video_mem_size = PAGE_ALIGN(pxafb->video_mem_size);
ofb               924 drivers/video/fbdev/pxafb.c 	mutex_lock(&ofb->fb.mm_lock);
ofb               925 drivers/video/fbdev/pxafb.c 	ofb->fb.fix.smem_start	= ofb->video_mem_phys;
ofb               926 drivers/video/fbdev/pxafb.c 	ofb->fb.fix.smem_len	= pxafb->video_mem_size;
ofb               927 drivers/video/fbdev/pxafb.c 	mutex_unlock(&ofb->fb.mm_lock);
ofb               929 drivers/video/fbdev/pxafb.c 	ofb->fb.screen_base	= ofb->video_mem;
ofb               942 drivers/video/fbdev/pxafb.c 		struct pxafb_layer *ofb = &fbi->overlay[i];
ofb               943 drivers/video/fbdev/pxafb.c 		init_pxafb_overlay(fbi, ofb, i);
ofb               944 drivers/video/fbdev/pxafb.c 		ret = register_framebuffer(&ofb->fb);
ofb               949 drivers/video/fbdev/pxafb.c 		ret = pxafb_overlay_map_video_memory(fbi, ofb);
ofb               954 drivers/video/fbdev/pxafb.c 			unregister_framebuffer(&ofb->fb);
ofb               957 drivers/video/fbdev/pxafb.c 		ofb->registered = 1;
ofb               974 drivers/video/fbdev/pxafb.c 		struct pxafb_layer *ofb = &fbi->overlay[i];
ofb               975 drivers/video/fbdev/pxafb.c 		if (ofb->registered) {
ofb               976 drivers/video/fbdev/pxafb.c 			if (ofb->video_mem)
ofb               977 drivers/video/fbdev/pxafb.c 				free_pages_exact(ofb->video_mem,
ofb               978 drivers/video/fbdev/pxafb.c 					ofb->video_mem_size);
ofb               979 drivers/video/fbdev/pxafb.c 			unregister_framebuffer(&ofb->fb);