All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: fix typo error amdgput -> amdgpu
@ 2019-08-13  9:08 Wang, Kevin(Yang)
       [not found] ` <20190813090745.9496-1-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Wang, Kevin(Yang) @ 2019-08-13  9:08 UTC (permalink / raw)
  To: dl.srdc_lnx_nv10
  Cc: Wang, Kevin(Yang), amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

fix typo error:
change function name from "amdgput_ctx_total_num_entities" to
"amdgpu_ctx_total_num_entities".

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index b7b4cfa256f1..95d8201a738e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -43,7 +43,7 @@ const unsigned int amdgpu_ctx_num_entities[AMDGPU_HW_IP_NUM] = {
 	[AMDGPU_HW_IP_VCN_JPEG]	=	1,
 };
 
-static int amdgput_ctx_total_num_entities(void)
+static int amdgpu_ctx_total_num_entities(void)
 {
 	unsigned i, num_entities = 0;
 
@@ -74,7 +74,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev,
 			   struct drm_file *filp,
 			   struct amdgpu_ctx *ctx)
 {
-	unsigned num_entities = amdgput_ctx_total_num_entities();
+	unsigned num_entities = amdgpu_ctx_total_num_entities();
 	unsigned i, j, k;
 	int r;
 
@@ -208,7 +208,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev,
 static void amdgpu_ctx_fini(struct kref *ref)
 {
 	struct amdgpu_ctx *ctx = container_of(ref, struct amdgpu_ctx, refcount);
-	unsigned num_entities = amdgput_ctx_total_num_entities();
+	unsigned num_entities = amdgpu_ctx_total_num_entities();
 	struct amdgpu_device *adev = ctx->adev;
 	unsigned i, j;
 
@@ -525,7 +525,7 @@ struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx,
 void amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx,
 				  enum drm_sched_priority priority)
 {
-	unsigned num_entities = amdgput_ctx_total_num_entities();
+	unsigned num_entities = amdgpu_ctx_total_num_entities();
 	enum drm_sched_priority ctx_prio;
 	unsigned i;
 
@@ -570,7 +570,7 @@ void amdgpu_ctx_mgr_init(struct amdgpu_ctx_mgr *mgr)
 
 long amdgpu_ctx_mgr_entity_flush(struct amdgpu_ctx_mgr *mgr, long timeout)
 {
-	unsigned num_entities = amdgput_ctx_total_num_entities();
+	unsigned num_entities = amdgpu_ctx_total_num_entities();
 	struct amdgpu_ctx *ctx;
 	struct idr *idp;
 	uint32_t id, i;
@@ -592,7 +592,7 @@ long amdgpu_ctx_mgr_entity_flush(struct amdgpu_ctx_mgr *mgr, long timeout)
 
 void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
 {
-	unsigned num_entities = amdgput_ctx_total_num_entities();
+	unsigned num_entities = amdgpu_ctx_total_num_entities();
 	struct amdgpu_ctx *ctx;
 	struct idr *idp;
 	uint32_t id, i;
-- 
2.22.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm/amdgpu: use exiting amdgput_ctx_total_num_entities function
       [not found] ` <20190813090745.9496-1-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
@ 2019-08-13  9:08   ` Wang, Kevin(Yang)
       [not found]     ` <20190813090745.9496-2-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
  2019-08-13  9:11   ` [PATCH 1/2] drm/amdgpu: fix typo error amdgput -> amdgpu Christian König
  1 sibling, 1 reply; 4+ messages in thread
From: Wang, Kevin(Yang) @ 2019-08-13  9:08 UTC (permalink / raw)
  To: dl.srdc_lnx_nv10
  Cc: Wang, Kevin(Yang), amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

simplify driver code.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 95d8201a738e..89c26bb0f05c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -290,10 +290,7 @@ static void amdgpu_ctx_do_release(struct kref *ref)
 
 	ctx = container_of(ref, struct amdgpu_ctx, refcount);
 
-	num_entities = 0;
-	for (i = 0; i < AMDGPU_HW_IP_NUM; i++)
-		num_entities += amdgpu_ctx_num_entities[i];
-
+	num_entities = amdgpu_ctx_total_num_entities();
 	for (i = 0; i < num_entities; i++)
 		drm_sched_entity_destroy(&ctx->entities[0][i].entity);
 
-- 
2.22.0

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: fix typo error amdgput -> amdgpu
       [not found] ` <20190813090745.9496-1-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
  2019-08-13  9:08   ` [PATCH 2/2] drm/amdgpu: use exiting amdgput_ctx_total_num_entities function Wang, Kevin(Yang)
@ 2019-08-13  9:11   ` Christian König
  1 sibling, 0 replies; 4+ messages in thread
