Skip to contentSkip to conversation

drm/amd/amdgpu: Remove workaround check for UVD6 on APUs

PATCH In review Tom St Denis 3 participants 6 messages Oct 23, 2017 – Oct 24, 2017 4 messages not in the archive

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

PATCH 1/1 drm/amd/amdgpu: Remove workaround check for UVD6 on APUs

On APUs the uvd6 driver was skipping proper suspend/resume routines resulting in a broken state upon resume.

---
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +5 -11
index 71299c67c517..2581543b35a7 100644
@@ -565,11 +565,7 @@ static int uvd_v6_0_suspend(void *handle)
 	if (r)
 		return r;
 
-	/* Skip this for APU for now */
-	if (!(adev->flags & AMD_IS_APU))
-		r = amdgpu_uvd_suspend(adev);
-
-	return r;
+	return amdgpu_uvd_suspend(adev);
 }
 
 static int uvd_v6_0_resume(void *handle)
@@ -577,12 +573,10 @@ static int uvd_v6_0_resume(void *handle)
 	int r;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	/* Skip this for APU for now */
-	if (!(adev->flags & AMD_IS_APU)) {
-		r = amdgpu_uvd_resume(adev);
-		if (r)
-			return r;
-	}
+	r = amdgpu_uvd_resume(adev);
+	if (r)
+		return r;
+
 	return uvd_v6_0_hw_init(adev);
 }
 
Signature · 6 lines
2.12.0

_______________________________________________
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): [email protected]

Acked-by
#2 lore raw
Quoted 4 lines · Tom St Denis

On APUs the uvd6 driver was skipping proper suspend/resume routines resulting in a broken state upon resume.

Quoted 41 lines
---
 drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +5 -12
index 71299c67c517..2581543b35a7 100644
@@ -565,11 +565,7 @@ static int uvd_v6_0_suspend(void *handle)
        if (r)
                return r;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU))
-               r = amdgpu_uvd_suspend(adev);
-
-       return r;
+       return amdgpu_uvd_suspend(adev);
 }
 
 static int uvd_v6_0_resume(void *handle)
@@ -577,12 +573,10 @@ static int uvd_v6_0_resume(void *handle)
        int r;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU)) {
-               r = amdgpu_uvd_resume(adev);
-               if (r)
-                       return r;
-       }
+       r = amdgpu_uvd_resume(adev);
+       if (r)
+               return r;
+
        return uvd_v6_0_hw_init(adev);
 }
 
--

2.12.0

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

A message that is not in the archive (sent off-list or not yet received): CADnq5_OLhGUYqoj5O8JMyC4N+G+nC2QCQp9ymBpysXj4e2YiZg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

Reviewed-by
#4 lore raw
Quoted 48 lines · Alex Deucher
Quoted 4 lines · Tom St Denis

On APUs the uvd6 driver was skipping proper suspend/resume routines resulting in a broken state upon resume.

Quoted 41 lines
---
  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +++++-----------
  1 file changed, 5 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +5 -12
index 71299c67c517..2581543b35a7 100644
@@ -565,11 +565,7 @@ static int uvd_v6_0_suspend(void *handle)
         if (r)
                 return r;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU))
-               r = amdgpu_uvd_suspend(adev);
-
-       return r;
+       return amdgpu_uvd_suspend(adev);
  }
 
  static int uvd_v6_0_resume(void *handle)
@@ -577,12 +573,10 @@ static int uvd_v6_0_resume(void *handle)
         int r;
         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU)) {
-               r = amdgpu_uvd_resume(adev);
-               if (r)
-                       return r;
-       }
+       r = amdgpu_uvd_resume(adev);
+       if (r)
+               return r;
+
         return uvd_v6_0_hw_init(adev);
  }
 
--

2.12.0

Quoted 8 lines
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

A message that is not in the archive (sent off-list or not yet received): 775fcb26-f9eb-ed8b-9b96-b73023443cbe-5C7GfCeVMHo@public.gmane.org

#6 lore raw

Thanks Leo,

I don't have any uvd7 gear but that code has the same "workaround." Should that be removed as well?

Cheers,
Tom

Quoted 61 lines · Leo Liu
Quoted 56 lines · Alex Deucher
Quoted 4 lines · Tom St Denis

