htcleo: add different mdp modifications
We have to check whether the hacks are still needed or not
This commit is contained in:
parent
62bfba1cd7
commit
729e4a7768
@ -139,6 +139,11 @@ static irqreturn_t mdp_isr(int irq, void *data)
|
||||
status = mdp_readl(mdp, MDP_INTR_STATUS);
|
||||
mdp_writel(mdp, status, MDP_INTR_CLEAR);
|
||||
|
||||
|
||||
#if defined(CONFIG_MACH_HTCLEO)
|
||||
status &= ~0x10000; // Cotulla
|
||||
#endif
|
||||
|
||||
// pr_info("%s: status=%08x (irq_mask=%08x)\n", __func__, status,
|
||||
// mdp_irq_mask);
|
||||
status &= mdp_irq_mask;
|
||||
|
@ -230,10 +230,33 @@ static void lcdc_request_vsync(struct msm_panel_data *fb_panel,
|
||||
|
||||
/* the vsync callback will start the dma */
|
||||
vsync_cb->func(vsync_cb);
|
||||
lcdc->got_vsync = 0;
|
||||
mdp_out_if_req_irq(mdp_dev, MSM_LCDC_INTERFACE, MDP_LCDC_FRAME_START,
|
||||
&lcdc->frame_start_cb);
|
||||
lcdc_wait_vsync(fb_panel);
|
||||
// CotullaFIX start
|
||||
// FUCK, who make calls from console with disabled interrupts, FUCK THEM!
|
||||
if (irqs_disabled())
|
||||
{
|
||||
struct mdp_lcdc_info *lcdc = panel_to_lcdc(fb_panel);
|
||||
uint32_t status;
|
||||
uint32_t i;
|
||||
// do it via polling
|
||||
for (i = 0; i < 20; i++)
|
||||
{
|
||||
status = mdp_readl(lcdc->mdp, MDP_INTR_STATUS);
|
||||
if (status & MDP_LCDC_FRAME_START)
|
||||
break;
|
||||
mdelay(1);
|
||||
}
|
||||
// clear intr at the end
|
||||
mdp_writel(lcdc->mdp, MDP_LCDC_FRAME_START, MDP_INTR_CLEAR);
|
||||
// vsync_cb->func(vsync_cb);
|
||||
}
|
||||
else
|
||||
{
|
||||
lcdc->got_vsync = 0;
|
||||
mdp_out_if_req_irq(mdp_dev, MSM_LCDC_INTERFACE, MDP_LCDC_FRAME_START,
|
||||
&lcdc->frame_start_cb);
|
||||
lcdc_wait_vsync(fb_panel);
|
||||
}
|
||||
// CotullaFIX end
|
||||
}
|
||||
|
||||
static void lcdc_clear_vsync(struct msm_panel_data *fb_panel)
|
||||
|
@ -268,6 +268,7 @@ static void blit_blend(struct mdp_blit_req *req, struct ppp_regs *regs)
|
||||
req->alpha &= 0xff;
|
||||
/* ALPHA BLEND */
|
||||
if (HAS_ALPHA(req->src.format)) {
|
||||
#if !defined(CONFIG_MACH_HTCLEO)
|
||||
regs->op |= PPP_OP_ROT_ON | PPP_OP_BLEND_ON;
|
||||
if (req->flags & MDP_BLEND_FG_PREMULT) {
|
||||
#ifdef CONFIG_MSM_MDP31
|
||||
@ -284,6 +285,10 @@ static void blit_blend(struct mdp_blit_req *req, struct ppp_regs *regs)
|
||||
} else {
|
||||
regs->op |= PPP_OP_BLEND_SRCPIXEL_ALPHA;
|
||||
}
|
||||
#else
|
||||
regs->op |= PPP_OP_ROT_ON | PPP_OP_BLEND_ON;
|
||||
regs->op |= PPP_OP_BLEND_SRCPIXEL_ALPHA;
|
||||
#endif
|
||||
} else if (req->alpha < MDP_ALPHA_NOP) {
|
||||
/* just blend by alpha */
|
||||
regs->op |= PPP_OP_ROT_ON | PPP_OP_BLEND_ON |
|
||||
@ -496,6 +501,10 @@ static int send_blit(const struct mdp_info *mdp, struct mdp_blit_req *req,
|
||||
mdp_writel_dbg(mdp, regs->bg_img_sz, MDP_PPP_BG_IMAGE_SIZE);
|
||||
mdp_writel_dbg(mdp, regs->bg_alpha_sel,
|
||||
MDP_PPP_BLEND_BG_ALPHA_SEL);
|
||||
|
||||
#if defined(CONFIG_MACH_HTCLEO)
|
||||
mdp_writel_dbg(mdp, 0, MDP_TFETCH_TEST_MODE);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
if( src_file != -1 && dst_file != -1 )
|
||||
|
@ -629,22 +629,28 @@ int msmfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
static void msmfb_fillrect(struct fb_info *p, const struct fb_fillrect *rect)
|
||||
{
|
||||
cfb_fillrect(p, rect);
|
||||
#if !defined(CONFIG_MACH_HTCLEO)
|
||||
msmfb_update(p, rect->dx, rect->dy, rect->dx + rect->width,
|
||||
rect->dy + rect->height);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void msmfb_copyarea(struct fb_info *p, const struct fb_copyarea *area)
|
||||
{
|
||||
cfb_copyarea(p, area);
|
||||
#if !defined(CONFIG_MACH_HTCLEO)
|
||||
msmfb_update(p, area->dx, area->dy, area->dx + area->width,
|
||||
area->dy + area->height);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void msmfb_imageblit(struct fb_info *p, const struct fb_image *image)
|
||||
{
|
||||
cfb_imageblit(p, image);
|
||||
#if !defined(CONFIG_MACH_HTCLEO)
|
||||
msmfb_update(p, image->dx, image->dy, image->dx + image->width,
|
||||
image->dy + image->height);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user