mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
osd: add afbc flag for getting capbility [1/1]
PD#SWPL-22030 Problem: add afbc flag for getting capbility Solution: add this flag support Verify: on g12b w400 Change-Id: I4f6efec85e3a62c484388821c24bbdd7eee06251 Signed-off-by: Cao Jian <jian.cao@amlogic.com>
This commit is contained in:
@@ -151,9 +151,10 @@ enum color_index_e {
|
||||
#define MALI_AFBC_SPLIT_ON 1
|
||||
#define OSD_HW_CURSOR (1 << 0)
|
||||
#define OSD_UBOOT_LOGO (1 << 1)
|
||||
#define OSD_ZORDER (1 << 2)
|
||||
#define OSD_PRIMARY (1 << 3)
|
||||
#define OSD_FREESCALE (1 << 4)
|
||||
#define OSD_ZORDER (1 << 2)
|
||||
#define OSD_PRIMARY (1 << 3)
|
||||
#define OSD_FREESCALE (1 << 4)
|
||||
#define OSD_AFBC (1 << 5)
|
||||
#define OSD_VIU2 (1 << 29)
|
||||
#define OSD_VIU1 (1 << 30)
|
||||
#define OSD_LAYER_ENABLE (1 << 31)
|
||||
|
||||
@@ -4006,26 +4006,30 @@ void osd_set_hold_line(u32 index, int hold_line)
|
||||
int osd_get_capbility(u32 index)
|
||||
{
|
||||
u32 capbility = 0;
|
||||
u32 afbc = osd_hw.osd_meson_dev.afbc_type;
|
||||
|
||||
if (osd_hw.osd_meson_dev.osd_ver == OSD_HIGH_ONE) {
|
||||
if (index == OSD1)
|
||||
capbility |= OSD_LAYER_ENABLE | OSD_FREESCALE
|
||||
| OSD_UBOOT_LOGO | OSD_ZORDER | OSD_VIU1
|
||||
| OSD_PRIMARY;
|
||||
| OSD_PRIMARY | (afbc ? OSD_AFBC : 0);
|
||||
else if (index < osd_hw.osd_meson_dev.viu1_osd_count)
|
||||
capbility |= OSD_LAYER_ENABLE | OSD_FREESCALE |
|
||||
OSD_ZORDER | OSD_VIU1;
|
||||
OSD_ZORDER | OSD_VIU1 |
|
||||
(afbc ? OSD_AFBC : 0);
|
||||
else if (index == osd_hw.osd_meson_dev.viu2_index)
|
||||
capbility |= OSD_LAYER_ENABLE | OSD_VIU2;
|
||||
} else if (osd_hw.osd_meson_dev.osd_ver == OSD_NORMAL) {
|
||||
if (index == OSD1)
|
||||
capbility |= OSD_LAYER_ENABLE | OSD_FREESCALE
|
||||
| OSD_VIU1;
|
||||
| OSD_VIU1 | (afbc ? OSD_AFBC : 0);
|
||||
else if (index == OSD2)
|
||||
capbility |= OSD_LAYER_ENABLE |
|
||||
OSD_HW_CURSOR | OSD_FREESCALE
|
||||
| OSD_UBOOT_LOGO | OSD_VIU1;
|
||||
| OSD_UBOOT_LOGO | OSD_VIU1 |
|
||||
(afbc ? OSD_AFBC : 0);
|
||||
}
|
||||
|
||||
return capbility;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user