AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Thomas Zimmermann <tzimmermann@suse.de>
Cc: alexander.deucher@amd.com, christian.koenig@amd.com,
	Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	kherbst@redhat.com, lyude@redhat.com, dakr@redhat.com,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	nouveau@lists.freedesktop.org
Subject: Re: [PATCH v2 6/9] drm/fbdev-helper: Update documentation on obsolete callbacks
Date: Mon, 12 Aug 2024 11:25:31 +0200	[thread overview]
Message-ID: <ZrnVCzdTsNQz4KQi@phenom.ffwll.local> (raw)
In-Reply-To: <20240812083000.337744-7-tzimmermann@suse.de>

On Mon, Aug 12, 2024 at 10:28:27AM +0200, Thomas Zimmermann wrote:
> The old callbacks lastclose and output_poll_changed are deprecated and
> unused. Remove them from the documentation.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 22 +++++++---------------
>  1 file changed, 7 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 3f7da78849e4..fe5667477839 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -89,14 +89,6 @@ static DEFINE_MUTEX(kernel_fb_helper_lock);
>   * 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.
> - * They should also notify the fb helper code from updates to the output
> - * configuration by using drm_fb_helper_output_poll_changed() as their
> - * &drm_mode_config_funcs.output_poll_changed callback. New implementations
> - * of fbdev should be build on top of struct &drm_client_funcs, which handles
> - * this automatically. Setting the old callbacks should be avoided.
> - *
>   * For suspend/resume consider using drm_mode_config_helper_suspend() and
>   * drm_mode_config_helper_resume() which takes care of fbdev as well.
>   *
> @@ -260,12 +252,12 @@ __drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper,
>   * drm_fb_helper_restore_fbdev_mode_unlocked - restore fbdev configuration
>   * @fb_helper: driver-allocated fbdev helper, can be NULL
>   *
> - * This should be called from driver's drm &drm_driver.lastclose callback
> - * when implementing an fbcon on top of kms using this helper. This ensures that
> - * the user isn't greeted with a black screen when e.g. X dies.
> + * This helper should be called from fbdev emulation's &drm_client_funcs.restore
> + * callback. It ensures that the user isn't greeted with a black screen when the
> + * userspace compositor releases the display device.
>   *
> - * RETURNS:
> - * Zero if everything went ok, negative error code otherwise.
> + * Returns:
> + * 0 on success, or a negative errno code otherwise.
>   */
>  int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
>  {
> @@ -2003,8 +1995,8 @@ EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
>   * drm_fb_helper_lastclose - DRM driver lastclose helper for fbdev emulation
>   * @dev: DRM device
>   *
> - * This function can be used as the &drm_driver->lastclose callback for drivers
> - * that only need to call drm_fb_helper_restore_fbdev_mode_unlocked().
> + * This function is obsolete. Call drm_fb_helper_restore_fbdev_mode_unlocked()
> + * instead.
>   */
>  void drm_fb_helper_lastclose(struct drm_device *dev)
>  {
> -- 
> 2.46.0
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  reply	other threads:[~2024-08-12  9:25 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-12  8:28 [PATCH v2 0/9] drm/{amdgpu,nouveau}: Remove old fbdev hooks Thomas Zimmermann
2024-08-12  8:28 ` [PATCH v2 1/9] drm: Do delayed switcheroo in drm_lastclose() Thomas Zimmermann
2024-08-12  9:23   ` Daniel Vetter
2024-08-12 10:18     ` Daniel Vetter
2024-08-12 10:41       ` Thomas Zimmermann
2024-08-12 14:40         ` Daniel Vetter
2024-08-12 18:47           ` Alex Deucher
2024-08-12 19:05   ` Alex Deucher
     [not found]   ` <CABwHSOsWh_Mbf9dkNqznwZwJbKZqndb79OGCA1xFqc1xzMFXCw@mail.gmail.com>
2024-08-20 20:56     ` Getting off this list Lyude Paul
2024-08-12  8:28 ` [PATCH v2 2/9] drm/amdgpu: Do not set struct drm_driver.lastclose Thomas Zimmermann
2024-08-12  9:24   ` Daniel Vetter
2024-08-12 19:05   ` Alex Deucher
2024-08-12 19:07     ` Alex Deucher
2024-08-12  8:28 ` [PATCH v2 3/9] drm/nouveau: " Thomas Zimmermann
2024-08-12  9:24   ` Daniel Vetter
2024-08-12 12:02   ` Danilo Krummrich
2024-08-12  8:28 ` [PATCH v2 4/9] drm/nouveau: Do not set struct drm_mode_config_funcs.output_poll_changed Thomas Zimmermann
2024-08-12 12:11   ` Danilo Krummrich
2024-08-12  8:28 ` [PATCH v2 5/9] drm/nouveau: Implement switcheroo reprobe with drm_client_dev_hotplug() Thomas Zimmermann
2024-08-12 12:17   ` Danilo Krummrich
2024-08-12 12:34     ` Thomas Zimmermann
2024-08-12 18:55       ` Danilo Krummrich
2024-08-12  8:28 ` [PATCH v2 6/9] drm/fbdev-helper: Update documentation on obsolete callbacks Thomas Zimmermann
2024-08-12  9:25   ` Daniel Vetter [this message]
2024-08-12  8:28 ` [PATCH v2 7/9] drm/fbdev-helper: Remove drm_fb_helper_output_poll_changed() Thomas Zimmermann
2024-08-12  9:25   ` Daniel Vetter
2024-08-12  8:28 ` [PATCH v2 8/9] drm: Remove struct drm_driver.lastclose Thomas Zimmermann
2024-08-12  8:28 ` [PATCH v2 9/9] drm: Remove struct drm_mode_config_funcs.output_poll_changed 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=ZrnVCzdTsNQz4KQi@phenom.ffwll.local \
    --to=daniel.vetter@ffwll.ch \
    --cc=Xinhui.Pan@amd.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dakr@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kherbst@redhat.com \
    --cc=lyude@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.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