Use drm render device to map kfd BOs

Previously kfd device is used to map memory for CPU access.
However this is not compatible with how TTM handles CPU mapping
on eviction - memory won't be unmapped and remapped on restore.
This fixes the issue by mmapping memory using DRM render device.

This patch requires a coordinated kernel driver change to work.
To make it compatible with old kernel driver, some temporary codes
are included. Once the coordinated kernel driver is checked in,
the temporary codes can be removed.



Change-Id: Ie7b304c4a82b7e8d5ab703acb81d66430af4f0bc
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>


[ROCm/ROCR-Runtime commit: 68a2d286ca]
Cette révision appartient à :
Oak Zeng a créé et Felix Kuehling a révisé 2017-11-02 09:06:26 -04:00
1 Parent a068301408
révision e305dc9c82
4 fichiers modifiés
+47 -9

Aucun fichier ne correspond à votre recherche

+1 -1
Voir le fichier
@@ -247,7 +247,7 @@ typedef struct _HsaNodeProperties
HSAuint64 LocalMemSize; // Local memory size
HSAuint32 MaxEngineClockMhzFCompute; // maximum engine clocks for CPU and
HSAuint32 MaxEngineClockMhzCCompute; // GPU function, including any boost caopabilities,
HSAint32 DrmRenderMinor; // DRM render device minor device number
HSAuint16 MarketingName[HSA_PUBLIC_NAME_SIZE]; // Public name of the "device" on the node (board or APU name).
// Unicode string
HSAuint8 AMDName[HSA_PUBLIC_NAME_SIZE]; //CAL Name of the "device", ASCII