Commit 9bdefeb4 authored by Tony Lindgren's avatar Tony Lindgren Committed by Ma Wupeng
Browse files

drm/omapdrm: Fix console by implementing fb_dirty

stable inclusion
from stable-v6.6.33
commit e79f933ad162925143f49847ec4ac3a624df3e7d
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/IAD6H2

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e79f933ad162925143f49847ec4ac3a624df3e7d



--------------------------------

[ Upstream commit 632bac50544c0929ced9eed41e7d04c08adecbb0 ]

The framebuffer console stopped updating with commit f231af49
("drm/fb-helper: Disconnect damage worker from update logic").

Let's fix the issue by implementing fb_dirty similar to what was done
with commit 039a72ce ("drm/i915/fbdev: Implement fb_dirty for intel
custom fb helper").

Fixes: f231af49 ("drm/fb-helper: Disconnect damage worker from update logic")
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240228063540.4444-2-tony@atomide.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarWang Hai <wanghai38@huawei.com>
parent 820048a4
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -238,8 +238,20 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
	return ret;
}

static int omap_fbdev_dirty(struct drm_fb_helper *helper, struct drm_clip_rect *clip)
{
	if (!(clip->x1 < clip->x2 && clip->y1 < clip->y2))
		return 0;

	if (helper->fb->funcs->dirty)
		return helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, clip, 1);

	return 0;
}

static const struct drm_fb_helper_funcs omap_fb_helper_funcs = {
	.fb_probe = omap_fbdev_create,
	.fb_dirty = omap_fbdev_dirty,
};

static struct drm_fb_helper *get_fb(struct fb_info *fbi)