public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Jocelyn Falempe <jfalempe@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
	javierm@redhat.com, simona@ffwll.ch, airlied@gmail.com,
	mripard@kernel.org, maarten.lankhorst@linux.intel.com,
	gregkh@linuxfoundation.org, jirislaby@kernel.org
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org
Subject: Re: [PATCH 3/3] drm/client: log: Implement struct drm_client_funcs.restore
Date: Mon, 10 Nov 2025 15:05:16 +0100	[thread overview]
Message-ID: <0749be61-2f3d-440e-887a-c841007e5b50@redhat.com> (raw)
In-Reply-To: <20251107142612.467817-4-tzimmermann@suse.de>

On 07/11/2025 15:19, Thomas Zimmermann wrote:
> Restore the log client's output when the DRM core invokes the restore
> callback. Follow the existing behavior of fbdev emulation wrt. the
> value of the force parameter.
> 
> If force is false, acquire the DRM master lock and reprogram the
> display. This is the case when the user-space compositor exists and
> the DRM core transfers the display back to the in-kernel client. This
> also enables log output during reboots.
> 
> If force is true, reprogram without considering the master lock. This
> overrides the current compositor and prints the log to the screen. In
> case of system malfunction, users can enter SysRq+v to invoke the
> emergency error reporting. See Documentation/admin-guide/sysrq.rst for
> more information.

Thanks, it looks good to me.

Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>

> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>   drivers/gpu/drm/clients/drm_log.c | 13 +++++++++++++
>   1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/clients/drm_log.c b/drivers/gpu/drm/clients/drm_log.c
> index 19e55aa0ed74..4d3005273b27 100644
> --- a/drivers/gpu/drm/clients/drm_log.c
> +++ b/drivers/gpu/drm/clients/drm_log.c
> @@ -315,6 +315,18 @@ static void drm_log_client_unregister(struct drm_client_dev *client)
>   	drm_client_release(client);
>   }
>   
> +static int drm_log_client_restore(struct drm_client_dev *client, bool force)
> +{
> +	int ret;
> +
> +	if (force)
> +		ret = drm_client_modeset_commit_locked(client);
> +	else
> +		ret = drm_client_modeset_commit(client);
> +
> +	return ret;
> +}
> +
>   static int drm_log_client_hotplug(struct drm_client_dev *client)
>   {
>   	struct drm_log *dlog = client_to_drm_log(client);
> @@ -348,6 +360,7 @@ static const struct drm_client_funcs drm_log_client_funcs = {
>   	.owner		= THIS_MODULE,
>   	.free		= drm_log_client_free,
>   	.unregister	= drm_log_client_unregister,
> +	.restore	= drm_log_client_restore,
>   	.hotplug	= drm_log_client_hotplug,
>   	.suspend	= drm_log_client_suspend,
>   	.resume		= drm_log_client_resume,


      reply	other threads:[~2025-11-10 14:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-07 14:19 [PATCH 0/3] drm/client: Wire up sysrq for all clients and update drm_log Thomas Zimmermann
2025-11-07 14:19 ` [PATCH 1/3] drm/client: Pass force parameter to client restore Thomas Zimmermann
2025-11-10 14:02   ` Jocelyn Falempe
2025-11-07 14:19 ` [PATCH 2/3] drm/client: Support emergency restore via sysrq for all clients Thomas Zimmermann
2025-11-10 11:29   ` kernel test robot
2025-11-10 12:12   ` kernel test robot
2025-11-10 13:47   ` kernel test robot
2025-11-07 14:19 ` [PATCH 3/3] drm/client: log: Implement struct drm_client_funcs.restore Thomas Zimmermann
2025-11-10 14:05   ` Jocelyn Falempe [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=0749be61-2f3d-440e-887a-c841007e5b50@redhat.com \
    --to=jfalempe@redhat.com \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=javierm@redhat.com \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=simona@ffwll.ch \
    --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