Skip to contentSkip to conversation

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

PATCH In review Yang, Philip 3 participants 4 messages Mar 6, 2019 3 messages 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 v2

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..a5fd73fc24bf 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\n");
+	DRM_WARN_ONCE("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]

#2 lore raw

Am 06.03.19 um 16:02 schrieb Yang, Philip:

Quoted 19 lines

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..a5fd73fc24bf 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\n");
+	DRM_WARN_ONCE("add CONFIG_ZONE_DEVICE=y in config file to fix this\n");

One message please, apart from that looks good to me.

Christian.

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

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_mn.h +0 -0
  	return -ENODEV;
  }
  static inline void amdgpu_mn_unregister(struct amdgpu_bo *bo) {}

_______________________________________________
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): d6614393-a582-d7d3-8c59-e083c617e761-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw
Quoted 32 lines · Christian König

Am 06.03.19 um 16:02 schrieb Yang, Philip:

Quoted 22 lines

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..a5fd73fc24bf 100644
@@ -53,6 +53,8 @@ static inline struct amdgpu_mn *amdgpu_mn_get(struct 
 amdgpu_device *adev,
   }
Quoted 6 lines

  static inline int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr)
  {
+    DRM_WARN_ONCE("HMM_MIRROR kernel config option is not enabled\n"); +    DRM_WARN_ONCE("add CONFIG_ZONE_DEVICE=y in config file to fix this\n");

One message please, apart from that looks good to me.

Quoted 2 lines

Christian.

Do you mean use multiple line string with one DRM_WARN_ONCE call? That will get checkpatch warning "WARNING: quoted string split across lines". Can I just ignore that checkpatch warning?

Philip

Quoted 4 lines
Quoted 3 lines

      return -ENODEV;
  }
  static inline void amdgpu_mn_unregister(struct amdgpu_bo *bo) {}

_______________________________________________
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): cbd88f4a-c2c3-0bf7-35e1-987c947b3088-5C7GfCeVMHo@public.gmane.org

#6 lore raw
Quoted 33 lines · Philip
Quoted 32 lines · Christian König

Am 06.03.19 um 16:02 schrieb Yang, Philip:

Quoted 22 lines

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..a5fd73fc24bf 100644
@@ -53,6 +53,8 @@ static inline struct amdgpu_mn *amdgpu_mn_get(struct 
 amdgpu_device *adev,
   }
Quoted 6 lines

  static inline int amdgpu_mn_register(struct amdgpu_bo *bo, unsigned long addr)
  {
+    DRM_WARN_ONCE("HMM_MIRROR kernel config option is not enabled\n"); +    DRM_WARN_ONCE("add CONFIG_ZONE_DEVICE=y in config file to fix this\n");

One message please, apart from that looks good to me.

Quoted 5 lines
Quoted 2 lines

Christian.

Do you mean use multiple line string with one DRM_WARN_ONCE call? That will get checkpatch warning "WARNING: quoted string split across lines". Can I just ignore that checkpatch warning?

Probably, though it depends what exactly the corresponding patch looks like.

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