All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: cleanup or bug?
@ 2016-03-03 20:17 Nils Wallménius
  2016-03-03 20:17 ` [PATCH] drm/amdgpu: delete set-but-not-read member has_uvd from amdgpu_device Nils Wallménius
  0 siblings, 1 reply; 3+ messages in thread
From: Nils Wallménius @ 2016-03-03 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Nils Wallménius

Hi!

First time sending a patch to the list.

This patch deletes a set-but-not-read member from the amdgpu_device
struct but I'm not sure the correct thing is to delete it. Maybe it
should be checked some where?

BR

Nils

Nils Wallménius (1):
  drm/amdgpu: delete set-but-not-read member has_uvd from amdgpu_device

 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 -
 drivers/gpu/drm/amd/amdgpu/cik.c    | 2 --
 drivers/gpu/drm/amd/amdgpu/vi.c     | 4 ----
 3 files changed, 7 deletions(-)

-- 
2.7.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH] drm/amdgpu: delete set-but-not-read member has_uvd from amdgpu_device
  2016-03-03 20:17 [PATCH] drm/amdgpu: cleanup or bug? Nils Wallménius
@ 2016-03-03 20:17 ` Nils Wallménius
  2016-03-04  9:25   ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: Nils Wallménius @ 2016-03-03 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Nils Wallménius

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 -
 drivers/gpu/drm/amd/amdgpu/cik.c    | 2 --
 drivers/gpu/drm/amd/amdgpu/vi.c     | 4 ----
 3 files changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 0c42a85..cfd35b0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -2053,7 +2053,6 @@ struct amdgpu_device {
 	struct amdgpu_sdma		sdma;
 
 	/* uvd */
-	bool				has_uvd;
 	struct amdgpu_uvd		uvd;
 
 	/* vce */
diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c
index 6b1f053..5da14a3 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik.c
@@ -2025,8 +2025,6 @@ static int cik_common_early_init(void *handle)
 
 	adev->asic_funcs = &cik_asic_funcs;
 
-	adev->has_uvd = true;
-
 	adev->rev_id = cik_get_rev_id(adev);
 	adev->external_rev_id = 0xFF;
 	switch (adev->asic_type) {
diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
index 1250035..9163f59 100644
--- a/drivers/gpu/drm/amd/amdgpu/vi.c
+++ b/drivers/gpu/drm/amd/amdgpu/vi.c
@@ -1071,26 +1071,22 @@ static int vi_common_early_init(void *handle)
 	adev->external_rev_id = 0xFF;
 	switch (adev->asic_type) {
 	case CHIP_TOPAZ:
-		adev->has_uvd = false;
 		adev->cg_flags = 0;
 		adev->pg_flags = 0;
 		adev->external_rev_id = 0x1;
 		break;
 	case CHIP_FIJI:
-		adev->has_uvd = true;
 		adev->cg_flags = 0;
 		adev->pg_flags = 0;
 		adev->external_rev_id = adev->rev_id + 0x3c;
 		break;
 	case CHIP_TONGA:
-		adev->has_uvd = true;
 		adev->cg_flags = 0;
 		adev->pg_flags = 0;
 		adev->external_rev_id = adev->rev_id + 0x14;
 		break;
 	case CHIP_CARRIZO:
 	case CHIP_STONEY:
-		adev->has_uvd = true;
 		adev->cg_flags = 0;
 		/* Disable UVD pg */
 		adev->pg_flags = /* AMDGPU_PG_SUPPORT_UVD | */AMDGPU_PG_SUPPORT_VCE;
-- 
2.7.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/amdgpu: delete set-but-not-read member has_uvd from amdgpu_device
  2016-03-03 20:17 ` [PATCH] drm/amdgpu: delete set-but-not-read member has_uvd from amdgpu_device Nils Wallménius
@ 2016-03-04  9:25   ` Christian König
  0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2016-03-04  9:25 UTC (permalink / raw)
  To: Nils Wallménius, dri-devel

Hi Nils,

Nice catch and yes that's just obviously a leftover from the radeon 
code. In amdgpu we handle missing and present engines completely 
differently.

Your patch looks good to me, but has some style problems. You should add 
a commit message and a signed-of-by line (use git commit --amend -s).

Regards,
Christian.

Am 03.03.2016 um 21:17 schrieb Nils Wallménius:
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 -
>   drivers/gpu/drm/amd/amdgpu/cik.c    | 2 --
>   drivers/gpu/drm/amd/amdgpu/vi.c     | 4 ----
>   3 files changed, 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index 0c42a85..cfd35b0 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -2053,7 +2053,6 @@ struct amdgpu_device {
>   	struct amdgpu_sdma		sdma;
>   
>   	/* uvd */
> -	bool				has_uvd;
>   	struct amdgpu_uvd		uvd;
>   
>   	/* vce */
> diff --git a/drivers/gpu/drm/amd/amdgpu/cik.c b/drivers/gpu/drm/amd/amdgpu/cik.c
> index 6b1f053..5da14a3 100644
> --- a/drivers/gpu/drm/amd/amdgpu/cik.c
> +++ b/drivers/gpu/drm/amd/amdgpu/cik.c
> @@ -2025,8 +2025,6 @@ static int cik_common_early_init(void *handle)
>   
>   	adev->asic_funcs = &cik_asic_funcs;
>   
> -	adev->has_uvd = true;
> -
>   	adev->rev_id = cik_get_rev_id(adev);
>   	adev->external_rev_id = 0xFF;
>   	switch (adev->asic_type) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c b/drivers/gpu/drm/amd/amdgpu/vi.c
> index 1250035..9163f59 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vi.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vi.c
> @@ -1071,26 +1071,22 @@ static int vi_common_early_init(void *handle)
>   	adev->external_rev_id = 0xFF;
>   	switch (adev->asic_type) {
>   	case CHIP_TOPAZ:
> -		adev->has_uvd = false;
>   		adev->cg_flags = 0;
>   		adev->pg_flags = 0;
>   		adev->external_rev_id = 0x1;
>   		break;
>   	case CHIP_FIJI:
> -		adev->has_uvd = true;
>   		adev->cg_flags = 0;
>   		adev->pg_flags = 0;
>   		adev->external_rev_id = adev->rev_id + 0x3c;
>   		break;
>   	case CHIP_TONGA:
> -		adev->has_uvd = true;
>   		adev->cg_flags = 0;
>   		adev->pg_flags = 0;
>   		adev->external_rev_id = adev->rev_id + 0x14;
>   		break;
>   	case CHIP_CARRIZO:
>   	case CHIP_STONEY:
> -		adev->has_uvd = true;
>   		adev->cg_flags = 0;
>   		/* Disable UVD pg */
>   		adev->pg_flags = /* AMDGPU_PG_SUPPORT_UVD | */AMDGPU_PG_SUPPORT_VCE;

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2016-03-04  9:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-03 20:17 [PATCH] drm/amdgpu: cleanup or bug? Nils Wallménius
2016-03-03 20:17 ` [PATCH] drm/amdgpu: delete set-but-not-read member has_uvd from amdgpu_device Nils Wallménius
2016-03-04  9:25   ` 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.