Skip to contentSkip to conversation

drm/amdgpu: more descriptive message if HMM not enabled v3

PATCH In review Yang, Philip 2 participants 2 messages Mar 6, 2019 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 drm/amdgpu: more descriptive message if HMM not enabled v3

If using old kernel config file, CONFIG_ZONE_DEVICE is not selected, so CONFIG_HMM and CONFIG_HMM_MIRROR is not enabled, the current driver error message "Failed to register MMU notifier" is not clear. Inform user with more descriptive message on how to fix the missing kernel config option.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109808

Change-Id Idfebaeababa4c37c1ef093c2b91a26910a167585
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h +2 -0
index 4803e216e174..ee5541b49604 100644
@@ -53,6 +53,8 @@ static inline struct amdgpu_mn *amdgpu_mn_get(struct amdgpu_device *adev,
 }
 static inline int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr)
 {
+	DRM_WARN_ONCE("HMM_MIRROR kernel config option is not enabled, "
+		"add CONFIG_ZONE_DEVICE=y in config file to fix this\n");
 	return -ENODEV;
 }
 static inline void amdgpu_mn_unregister(struct amdgpu_bo *bo) {}
Signature · 6 lines
2.17.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by
#2 lore raw
Quoted 19 lines · Philip

If using old kernel config file, CONFIG_ZONE_DEVICE is not selected, so CONFIG_HMM and CONFIG_HMM_MIRROR is not enabled, the current driver error message "Failed to register MMU notifier" is not clear. Inform user with more descriptive message on how to fix the missing kernel config option.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109808

Change-Id Idfebaeababa4c37c1ef093c2b91a26910a167585
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h +0 -0
index 4803e216e174..ee5541b49604 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h static inline struct amdgpu_mn *amdgpu_mn_get(struct amdgpu_device *adev, · line 57

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h +2 -0
@@ -53,6 +53,8 @@ static inline struct amdgpu_mn *amdgpu_mn_get(struct amdgpu_device *adev,
 }
 static inline int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr)
 {
+	DRM_WARN_ONCE("HMM_MIRROR kernel config option is not enabled, "
+		"add CONFIG_ZONE_DEVICE=y in config file to fix this\n");

With the second line indentation fixed to properly line up with the opening parenthesis,

Signature · 6 lines
Earthling Michel Dänzer               |              https://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx