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

drm/tegra: falcon: Set DMACTX field on DMA transactions

The DMACTX field determines which context, as specified in the
TRANSCFG register, is used. While during boot it doesn't matter
which is used, later on it matters and this value is reused by
the firmware.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Mikko Perttunen and committed by
Thierry Reding
e078d8d6 24862547

+9
+8
drivers/gpu/drm/tegra/falcon.c
··· 48 48 if (target == FALCON_MEMORY_IMEM) 49 49 cmd |= FALCON_DMATRFCMD_IMEM; 50 50 51 + /* 52 + * Use second DMA context (i.e. the one for firmware). Strictly 53 + * speaking, at this point both DMA contexts point to the firmware 54 + * stream ID, but this register's value will be reused by the firmware 55 + * for later DMA transactions, so we need to use the correct value. 56 + */ 57 + cmd |= FALCON_DMATRFCMD_DMACTX(1); 58 + 51 59 falcon_writel(falcon, offset, FALCON_DMATRFMOFFS); 52 60 falcon_writel(falcon, base, FALCON_DMATRFFBOFFS); 53 61 falcon_writel(falcon, cmd, FALCON_DMATRFCMD);
+1
drivers/gpu/drm/tegra/falcon.h
··· 50 50 #define FALCON_DMATRFCMD_IDLE (1 << 1) 51 51 #define FALCON_DMATRFCMD_IMEM (1 << 4) 52 52 #define FALCON_DMATRFCMD_SIZE_256B (6 << 8) 53 + #define FALCON_DMATRFCMD_DMACTX(v) (((v) & 0x7) << 12) 53 54 54 55 #define FALCON_DMATRFFBOFFS 0x0000111c 55 56