/* Transparency for palette pixel formats is not supported at the moment.  */
static uint32_t pxafb_var_to_lccr3(struct fb_var_screeninfo *var)
/* Transparency for palette pixel formats is not supported at the moment.  */
static uint32_t pxafb_var_to_lccr3(struct fb_var_screeninfo *var)
{
	int bpp = pxafb_var_to_bpp(var);
	uint32_t lccr3;
	if (bpp < 0)
		return 0;
	lccr3 = LCCR3_BPP(bpp);
	switch (var_to_depth(var)) {
	case 16: lccr3 |= var->transp.length ? LCCR3_PDFOR_3 : 0; break;
	case 18: lccr3 |= LCCR3_PDFOR_3; break;
	case 24: lccr3 |= var->transp.length ? LCCR3_PDFOR_2 : LCCR3_PDFOR_3;
		 break;
	case 19:
	case 25: lccr3 |= LCCR3_PDFOR_0; break;
	}
	return lccr3;
}