Skip to contentSkip to conversation

drm/amdgpu: properly guard DC support in navi code

PATCH In review Alex Deucher 4 participants 6 messages Jul 5, 2019 – Jul 8, 2019 4 messages not in the archive

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

PATCH 1/1 drm/amdgpu: properly guard DC support in navi code

Need to add appropriate ifdef.

---
 drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +4 -0
index a090e3fdc762..ee39cb740d41 100644
@@ -352,8 +352,12 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
 			amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
 		if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
 			amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC)
 		else if (amdgpu_device_has_dc_support(adev))
 			amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#else
+#	warning "Enable CONFIG_DRM_AMD_DC for display support on navi."
+#endif
 		amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
 		amdgpu_device_ip_block_add(adev, &sdma_v5_0_ip_block);
 		if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&
Signature · 6 lines
2.20.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): 20190705204142.10231-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

#2 lore raw
Quoted 15 lines · Alex Deucher

Need to add appropriate ifdef.

---
 drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +0 -0
index a090e3fdc762..ee39cb740d41 100644
@@ -352,8 +352,12 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
 			amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
 		if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))

drivers/gpu/drm/amd/amdgpu/nv.c int nv_set_ip_blocks(struct amdgpu_device *adev) · line 363

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/nv.c +4 -0
 			amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC)
 		else if (amdgpu_device_has_dc_support(adev))
 			amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#else
+#	warning "Enable CONFIG_DRM_AMD_DC for display support on navi."
+#endif
 		amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
 		amdgpu_device_ip_block_add(adev, &sdma_v5_0_ip_block);
 		if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&

Is CONFIG_DRM_AMD_DC still needed? What for? (Other than accidentally disabling display with current hardware ;)

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

A message that is not in the archive (sent off-list or not yet received): c62c35e2-a920-081b-6dfc-7fdab8a8b1ba-otUistvHUpPR7s880joybQ@public.gmane.org

#4 lore raw
Quoted 21 lines · Michel Dänzer
Quoted 20 lines · Alex Deucher

Need to add appropriate ifdef.

---
  drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +3 -0
index a090e3fdc762..ee39cb740d41 100644
@@ -352,8 +352,12 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
  			amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
  		if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
  			amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC)
  		else if (amdgpu_device_has_dc_support(adev))
  			amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#else
+#	warning "Enable CONFIG_DRM_AMD_DC for display support on navi."
Quoted 10 lines

drivers/gpu/drm/amd/amdgpu/nv.c int nv_set_ip_blocks(struct amdgpu_device *adev) · line 363

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
+#endif
  		amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
  		amdgpu_device_ip_block_add(adev, &sdma_v5_0_ip_block);
  		if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&

Is CONFIG_DRM_AMD_DC still needed? What for? (Other than accidentally disabling display with current hardware ;)

It would slim down module size and compile times if you just needed Radeon and nothing else, but it's kind of a niche use case.

I think the only thing it does right now is autoselect DCN based on whether we think we have FP support or not, but that could probably be moved elsewhere.

Nicholas Kazlauskas
_______________________________________________
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): 25d7a737-534d-8200-2b24-60080218db64-5C7GfCeVMHo@public.gmane.org

#6 lore raw
Quoted 34 lines · Nicholas
Quoted 21 lines · Michel Dänzer
Quoted 20 lines · Alex Deucher

Need to add appropriate ifdef.

---
  drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +3 -0
index a090e3fdc762..ee39cb740d41 100644
@@ -352,8 +352,12 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
                     amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
             if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
                     amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC)
             else if (amdgpu_device_has_dc_support(adev))
                     amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#else
+#   warning "Enable CONFIG_DRM_AMD_DC for display support on navi."
Quoted 10 lines

drivers/gpu/drm/amd/amdgpu/nv.c int nv_set_ip_blocks(struct amdgpu_device *adev) · line 363

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
+#endif
             amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
             amdgpu_device_ip_block_add(adev, &sdma_v5_0_ip_block);
             if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&

Is CONFIG_DRM_AMD_DC still needed? What for? (Other than accidentally disabling display with current hardware ;)

Quoted 6 lines

It would slim down module size and compile times if you just needed Radeon and nothing else, but it's kind of a niche use case.

I think the only thing it does right now is autoselect DCN based on whether we think we have FP support or not, but that could probably be moved elsewhere.

Can I get an ack or RB on this? We can decide what to do about the option later.

Alex

Quoted 2 lines

Nicholas Kazlauskas

_______________________________________________
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): CADnq5_Nv-8-jY4FPGWUrDPAUP4TBg_amaR4DGPqyUtkmrNcJzA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Reviewed-by Nicholas Kazlauskas
#8 lore raw
Quoted 39 lines · Alex Deucher
Quoted 37 lines · Nicholas
Quoted 21 lines · Michel Dänzer
Quoted 20 lines · Alex Deucher

Need to add appropriate ifdef.

---
   drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++++
   1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +3 -0
index a090e3fdc762..ee39cb740d41 100644
@@ -352,8 +352,12 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
                      amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
              if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))
                      amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC)
              else if (amdgpu_device_has_dc_support(adev))
                      amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#else
+#   warning "Enable CONFIG_DRM_AMD_DC for display support on navi."
Quoted 10 lines

drivers/gpu/drm/amd/amdgpu/nv.c int nv_set_ip_blocks(struct amdgpu_device *adev) · line 363

Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/nv.c +1 -0
+#endif
              amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
              amdgpu_device_ip_block_add(adev, &sdma_v5_0_ip_block);
              if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&

Is CONFIG_DRM_AMD_DC still needed? What for? (Other than accidentally disabling display with current hardware ;)

It would slim down module size and compile times if you just needed Radeon and nothing else, but it's kind of a niche use case.

Quoted 8 lines
Quoted 3 lines

I think the only thing it does right now is autoselect DCN based on whether we think we have FP support or not, but that could probably be moved elsewhere.

Can I get an ack or RB on this? We can decide what to do about the option later.

Alex

This is fine for now.

Quoted 3 lines
Quoted 3 lines

Nicholas Kazlauskas

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

Acked-by Leo Li
#9 lore raw
In reply to a message not in the archive
Quoted 2 lines · Alex Deucher

Need to add appropriate ifdef.

Quoted 13 lines
---
 drivers/gpu/drm/amd/amdgpu/nv.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/nv.c +0 -0
index a090e3fdc762..ee39cb740d41 100644
@@ -352,8 +352,12 @@ int nv_set_ip_blocks(struct amdgpu_device *adev)
 			amdgpu_device_ip_block_add(adev, &smu_v11_0_ip_block);
 		if (adev->enable_virtual_display || amdgpu_sriov_vf(adev))

drivers/gpu/drm/amd/amdgpu/nv.c int nv_set_ip_blocks(struct amdgpu_device *adev) · line 363

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/nv.c +4 -0
 			amdgpu_device_ip_block_add(adev, &dce_virtual_ip_block);
+#if defined(CONFIG_DRM_AMD_DC)
 		else if (amdgpu_device_has_dc_support(adev))
 			amdgpu_device_ip_block_add(adev, &dm_ip_block);
+#else
+#	warning "Enable CONFIG_DRM_AMD_DC for display support on navi."
+#endif
 		amdgpu_device_ip_block_add(adev, &gfx_v10_0_ip_block);
 		amdgpu_device_ip_block_add(adev, &sdma_v5_0_ip_block);
 		if (adev->firmware.load_type == AMDGPU_FW_LOAD_DIRECT &&

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