mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Shixiong Ou <oushixiong1025@163.com>, Dave Airlie <airlied@redhat.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Shixiong Ou <oushixiong@kylinos.cn>
Subject: Re: [PATCH v3] drm/udl: Increase GET_URB_TIMEOUT
Date: Fri, 24 Apr 2026 15:13:48 +0200	[thread overview]
Message-ID: <5839b215-022a-4aa1-b99c-1de04cc7a684@suse.de> (raw)
In-Reply-To: <20260424124427.657-1-oushixiong1025@163.com>



Am 24.04.26 um 14:44 schrieb Shixiong Ou:
> From: Shixiong Ou <oushixiong@kylinos.cn>
>
> [WHY]
> A situation has occurred where udl_handle_damage() executed successfully
> and the kernel log appears normal, but the display fails to show any output.
> This is because the call to udl_get_urb() in udl_crtc_helper_atomic_enable()
> failed without generating any error message.
>
> [HOW]
> 1. Increase timeout of getting urb.
> 2. Add error messages when calling udl_get_urb() failed in
> udl_crtc_helper_atomic_enable().
>
> Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>

Thanks

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

Fixes: 5320918b9a87 ("drm/udl: initial UDL driver (v4)")
Cc: <stable@vger.kernel.org> # v3.4+


> ---
> v3: Remove GET_URB_TIMEOUT macro and pass 2 * HZ directly.
>
>   drivers/gpu/drm/udl/udl_main.c    | 3 +--
>   drivers/gpu/drm/udl/udl_modeset.c | 5 ++++-
>   2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c
> index bc58991a6f14..b4c23dbcf3e3 100644
> --- a/drivers/gpu/drm/udl/udl_main.c
> +++ b/drivers/gpu/drm/udl/udl_main.c
> @@ -285,13 +285,12 @@ static struct urb *udl_get_urb_locked(struct udl_device *udl, long timeout)
>   	return unode->urb;
>   }
>   
> -#define GET_URB_TIMEOUT	HZ
>   struct urb *udl_get_urb(struct udl_device *udl)
>   {
>   	struct urb *urb;
>   
>   	spin_lock_irq(&udl->urbs.lock);
> -	urb = udl_get_urb_locked(udl, GET_URB_TIMEOUT);
> +	urb = udl_get_urb_locked(udl, HZ * 2);
>   	spin_unlock_irq(&udl->urbs.lock);
>   	return urb;
>   }
> diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
> index 231e829bd709..1ca073a4ecb2 100644
> --- a/drivers/gpu/drm/udl/udl_modeset.c
> +++ b/drivers/gpu/drm/udl/udl_modeset.c
> @@ -21,6 +21,7 @@
>   #include <drm/drm_gem_framebuffer_helper.h>
>   #include <drm/drm_gem_shmem_helper.h>
>   #include <drm/drm_modeset_helper_vtables.h>
> +#include <drm/drm_print.h>
>   #include <drm/drm_probe_helper.h>
>   #include <drm/drm_vblank.h>
>   
> @@ -342,8 +343,10 @@ static void udl_crtc_helper_atomic_enable(struct drm_crtc *crtc, struct drm_atom
>   		return;
>   
>   	urb = udl_get_urb(udl);
> -	if (!urb)
> +	if (!urb) {
> +		drm_err_ratelimited(dev, "get urb failed when enabling crtc\n");
>   		goto out;
> +	}
>   
>   	buf = (char *)urb->transfer_buffer;
>   	buf = udl_vidreg_lock(buf);

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstr. 146, 90461 Nürnberg, Germany, www.suse.com
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich, (HRB 36809, AG Nürnberg)



      reply	other threads:[~2026-04-24 13:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-24 12:44 Shixiong Ou
2026-04-24 13:13 ` 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=5839b215-022a-4aa1-b99c-1de04cc7a684@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@gmail.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=oushixiong1025@163.com \
    --cc=oushixiong@kylinos.cn \
    --cc=simona@ffwll.ch \
    /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

all inboxes | Powered by JetHome®