vdin: game_mode yuv444 input yuv444 output [1/1]

PD#SWPL-237700

Problem:
When inputting 444, set the game to default output 444.

Solution:
When inputting 444, set the game to default output 444.

Verify:
t6x

Change-Id: Ifd7180bd7640237418503e055d331290506c19e4
Signed-off-by: mingxiu.sun <mingxiu.sun@amlogic.com>
This commit is contained in:
mingxiu.sun
2025-11-10 19:45:06 +08:00
committed by gerrit autosubmit
parent 8f2da48918
commit e97757da19
4 changed files with 13 additions and 7 deletions
+2 -4
View File
@@ -587,8 +587,7 @@ void vdin_get_format_convert(struct vdin_dev_s *devp)
case TVIN_YUV444:
if (IS_HDMI_SRC(port) &&
scan_mod == TVIN_SCAN_MODE_PROGRESSIVE && !manual_md) {
if (devp->vdin_pc_mode || (devp->game_mode &&
(devp->vdin_function_sel & VDIN_AUTO_DST_FMT)) ||
if (devp->vdin_pc_mode || devp->game_mode ||
devp->vdin_function_sel & VDIN_FORCE_444_NOT_CONVERT)
format_convert = VDIN_FORMAT_CONVERT_YUV_YUV444;
else
@@ -619,8 +618,7 @@ void vdin_get_format_convert(struct vdin_dev_s *devp)
case TVIN_RGB444:
if (IS_HDMI_SRC(port) &&
scan_mod == TVIN_SCAN_MODE_PROGRESSIVE && !manual_md) {
if (devp->vdin_pc_mode || (devp->game_mode &&
(devp->vdin_function_sel & VDIN_AUTO_DST_FMT)) ||
if (devp->vdin_pc_mode || devp->game_mode ||
devp->vdin_function_sel & VDIN_FORCE_444_NOT_CONVERT)
format_convert = VDIN_FORMAT_CONVERT_RGB_YUV444;
else
+8
View File
@@ -5017,6 +5017,14 @@ start_chk:
devp->debug.reg_addr = temp;
pr_info("vdin%d,reg_addr = %#x\n",
devp->index, devp->debug.reg_addr);
} else if (!strcmp(parm[0], "bypass_game_dyn_fmt")) {
if (parm[1] && (kstrtouint(parm[1], 0, &temp) == 0)) {
if (temp)
devp->debug.bypass_game_dyn_fmt = true;
else
devp->debug.bypass_game_dyn_fmt = false;
pr_info("bypass_game_dyn_fmt:%d\n", devp->debug.bypass_game_dyn_fmt);
}
}
#endif
else if (!strcmp(parm[0], "state")) {
+2 -2
View File
@@ -717,7 +717,7 @@ static inline void vdin_game_mode_dynamic_check(struct vdin_dev_s *devp)
void vdin_game_mode_reconfig(struct vdin_dev_s *devp)
{
if (!(devp->vdin_function_sel & VDIN_AUTO_DST_FMT))
if (devp->debug.bypass_game_dyn_fmt)
return;
/* 444 in:game on,output 444,game off,output 422 */
@@ -741,7 +741,7 @@ void vdin_game_mode_reconfig(struct vdin_dev_s *devp)
void vdin_dyn_fmt(struct vdin_dev_s *devp)
{
if (!(devp->vdin_function_sel & VDIN_AUTO_DST_FMT))
if (devp->debug.bypass_game_dyn_fmt)
return;
if (!vdin_is_444_input(devp->prop.color_format)) {
+1 -1
View File
@@ -353,7 +353,6 @@ struct match_data_s {
#define VDIN_MEM_MEMSET_EN BIT(23)
#define VDIN_CROP_SEL BIT(24) //0-vdin cut win;1-vdin set src_crop in vf
#define VDIN_AFD_DISABLE BIT(25) //0-enable AFD;1-disable AFD
#define VDIN_AUTO_DST_FMT BIT(26)
/* vdin_function_sel control bits end */
@@ -739,6 +738,7 @@ struct vdin_debug_s {
unsigned int ignore_vdin_ioctl;
unsigned int force_disp_mode;
unsigned int reg_addr;
bool bypass_game_dyn_fmt;
};
struct vdin_dv_s {