linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	daniel@ffwll.ch, airlied@gmail.com, deller@gmx.de,
	javierm@redhat.com
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 42/43] drm/fbdev-generic: Convert to fbdev-ttm
Date: Tue, 22 Oct 2024 14:31:25 +0100	[thread overview]
Message-ID: <1094c262-9d39-4a7b-bede-dc927cd1f52a@nvidia.com> (raw)
In-Reply-To: <20240312154834.26178-43-tzimmermann@suse.de>

Hi Thomas,

On 12/03/2024 15:45, Thomas Zimmermann wrote:
> Only TTM-based drivers use fbdev-generic. Rename it to fbdev-ttm and
> change the symbol infix from _generic_ to _ttm_. Link the source file
> into TTM helpers, so that it is only build if TTM-based drivers have
> been selected. Select DRM_TTM_HELPER for loongson.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>   Documentation/gpu/drm-kms-helpers.rst         |  2 +-
>   drivers/gpu/drm/Makefile                      |  5 +-
>   drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |  6 +-
>   .../{drm_fbdev_generic.c => drm_fbdev_ttm.c}  | 80 +++++++++----------
>   .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c   |  4 +-
>   drivers/gpu/drm/loongson/Kconfig              |  1 +
>   drivers/gpu/drm/loongson/lsdc_drv.c           |  4 +-
>   drivers/gpu/drm/nouveau/nouveau_drm.c         |  6 +-
>   drivers/gpu/drm/qxl/qxl_drv.c                 |  4 +-
>   drivers/gpu/drm/tiny/bochs.c                  |  4 +-
>   drivers/gpu/drm/vboxvideo/vbox_drv.c          |  4 +-
>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           |  4 +-
>   include/drm/drm_fbdev_generic.h               | 15 ----
>   include/drm/drm_fbdev_ttm.h                   | 15 ++++
>   14 files changed, 77 insertions(+), 77 deletions(-)
>   rename drivers/gpu/drm/{drm_fbdev_generic.c => drm_fbdev_ttm.c} (76%)
>   delete mode 100644 include/drm/drm_fbdev_generic.h
>   create mode 100644 include/drm/drm_fbdev_ttm.h

...

> diff --git a/include/drm/drm_fbdev_ttm.h b/include/drm/drm_fbdev_ttm.h
> new file mode 100644
> index 0000000000000..9e6c3bdf35376
> --- /dev/null
> +++ b/include/drm/drm_fbdev_ttm.h
> @@ -0,0 +1,15 @@
> +/* SPDX-License-Identifier: MIT */
> +
> +#ifndef DRM_FBDEV_TTM_H
> +#define DRM_FBDEV_TTM_H
> +
> +struct drm_device;
> +
> +#ifdef CONFIG_DRM_FBDEV_EMULATION
> +void drm_fbdev_ttm_setup(struct drm_device *dev, unsigned int preferred_bpp);
> +#else
> +static inline void drm_fbdev_ttm_setup(struct drm_device *dev, unsigned int preferred_bpp)
> +{ }
> +#endif
> +
> +#endif


I recently noticed that with Linux v6.11 it is possible to enable
CONFIG_DRM_FBDEV_EMULATION without enabling CONFIG_DRM_TTM_HELPER. Now
while this does not currently cause any build issues, I believe that if
the function drm_fbdev_ttm_setup() is ever used somewhere that does not
explicitly select CONFIG_DRM_TTM_HELPER, then you could get a 'ERROR:
modpost: "drm_fbdev_ttm_setup"'.

So I was thinking that may be this should be ...

diff --git a/include/drm/drm_fbdev_ttm.h b/include/drm/drm_fbdev_ttm.h
index 9e6c3bdf3537..5b6723a37caa 100644
--- a/include/drm/drm_fbdev_ttm.h
+++ b/include/drm/drm_fbdev_ttm.h
@@ -5,7 +5,7 @@
  
  struct drm_device;
  
-#ifdef CONFIG_DRM_FBDEV_EMULATION
+#if defined(CONFIG_DRM_FBDEV_EMULATION) && defined(CONFIG_DRM_TTM_HELPER)
  void drm_fbdev_ttm_setup(struct drm_device *dev, unsigned int preferred_bpp);
  #else
  static inline void drm_fbdev_ttm_setup(struct drm_device *dev, unsigned int preferred_bpp)


The above function has been removed now in -next, but I believe we could
have the same problem with drm_fbdev_ttm_helper_fb_probe()?

Cheers
Jon

-- 
nvpublic

  reply	other threads:[~2024-10-22 13:31 UTC|newest]

Thread overview: 84+ 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-10-22 13:31   ` Jon Hunter [this message]
2024-10-22 14:55     ` Thomas Zimmermann
2024-10-22 15:36       ` Jon Hunter
2024-10-23  6:43         ` Thomas Zimmermann
2024-10-23  8:44           ` Jon Hunter
2024-10-23  8:49             ` Jon Hunter
2024-03-12 15:45 ` [PATCH 43/43] drm/fbdev: Clean up fbdev documentation 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=1094c262-9d39-4a7b-bede-dc927cd1f52a@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=tzimmermann@suse.de \
    /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).