Skip to content

Commit 6c83ca7

Browse files
committed
drm/rockchip: Use dirtyfb helper
Instead of flushing all vops every time we get a dirtyfb call, use the damage helper to kick off an atomic commit. Even though we don't use damage clips, the helper commit will force us through the normal psr_inhibit_get/put sequence. Changes in v3: - Added to the set Changes in v4: - None Changes in v5: - None Link to v3: https://patchwork.freedesktop.org/patch/msgid/[email protected] Link to v4: https://patchwork.freedesktop.org/patch/msgid/[email protected] Suggested-by: Daniel Vetter <[email protected]> Tested-by: Heiko Stuebner <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 1452c25 commit 6c83ca7

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

drivers/gpu/drm/rockchip/rockchip_drm_fb.c

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <drm/drm.h>
1717
#include <drm/drmP.h>
1818
#include <drm/drm_atomic.h>
19+
#include <drm/drm_damage_helper.h>
1920
#include <drm/drm_fb_helper.h>
2021
#include <drm/drm_gem_framebuffer_helper.h>
2122
#include <drm/drm_probe_helper.h>
@@ -25,20 +26,10 @@
2526
#include "rockchip_drm_gem.h"
2627
#include "rockchip_drm_psr.h"
2728

28-
static int rockchip_drm_fb_dirty(struct drm_framebuffer *fb,
29-
struct drm_file *file,
30-
unsigned int flags, unsigned int color,
31-
struct drm_clip_rect *clips,
32-
unsigned int num_clips)
33-
{
34-
rockchip_drm_psr_flush_all(fb->dev);
35-
return 0;
36-
}
37-
3829
static const struct drm_framebuffer_funcs rockchip_drm_fb_funcs = {
3930
.destroy = drm_gem_fb_destroy,
4031
.create_handle = drm_gem_fb_create_handle,
41-
.dirty = rockchip_drm_fb_dirty,
32+
.dirty = drm_atomic_helper_dirtyfb,
4233
};
4334

4435
static struct drm_framebuffer *

0 commit comments

Comments
 (0)