From: Brendan Steve Leder Date: Thu, 7 Jan 2021 20:17:29 +0000 (-0500) Subject: drm/amd/display: initialize i2c speed if not initialized in dcnxxx__resource.c X-Git-Tag: v5.15~1634^2~9^2~27 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=91501d0affc2e34598e6514990614ed741de567b;p=platform%2Fkernel%2Flinux-starfive.git drm/amd/display: initialize i2c speed if not initialized in dcnxxx__resource.c Some dcnxxx__resource.c do not initialize the i2c speed; this patch adds the required initialization at dc_construct(). Signed-off-by: Brendan Steve Leder Reviewed-by: Charlene Liu Acked-by: Anson Jacob Tested-by: Daniel Wheeler Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 2bb0ec6..8fa179c 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -761,6 +761,10 @@ static bool dc_construct(struct dc *dc, if (!dc->res_pool) goto fail; + /* set i2c speed if not done by the respective dcnxxx__resource.c */ + if (dc->caps.i2c_speed_in_khz_hdcp == 0) + dc->caps.i2c_speed_in_khz_hdcp = dc->caps.i2c_speed_in_khz; + dc->clk_mgr = dc_clk_mgr_create(dc->ctx, dc->res_pool->pp_smu, dc->res_pool->dccg); if (!dc->clk_mgr) goto fail;