Skip to content

Commit 039a72c

Browse files
hoganderrodrigovivi
authored andcommitted
drm/i915/fbdev: Implement fb_dirty for intel custom fb helper
After disconnecting damage worker from update logic it's left to fbdev emulation implementation to have fb_dirty function. Currently intel fbdev doesn't have it. This is causing problems to features (PSR, FBC, DRRS) relying on dirty callback. Implement simple fb_dirty callback to deliver notifications about updates in fb console. v4: Add proper Fixes tag and modify commit message v3: Check damage clip v2: Improved commit message and added Fixes tag Fixes: f231af4 ("drm/fb-helper: Disconnect damage worker from update logic") Cc: Ville Syrjälä <[email protected]> Cc: Thomas Zimmermann <[email protected]> Cc: Jani Nikula <[email protected]> Signed-off-by: Jouni Högander <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 1af546c) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 90d5e83 commit 039a72c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/gpu/drm/i915/display/intel_fbdev.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,20 @@ static int intelfb_create(struct drm_fb_helper *helper,
328328
return ret;
329329
}
330330

331+
static int intelfb_dirty(struct drm_fb_helper *helper, struct drm_clip_rect *clip)
332+
{
333+
if (!(clip->x1 < clip->x2 && clip->y1 < clip->y2))
334+
return 0;
335+
336+
if (helper->fb->funcs->dirty)
337+
return helper->fb->funcs->dirty(helper->fb, NULL, 0, 0, clip, 1);
338+
339+
return 0;
340+
}
341+
331342
static const struct drm_fb_helper_funcs intel_fb_helper_funcs = {
332343
.fb_probe = intelfb_create,
344+
.fb_dirty = intelfb_dirty,
333345
};
334346

335347
static void intel_fbdev_destroy(struct intel_fbdev *ifbdev)

0 commit comments

Comments
 (0)