Skip to contentSkip to conversation

drm/amd/display: Enable VM support only on APUs newer than CZ

PATCH In review Harry Wentland 3 participants 4 messages Oct 30, 2017 3 messages not in the archive

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

PATCH 1/1 drm/amd/display: Enable VM support only on APUs newer than CZ

VM support is only available for CZ and newer APUs. Trying to enable it for dGPU will blow up in DC.

---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
index 26f6d5e4c08c..332761f643f6 100644
@@ -427,6 +427,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
 		amdgpu_dm_initialize_fbc(adev);
 	init_data.fbc_gpu_addr = adev->dm.compressor.gpu_addr;
 #endif
+
+	if (adev->flags & AMD_IS_APU && adev->asic_type >= CHIP_CARRIZO)
+		init_data.flags.gpu_vm_support = true;
+
 	/* Display Core create. */
 	adev->dm.dc = dc_create(&init_data);
 
Signature · 6 lines
2.14.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): 20171030174151.17425-1-harry.wentland-5C7GfCeVMHo@public.gmane.org

#2 lore raw

Am 30.10.2017 um 18:41 schrieb Harry Wentland:

Quoted 6 lines

VM support is only available for CZ and newer APUs. Trying to enable it for dGPU will blow up in DC.

Ok, with me. But I think it would be cleaner if the backend can just handle this gracefully even when it is not supported by the hardware.

Christian.

Quoted 9 lines
---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +0 -0
index 26f6d5e4c08c..332761f643f6 100644

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c static int amdgpu_dm_init(struct amdgpu_device *adev) · line 436

Quoted 10 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
@@ -427,6 +427,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
  		amdgpu_dm_initialize_fbc(adev);
  	init_data.fbc_gpu_addr = adev->dm.compressor.gpu_addr;
  #endif
+
+	if (adev->flags & AMD_IS_APU && adev->asic_type >= CHIP_CARRIZO)
+		init_data.flags.gpu_vm_support = true;
+
  	/* Display Core create. */
  	adev->dm.dc = dc_create(&init_data);
 

_______________________________________________
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): 92899c4b-3b0f-46fa-cbd8-b41cd8a541d9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

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

Am 30.10.2017 um 18:41 schrieb Harry Wentland:

Quoted 6 lines

VM support is only available for CZ and newer APUs. Trying to enable it for dGPU will blow up in DC.

Ok, with me. But I think it would be cleaner if the backend can just handle this gracefully even when it is not supported by the hardware.

Yes, I think we're all agreed on this. I just thought I'd send out something because it looked like it might be urgent. This is kind-of unplanned work for me and not on top of my list with everything else that's happening right now.

Harry

Quoted 6 lines

Christian.

Quoted 4 lines

---
  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++

  1 file changed, 4 insertions(+)
Quoted 17 lines
Quoted 14 lines
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
index 26f6d5e4c08c..332761f643f6 100644
@@ -427,6 +427,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
           amdgpu_dm_initialize_fbc(adev);
       init_data.fbc_gpu_addr = adev->dm.compressor.gpu_addr;
   #endif
+
+    if (adev->flags & AMD_IS_APU && adev->asic_type >= CHIP_CARRIZO)
+        init_data.flags.gpu_vm_support = true;
+
       /* Display Core create. */
       adev->dm.dc = dc_create(&init_data);
Quoted 1 line

_______________________________________________
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): cbd3d582-0fe9-e528-d5b3-93389aee96a8-5C7GfCeVMHo@public.gmane.org

#6 lore raw

Am 30.10.2017 um 19:52 schrieb Harry Wentland:

Quoted 11 lines · Christian König
Quoted 9 lines

Am 30.10.2017 um 18:41 schrieb Harry Wentland:

Quoted 6 lines

VM support is only available for CZ and newer APUs. Trying to enable it for dGPU will blow up in DC.

Ok, with me. But I think it would be cleaner if the backend can just handle this gracefully even when it is not supported by the hardware.

Yes, I think we're all agreed on this. I just thought I'd send out something because it looked like it might be urgent. This is kind-of unplanned work for me and not on top of my list with everything else that's happening right now.

Calm down, that isn't even remotely urgent. I would like to finish it before 4.15, but we have at least two weeks before the next merge window.

And even then I don't think it would hurt us to much if we need to wait for 4.16.

Christian.

Quoted 25 lines

Harry

Quoted 22 lines

Christian.

Quoted 19 lines
---
   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 ++++
   1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -0
index 26f6d5e4c08c..332761f643f6 100644
@@ -427,6 +427,10 @@ static int amdgpu_dm_init(struct amdgpu_device *adev)
           amdgpu_dm_initialize_fbc(adev);
       init_data.fbc_gpu_addr = adev->dm.compressor.gpu_addr;
   #endif
+
+    if (adev->flags & AMD_IS_APU && adev->asic_type >= CHIP_CARRIZO)
+        init_data.flags.gpu_vm_support = true;
+
       /* Display Core create. */
       adev->dm.dc = dc_create(&init_data);
 

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