On APUs the uvd6 driver was skipping proper suspend/resume routines resulting in a broken state upon resume.

Quoted 45 lines

---
  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +++++-----------

  1 file changed, 5 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +5 -11
index 71299c67c517..2581543b35a7 100644
@@ -565,11 +565,7 @@ static int uvd_v6_0_suspend(void *handle)
          if (r)
                  return r;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU))
-               r = amdgpu_uvd_suspend(adev);
-
-       return r;
+       return amdgpu_uvd_suspend(adev);
   }
 
   static int uvd_v6_0_resume(void *handle)
@@ -577,12 +573,10 @@ static int uvd_v6_0_resume(void *handle)
          int r;
          struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU)) {
-               r = amdgpu_uvd_resume(adev);
-               if (r)
-                       return r;
-       }
+       r = amdgpu_uvd_resume(adev);
+       if (r)
+               return r;
+
          return uvd_v6_0_hw_init(adev);
   }
 
Signature · 6 lines
2.12.0

_______________________________________________
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

A message that is not in the archive (sent off-list or not yet received): 06efb1fd-9736-e04a-9de6-a2a0cdbe655a-5C7GfCeVMHo@public.gmane.org

#8 lore raw
Quoted 3 lines · Tom St Denis

Thanks Leo,

I don't have any uvd7 gear but that code has the same "workaround." Should that be removed as well?

Good question. Since we don't have UVD7 APUs to verify, it's up to you to either re-visit later or remove it now.

Leo

Quoted 67 lines

Cheers,
Tom

Quoted 61 lines · Leo Liu
Quoted 56 lines · Alex Deucher
Quoted 4 lines · Tom St Denis

On APUs the uvd6 driver was skipping proper suspend/resume routines resulting in a broken state upon resume.

Quoted 45 lines

---
  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +++++-----------

  1 file changed, 5 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +5 -11
index 71299c67c517..2581543b35a7 100644
@@ -565,11 +565,7 @@ static int uvd_v6_0_suspend(void *handle)
          if (r)
                  return r;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU))
-               r = amdgpu_uvd_suspend(adev);
-
-       return r;
+       return amdgpu_uvd_suspend(adev);
   }
 
   static int uvd_v6_0_resume(void *handle)
@@ -577,12 +573,10 @@ static int uvd_v6_0_resume(void *handle)
          int r;
          struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU)) {
-               r = amdgpu_uvd_resume(adev);
-               if (r)
-                       return r;
-       }
+       r = amdgpu_uvd_resume(adev);
+       if (r)
+               return r;
+
          return uvd_v6_0_hw_init(adev);
   }
 
Signature · 6 lines
2.12.0

_______________________________________________
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

#9 lore raw
In reply to a message not in the archive
Quoted 4 lines · Tom St Denis

Thanks Leo,

I don't have any uvd7 gear but that code has the same "workaround." Should that be removed as well?

There are no UVD 7 APUs, so feel free to remove it :)

Alex

Quoted 77 lines

Cheers,
Tom

Quoted 70 lines · Leo Liu
Quoted 63 lines · Alex Deucher
Quoted 6 lines · Tom St Denis

On APUs the uvd6 driver was skipping proper suspend/resume routines resulting
in a broken state upon resume.

Quoted 42 lines
---
  drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 16 +++++-----------
  1 file changed, 5 insertions(+), 11 deletions(-)
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +5 -12
index 71299c67c517..2581543b35a7 100644
@@ -565,11 +565,7 @@ static int uvd_v6_0_suspend(void *handle)
         if (r)
                 return r;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU))
-               r = amdgpu_uvd_suspend(adev);
-
-       return r;
+       return amdgpu_uvd_suspend(adev);
  }
 
  static int uvd_v6_0_resume(void *handle)
@@ -577,12 +573,10 @@ static int uvd_v6_0_resume(void *handle)
         int r;
         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       /* Skip this for APU for now */
-       if (!(adev->flags & AMD_IS_APU)) {
-               r = amdgpu_uvd_resume(adev);
-               if (r)
-                       return r;
-       }
+       r = amdgpu_uvd_resume(adev);
+       if (r)
+               return r;
+
         return uvd_v6_0_hw_init(adev);
  }
 
--

2.12.0

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