* [PATCH v2 0/3] Fixes and cleanup for DRM fbdev emulation and deferred I/O
@ 2023-01-21 19:24 Javier Martinez Canillas
2023-01-21 19:24 ` [PATCH v2 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field Javier Martinez Canillas
0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2023-01-21 19:24 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Zimmermann, Noralf Trønnes, Maxime Ripard,
Javier Martinez Canillas, Daniel Vetter, David Airlie,
Helge Deller, Jaya Kumar, Maarten Lankhorst, dri-devel,
linux-fbdev
Hello,
This patch series contains two fixes and a cleanup for things that I noticed
while debugging a regression in the fbdev emulation for a DRM driver.
The first two patches are trivial and shoulnd't be controversial, the third
patch is less trivial, but it has been already reviewed by Thomas and I did
test it to make sure that works as expected. With it, I got rid of the WARN
that happened due a mutex used after it has been destroyed.
Best regards,
Javier
Changes in v2:
- Re-introduce the CONFIG_FB_DEFERRED_IO ifdef guard for the @fbdefio field
declaration since the kernel test robot reported that's needed at the end.
Javier Martinez Canillas (3):
fbdev: Remove unused struct fb_deferred_io .first_io field
drm/fb-helper: Check fb_deferred_io_init() return value
drm/fb-helper: Use a per-driver FB deferred I/O handler
drivers/gpu/drm/drm_fbdev_generic.c | 15 ++++++++-------
drivers/video/fbdev/core/fb_defio.c | 4 ----
include/drm/drm_fb_helper.h | 12 ++++++++++++
include/linux/fb.h | 1 -
4 files changed, 20 insertions(+), 12 deletions(-)
--
2.39.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH v2 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field
2023-01-21 19:24 [PATCH v2 0/3] Fixes and cleanup for DRM fbdev emulation and deferred I/O Javier Martinez Canillas
@ 2023-01-21 19:24 ` Javier Martinez Canillas
2023-01-24 10:09 ` Javier Martinez Canillas
0 siblings, 1 reply; 3+ messages in thread
From: Javier Martinez Canillas @ 2023-01-21 19:24 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Zimmermann, Noralf Trønnes, Maxime Ripard,
Javier Martinez Canillas, Daniel Vetter, Helge Deller,
Jaya Kumar, dri-devel, linux-fbdev
This optional callback was added in the commit 1f45f9dbb392 ("fb_defio:
add first_io callback") but it was never used by a driver. Let's remove
it since it's unlikely that will be used after a decade that was added.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
---
(no changes since v1)
drivers/video/fbdev/core/fb_defio.c | 4 ----
include/linux/fb.h | 1 -
2 files changed, 5 deletions(-)
diff --git a/drivers/video/fbdev/core/fb_defio.c b/drivers/video/fbdev/core/fb_defio.c
index c730253ab85c..1b680742b7f3 100644
--- a/drivers/video/fbdev/core/fb_defio.c
+++ b/drivers/video/fbdev/core/fb_defio.c
@@ -157,10 +157,6 @@ static vm_fault_t fb_deferred_io_track_page(struct fb_info *info, unsigned long
/* protect against the workqueue changing the page list */
mutex_lock(&fbdefio->lock);
- /* first write in this cycle, notify the driver */
- if (fbdefio->first_io && list_empty(&fbdefio->pagereflist))
- fbdefio->first_io(info);
-
pageref = fb_deferred_io_pageref_get(info, offset, page);
if (WARN_ON_ONCE(!pageref)) {
ret = VM_FAULT_OOM;
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 30183fd259ae..daf336385613 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -215,7 +215,6 @@ struct fb_deferred_io {
struct mutex lock; /* mutex that protects the pageref list */
struct list_head pagereflist; /* list of pagerefs for touched pages */
/* callback */
- void (*first_io)(struct fb_info *info);
void (*deferred_io)(struct fb_info *info, struct list_head *pagelist);
};
#endif
--
2.39.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field
2023-01-21 19:24 ` [PATCH v2 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field Javier Martinez Canillas
@ 2023-01-24 10:09 ` Javier Martinez Canillas
0 siblings, 0 replies; 3+ messages in thread
From: Javier Martinez Canillas @ 2023-01-24 10:09 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Zimmermann, Noralf Trønnes, Maxime Ripard,
Daniel Vetter, Helge Deller, Jaya Kumar, dri-devel, linux-fbdev
On 1/21/23 20:24, Javier Martinez Canillas wrote:
> This optional callback was added in the commit 1f45f9dbb392 ("fb_defio:
> add first_io callback") but it was never used by a driver. Let's remove
> it since it's unlikely that will be used after a decade that was added.
>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
Pushed this to drm-misc (drm-misc-next). Thanks!
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-01-24 10:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-21 19:24 [PATCH v2 0/3] Fixes and cleanup for DRM fbdev emulation and deferred I/O Javier Martinez Canillas
2023-01-21 19:24 ` [PATCH v2 1/3] fbdev: Remove unused struct fb_deferred_io .first_io field Javier Martinez Canillas
2023-01-24 10:09 ` Javier Martinez Canillas
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).