#endif
}
#endif
+ if (get_double_write_mode(dec) == 0)
+ data32 |= 0x2; /*disable double write*/
+ else if (get_double_write_mode(dec) & 0x10)
+ data32 |= 0x1; /*disable cm*/
+
WRITE_VREG(HEVC_SAO_CTRL1, data32);
if (get_double_write_mode(dec) & 0x10) {
if (get_cpu_major_id() >= MESON_CPU_MAJOR_ID_G12A) {
WRITE_VREG(HEVC_DBLK_CFG1, 0x2); // set ctusize==16
WRITE_VREG(HEVC_DBLK_CFG2, ((height & 0xffff)<<16) | (width & 0xffff));
- if (dw_mode)
+ if (dw_mode & 0x10)
+ WRITE_VREG(HEVC_DBLK_CFGB, 0x40405603);
+ else if (dw_mode)
WRITE_VREG(HEVC_DBLK_CFGB, 0x40405703);
else
WRITE_VREG(HEVC_DBLK_CFGB, 0x40405503);
data32 &= (~0xff0);
data32 |= endian; /* Big-Endian per 64-bit */
- if (hw->mmu_enable && dw_mode)
+ if (hw->mmu_enable && (dw_mode & 0x10))
+ data32 |= ((hw->canvas_mode << 12) |1);
+ else if (hw->mmu_enable && dw_mode)
data32 |= ((hw->canvas_mode << 12));
else
data32 |= ((hw->canvas_mode << 12)|2);
data32 &= (~0xff0);
/* data32 |= 0x670; // Big-Endian per 64-bit */
data32 |= endian; /* Big-Endian per 64-bit */
- if (get_cpu_major_id() < AM_MESON_CPU_MAJOR_ID_G12A) {
- data32 &= (~0x3); /*[1]:dw_disable [0]:cm_disable*/
- if (get_double_write_mode(hevc) == 0)
- data32 |= 0x2; /*disable double write*/
- else if (get_double_write_mode(hevc) & 0x10)
- data32 |= 0x1; /*disable cm*/
- } else {
+ data32 &= (~0x3); /*[1]:dw_disable [0]:cm_disable*/
+ if (get_double_write_mode(hevc) == 0)
+ data32 |= 0x2; /*disable double write*/
+ else if (get_double_write_mode(hevc) & 0x10)
+ data32 |= 0x1; /*disable cm*/
+ if (get_cpu_major_id() >= AM_MESON_CPU_MAJOR_ID_G12A) {
unsigned int data;
data = (0x57 << 8) | /* 1st/2nd write both enable*/
(0x0 << 0); /* h265 video format*/
data |= (0x1 << 9); /*double write only*/
else
data |= ((0x1 << 8) |(0x1 << 9));
-
WRITE_VREG(HEVC_DBLK_CFGB, data);
hevc_print(hevc, H265_DEBUG_BUFMGR_MORE,
"[DBLK DEBUG] HEVC1 CFGB : 0x%x\n", data);
* [1] dw_disable:disable double write output
* [0] cm_disable:disable compress output
*/
+
WRITE_VREG(HEVC_SAO_CTRL1, data32);
if (get_double_write_mode(hevc) & 0x10) {
/* [23:22] dw_v1_ctrl
#else
data32 |= endian; /* Big-Endian per 64-bit */
#endif
- if (get_cpu_major_id() < AM_MESON_CPU_MAJOR_ID_G12A) {
- data32 &= (~0x3); /*[1]:dw_disable [0]:cm_disable*/
- if (get_double_write_mode(hw) == 0)
- data32 |= 0x2; /*disable double write*/
+ data32 &= (~0x3); /*[1]:dw_disable [0]:cm_disable*/
+ if (get_double_write_mode(hw) == 0)
+ data32 |= 0x2; /*disable double write*/
else if (get_double_write_mode(hw) & 0x10)
data32 |= 0x1; /*disable cm*/
- } else { /* >= G12A dw write control */
+ if (get_cpu_major_id() >= AM_MESON_CPU_MAJOR_ID_G12A) { /* >= G12A dw write control */
unsigned int data;
data = READ_VREG(HEVC_DBLK_CFGB);
data &= (~0x300); /*[8]:first write enable (compress) [9]:double write enable (uncompress)*/
data |= ((0x1 << 8) |(0x1 << 9));
WRITE_VREG(HEVC_DBLK_CFGB, data);
}
+
WRITE_VREG(HEVC_SAO_CTRL1, data32);
if (get_double_write_mode(hw) & 0x10) {
data32 &= (~0xff0);
/* data32 |= 0x670; // Big-Endian per 64-bit */
data32 |= endian; /* Big-Endian per 64-bit */
- if (get_cpu_major_id() < AM_MESON_CPU_MAJOR_ID_G12A) {
- data32 &= (~0x3); /*[1]:dw_disable [0]:cm_disable*/
- if (get_double_write_mode(pbi) == 0)
- data32 |= 0x2; /*disable double write*/
+ data32 &= (~0x3); /*[1]:dw_disable [0]:cm_disable*/
+ if (get_double_write_mode(pbi) == 0)
+ data32 |= 0x2; /*disable double write*/
else if (get_double_write_mode(pbi) & 0x10)
data32 |= 0x1; /*disable cm*/
- } else { /* >= G12A dw write control */
+ if (get_cpu_major_id() >= AM_MESON_CPU_MAJOR_ID_G12A) { /* >= G12A dw write control */
unsigned int data;
data = READ_VREG(HEVC_DBLK_CFGB);
data &= (~0x300); /*[8]:first write enable (compress) [9]:double write enable (uncompress)*/
(0x3 << 10) | // (dw fifo thres not r/b)
(0x3 << 8) | // 1st/2nd write both enable
(0x1 << 0); // vp9 video format
+ if (get_double_write_mode(pbi) == 0x10)
+ data32 &= (~0x100);
} else if (get_cpu_major_id() >= AM_MESON_CPU_MAJOR_ID_G12A) {
data32 = (0x57 << 8) | /*1st/2nd write both enable*/
(0x1 << 0); /*vp9 video format*/
+ if (get_double_write_mode(pbi) == 0x10)
+ data32 &= (~0x100);
} else
data32 = 0x40400001;