Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display/dc: enable oem i2c support for DCE 12.x

Use the value pulled from the vbios just like newer chips.

Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+17
+17
drivers/gpu/drm/amd/display/dc/resource/dce120/dce120_resource.c
··· 67 67 #include "reg_helper.h" 68 68 69 69 #include "dce100/dce100_resource.h" 70 + #include "link.h" 70 71 71 72 #ifndef mmDP0_DP_DPHY_INTERNAL_CTRL 72 73 #define mmDP0_DP_DPHY_INTERNAL_CTRL 0x210f ··· 660 659 661 660 if (pool->base.dmcu != NULL) 662 661 dce_dmcu_destroy(&pool->base.dmcu); 662 + 663 + if (pool->base.oem_device != NULL) { 664 + struct dc *dc = pool->base.oem_device->ctx->dc; 665 + 666 + dc->link_srv->destroy_ddc_service(&pool->base.oem_device); 667 + } 663 668 } 664 669 665 670 static void read_dce_straps( ··· 1061 1054 struct dc *dc, 1062 1055 struct dce110_resource_pool *pool) 1063 1056 { 1057 + struct ddc_service_init_data ddc_init_data = {0}; 1064 1058 unsigned int i; 1065 1059 int j; 1066 1060 struct dc_context *ctx = dc->ctx; ··· 1264 1256 bw_calcs_init(dc->bw_dceip, dc->bw_vbios, dc->ctx->asic_id); 1265 1257 1266 1258 bw_calcs_data_update_from_pplib(dc); 1259 + 1260 + if (dc->ctx->dc_bios->fw_info.oem_i2c_present) { 1261 + ddc_init_data.ctx = dc->ctx; 1262 + ddc_init_data.link = NULL; 1263 + ddc_init_data.id.id = dc->ctx->dc_bios->fw_info.oem_i2c_obj_id; 1264 + ddc_init_data.id.enum_id = 0; 1265 + ddc_init_data.id.type = OBJECT_TYPE_GENERIC; 1266 + pool->base.oem_device = dc->link_srv->create_ddc_service(&ddc_init_data); 1267 + } 1267 1268 1268 1269 return true; 1269 1270