hdmirx: send uevent when hdmirx port open/close [1/2]

PD#SWPL-4308

Problem:
gpu limit cause cts performance test fail

Solution:
limit gpu only when video playing or hdmiin

Verify:
P321

Change-Id: I682a908957491c8445fdb384dedd404169757e2b
Signed-off-by: wenbiao zhang <wenbiao.zhang@amlogic.com>
This commit is contained in:
wenbiao zhang
2019-03-13 14:55:02 +08:00
committed by Luke Go
parent 699a75e987
commit 33419ad6de
3 changed files with 23 additions and 1 deletions

View File

@@ -457,6 +457,7 @@ void hdmirx_extcon_register(struct platform_device *pdev, struct device *dev)
ret = extcon_dev_register(edev);
if (ret < 0) {
rx_pr("failed to register rx_excton_rx22\n");
extcon_dev_free(edev);
return;
}
rx.rx_excton_rx22 = edev;
@@ -473,10 +474,28 @@ void hdmirx_extcon_register(struct platform_device *pdev, struct device *dev)
ret = extcon_dev_register(edev);
if (ret < 0) {
rx_pr("failed to register rx_excton_auth\n");
extcon_dev_free(edev);
return;
}
rx.hdcp.rx_excton_auth = edev;
/* rx_pr("hdmirx_extcon_register done\n"); */
/*hdmirx extcon open port*/
edev = extcon_dev_allocate(rx22_ext);
if (IS_ERR(edev)) {
rx_pr("failed to allocate rx_excton_open\n");
return;
}
edev->dev.parent = dev;
edev->name = "rx_excton_open";
dev_set_name(&edev->dev, "hdmiin");
ret = extcon_dev_register(edev);
if (ret < 0) {
rx_pr("failed to register rx_excton_open\n");
extcon_dev_free(edev);
return;
}
rx.rx_excton_open = edev;
}
static struct tvin_decoder_ops_s hdmirx_dec_ops = {
.support = hdmirx_dec_support,

View File

@@ -46,7 +46,7 @@
*
*
*/
#define RX_VER2 "ver.2019/02/21"
#define RX_VER2 "ver.2019/03/19"
/*print type*/
#define LOG_EN 0x01
@@ -419,6 +419,7 @@ struct rx_s {
struct hdmi_rx_hdcp hdcp;
/*report hpd status to app*/
struct extcon_dev *rx_excton_rx22;
struct extcon_dev *rx_excton_open;
/* wrapper */
unsigned int state;

View File

@@ -1889,6 +1889,7 @@ void hdmirx_open_port(enum tvin_port_e port)
edid_update_flag = 0;
rx_pkt_initial();
sm_pause = fsmst;
extcon_set_state_sync(rx.rx_excton_open, EXTCON_DISP_HDMI, 1);
rx_pr("%s:%d\n", __func__, rx.port);
}
@@ -1900,6 +1901,7 @@ void hdmirx_close_port(void)
/* when exit hdmi, disable termination & hpd of specific port */
if (disable_port_en)
rx_set_port_hpd(disable_port_num, 0);
extcon_set_state_sync(rx.rx_excton_open, EXTCON_DISP_HDMI, 0);
}
void rx_nosig_monitor(void)