From 876eac68ea159d7a077c92dec6722bbbd79202a3 Mon Sep 17 00:00:00 2001 From: "yaoyu.xu" Date: Fri, 31 May 2024 10:23:52 +0800 Subject: [PATCH] hdmirx: do not use vcbus mute unless game [1/1] PD#SWPL-170597 Problem: screen split when signal change. Solution: do not use vcbus mute unless game. Verify: t3x Change-Id: I8586dd44c8b7d3b56d1f59dc46c629eabb93e5d5 Signed-off-by: yaoyu.xu --- drivers/media/vin/tvin/hdmirx/hdmi_rx_hw_t3x.c | 5 ++++- drivers/media/vin/tvin/tvin_frontend.h | 1 + drivers/media/vin/tvin/vdin/vdin_drv.c | 14 ++++++++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/media/vin/tvin/hdmirx/hdmi_rx_hw_t3x.c b/drivers/media/vin/tvin/hdmirx/hdmi_rx_hw_t3x.c index dd2b81bee..153010977 100644 --- a/drivers/media/vin/tvin/hdmirx/hdmi_rx_hw_t3x.c +++ b/drivers/media/vin/tvin/hdmirx/hdmi_rx_hw_t3x.c @@ -5972,7 +5972,8 @@ void rx_mute_t3x(bool en, u8 port_type) if (en) { if (port_type == TVIN_PORT_MAIN) { rx_mute_dual_video_rdma(E_RX_MUTE, E_RX_NA); - rx_mute_dual_video_vcbus(E_RX_MUTE, E_RX_NA); + if (tvin_get_game_mode_status(port_type)) + rx_mute_dual_video_vcbus(E_RX_MUTE, E_RX_NA); rx_pr("main port mute\n"); } else if (port_type == TVIN_PORT_SUB) { rx_mute_dual_video_rdma(E_RX_NA, E_RX_MUTE); @@ -5980,6 +5981,8 @@ void rx_mute_t3x(bool en, u8 port_type) rx_pr("sub port mute\n"); } else { rx_mute_dual_video_rdma(E_RX_NA, E_RX_NA); + if (tvin_get_game_mode_status(port_type)) + rx_mute_dual_video_vcbus(E_RX_MUTE, E_RX_NA); rx_mute_dual_video_vcbus(E_RX_NA, E_RX_NA); rx_pr("Na\n"); } diff --git a/drivers/media/vin/tvin/tvin_frontend.h b/drivers/media/vin/tvin/tvin_frontend.h index 5f986f863..002b37ceb 100644 --- a/drivers/media/vin/tvin/tvin_frontend.h +++ b/drivers/media/vin/tvin/tvin_frontend.h @@ -111,6 +111,7 @@ struct tvin_state_machine_ops_s *tvin_get_sm_ops(enum tvin_port_e port, int index); void tvin_notify_vdin_skip_frame(unsigned int drop_num, enum tvin_port_type_e port_type); void tvin_update_vdin_prop(u8 port_type); +bool tvin_get_game_mode_status(u8 port_type); void viuin_select_loopback_path(void); void viuin_clear_loopback_path(void); void dsc_dec_en(bool on_off, struct dsc_pps_data_s *pps_data); diff --git a/drivers/media/vin/tvin/vdin/vdin_drv.c b/drivers/media/vin/tvin/vdin/vdin_drv.c index 4788b6ba2..1b8265e2b 100644 --- a/drivers/media/vin/tvin/vdin/vdin_drv.c +++ b/drivers/media/vin/tvin/vdin/vdin_drv.c @@ -333,6 +333,20 @@ void tvin_notify_vdin_skip_frame(unsigned int drop_num, enum tvin_port_type_e po } EXPORT_SYMBOL(tvin_notify_vdin_skip_frame); +bool tvin_get_game_mode_status(u8 port_type) +{ + struct vdin_dev_s *devp = port_type ? vdin_devp[1] : vdin_devp[0]; + + if (!devp) + return false; + + if (devp->game_mode) + return true; + else + return false; +} +EXPORT_SYMBOL(tvin_get_game_mode_status); + /* * 1. find the corresponding frontend according to the port & save it. * 2. set default register, including: