drm/amdgpu: fix compile error on architecture s390
Subsystems (2)
PATCH 1/2 drm/amdgpu: fix compile error on architecture s390
ioremap_cache is not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
@@ -1817,7 +1817,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)/* Change the size here instead of the init above so only lpfn is affected */ amdgpu_ttm_set_buffer_funcs_status (adev, false); -#ifdef CONFIG_64BIT +#ifdef CONFIG_X86 if (adev->gmc.xgmi.connected_to_cpu) adev->mman.aper_base_kaddr =ioremap_cache (adev->gmc.aper_base, adev->gmc.visible_vram_size);
Signature · 6 lines
2.7.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 2/2 drm/amdgpu: fix a few compiler warnings
1. make function mmhub_v1_7_setup_vm_pt_regs static
2. indent a if statement
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c +2 -2
@@ -88,14 +88,14 @@ int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev) adev->gmc.xgmi.num_physical_nodes = max_region +1 ;if (adev->gmc.xgmi.num_physical_nodes > max_num_physical_nodes) -return -EINVAL ; +return -EINVAL ; adev->gmc.xgmi.physical_node_id =REG_GET_FIELD (xgmi_lfb_cntl,MC_VM_XGMI_LFB_CNTL ,PF_LFB_REGION );if (adev->gmc.xgmi.physical_node_id > max_physical_node_id) -return -EINVAL ; +return -EINVAL ; adev->gmc.xgmi.node_segment_size = seg_size; }
drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c +1 -1
@@ -53,7 +53,7 @@ static u64 mmhub_v1_7_get_fb_location(struct amdgpu_device *adev)return base; } -void mmhub_v1_7_setup_vm_pt_regs (struct amdgpu_device *adev,uint32_t vmid, +static void mmhub_v1_7_setup_vm_pt_regs (struct amdgpu_device *adev,uint32_t vmid,uint64_t page_table_base) {struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_MMHUB_0 ];
Signature · 6 lines
2.7.4 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
RE: [PATCH 2/2] drm/amdgpu: fix a few compiler warnings
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Oak Zeng
Sent: Wednesday, March 10, 2021 10:29 PM
To: [email protected]; [email protected]
Cc: Zeng, Oak <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: fix a few compiler warnings
[CAUTION: External Email]
1. make function mmhub_v1_7_setup_vm_pt_regs static 2. indent a if statement
--- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_1.c +2 -2
@@ -88,14 +88,14 @@ int gfxhub_v1_1_get_xgmi_info(struct amdgpu_device *adev) adev->gmc.xgmi.num_physical_nodes = max_region +1 ;if (adev->gmc.xgmi.num_physical_nodes > max_num_physical_nodes) -return -EINVAL ; +return -EINVAL ; adev->gmc.xgmi.physical_node_id =REG_GET_FIELD (xgmi_lfb_cntl,MC_VM_XGMI_LFB_CNTL ,PF_LFB_REGION );if (adev->gmc.xgmi.physical_node_id > max_physical_node_id) -return -EINVAL ; +return -EINVAL ; adev->gmc.xgmi.node_segment_size = seg_size; }
drivers/gpu/drm/amd/amdgpu/mmhub_v1_7.c +2 -2
@@ -53,7 +53,7 @@ static u64 mmhub_v1_7_get_fb_location(struct amdgpu_device *adev)return base; } -void mmhub_v1_7_setup_vm_pt_regs (struct amdgpu_device *adev,uint32_t vmid, +static void mmhub_v1_7_setup_vm_pt_regs (struct amdgpu_device *adev, +uint32_t vmid,uint64_t page_table_base) {struct amdgpu_vmhub *hub = &adev->vmhub[AMDGPU_MMHUB_0 ]; --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7Crajneesh.bhardwaj%40amd.com%7C8f296a25634a47c40dde08d8e43dde97%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637510301669209178%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ucX2H8f4HhlXKJ4OBcZZwjfBTBAXYDSrGpPF%2BK1JOLw%3D&reserved=0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Am 11.03.21 um 04:29 schrieb Oak Zeng:
Quoted 6 lines
ioremap_cacheis not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot.Signed-off-by Oak Zeng <[email protected]>Reported-by Kernel test robot <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device *adev) · line 1823
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1
-1@@ -1817,7 +1817,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)/* Change the size here instead of the init above so only lpfn is affected */ amdgpu_ttm_set_buffer_funcs_status (adev, false); -#ifdef CONFIG_64BIT +#ifdef CONFIG_X86 if (adev->gmc.xgmi.connected_to_cpu) adev->mman.aper_base_kaddr =ioremap_cache (adev->gmc.aper_base, adev->gmc.visible_vram_size);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Wouldn't this restrict amdgpu for only x86 platform?
Quoted 15 lines · Oak Zeng
ioremap_cacheis not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot.Signed-off-by Oak Zeng <[email protected]>Reported-by Kernel test robot <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device *adev) · line 1823
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1
-1@@ -1817,7 +1817,7 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)/* Change the size here instead of the init above so only lpfn is affected */ amdgpu_ttm_set_buffer_funcs_status (adev, false); -#ifdef CONFIG_64BIT +#ifdef CONFIG_X86 if (adev->gmc.xgmi.connected_to_cpu) adev->mman.aper_base_kaddr =ioremap_cache (adev->gmc.aper_base, adev->gmc.visible_vram_size);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
maintainer[AMD Public Use]
Quoted 8 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Nirmoy
Sent: Monday, March 15, 2021 2:43 PM
To: Zeng, Oak <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390Wouldn't this restrict amdgpu for only x86 platform?
This particular case will only be x86.
Alex
Quoted 29 lines · Oak Zeng
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device
Quoted 16 lines
ioremap_cacheis not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot.Signed-off-by Oak Zeng <[email protected]>Reported-by Kernel test robot <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0@@ -1817,7 +1817,7 @@ int amdgpu_ttm_init(struct amdgpu_device*adev)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device · line 1817
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0/* Change the size here instead of the init above so only lpfn is affected */
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0amdgpu_ttm_set_buffer_funcs_status(adev, false); -#ifdef
CONFIG_64BIT
+#ifdefCONFIG_X86
if (adev->gmc.xgmi.connected_to_cpu)
adev->mman.aper_base_kaddr= ioremap_cache(adev-
gmc.aper_base,
adev->gmc.visible_vram_size);
Quoted 11 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
freedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C6fab18a743 c84b8abbd008d8e7e21e10%7C3dd8961fe4884e608e11a82d994e183d%7C0%7 C0%7C637514305648085244%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&am p;sdata=KLYRSc45rllptRvyiOF18qA9IFt5zAGXL1zsHasgdLs%3D&reserved =0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Alex,
Quoted 11 lines · Alexander
[AMD Public Use]
Quoted 8 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Nirmoy
Sent: Monday, March 15, 2021 2:43 PM
To: Zeng, Oak <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390Wouldn't this restrict amdgpu for only x86 platform?
This particular case will only be x86.
If I understand correctly, we map all the VRAM at startup to avoid
mapping each BOs. Can't we do that for other Archs ?
Nirmoy
Quoted 41 lines
Alex
Quoted 38 lines · Oak Zeng
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device
Quoted 16 lines
ioremap_cacheis not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot.Signed-off-by Oak Zeng <[email protected]>Reported-by Kernel test robot <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0@@ -1817,7 +1817,7 @@ int amdgpu_ttm_init(struct amdgpu_device*adev)
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device · line 1817
Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0/* Change the size here instead of the init above so only lpfn is affected */
Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0amdgpu_ttm_set_buffer_funcs_status(adev, false); -#ifdef
CONFIG_64BIT
+#ifdefCONFIG_X86
if (adev->gmc.xgmi.connected_to_cpu)
adev->mman.aper_base_kaddr= ioremap_cache(adev-
gmc.aper_base,
adev->gmc.visible_vram_size);_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
freedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C6fab18a743 c84b8abbd008d8e7e21e10%7C3dd8961fe4884e608e11a82d994e183d%7C0%7 C0%7C637514305648085244%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&am p;sdata=KLYRSc45rllptRvyiOF18qA9IFt5zAGXL1zsHasgdLs%3D&reserved =0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
maintainer[AMD Public Use]
Quoted 21 lines
-----Original Message-----
From: Das, Nirmoy <[email protected]>
Sent: Monday, March 15, 2021 3:17 PM
To: Deucher, Alexander <[email protected]>; Das, Nirmoy <[email protected]>; Zeng, Oak <[email protected]>; amd- [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390Hi Alex,
Quoted 10 lines · Alexander
[AMD Public Use]
Quoted 8 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Nirmoy
Sent: Monday, March 15, 2021 2:43 PM
To: Zeng, Oak <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390
Quoted 7 lines
Quoted 2 lines
Quoted 1 line
Wouldn't this restrict amdgpu for only x86 platform?
This particular case will only be x86.
If I understand correctly, we map all the VRAM at startup to avoid
mapping each BOs. Can't we do that for other Archs ?
You are right. The else should be CONFIG_64BIT not CONFIG_X86. @Zeng, Oak can you fix this up?
Alex
Quoted 45 lines
Nirmoy
Quoted 29 lines
Alex
Quoted 26 lines · Oak Zeng
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device
Quoted 16 lines
ioremap_cacheis not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot.Signed-off-by Oak Zeng <[email protected]>Reported-by Kernel test robot <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0@@ -1817,7 +1817,7 @@ int amdgpu_ttm_init(struct amdgpu_device*adev)
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0/* Change the size here instead of the init above so only lpfn is
affected */
Quoted 5 lines
amdgpu_ttm_set_buffer_funcs_status(adev, false); -#ifdefCONFIG_64BIT
+#ifdefCONFIG_X86
if (adev->gmc.xgmi.connected_to_cpu)
adev->mman.aper_base_kaddr= ioremap_cache(adev-gmc.aper_base,
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
adev->gmc.visible_vram_size);_______________________________________________
amd-gfx mailing list
[email protected]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
Quoted 2 lines
Quoted 2 lines
freedesktop.org%2Fmailman%2Flistinfo%2Famd-
gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C6fab18a743
Quoted 1 line
Quoted 1 line
Quoted 8 lines
c84b8abbd008d8e7e21e10%7C3dd8961fe4884e608e11a82d994e183d%7C0%7
Quoted 1 line
Quoted 1 line
C0%7C637514305648085244%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
Quoted 1 line
Quoted 1 line
LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&am
Quoted 1 line
Quoted 1 line
p;sdata=KLYRSc45rllptRvyiOF18qA9IFt5zAGXL1zsHasgdLs%3D&reserved
Quoted 1 line
Quoted 1 line
=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Deucher, Alexander
maintainer[AMD Public Use]
Quoted 36 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Deucher, Alexander
Sent: Monday, March 15, 2021 3:24 PM
To: Das, Nirmoy <[email protected]>; Zeng, Oak <[email protected]>; [email protected]
Subject: RE: [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390[AMD Public Use]
Quoted 26 lines
-----Original Message-----
From: Das, Nirmoy <[email protected]>
Sent: Monday, March 15, 2021 3:17 PM
To: Deucher, Alexander <[email protected]>; Das, Nirmoy <[email protected]>; Zeng, Oak <[email protected]>; amd- [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390Hi Alex,
Quoted 12 lines · Alexander
[AMD Public Use]
Quoted 9 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Nirmoy
Sent: Monday, March 15, 2021 2:43 PM
To: Zeng, Oak <[email protected]>; [email protected]
Subject: Re: [PATCH 1/2] drm/amdgpu: fix compile error on architecture s390Wouldn't this restrict amdgpu for only x86 platform?
This particular case will only be x86.
Quoted 6 lines
Quoted 3 lines
If I understand correctly, we map all the VRAM at startup to avoid
mapping each BOs. Can't we do that for other Archs ?
You are right. The else should be
CONFIG_64BITnotCONFIG_X86. @Zeng, Oak can you fix this up?
Just sent out the fix.
Alex
Quoted 64 lines
Alex
Quoted 34 lines
Nirmoy
Quoted 29 lines
Alex
Quoted 26 lines · Oak Zeng
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c int amdgpu_ttm_init(struct amdgpu_device
Quoted 16 lines
ioremap_cacheis not supported on some architecture such as s390. Put the codes into a #ifdef to fix some compile error reported by test robot.Signed-off-by Oak Zeng <[email protected]>Reported-by Kernel test robot <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0@@ -1817,7 +1817,7 @@ int amdgpu_ttm_init(struct amdgpu_device*adev)
Quoted 2 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +0
-0/* Change the size here instead of the init above so only lpfn is
affected */
Quoted 5 lines
amdgpu_ttm_set_buffer_funcs_status(adev, false); -#ifdefCONFIG_64BIT
+#ifdefCONFIG_X86
if (adev->gmc.xgmi.connected_to_cpu)
adev->mman.aper_base_kaddr=ioremap_cache(adev-
Quoted 7 lines
gmc.aper_base,
Quoted 5 lines
Quoted 5 lines
Quoted 1 line
adev->gmc.visible_vram_size);_______________________________________________
amd-gfx mailing list
[email protected]https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
freedesktop.org%2Fmailman%2Flistinfo%2Famd-
gfx&data=04%7C01%7Calexander.deucher%40amd.com%7C6fab18a743
Quoted 2 lines
Quoted 1 line
Quoted 1 line
c84b8abbd008d8e7e21e10%7C3dd8961fe4884e608e11a82d994e183d%7C0%7
Quoted 2 lines
Quoted 1 line
Quoted 1 line
C0%7C637514305648085244%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w
Quoted 2 lines
Quoted 1 line
Quoted 1 line
LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&am
Quoted 2 lines
Quoted 1 line
Quoted 1 line
p;sdata=KLYRSc45rllptRvyiOF18qA9IFt5zAGXL1zsHasgdLs%3D&reserved
Quoted 1 line
Quoted 1 line
Quoted 1 line
=0
Quoted 11 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.
freedesktop.org%2Fmailman%2Flistinfo%2Famd- gfx&data=04%7C01%7Calexander.deucher%40amd.com%7Cb8ba85a6c5 2449ad7ea908d8e7e7f43e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7 C0%7C637514330707623225%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&am p;sdata=k0wrS%2BIRR7D%2B7%2FA4S%2B%2F3Hcrb6VWJueVibaFaKlStNic%3 D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx