All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, airlied@gmail.com, javierm@redhat.com,
	mripard@kernel.org, maarten.lankhorst@linux.intel.com
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	dri-devel@lists.freedesktop.org
Subject: [PATCH v2 3/6] drm/fb-helper: Remove test for fb_dirty callback from deferred-I/O helper
Date: Tue, 15 Nov 2022 12:58:16 +0100	[thread overview]
Message-ID: <20221115115819.23088-4-tzimmermann@suse.de> (raw)
In-Reply-To: <20221115115819.23088-1-tzimmermann@suse.de>

The helper for processing deferred I/O on pages has no dependency on
the fb_dirty damge-handling callback; so remove the test. In practice,
deferred I/O is only used with damage handling and the damage worker
already guarantees the presence of the fb_dirty callback.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_fb_helper.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index be8ecb5e50b56..b3a731b9170a6 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -656,17 +656,15 @@ void drm_fb_helper_deferred_io(struct fb_info *info, struct list_head *pagerefli
 		min_off = min(min_off, start);
 		max_off = max(max_off, end);
 	}
-	if (min_off >= max_off)
-		return;
 
-	if (helper->funcs->fb_dirty) {
-		/*
-		 * As we can only track pages, we might reach beyond the end
-		 * of the screen and account for non-existing scanlines. Hence,
-		 * keep the covered memory area within the screen buffer.
-		 */
-		max_off = min(max_off, info->screen_size);
+	/*
+	 * As we can only track pages, we might reach beyond the end
+	 * of the screen and account for non-existing scanlines. Hence,
+	 * keep the covered memory area within the screen buffer.
+	 */
+	max_off = min(max_off, info->screen_size);
 
+	if (min_off < max_off) {
 		drm_fb_helper_memory_range_to_clip(info, min_off, max_off - min_off, &damage_area);
 		drm_fb_helper_damage(helper, damage_area.x1, damage_area.y1,
 				     drm_rect_width(&damage_area),
-- 
2.38.1


  parent reply	other threads:[~2022-11-15 11:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-15 11:58 [PATCH v2 0/6] drm/fb-helper: Remove damage worker Thomas Zimmermann
2022-11-15 11:58 ` [PATCH v2 1/6] drm/fb-helper: Set damage-clip area in helper Thomas Zimmermann
2022-11-15 11:58 ` [PATCH v2 2/6] drm/fb-helper: Move dirty-fb update into helper function Thomas Zimmermann
2022-11-15 11:58 ` Thomas Zimmermann [this message]
2022-11-15 11:58 ` [PATCH v2 4/6] drm/fb-helper: Perform damage handling in deferred-I/O helper Thomas Zimmermann
2022-11-15 11:58 ` [PATCH v2 5/6] drm/fb-helper: Schedule deferred-I/O worker after writing to framebuffer Thomas Zimmermann
2022-11-15 20:35   ` kernel test robot
2022-11-15 20:35     ` kernel test robot
2022-11-16  8:48     ` Thomas Zimmermann
     [not found]   ` <CGME20221117125800eucas1p29bc0adbe623ca0c42e903e771bf68b33@eucas1p2.samsung.com>
2022-11-17 12:57     ` [v2,5/6] " Marek Szyprowski
2022-11-17 12:57       ` Marek Szyprowski
2022-11-17 16:07       ` Thomas Zimmermann
2022-11-17 16:07         ` Thomas Zimmermann
2022-11-17 17:21         ` Marek Szyprowski
2022-11-17 17:21           ` Marek Szyprowski
2022-12-05 14:10           ` Marek Szyprowski
2022-12-05 14:10             ` Marek Szyprowski
2022-11-15 11:58 ` [PATCH v2 6/6] drm/fb-helper: Remove damage worker Thomas Zimmermann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221115115819.23088-4-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.