mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
VCODEC: detect hevc resolution to determine the running frequency.
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
This commit is contained in:
@@ -1000,6 +1000,12 @@ static inline int reg_probe_width(vpu_reg *reg)
|
||||
return width_in_mb * 16;
|
||||
}
|
||||
|
||||
static inline int reg_probe_hevc_y_stride(vpu_reg *reg)
|
||||
{
|
||||
int y_virstride = reg->reg[8];
|
||||
return y_virstride;
|
||||
}
|
||||
|
||||
#if defined(CONFIG_VCODEC_MMU)
|
||||
static int vcodec_fd_to_iova(struct vpu_subdev_data *data, vpu_reg *reg,int fd)
|
||||
{
|
||||
@@ -1292,6 +1298,10 @@ static vpu_reg *reg_init(struct vpu_subdev_data *data,
|
||||
}
|
||||
}
|
||||
}
|
||||
if (data->hw_info->hw_id == HEVC_ID) {
|
||||
if (reg_probe_hevc_y_stride(reg) > 60000)
|
||||
reg->freq = VPU_FREQ_400M;
|
||||
}
|
||||
if (reg->type == VPU_PP) {
|
||||
reg->freq = VPU_FREQ_400M;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user