diff options
author | Vinod Polimera <quic_vpolimer@quicinc.com> | 2022-09-14 19:49:08 +0530 |
---|---|---|
committer | Martin Roth <martin.roth@amd.corp-partner.google.com> | 2022-09-20 08:02:19 +0000 |
commit | 25f6db4d2d91028a133712045db096b05589f3d6 (patch) | |
tree | e3409e728c6e9670ee9dd78e2a72e4223faa9078 | |
parent | 15d03094cbbe32edd449d8a4e12401e8a42adfbf (diff) |
qualcomm/sc7280: initialize tu struct with zeros
Coverity is throwing a bunch of "maybe uninitialized" errors for tu
struct. Initialize the tu struct with zero.
BUG=b:182963902,b:216687885
TEST=Validated on qualcomm sc7280 development board.
Monitor name: LQ140M1JW49
Change-Id: Ie249ad4f53abc91376445420712364a28618a15a
Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67671
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
-rw-r--r-- | src/soc/qualcomm/sc7280/display/edp_ctrl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/soc/qualcomm/sc7280/display/edp_ctrl.c b/src/soc/qualcomm/sc7280/display/edp_ctrl.c index 7ec450224f..e9254cc9e8 100644 --- a/src/soc/qualcomm/sc7280/display/edp_ctrl.c +++ b/src/soc/qualcomm/sc7280/display/edp_ctrl.c @@ -1078,7 +1078,7 @@ static void tu_valid_boundary_calc(struct tu_algo_data *tu) static void edp_ctrl_calc_tu(struct edp_ctrl *ctrl, struct edid *edid, struct edp_ctrl_tu *tu_table) { - struct tu_algo_data tu; + struct tu_algo_data tu = {0}; int64_t f = 100000; int64_t LCLK_FAST_SKEW_fp = (6 * f) / 1000; /* 0.0006 */ uint8_t DP_BRUTE_FORCE = 1; @@ -1104,13 +1104,11 @@ static void edp_ctrl_calc_tu(struct edp_ctrl *ctrl, struct edid *edid, tu.extra_buffer_margin = DIV_ROUND_UP(tu.lclk * 4, tu.pclk); tu.ratio_fp = ((int64_t)(tu.pclk_fp * tu.bpp) / 8) / (tu.nlanes * tu.lclk); tu.original_ratio_fp = tu.ratio_fp; - tu.err_fp = 1000 * f; if (((tu.lwidth % tu.nlanes) != 0) && (tu.ratio_fp < f)) { tu.ratio_fp = (tu.ratio_fp * RATIO_SCALE_NUM) / RATIO_SCALE_DEN; tu.ratio_fp = tu.ratio_fp < f ? tu.ratio_fp : f; } - tu.err_fp = 1000 * f; if (tu.ratio_fp > f) tu.ratio_fp = f; |