Skip to content

Commit

Permalink
drm/bridge: Add 984 serdes setting for resume
Browse files Browse the repository at this point in the history
1, Add 984 serdes registers settting for suspend/resume
2. Set SCL high width output for 984 deserdes

Test-done:
    Android suspend/resuem tested with panel EF1E-A1

Tracked-On: OAM-116590
Signed-off-by: Jia, Lin A <[email protected]>
  • Loading branch information
ljia5 committed Mar 20, 2024
1 parent 38e39b9 commit a2d9eee
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions drivers/gpu/drm/bridge/ti/fpd_dp_ser_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1660,6 +1660,9 @@ void fpd_dp_deser_984_enable_output(struct i2c_client *client)
fpd_dp_ser_write_reg(client, 0x4e, 0x0);
/* Enable INTB_IN */
fpd_dp_ser_write_reg(client, 0x44, 0x81);
/* i2c 400k */
fpd_dp_ser_write_reg(client, 0x2b, 0x0a);
fpd_dp_ser_write_reg(client, 0x2c, 0x0b);
}

void fpd_dp_deser_984_enable(void)
Expand Down Expand Up @@ -1713,6 +1716,9 @@ static void fpd_poll_984_training(void)

pr_debug("[FPD_DP] ser training lock completed, count = %d\n", fpd_dp_priv->count);

/* Delay for VPs to sync to DP source */
usleep_range(20000, 22000);

fpd_dp_deser_984_enable();
}

Expand Down Expand Up @@ -1790,7 +1796,7 @@ static int get_bus_number(void)
return bus_number;
}

int fpd_dp_ser_init(void)
bool fpd_dp_ser_init(void)
{
fpd_dp_ser_enable();

Expand All @@ -1804,7 +1810,7 @@ int fpd_dp_ser_init(void)

fpd_dp_ser_motor_open(fpd_dp_priv->priv_dp_client[2]);

return 0;
return true;
}

static int fpd_dp_ser_probe(struct platform_device *pdev)
Expand Down Expand Up @@ -1914,7 +1920,7 @@ static int fpd_dp_ser_resume(struct device *dev)

pr_debug("[FPD_DP] [-%s-%s-%d-]\n", __FILE__, __func__, __LINE__);

result = fpd_dp_ser_enable();
result = fpd_dp_ser_init();
if (!result) {
pr_debug("Serdes enable fail in fpd_dp_ser_resume\n");
return -EIO;
Expand All @@ -1936,7 +1942,7 @@ static int fpd_dp_ser_runtime_resume(struct device *dev)
bool result;

pr_debug("[FPD_DP] [-%s-%s-%d-]\n", __FILE__, __func__, __LINE__);
result = fpd_dp_ser_enable();
result = fpd_dp_ser_init();
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/bridge/ti/fpd_dp_ser_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ struct fpd_dp_ser_priv {
void fpd_dp_ser_module_exit(void);
int fpd_dp_ser_module_init(void);

int fpd_dp_ser_init(void);
bool fpd_dp_ser_init(void);

#endif /* __FPD_DP_SER_DRV__ */

0 comments on commit a2d9eee

Please sign in to comment.