From: Christian König @ 2019-08-13  9:11 UTC (permalink / raw)
  To: Wang, Kevin(Yang), dl.srdc_lnx_nv10
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 13.08.19 um 11:08 schrieb Wang, Kevin(Yang):
> fix typo error:
> change function name from "amdgput_ctx_total_num_entities" to
> "amdgpu_ctx_total_num_entities".
>
> Signed-off-by: Kevin Wang <kevin1.wang@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index b7b4cfa256f1..95d8201a738e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> @@ -43,7 +43,7 @@ const unsigned int amdgpu_ctx_num_entities[AMDGPU_HW_IP_NUM] = {
>   	[AMDGPU_HW_IP_VCN_JPEG]	=	1,
>   };
>   
> -static int amdgput_ctx_total_num_entities(void)
> +static int amdgpu_ctx_total_num_entities(void)
>   {
>   	unsigned i, num_entities = 0;
>   
> @@ -74,7 +74,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev,
>   			   struct drm_file *filp,
>   			   struct amdgpu_ctx *ctx)
>   {
> -	unsigned num_entities = amdgput_ctx_total_num_entities();
> +	unsigned num_entities = amdgpu_ctx_total_num_entities();
>   	unsigned i, j, k;
>   	int r;
>   
> @@ -208,7 +208,7 @@ static int amdgpu_ctx_init(struct amdgpu_device *adev,
>   static void amdgpu_ctx_fini(struct kref *ref)
>   {
>   	struct amdgpu_ctx *ctx = container_of(ref, struct amdgpu_ctx, refcount);
> -	unsigned num_entities = amdgput_ctx_total_num_entities();
> +	unsigned num_entities = amdgpu_ctx_total_num_entities();
>   	struct amdgpu_device *adev = ctx->adev;
>   	unsigned i, j;
>   
> @@ -525,7 +525,7 @@ struct dma_fence *amdgpu_ctx_get_fence(struct amdgpu_ctx *ctx,
>   void amdgpu_ctx_priority_override(struct amdgpu_ctx *ctx,
>   				  enum drm_sched_priority priority)
>   {
> -	unsigned num_entities = amdgput_ctx_total_num_entities();
> +	unsigned num_entities = amdgpu_ctx_total_num_entities();
>   	enum drm_sched_priority ctx_prio;
>   	unsigned i;
>   
> @@ -570,7 +570,7 @@ void amdgpu_ctx_mgr_init(struct amdgpu_ctx_mgr *mgr)
>   
>   long amdgpu_ctx_mgr_entity_flush(struct amdgpu_ctx_mgr *mgr, long timeout)
>   {
> -	unsigned num_entities = amdgput_ctx_total_num_entities();
> +	unsigned num_entities = amdgpu_ctx_total_num_entities();
>   	struct amdgpu_ctx *ctx;
>   	struct idr *idp;
>   	uint32_t id, i;
> @@ -592,7 +592,7 @@ long amdgpu_ctx_mgr_entity_flush(struct amdgpu_ctx_mgr *mgr, long timeout)
>   
>   void amdgpu_ctx_mgr_entity_fini(struct amdgpu_ctx_mgr *mgr)
>   {
> -	unsigned num_entities = amdgput_ctx_total_num_entities();
> +	unsigned num_entities = amdgpu_ctx_total_num_entities();
>   	struct amdgpu_ctx *ctx;
>   	struct idr *idp;
>   	uint32_t id, i;

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drm/amdgpu: use exiting amdgput_ctx_total_num_entities function
       [not found]     ` <20190813090745.9496-2-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
@ 2019-08-13  9:44       ` Christian König
  0 siblings, 0 replies; 4+ messages in thread
From: Christian König @ 2019-08-13  9:44 UTC (permalink / raw)
  To: Wang, Kevin(Yang), dl.srdc_lnx_nv10
  Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

Am 13.08.19 um 11:08 schrieb Wang, Kevin(Yang):
> simplify driver code.
>
> Signed-off-by: Kevin Wang <kevin1.wang@amd.com>

Reviewed-by: Christian König <christian.koenig@amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> index 95d8201a738e..89c26bb0f05c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
> @@ -290,10 +290,7 @@ static void amdgpu_ctx_do_release(struct kref *ref)
>   
>   	ctx = container_of(ref, struct amdgpu_ctx, refcount);
>   
> -	num_entities = 0;
> -	for (i = 0; i < AMDGPU_HW_IP_NUM; i++)
> -		num_entities += amdgpu_ctx_num_entities[i];
> -
> +	num_entities = amdgpu_ctx_total_num_entities();
>   	for (i = 0; i < num_entities; i++)
>   		drm_sched_entity_destroy(&ctx->entities[0][i].entity);
>   

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-13  9:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13  9:08 [PATCH 1/2] drm/amdgpu: fix typo error amdgput -> amdgpu Wang, Kevin(Yang)
     [not found] ` <20190813090745.9496-1-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
2019-08-13  9:08   ` [PATCH 2/2] drm/amdgpu: use exiting amdgput_ctx_total_num_entities function Wang, Kevin(Yang)
     [not found]     ` <20190813090745.9496-2-kevin1.wang-5C7GfCeVMHo@public.gmane.org>
2019-08-13  9:44       ` Christian König
2019-08-13  9:11   ` [PATCH 1/2] drm/amdgpu: fix typo error amdgput -> amdgpu Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.