revert amdgpu dirty fb helper changes from 5.15.71
authorjsg <jsg@openbsd.org>
Mon, 10 Oct 2022 01:58:36 +0000 (01:58 +0000)
committerjsg <jsg@openbsd.org>
Mon, 10 Oct 2022 01:58:36 +0000 (01:58 +0000)
drm/amdgpu: don't register a dirty callback for non-atomic
drm/amdgpu: use dirty framebuffer helper

kettenis found that these changes made xpdf slow on x395 (picasso).
I can not reproduce this on renoir.

sys/dev/pci/drm/amd/amdgpu/amdgpu_display.c

index a09507a..c4dae83 100644 (file)
@@ -35,8 +35,6 @@
 #include <linux/pci.h>
 #include <linux/pm_runtime.h>
 #include <drm/drm_crtc_helper.h>
-#include <drm/drm_damage_helper.h>
-#include <drm/drm_drv.h>
 #include <drm/drm_edid.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_fb_helper.h>
@@ -494,12 +492,6 @@ static const struct drm_framebuffer_funcs amdgpu_fb_funcs = {
        .create_handle = drm_gem_fb_create_handle,
 };
 
-static const struct drm_framebuffer_funcs amdgpu_fb_funcs_atomic = {
-       .destroy = drm_gem_fb_destroy,
-       .create_handle = drm_gem_fb_create_handle,
-       .dirty = drm_atomic_helper_dirtyfb,
-};
-
 uint32_t amdgpu_display_supported_domains(struct amdgpu_device *adev,
                                          uint64_t bo_flags)
 {
@@ -1117,10 +1109,7 @@ int amdgpu_display_gem_fb_verify_and_init(
        if (ret)
                goto err;
 
-       if (drm_drv_uses_atomic_modeset(dev))
-               ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs_atomic);
-       else
-               ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs);
+       ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs);
        if (ret)
                goto err;