drm/rockchip: vop2: Support rk3576 vivid hdr

`hdr_extend->hdr_type` add vivid hdr platform flag in bit[15:8]
to differentiate between different platforms in the future.
At present, only support rk3528/rk3576 vivid hdr, there is no
need to deliberately distinguish.

Change-Id: Id6e5dbc648358254e84397edc86a5e0c8cf97d8e
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
This commit is contained in:
Algea Cao
2024-03-01 11:17:51 +08:00
committed by Tao Huang
parent 3c6f0f4fb0
commit d4bbfe8793
2 changed files with 4 additions and 1 deletions

View File

@@ -570,6 +570,9 @@ struct hdrvivid_regs {
uint32_t tone_sca_axi_tab[RK_HDRVIVID_TONE_SCA_AXI_TAB_LENGTH];
};
#define RK_HDR_TYPE_MASK 0xff
#define RK_HDR_PLAT_MASK (0xff << 8)
struct hdr_extend {
uint32_t hdr_type;
uint32_t length;

View File

@@ -9212,7 +9212,7 @@ static void vop3_setup_dynamic_hdr(struct vop2_video_port *vp, uint8_t win_phys_
}
hdr_data = (struct hdr_extend *)vcstate->hdr_ext_data->data;
hdr_format = hdr_data->hdr_type;
hdr_format = hdr_data->hdr_type & RK_HDR_TYPE_MASK;
switch (hdr_format) {
case HDR_NONE: