From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, airlied@gmail.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 2/3] Revert "drm/fb-helper: Schedule deferred-I/O worker after writing to framebuffer"
Date: Fri, 18 Nov 2022 14:35:34 +0100 [thread overview]
Message-ID: <20221118133535.9739-3-tzimmermann@suse.de> (raw)
In-Reply-To: <20221118133535.9739-1-tzimmermann@suse.de>
This reverts commit 7f5cc4a3e5e4c5a38e5748defc952e45278f7a70.
Needed to restore the fbdev damage worker. There have been bug reports
about locking order [1] and incorrectly takens branches. [2] Restore
the damage worker until these problems have been resovled.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://intel-gfx-ci.01.org/tree/drm-tip/fi-kbl-8809g.html # 1
Link: https://lore.kernel.org/dri-devel/20221115115819.23088-6-tzimmermann@suse.de/T/#m06eedc0a468940e4cbbd14ca026733b639bc445a # 2
---
drivers/gpu/drm/drm_fb_helper.c | 9 +--------
drivers/video/fbdev/core/fb_defio.c | 16 ----------------
include/linux/fb.h | 1 -
3 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index c0e9a977a3b3c..cdbf03e941b2b 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -599,16 +599,9 @@ static void drm_fb_helper_add_damage_clip(struct drm_fb_helper *helper, u32 x, u
static void drm_fb_helper_damage(struct drm_fb_helper *helper, u32 x, u32 y,
u32 width, u32 height)
{
- struct fb_info *info = helper->info;
-
drm_fb_helper_add_damage_clip(helper, x, y, width, height);
- /*
- * The current fbdev emulation only flushes buffers if a damage
- * update is necessary. And we can assume that deferred I/O has
- * been enabled as damage updates require deferred I/O for mmap.
- */
- fb_deferred_io_schedule_flush(info);
+ schedule_work(&helper->damage_work);
}
/*
diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c
index dec678f72a42f..c730253ab85ce 100644
--- a/drivers/video/fbdev/core/fb_defio.c
+++ b/drivers/video/fbdev/core/fb_defio.c
@@ -332,19 +332,3 @@ void fb_deferred_io_cleanup(struct fb_info *info)
mutex_destroy(&fbdefio->lock);
}
EXPORT_SYMBOL_GPL(fb_deferred_io_cleanup);
-
-void fb_deferred_io_schedule_flush(struct fb_info *info)
-{
- struct fb_deferred_io *fbdefio = info->fbdefio;
-
- if (WARN_ON_ONCE(!fbdefio))
- return; /* bug in driver logic */
-
- /*
- * There's no requirement from callers to schedule the
- * flush immediately. Rather schedule the worker with a
- * delay and let a few more writes pile up.
- */
- schedule_delayed_work(&info->deferred_work, fbdefio->delay);
-}
-EXPORT_SYMBOL_GPL(fb_deferred_io_schedule_flush);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 3a822e4357b12..e6b8e7ad7ac80 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -663,7 +663,6 @@ extern void fb_deferred_io_open(struct fb_info *info,
struct inode *inode,
struct file *file);
extern void fb_deferred_io_cleanup(struct fb_info *info);
-extern void fb_deferred_io_schedule_flush(struct fb_info *info);
extern int fb_deferred_io_fsync(struct file *file, loff_t start,
loff_t end, int datasync);
--
2.38.1
next prev parent reply other threads:[~2022-11-18 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 13:35 [PATCH 0/3] drm/fb-helper: Restore damage worker Thomas Zimmermann
2022-11-18 13:35 ` [PATCH 1/3] Revert "drm/fb-helper: Remove damage worker" Thomas Zimmermann
2022-11-18 13:35 ` Thomas Zimmermann [this message]
2022-11-18 13:35 ` [PATCH 3/3] Revert "drm/fb-helper: Perform damage handling in deferred-I/O helper" Thomas Zimmermann
2022-11-19 11:15 ` [PATCH 0/3] drm/fb-helper: Restore damage worker Daniel Vetter
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=20221118133535.9739-3-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).