vpp: add vpp slice switch policy in 4k1k240hz [1/1]

PD#SWPL-187128

Problem:
vd1 always 2 slice in 4k1k240hz

Solution:
add vpp slice switch policy in 4k1k240hz

Verify:
t3x

Change-Id: Ia14af7941cfbcf4642637f3b7889cba290c4718d
Signed-off-by: Pengcheng Chen <pengcheng.chen@amlogic.com>
This commit is contained in:
Pengcheng Chen
2024-09-27 17:26:13 +08:00
committed by gerrit autosubmit
parent 29fe9c3b05
commit a36e2fcbb8
2 changed files with 12 additions and 5 deletions
+2 -2
View File
@@ -4062,7 +4062,7 @@ static void force_switch_slice(void)
if (switch_flag != 1 && switch_flag != 2)
return;
if (vinfo && (vinfo->width > 1920 && vinfo->height > 1080 &&
if (vinfo && (vinfo->width > 1920 && vinfo->height >= 1080 &&
(vinfo->sync_duration_num /
vinfo->sync_duration_den > 60))) {
/* for t3x */
@@ -4116,7 +4116,7 @@ bool force_switch_to_2slice(void)
if (!video_is_meson_t3x_cpu())
return false;
if (vinfo && (vinfo->width > 1920 && vinfo->height > 1080 &&
if (vinfo && (vinfo->width > 1920 && vinfo->height >= 1080 &&
(vinfo->sync_duration_num /
vinfo->sync_duration_den > 60))) {
/* for t3x */
+10 -3
View File
@@ -12116,10 +12116,13 @@ void set_video_slice_policy(struct video_layer_s *layer,
if ((vinfo->width > 4096 && vinfo->height > 2160)) {
slice_num = 1;
pi_en = 1;
/* 4k 120hz */
} else if (vinfo->width > 1920 && vinfo->height > 1080 &&
/* 4k 120hz || 4k1k240hz */
} else if ((vinfo->width > 1920 && vinfo->height > 1080 &&
(vinfo->sync_duration_num /
vinfo->sync_duration_den > 60)) {
vinfo->sync_duration_den > 60)) ||
(vinfo->width > 1920 && vinfo->height >= 1080 &&
(vinfo->sync_duration_num /
vinfo->sync_duration_den > 120))) {
if (vf->duration < 1500 ||
vinfo->sync_duration_num / vinfo->sync_duration_den == 144 ||
vinfo->sync_duration_num / vinfo->sync_duration_den == 288 ||
@@ -12140,6 +12143,9 @@ void set_video_slice_policy(struct video_layer_s *layer,
#ifdef CONFIG_AMLOGIC_MEDIA_FRC
/* 4k120hz and frc_n2m_worked && aisr enable 1 slice */
/*frc_switch_flag : 0 or 2 force 2 slice valid*/
if (debug_common_flag & DEBUG_FLAG_COMMON_FRC)
pr_info("%s:line=%d, slice_num=%d\n",
__func__, __LINE__, slice_num);
if (frc_switch_flag == 0 || frc_switch_flag == 2) {
slice_num = 2;
/* temp set for current frame */
@@ -12182,6 +12188,7 @@ void set_video_slice_policy(struct video_layer_s *layer,
vinfo->height >= 1080 &&
(vinfo->sync_duration_num /
vinfo->sync_duration_den > 144)) {
/* 4k1k 288hz */
slice_num = 2;
if (debug_common_flag & DEBUG_FLAG_COMMON_AMDV)
pr_info("%s:dv on=%d\n", __func__, is_amdv_on());