From: Dave Airlie Date: Thu, 28 Oct 2021 04:59:38 +0000 (+1000) Subject: BackMerge tag 'v5.15-rc7' into drm-next X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=970eae15600a883e4ad27dd0757b18871cc983ab;p=linux.git BackMerge tag 'v5.15-rc7' into drm-next The msm next tree is based on rc3, so let's just backmerge rc7 before pulling it in. Signed-off-by: Dave Airlie --- 970eae15600a883e4ad27dd0757b18871cc983ab diff --cc drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c index 12ebd9f8912fe,0006bbac466c8..2b4459909648e --- a/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dcn31/dcn31_resource.c @@@ -1372,13 -1281,15 +1372,19 @@@ static struct stream_encoder *dcn31_str vpg = dcn31_vpg_create(ctx, vpg_inst); afmt = dcn31_afmt_create(ctx, afmt_inst); - if (!enc1 || !vpg || !afmt) + if (!enc1 || !vpg || !afmt) { + kfree(enc1); + kfree(vpg); + kfree(afmt); return NULL; + } + if (ctx->asic_id.chip_family == FAMILY_YELLOW_CARP && + ctx->asic_id.hw_internal_rev == YELLOW_CARP_B0) { + if ((eng_id == ENGINE_ID_DIGC) || (eng_id == ENGINE_ID_DIGD)) + eng_id = eng_id + 3; // For B0 only. C->F, D->G. + } + dcn30_dio_stream_encoder_construct(enc1, ctx, ctx->dc_bios, eng_id, vpg, afmt, &stream_enc_regs[eng_id],