All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de, javierm@redhat.com
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Thomas Zimmermann <tzimmermann@suse.de>,
	Jonathan Corbet <corbet@lwn.net>
Subject: [PATCH 43/43] drm/fbdev: Clean up fbdev documentation
Date: Tue, 12 Mar 2024 16:45:38 +0100	[thread overview]
Message-ID: <20240312154834.26178-44-tzimmermann@suse.de> (raw)
In-Reply-To: <20240312154834.26178-1-tzimmermann@suse.de>

Rewrite some docs that are not up-to-date any longer. Remove the TODO
item for fbdev-generic conversion, as the helper has been replaced. Make
documentation for DMA, SHMEM and TTM emulation available.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Jonathan Corbet <corbet@lwn.net>
---
 Documentation/gpu/drm-kms-helpers.rst | 12 +++++++++---
 Documentation/gpu/todo.rst            | 13 -------------
 drivers/gpu/drm/drm_drv.c             |  2 +-
 drivers/gpu/drm/drm_fb_helper.c       | 11 ++---------
 include/drm/drm_mode_config.h         |  4 ++--
 5 files changed, 14 insertions(+), 28 deletions(-)

diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst
index e46ab9b670acd..8435e8621cc08 100644
--- a/Documentation/gpu/drm-kms-helpers.rst
+++ b/Documentation/gpu/drm-kms-helpers.rst
@@ -110,15 +110,21 @@ fbdev Helper Functions Reference
 .. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
    :doc: fbdev helpers
 
-.. kernel-doc:: include/drm/drm_fb_helper.h
-   :internal:
+.. kernel-doc:: drivers/gpu/drm/drm_fbdev_dma.c
+   :export:
 
-.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
+.. kernel-doc:: drivers/gpu/drm/drm_fbdev_shmem.c
    :export:
 
 .. kernel-doc:: drivers/gpu/drm/drm_fbdev_ttm.c
    :export:
 
+.. kernel-doc:: include/drm/drm_fb_helper.h
+   :internal:
+
+.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
+   :export:
+
 format Helper Functions Reference
 =================================
 
diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index fb9ad120b1414..e2a0585915b32 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -243,19 +243,6 @@ Contact: Maintainer of the driver you plan to convert
 
 Level: Intermediate
 
-Convert drivers to use drm_fbdev_generic_setup()
-------------------------------------------------
-
-Most drivers can use drm_fbdev_generic_setup(). Driver have to implement
-atomic modesetting and GEM vmap support. Historically, generic fbdev emulation
-expected the framebuffer in system memory or system-like memory. By employing
-struct iosys_map, drivers with frambuffers in I/O memory can be supported
-as well.
-
-Contact: Maintainer of the driver you plan to convert
-
-Level: Intermediate
-
 Reimplement functions in drm_fbdev_fb_ops without fbdev
 -------------------------------------------------------
 
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 243cacb3575c0..cfcd45480d326 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -345,7 +345,7 @@ void drm_minor_release(struct drm_minor *minor)
  *		if (ret)
  *			return ret;
  *
- *		drm_fbdev_generic_setup(drm, 32);
+ *		drm_fbdev_{...}_setup(drm, 32);
  *
  *		return 0;
  *	}
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index d612133e2cf7e..e2e19f49342e1 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -85,12 +85,8 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
  * The fb helper functions are useful to provide an fbdev on top of a drm kernel
  * mode setting driver. They can be used mostly independently from the crtc
  * helper functions used by many drivers to implement the kernel mode setting
- * interfaces.
- *
- * Drivers that support a dumb buffer with a virtual address and mmap support,
- * should try out the generic fbdev emulation using drm_fbdev_generic_setup().
- * It will automatically set up deferred I/O if the driver requires a shadow
- * buffer.
+ * interfaces. Drivers that use one of the shared memory managers, TTM, SHMEM,
+ * DMA, should instead use the corresponding fbdev emulation.
  *
  * Existing fbdev implementations should restore the fbdev console by using
  * drm_fb_helper_lastclose() as their &drm_driver.lastclose callback.
@@ -126,9 +122,6 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
  * atomic context. If drm_fb_helper_deferred_io() is used as the deferred_io
  * callback it will also schedule dirty_work with the damage collected from the
  * mmap page writes.
- *
- * Deferred I/O is not compatible with SHMEM. Such drivers should request an
- * fbdev shadow buffer and call drm_fbdev_generic_setup() instead.
  */
 
 static void drm_fb_helper_restore_lut_atomic(struct drm_crtc *crtc)
