mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
video: rockchip: rga3: improve the resolution limitation of VSP
When the horizontal input exceeds 2k (here refers to 1996), need to switch from BI-cubic to BI-linear. When there is an HSD(horizontal scale down), need to check the horizontal input after the HSD. Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com> Change-Id: I3e4ceeb0e85811ccb131c22fe77ebaa571b8a922
This commit is contained in:
@@ -432,6 +432,8 @@
|
||||
#define s_RGA2_MMU_CTRL1_SW_ELS_MMU_EN(x) ((x & 0x1) << 12)
|
||||
#define s_RGA2_MMU_CTRL1_SW_ELS_MMU_FLUSH(x) ((x & 0x1) << 13)
|
||||
|
||||
#define RGA2_VSP_BICUBIC_LIMIT 1996
|
||||
|
||||
extern const struct rga_backend_ops rga2_ops;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -226,6 +226,7 @@ static void RGA2_set_reg_src_info(u8 *base, struct rga2_req *msg)
|
||||
u32 sw, sh;
|
||||
u32 dw, dh;
|
||||
u8 rotate_mode;
|
||||
u8 vsp_scale_mode = 0;
|
||||
u8 scale_w_flag, scale_h_flag;
|
||||
|
||||
bRGA_SRC_INFO = (u32 *) (base + RGA2_SRC_INFO_OFFSET);
|
||||
@@ -289,6 +290,18 @@ static void RGA2_set_reg_src_info(u8 *base, struct rga2_req *msg)
|
||||
scale_w_flag = 3;
|
||||
}
|
||||
|
||||
/* VSP scale mode select, HSD > VSD > VSP > HSP */
|
||||
if (scale_h_flag == 0x2) {
|
||||
/* After HSD, VSP needs to check dst_width */
|
||||
if ((scale_w_flag == 0x1) && (dw < RGA2_VSP_BICUBIC_LIMIT))
|
||||
vsp_scale_mode = 0x0;
|
||||
else if (sw < RGA2_VSP_BICUBIC_LIMIT)
|
||||
vsp_scale_mode = 0x0;
|
||||
else
|
||||
/* default select bilinear */
|
||||
vsp_scale_mode = 0x1;
|
||||
}
|
||||
|
||||
switch (msg->src.format) {
|
||||
case RGA_FORMAT_RGBA_8888:
|
||||
src0_format = 0x0;
|
||||
@@ -559,8 +572,7 @@ static void RGA2_set_reg_src_info(u8 *base, struct rga2_req *msg)
|
||||
((msg->alpha_rop_flag >> 4) & 0x1)));
|
||||
reg =
|
||||
((reg & (~m_RGA2_SRC_INFO_SW_SW_VSP_MODE_SEL)) |
|
||||
(s_RGA2_SRC_INFO_SW_SW_VSP_MODE_SEL((
|
||||
msg->scale_bicu_mode >> 4))));
|
||||
(s_RGA2_SRC_INFO_SW_SW_VSP_MODE_SEL((vsp_scale_mode))));
|
||||
reg =
|
||||
((reg & (~m_RGA2_SRC_INFO_SW_SW_YUV10_E)) |
|
||||
(s_RGA2_SRC_INFO_SW_SW_YUV10_E((yuv10))));
|
||||
@@ -1843,9 +1855,6 @@ static void rga_cmd_to_rga2_cmd(struct rga_scheduler_t *scheduler,
|
||||
break;
|
||||
}
|
||||
|
||||
if ((req->dst.act_w > 2048) && (req->src.act_h < req->dst.act_h))
|
||||
req->scale_bicu_mode |= (1 << 4);
|
||||
|
||||
req->LUT_addr = req_rga->LUT_addr;
|
||||
req->rop_mask_addr = req_rga->rop_mask_addr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user