This reverts commit da427a501e9b5e2cac8c8042df12eb203726903c.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216119
Fixes: 087451f372bf ("drm/amdgpu: use generic fb helpers instead of setting up 
AMD own's.")
Signed-off-by: Mario Limonciello <mario.limoncie...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 25 ++++-----------------
 1 file changed, 4 insertions(+), 21 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index c20922a5af9f..97fff4727724 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -1559,21 +1559,6 @@ bool amdgpu_crtc_get_scanout_position(struct drm_crtc 
*crtc,
                                                  stime, etime, mode);
 }
 
-static bool
-amdgpu_display_robj_is_fb(struct amdgpu_device *adev, struct amdgpu_bo *robj)
-{
-       struct drm_device *dev = adev_to_drm(adev);
-       struct drm_fb_helper *fb_helper = dev->fb_helper;
-
-       if (!fb_helper || !fb_helper->buffer)
-               return false;
-
-       if (gem_to_amdgpu_bo(fb_helper->buffer->gem) != robj)
-               return false;
-
-       return true;
-}
-
 int amdgpu_display_suspend_helper(struct amdgpu_device *adev)
 {
        struct drm_device *dev = adev_to_drm(adev);
@@ -1609,12 +1594,10 @@ int amdgpu_display_suspend_helper(struct amdgpu_device 
*adev)
                        continue;
                }
                robj = gem_to_amdgpu_bo(fb->obj[0]);
-               if (!amdgpu_display_robj_is_fb(adev, robj)) {
-                       r = amdgpu_bo_reserve(robj, true);
-                       if (r == 0) {
-                               amdgpu_bo_unpin(robj);
-                               amdgpu_bo_unreserve(robj);
-                       }
+               r = amdgpu_bo_reserve(robj, true);
+               if (r == 0) {
+                       amdgpu_bo_unpin(robj);
+                       amdgpu_bo_unreserve(robj);
                }
        }
        return 0;
-- 
2.34.1

Reply via email to