diff --git a/include/drm/drm_mode_config.h b/include/drm/drm_mode_config.h
index 973119a9176b2..1e4b8d01212e6 100644
--- a/include/drm/drm_mode_config.h
+++ b/include/drm/drm_mode_config.h
@@ -106,8 +106,8 @@ struct drm_mode_config_funcs {
 	 * Drivers implementing fbdev emulation use drm_kms_helper_hotplug_event()
 	 * to call this hook to inform the fbdev helper of output changes.
 	 *
-	 * This hook is deprecated, drivers should instead use
-	 * drm_fbdev_generic_setup() which takes care of any necessary
+	 * This hook is deprecated, drivers should instead implement fbdev
+	 * support with struct drm_client, which takes care of any necessary
 	 * hotplug event forwarding already without further involvement by
 	 * the driver.
 	 */
-- 
2.44.0


      parent reply	other threads:[~2024-03-12 15:48 UTC|newest]

Thread overview: 78+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-12 15:44 [PATCH 00/43] drm: Provide fbdev emulation per memory manager Thomas Zimmermann
2024-03-12 15:44 ` [PATCH 01/43] drm/fbdev-generic: Do not set physical framebuffer address Thomas Zimmermann
2024-03-17 12:43   ` Javier Martinez Canillas
2024-03-18  8:19     ` Thomas Zimmermann
2024-03-18  2:35   ` Zack Rusin
2024-03-18  7:59     ` Thomas Zimmermann
2024-03-18  8:44       ` Maxime Ripard
2024-03-18  9:48         ` Javier Martinez Canillas
2024-03-18 22:22   ` [01/43] " Sui Jingfeng
2024-03-12 15:44 ` [PATCH 02/43] fbdev/deferred-io: Move pageref setup into separate helper Thomas Zimmermann
2024-03-17 12:49   ` Javier Martinez Canillas
2024-03-12 15:44 ` [PATCH 03/43] fbdev/deferred-io: Clean up pageref on lastclose Thomas Zimmermann
2024-03-17 13:19   ` Javier Martinez Canillas
2024-03-12 15:44 ` [PATCH 04/43] fbdev/deferred-io: Test screen_buffer for vmalloc'ed memory Thomas Zimmermann
2024-03-17 13:20   ` Javier Martinez Canillas
2024-03-12 15:45 ` [PATCH 05/43] fbdev/deferred-io: Test smem_start for I/O memory Thomas Zimmermann
2024-03-18 17:03   ` Javier Martinez Canillas
2024-03-12 15:45 ` [PATCH 06/43] fbdev/deferred-io: Always call get_page() for framebuffer pages Thomas Zimmermann
2024-03-18 17:04   ` Javier Martinez Canillas
2024-03-12 15:45 ` [PATCH 07/43] fbdev/deferred-io: Provide get_page hook in struct fb_deferred_io Thomas Zimmermann
2024-03-18 17:11   ` Javier Martinez Canillas
2024-03-12 15:45 ` [PATCH 08/43] drm/fbdev: Add fbdev-shmem Thomas Zimmermann
2024-03-12 16:14   ` Geert Uytterhoeven
2024-03-13  8:19     ` Thomas Zimmermann
2024-03-13  9:03       ` Geert Uytterhoeven
2024-03-13  9:24         ` Thomas Zimmermann
2024-03-13  9:56           ` Geert Uytterhoeven
2024-03-12 15:45 ` [PATCH 09/43] drm/ast: Use fbdev-shmem Thomas Zimmermann
2024-03-13 14:03   ` Jocelyn Falempe
2024-03-12 15:45 ` [PATCH 10/43] drm/gud: " Thomas Zimmermann
2024-03-17 19:21   ` Noralf Trønnes
2024-03-12 15:45 ` [PATCH 11/43] drm/hyperv: " Thomas Zimmermann
2024-03-12 16:08   ` Deepak Rawat
2024-03-12 15:45 ` [PATCH 12/43] drm/mgag200: " Thomas Zimmermann
2024-03-13 14:03   ` Jocelyn Falempe
2024-03-18  7:56     ` Thomas Zimmermann
2024-03-18  9:23       ` Jocelyn Falempe
2024-03-12 15:45 ` [PATCH 13/43] drm/solomon: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 14/43] drm/tiny/cirrus: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 15/43] drm/tiny/gm12u320: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 16/43] drm/tiny/ofdrm: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 17/43] drm/tiny/simpledrm: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 18/43] drm/udl: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 19/43] drm/virtio: " Thomas Zimmermann
2024-03-28 14:55   ` Dmitry Osipenko
2024-03-12 15:45 ` [PATCH 20/43] drm/vkms: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 21/43] drm/fbdev-dma: Implement damage handling and deferred I/O Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 22/43] drm/arm/komeda: Use fbdev-dma Thomas Zimmermann
2024-03-13 10:53   ` Liviu Dudau
2024-03-12 15:45 ` [PATCH 23/43] drm/hisilicon/kirin: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 24/43] drm/imx/lcdc: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 25/43] drm/ingenic: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 26/43] drm/mediatek: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 27/43] drm/panel/panel-ilitek-9341: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 28/43] drm/renesas/rcar-du: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 29/43] drm/renesas/rz-du: " Thomas Zimmermann
2024-03-12 19:14   ` Biju Das
2024-03-13  8:30     ` Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 30/43] drm/renesas/shmobile: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 31/43] drm/rockchip: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 32/43] drm/tiny/hx8357d: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 33/43] drm/tiny/ili9163: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 34/43] drm/tiny/ili9225: " Thomas Zimmermann
2024-03-12 22:20   ` David Lechner
2024-03-12 15:45 ` [PATCH 35/43] drm/tiny/ili9341: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 36/43] drm/tiny/ili9486: " Thomas Zimmermann
2024-03-12 15:45 ` [PATCH 37/43] drm/tiny/mi0283qt: " Thomas Zimmermann
2024-03-17 19:21   ` Noralf Trønnes
2024-03-12 15:45 ` [PATCH 38/43] drm/tiny/panel-mipi-dbi: " Thomas Zimmermann
2024-03-17 19:22   ` Noralf Trønnes
2024-03-12 15:45 ` [PATCH 39/43] drm/tiny/repaper: " Thomas Zimmermann
2024-03-17 19:22   ` Noralf Trønnes
2024-03-12 15:45 ` [PATCH 40/43] drm/tiny/st7586: " Thomas Zimmermann
2024-03-12 22:21   ` David Lechner
2024-03-12 15:45 ` [PATCH 41/43] drm/tiny/st7735r: " Thomas Zimmermann
2024-03-12 22:21   ` David Lechner
2024-03-12 15:45 ` [PATCH 42/43] drm/fbdev-generic: Convert to fbdev-ttm Thomas Zimmermann
2024-03-12 15:45 ` Thomas Zimmermann [this message]

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=20240312154834.26178-44-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=corbet@lwn.net \
    --cc=daniel@ffwll.ch \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.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.