コード例 #1
0
static void _mlc_set(int module, int width, int height)
{
    NX_MLC_SetMLCTopControlParameter(module,
            /*CTRUE, // Field Enable(interlace or progressive)*/
            CFALSE, // Field Enable(interlace or progressive)
            CTRUE, // MLC Operation Enable
            1,  // Layer preference decide
            SECON );

    NX_MLC_SetScreenSize(module, width, height);
    NX_MLC_SetBackground(module, 0xFFFFFF);
    
    NX_MLC_SetSRAMMODE(module, TOPMLC, RUN);

#if 0
    NX_MLC_SetRGB0LayerControlParameter(module,
            CTRUE, CFALSE,
            CFALSE, 0x0,
            CFALSE, 0x0,
            CFALSE, 0x0,
            RGBFMT_A8B8G8R8, LOCKSIZE_16);
#else
    // only enable background
    NX_MLC_SetRGB0LayerControlParameter(module,
            CFALSE, CFALSE,
            CFALSE, 0x0,
            CFALSE, 0x0,
            CFALSE, 0x0,
            RGBFMT_A8B8G8R8, LOCKSIZE_16);
#endif

    NX_MLC_SetLayerRegFinish(module, TOPMLC);
    NX_MLC_SetLayerRegFinish(module, RGB0);
}
コード例 #2
0
ファイル: display_dev.c プロジェクト: Alexorleon/uboot
int disp_multily_setup(int module, struct disp_multily_param *par, unsigned int fbbase)
{
	int	x_resol = par->x_resol;
	int	y_resol	= par->y_resol;
	int	interlace = par->interlace;
	int	video_prior	= par->video_prior;
	int	pixel_byte = par->pixel_byte;
	int	mem_lock_size = par->mem_lock_size;
	int layer = par->fb_layer;
	unsigned int rgb_format = par->rgb_format;
	unsigned int bg_color = par->bg_color;

	mem_lock_size = 16; /* fix mem lock size */

	/* MLC TOP layer */
	NX_MLC_SetLayerPriority	(module, video_prior);
	NX_MLC_SetBackground(module, bg_color);
	NX_MLC_SetFieldEnable(module, interlace);
	NX_MLC_SetScreenSize(module, x_resol, y_resol);
	NX_MLC_SetRGBLayerGamaTablePowerMode(module, CFALSE, CFALSE, CFALSE);
	NX_MLC_SetRGBLayerGamaTableSleepMode(module, CTRUE, CTRUE, CTRUE);
	NX_MLC_SetRGBLayerGammaEnable(module, CFALSE);
	NX_MLC_SetDitherEnableWhenUsingGamma(module, CFALSE);
	NX_MLC_SetGammaPriority(module, CFALSE);
    NX_MLC_SetTopPowerMode(module, CTRUE);
    NX_MLC_SetTopSleepMode(module, CFALSE);

	/* MLC FB layer */
	NX_MLC_SetLockSize(module, layer, mem_lock_size);
	NX_MLC_SetAlphaBlending(module, layer, CFALSE, 15);
	NX_MLC_SetTransparency(module, layer, CFALSE, 0);
	NX_MLC_SetColorInversion(module, layer, CFALSE, 0);
	NX_MLC_SetRGBLayerInvalidPosition(module, layer, 0, 0, 0, 0, 0, CFALSE);
	NX_MLC_SetRGBLayerInvalidPosition(module, layer, 1, 0, 0, 0, 0, CFALSE);
	NX_MLC_SetFormatRGB(module, layer, rgb_format);
	NX_MLC_SetPosition(module, layer, 0, 0, x_resol-1, y_resol-1);
	NX_MLC_SetRGBLayerStride(module, layer, pixel_byte, x_resol*pixel_byte);
	NX_MLC_SetRGBLayerAddress(module, layer, fbbase);

	return 0;
}