Skip to contentSkip to conversation

drm/amdgpu/vi: remove duplicate CG flags

PATCH In review Alex Deucher 3 participants 4 messages Mar 16, 2017 2 messages not in the archive

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

PATCH 1/2 drm/amdgpu/vi: remove duplicate CG flags

GFX_MGLS was added twice.

---
 drivers/gpu/drm/amd/amdgpu/vi.c | 2 --
 1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vi.c +0 -2
index fca85f8..28385b8 100644
@@ -1044,7 +1044,6 @@ static int vi_common_early_init(void *handle)
 			AMD_CG_SUPPORT_GFX_RLC_LS |
 			AMD_CG_SUPPORT_GFX_CP_LS |
 			AMD_CG_SUPPORT_GFX_CGTS |
-			AMD_CG_SUPPORT_GFX_MGLS |
 			AMD_CG_SUPPORT_GFX_CGTS_LS |
 			AMD_CG_SUPPORT_GFX_CGCG |
 			AMD_CG_SUPPORT_GFX_CGLS |
@@ -1073,7 +1072,6 @@ static int vi_common_early_init(void *handle)
 			AMD_CG_SUPPORT_GFX_RLC_LS |
 			AMD_CG_SUPPORT_GFX_CP_LS |
 			AMD_CG_SUPPORT_GFX_CGTS |
-			AMD_CG_SUPPORT_GFX_MGLS |
 			AMD_CG_SUPPORT_GFX_CGTS_LS |
 			AMD_CG_SUPPORT_GFX_CGCG |
 			AMD_CG_SUPPORT_GFX_CGLS |
Signature · 6 lines
2.5.5

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

PATCH 2/2 drm/amdgpu/vi: add missing error handling when setting uvd dclk

In reply to a message not in the archive
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/vi.c +2 -0
index 28385b8..eff123b 100644
@@ -795,6 +795,8 @@ static int vi_set_uvd_clocks(struct amdgpu_device *adev, u32 vclk, u32 dclk)
 		return r;
 
 	r = vi_set_uvd_clock(adev, dclk, ixCG_DCLK_CNTL, ixCG_DCLK_STATUS);
+	if (r)
+		return r;
 
 	return 0;
 }
Signature · 6 lines
2.5.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by
#4 lore raw

Re: [PATCH 2/2] drm/amdgpu/vi: add missing error handling when setting uvd dclk

In reply to a message not in the archive

Hi Alex,

Quoted 1 line · Alex Deucher

In case it matters - Reported-by or Suggested-by are the more common tags. Quick search in kernel history [since 2007] shows less than ~60 instances of the above with ~20 from yourself.

Quoted 10 lines
---
 drivers/gpu/drm/amd/amdgpu/vi.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/vi.c +0 -0
index 28385b8..eff123b 100644

drivers/gpu/drm/amd/amdgpu/vi.c static int vi_set_uvd_clocks(struct amdgpu_device *adev, u32 vclk, u32 dclk) · line 801

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vi.c +2 -0
@@ -795,6 +795,8 @@ static int vi_set_uvd_clocks(struct amdgpu_device *adev, u32 vclk, u32 dclk)
                return r;
 
        r = vi_set_uvd_clock(adev, dclk, ixCG_DCLK_CNTL, ixCG_DCLK_STATUS);
+       if (r)
+               return r;
 
        return 0;

One can drop the intermediate "r" here

   return vi_set_uvd_clock(adev, dclk, ixCG_DCLK_CNTL, ixCG_DCLK_STATUS);

Either way both patches are correct. so FWIW

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

Reviewed-by
#5 lore raw
In reply to a message not in the archive

Am 16.03.2017 um 03:06 schrieb Alex Deucher:

Quoted 4 lines

GFX_MGLS was added twice.

Quoted 17 lines
---
  drivers/gpu/drm/amd/amdgpu/vi.c | 2 --
  1 file changed, 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/vi.c +0 -1
index fca85f8..28385b8 100644
@@ -1044,7 +1044,6 @@ static int vi_common_early_init(void *handle)
  			AMD_CG_SUPPORT_GFX_RLC_LS |
  			AMD_CG_SUPPORT_GFX_CP_LS |
  			AMD_CG_SUPPORT_GFX_CGTS |
-			AMD_CG_SUPPORT_GFX_MGLS |
  			AMD_CG_SUPPORT_GFX_CGTS_LS |
  			AMD_CG_SUPPORT_GFX_CGCG |
  			AMD_CG_SUPPORT_GFX_CGLS |

drivers/gpu/drm/amd/amdgpu/vi.c static int vi_common_early_init(void *handle) · line 1077

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/vi.c +0 -1
@@ -1073,7 +1072,6 @@ static int vi_common_early_init(void *handle)
  			AMD_CG_SUPPORT_GFX_RLC_LS |
  			AMD_CG_SUPPORT_GFX_CP_LS |
  			AMD_CG_SUPPORT_GFX_CGTS |
-			AMD_CG_SUPPORT_GFX_MGLS |
  			AMD_CG_SUPPORT_GFX_CGTS_LS |
  			AMD_CG_SUPPORT_GFX_CGCG |
  			AMD_CG_SUPPORT_GFX_CGLS |

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