drm/amd/display: Update OTG instance in the commit stream
authorjsg <jsg@openbsd.org>
Thu, 17 Aug 2023 04:03:16 +0000 (04:03 +0000)
committerjsg <jsg@openbsd.org>
Thu, 17 Aug 2023 04:03:16 +0000 (04:03 +0000)
From Rodrigo Siqueira
4fe91c51aa936779edcae5943b1e621047fe2c2d in linux-6.1.y/6.1.46
eef019eabc3cd0fddcffefbf67806a4d8cca29bb in mainline linux

sys/dev/pci/drm/amd/display/dc/core/amdgpu_dc.c

index 753c07a..5d0a44e 100644 (file)
@@ -1995,6 +1995,12 @@ enum dc_status dc_commit_streams(struct dc *dc,
 
        res = dc_commit_state_no_check(dc, context);
 
+       for (i = 0; i < stream_count; i++) {
+               for (j = 0; j < context->stream_count; j++)
+                       if (streams[i]->stream_id == context->streams[j]->stream_id)
+                               streams[i]->out.otg_offset = context->stream_status[j].primary_otg_inst;
+       }
+
 fail:
        dc_release_state(context);