Skip to contentSkip to conversation

drm/amdgpu: remove duplicated codes

PATCH In review Flora Cui 3 participants 5 messages Jun 27, 2018 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

Flora Cui

author
#0 lore raw

PATCH 1/1 drm/amdgpu: remove duplicated codes

Change-Id Ic0dbd693bac093e54eb95b5e547c89b64a5743b8
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +0 -5
index a1c78f9..3a072a7 100644
@@ -578,11 +578,6 @@ void amdgpu_vmid_mgr_init(struct amdgpu_device *adev)
 			list_add_tail(&id_mgr->ids[j].list, &id_mgr->ids_lru);
 		}
 	}
-
-	adev->vm_manager.fence_context =
-		dma_fence_context_alloc(AMDGPU_MAX_RINGS);
-	for (i = 0; i < AMDGPU_MAX_RINGS; ++i)
-		adev->vm_manager.seqno[i] = 0;
 }
 
 /**
Signature · 6 lines
2.7.4

_______________________________________________
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): 1530079813-4012-1-git-send-email-Flora.Cui-5C7GfCeVMHo@public.gmane.org

Reviewed-by Junwei Zhang
#2 lore raw
Quoted 2 lines · Flora Cui
Change-Id Ic0dbd693bac093e54eb95b5e547c89b64a5743b8

Good catch.

Quoted 11 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 5 -----
  1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +0 -0
index a1c78f9..3a072a7 100644
@@ -578,11 +578,6 @@ void amdgpu_vmid_mgr_init(struct amdgpu_device *adev)
  			list_add_tail(&id_mgr->ids[j].list, &id_mgr->ids_lru);

drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c void amdgpu_vmid_mgr_init(struct amdgpu_device *adev) · line 583

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +0 -5
  		}
  	}
-
-	adev->vm_manager.fence_context =
-		dma_fence_context_alloc(AMDGPU_MAX_RINGS);
-	for (i = 0; i < AMDGPU_MAX_RINGS; ++i)
-		adev->vm_manager.seqno[i] = 0;
  }
 
  /**

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

#3 lore raw
In reply to a message not in the archive

Please add patch's comment to describe where and where are duplicated.

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Flora Cui
Sent: Wednesday, June 27, 2018 2:10 PM
To: [email protected]
Cc: Cui, Flora <[email protected]>
Subject: [PATCH] drm/amdgpu: remove duplicated codes

Change-Id Ic0dbd693bac093e54eb95b5e547c89b64a5743b8
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +0 -5
index a1c78f9..3a072a7 100644
@@ -578,11 +578,6 @@ void amdgpu_vmid_mgr_init(struct amdgpu_device *adev)
 			list_add_tail(&id_mgr->ids[j].list, &id_mgr->ids_lru);
 		}
 	}
-
-	adev->vm_manager.fence_context =
-		dma_fence_context_alloc(AMDGPU_MAX_RINGS);
-	for (i = 0; i < AMDGPU_MAX_RINGS; ++i)
-		adev->vm_manager.seqno[i] = 0;
 }
 
 /**
Signature · 10 lines
2.7.4

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
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): BY1PR12MB0502442618374EF8822D055CB4480-PicGAnIBOobrCwm+z9iKNgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org

author
#5 lore raw

the fence_context and seqno is init in amdgpu_vm_manager_init() & amdgpu_vmid_mgr_init(). remove the amdgpu_vmid_mgr_init() copy.

Change-Id Ic0dbd693bac093e54eb95b5e547c89b64a5743b8
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +0 -5
index a1c78f9..3a072a7 100644
@@ -578,11 +578,6 @@ void amdgpu_vmid_mgr_init(struct amdgpu_device *adev)
 			list_add_tail(&id_mgr->ids[j].list, &id_mgr->ids_lru);
 		}
 	}
-
-	adev->vm_manager.fence_context =
-		dma_fence_context_alloc(AMDGPU_MAX_RINGS);
-	for (i = 0; i < AMDGPU_MAX_RINGS; ++i)
-		adev->vm_manager.seqno[i] = 0;
 }
 
 /**
Signature · 1 line
2.7.4
Quoted 38 lines · David(ChunMing)

Please add patch's comment to describe where and where are duplicated.

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Flora Cui
Sent: Wednesday, June 27, 2018 2:10 PM
To: [email protected]
Cc: Cui, Flora <[email protected]>
Subject: [PATCH] drm/amdgpu: remove duplicated codes

Change-Id Ic0dbd693bac093e54eb95b5e547c89b64a5743b8
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +0 -5
index a1c78f9..3a072a7 100644
@@ -578,11 +578,6 @@ void amdgpu_vmid_mgr_init(struct amdgpu_device *adev)
 			list_add_tail(&id_mgr->ids[j].list, &id_mgr->ids_lru);
 		}
 	}
-
-	adev->vm_manager.fence_context =
-		dma_fence_context_alloc(AMDGPU_MAX_RINGS);
-	for (i = 0; i < AMDGPU_MAX_RINGS; ++i)
-		adev->vm_manager.seqno[i] = 0;
 }
 
 /**
Signature · 6 lines
2.7.4

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

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

#6 lore raw

Feel free add my RB on that.

Thanks,
David Zhou

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Flora Cui
Sent: Wednesday, June 27, 2018 3:06 PM
To: Zhou, David(ChunMing) <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH] drm/amdgpu: remove duplicated codes

the fence_context and seqno is init in amdgpu_vm_manager_init() & amdgpu_vmid_mgr_init(). remove the amdgpu_vmid_mgr_init() copy.

Change-Id Ic0dbd693bac093e54eb95b5e547c89b64a5743b8
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +0 -5
index a1c78f9..3a072a7 100644
@@ -578,11 +578,6 @@ void amdgpu_vmid_mgr_init(struct amdgpu_device *adev)
 			list_add_tail(&id_mgr->ids[j].list, &id_mgr->ids_lru);
 		}
 	}
-
-	adev->vm_manager.fence_context =
-		dma_fence_context_alloc(AMDGPU_MAX_RINGS);
-	for (i = 0; i < AMDGPU_MAX_RINGS; ++i)
-		adev->vm_manager.seqno[i] = 0;
 }
 
 /**

--
2.7.4

Quoted 36 lines · David(ChunMing)

Please add patch's comment to describe where and where are duplicated.

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Flora Cui
Sent: Wednesday, June 27, 2018 2:10 PM
To: [email protected]
Cc: Cui, Flora <[email protected]>
Subject: [PATCH] drm/amdgpu: remove duplicated codes

Change-Id Ic0dbd693bac093e54eb95b5e547c89b64a5743b8
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c | 5 -----
 1 file changed, 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ids.c +0 -6
index a1c78f9..3a072a7 100644
@@ -578,11 +578,6 @@ void amdgpu_vmid_mgr_init(struct amdgpu_device *adev)
 			list_add_tail(&id_mgr->ids[j].list, &id_mgr->ids_lru);
 		}
 	}
-
-	adev->vm_manager.fence_context =
-		dma_fence_context_alloc(AMDGPU_MAX_RINGS);
-	for (i = 0; i < AMDGPU_MAX_RINGS; ++i)
-		adev->vm_manager.seqno[i] = 0;
 }
 
 /**
--

2.7.4

Quoted 4 lines

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

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