drm/tegra: vic: Add comments on STREAMID registers
authorMikko Perttunen <mperttunen@nvidia.com>
Tue, 12 Jan 2021 11:37:07 +0000 (13:37 +0200)
committerThierry Reding <treding@nvidia.com>
Fri, 15 Jan 2021 16:16:03 +0000 (17:16 +0100)
Add comments clarifying use of the THI_STREAMID0 and THI_STREAMID1
registers.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/vic.c

index a3dbb88..48e98a6 100644 (file)
@@ -117,7 +117,19 @@ static int vic_boot(struct vic *vic)
                if (spec->num_ids > 0) {
                        value = spec->ids[0] & 0xffff;
 
+                       /*
+                        * STREAMID0 is used for input/output buffers.
+                        * Initialize it to SID_VIC in case context isolation
+                        * is not enabled, and SID_VIC is used for both firmware
+                        * and data buffers.
+                        *
+                        * If context isolation is enabled, it will be
+                        * overridden by the SETSTREAMID opcode as part of
+                        * each job.
+                        */
                        vic_writel(vic, value, VIC_THI_STREAMID0);
+
+                       /* STREAMID1 is used for firmware loading. */
                        vic_writel(vic, value, VIC_THI_STREAMID1);
                }
        }