static dev_t di_devno;
static struct class *di_clsp;
-static const char version_s[] = "2018-09-28a";
+static const char version_s[] = "2018-11-06a";
static int bypass_state = 1;
static int bypass_all;
if (vf->type & VIDTYPE_PIC)
return true;
-#if 1
+#if 0
if (vf->type & VIDTYPE_COMPRESS)
return true;
#else
+ /*support G12A and TXLX platform*/
if (vf->type & VIDTYPE_COMPRESS) {
+ if (!afbc_is_supported())
+ return true;
if ((vf->compHeight > (default_height + 8))
|| (vf->compWidth > default_width))
return true;
return ®_AFBC[afbc_get_decnub()][0];
}
-static bool afbc_is_supported(void)
+bool afbc_is_supported(void)
{
bool ret = false;
- if (is_meson_gxl_cpu()
- || is_meson_txlx_cpu()
+ /*currently support txlx and g12a*/
+ if (is_meson_txlx_cpu()
|| cpu_after_eq(MESON_CPU_MAJOR_ID_G12A))
ret = true;
if (post_write_en) {
DI_VSYNC_WR_MPEG_REG(DI_POST_GL_CTRL,
0x80000000|line_num_post_frst);
+ /*di if0 mif to di post*/
+ DI_VSYNC_WR_MPEG_REG_BITS(VIUB_MISC_CTRL0, 0, 4, 1);
+ /*di_mif0_en:select mif to di*/
DI_VSYNC_WR_MPEG_REG_BITS(VD1_AFBCD0_MISC_CTRL,
- 0, 20, 1);
- DI_VSYNC_WR_MPEG_REG_BITS(VD1_AFBCD0_MISC_CTRL,
- 0, 8, 9);
+ 1, 8, 1);
} else {
DI_VSYNC_WR_MPEG_REG_BITS(VD1_AFBCD0_MISC_CTRL,
1, 8, 1);
unsigned char det3d_en, unsigned char nrds_en,
unsigned char post_wr, unsigned char mc_en);
void di_txl_patch_prog(int prog_flg, unsigned int cnt, bool mc_en);
+bool afbc_is_supported(void);
//extern void afbc_power_sw(bool on);
extern void afbc_reg_sw(bool on);
extern void afbc_sw_trig(bool on);