Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH v3] drm/i915/fbdev: Implement fb_dirty for intel custom fb helper
@ 2022-12-21 15:38 Jouni Högander
  2022-12-22  7:00 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/fbdev: Implement fb_dirty for intel custom fb helper (rev2) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jouni Högander @ 2022-12-21 15:38 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Thomas Zimmermann

After splitting generic drm_fb_helper into it's own file it's left to
helper 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.

v3: Check damage clip
v2: Improved commit message and added Fixes tag

Fixes: 8ab59da26bc0 ("drm/fb-helper: Move generic fbdev emulation into separate source file")
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fbdev.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 03ed4607a46d..4e87d9964fcc 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -328,8 +328,20 @@ static int intelfb_create(struct drm_fb_helper *helper,
 	return ret;
 }
 
+static int intelfb_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 intel_fb_helper_funcs = {
 	.fb_probe = intelfb_create,
+	.fb_dirty = intelfb_dirty,
 };
 
 static void intel_fbdev_destroy(struct intel_fbdev *ifbdev)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-01-23  7:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-21 15:38 [Intel-gfx] [PATCH v3] drm/i915/fbdev: Implement fb_dirty for intel custom fb helper Jouni Högander
2022-12-22  7:00 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/fbdev: Implement fb_dirty for intel custom fb helper (rev2) Patchwork
2023-01-05 17:41 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/fbdev: Implement fb_dirty for intel custom fb helper (rev3) Patchwork
2023-01-06 10:35 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-01-20 17:30 ` [Intel-gfx] [PATCH v3] drm/i915/fbdev: Implement fb_dirty for intel custom fb helper Ville Syrjälä
2023-01-23  7:45   ` Hogander, Jouni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox