drm/amd/display: Check correct bounds for stream encoder instances for DCN303
authorjsg <jsg@openbsd.org>
Thu, 25 Aug 2022 23:52:56 +0000 (23:52 +0000)
committerjsg <jsg@openbsd.org>
Thu, 25 Aug 2022 23:52:56 +0000 (23:52 +0000)
From Aurabindo Pillai
82a27c1855445d48aacc67b0c0640f3dadebe52f in linux 5.15.y/5.15.63
89b008222c2bf21e50219725caed31590edfd9d1 in mainline linux

sys/dev/pci/drm/amd/display/dc/dcn303/dcn303_resource.c

index 589ddab..7aad034 100644 (file)
@@ -500,7 +500,7 @@ static struct stream_encoder *dcn303_stream_encoder_create(enum engine_id eng_id
        int afmt_inst;
 
        /* Mapping of VPG, AFMT, DME register blocks to DIO block instance */
-       if (eng_id <= ENGINE_ID_DIGE) {
+       if (eng_id <= ENGINE_ID_DIGB) {
                vpg_inst = eng_id;
                afmt_inst = eng_id;
        } else