From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48020C3DA59 for ; Mon, 22 Jul 2024 11:21:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B88E110E4DC; Mon, 22 Jul 2024 11:21:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JSLhcW3q"; dkim-atps=neutral Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id B288610E4DC for ; Mon, 22 Jul 2024 11:21:00 +0000 (UTC) Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2eede876fbfso56557721fa.1 for ; Mon, 22 Jul 2024 04:21:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721647259; x=1722252059; darn=lists.freedesktop.org; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=W24yABKvqq5/qg6cCKyTRox0+zW+jV7VUViXuKLWtqg=; b=JSLhcW3qxJNzR4jBcjo7uiyo/ejKr0qQwBwwJqexRS6+5U47sbcUP2hNxSgH4WO/uO viS7BSSZGQ+unRNvtbF9OdTORz+sBc5+mpn5vfp7l5v9Ddeu9rs+vjH+PiUIAphaBJDD P8Om8zkTpsdb8nanBBJ2DDVgOq2qAMV7tMrjrQX0y1OriYAWOcaSUYVnsRV62Lftj436 KZi3yEAg4h9utOdEpqytmlR5NmYIZAOBGM6LCxZgWhXAyx+KMKsjsg7X14AjHGGI8bXP rhKyMwe9vI3F+q6PJ2p6aM9X4fD5UGwBY7/3+OO3OGBxGEj65X8NSqA50FpC3VbDrvK2 UNgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721647259; x=1722252059; h=in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=W24yABKvqq5/qg6cCKyTRox0+zW+jV7VUViXuKLWtqg=; b=iB2OWGr9GHr1IgnJXa4yjB55gO2btJFv9y0CamAnME9HrupF+bSlJ84GS7kZf+WrL5 dsjYrpL/drttG2+6etL02jAWxpiXhrh1EpaXrtn2ETlPLCs7qjFAGzi5ATXBRwpuRdeU zIqxwOjEKBevhrTttP4scxu74kGtSCWsSA4W1PqBNcp9d22zO5KkRyAgMk3qjqFJmG64 9VP9VZib8bIFM8s2zxaQ1SJ683CL1Y5s5EGfK6S7u/aeAtXKTx1Mz6okb+IeM7XPg3Gb anClxK42YkYViAU2XOIqPXuGVjY/3lW4Q+KpN6AUXilwIyAX0imXFWIjq1zkKB5VzBVG x5wQ== X-Forwarded-Encrypted: i=1; AJvYcCWA4I6/PtzUfeGa94dGkrGRnKvIc13DbJyOtHVLdtkSN2dLWmCnRYZUOe9dmowngLLrZTyXtAKcWf5W2zlRM5FvYh8KzaiDoH2LzEh8tA== X-Gm-Message-State: AOJu0Yyzv3cEVlUxuYumM6IIqjLb0cpwHYq2PF8TyofsUkFUpYZRiga6 97w8ypqUhZKGg7PlqBc/V3HRc8MiaPR6ZVeWxCdZPjuambJfpM08 X-Google-Smtp-Source: AGHT+IGxRwvvesHSQoqGS/+X1tbOjBuZVSlZak7FuTHr8xnrJMeiKEB/cYpGtG/We8Z0mBmtr5/X3g== X-Received: by 2002:a2e:83c6:0:b0:2ec:5fe1:c762 with SMTP id 38308e7fff4ca-2ef16864a11mr49071021fa.46.1721647258034; Mon, 22 Jul 2024 04:20:58 -0700 (PDT) Received: from [10.254.108.81] (munvpn.amd.com. [165.204.72.6]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3687868b7cesm8247471f8f.37.2024.07.22.04.20.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jul 2024 04:20:57 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------DwP7akRhqonRfmaXCDBJuLt0" Message-ID: <87d19441-ac19-4b79-a7d8-6980840f0f19@gmail.com> Date: Mon, 22 Jul 2024 13:20:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/amdgpu/mes: fix mes ring buffer overflow To: "Xiao, Jack" , "amd-gfx@lists.freedesktop.org" , "Deucher, Alexander" References: <20240719091615.1534436-1-Jack.Xiao@amd.com> <92f00b1c-79c2-431b-b8dc-70070a65b14a@gmail.com> Content-Language: en-US From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" This is a multi-part message in MIME format. --------------DwP7akRhqonRfmaXCDBJuLt0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit What I meant is that the MES ring is now to small for the number of packets written to it. Either reduce the num_hw_submission or increase the MES ring size. E.g. see this code here in amdgpu_ring_init:         if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)                 sched_hw_submission = max(sched_hw_submission, 256);         else if (ring == &adev->sdma.instance[0].page)                 sched_hw_submission = 256; We are basically just missing a case for the MES here as far as I can see. Regards, Christian. Am 22.07.24 um 10:46 schrieb Xiao, Jack: > > [AMD Official Use Only - AMD Internal Distribution Only] > > > />> Can you try to reduce num_hw_submission for the MES ring? > / > Smaller num_hw_submission should not help for this issue, for Mes work > without drm scheduler like legacy kiq. Smaller num_hw_submission will > result in smaller mes ring size and more waiting time. > > Regards, > Jack > ------------------------------------------------------------------------ > *From:* Christian König > *Sent:* Monday, 22 July 2024 16:20 > *To:* Xiao, Jack ; amd-gfx@lists.freedesktop.org > ; Deucher, Alexander > > *Subject:* Re: [PATCH] drm/amdgpu/mes: fix mes ring buffer overflow > Thx, but in that case this patch here then won't help either it just > mitigates the problem. > > Can you try to reduce num_hw_submission for the MES ring? > > Thanks, > Christian. > > Am 22.07.24 um 05:27 schrieb Xiao, Jack: >> >> [AMD Official Use Only - AMD Internal Distribution Only] >> >> >> />> I think we rather need to increase the MES ring size instead./ >> >> Unfortunately, it doesn't work. I guess mes firmware has limitation. >> >> Regards, >> Jack >> >> ------------------------------------------------------------------------ >> *From:* Christian König >> >> *Sent:* Friday, 19 July 2024 23:44 >> *To:* Xiao, Jack ; >> amd-gfx@lists.freedesktop.org >> >> ; Deucher, Alexander >> >> *Subject:* Re: [PATCH] drm/amdgpu/mes: fix mes ring buffer overflow >> Am 19.07.24 um 11:16 schrieb Jack Xiao: >> > wait memory room until enough before writing mes packets >> > to avoid ring buffer overflow. >> > >> > Signed-off-by: Jack Xiao >> > --- >> >   drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 18 ++++++++++++++---- >> >   drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 18 ++++++++++++++---- >> >   2 files changed, 28 insertions(+), 8 deletions(-) >> > >> > diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c >> b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c >> > index 8ce51b9236c1..68c74adf79f1 100644 >> > --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c >> > +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c >> > @@ -168,7 +168,7 @@ static int >> mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >        const char *op_str, *misc_op_str; >> >        unsigned long flags; >> >        u64 status_gpu_addr; >> > -     u32 status_offset; >> > +     u32 seq, status_offset; >> >        u64 *status_ptr; >> >        signed long r; >> >        int ret; >> > @@ -196,6 +196,13 @@ static int >> mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >        if (r) >> >                goto error_unlock_free; >> > >> > +     seq = ++ring->fence_drv.sync_seq; >> > +     r = amdgpu_fence_wait_polling(ring, >> > +                                   seq - >> ring->fence_drv.num_fences_mask, >> > +                                   timeout); >> > +     if (r < 1) >> > +             goto error_undo; >> > + >> >        api_status = (struct MES_API_STATUS *)((char *)pkt + >> api_status_off); >> > api_status->api_completion_fence_addr = status_gpu_addr; >> > api_status->api_completion_fence_value = 1; >> > @@ -208,8 +215,7 @@ static int >> mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >        mes_status_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS; >> > mes_status_pkt.api_status.api_completion_fence_addr = >> >                ring->fence_drv.gpu_addr; >> > - mes_status_pkt.api_status.api_completion_fence_value = >> > -             ++ring->fence_drv.sync_seq; >> > + mes_status_pkt.api_status.api_completion_fence_value = seq; >> > >> >        amdgpu_ring_write_multiple(ring, &mes_status_pkt, >> > sizeof(mes_status_pkt) / 4); >> > @@ -229,7 +235,7 @@ static int >> mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >                dev_dbg(adev->dev, "MES msg=%d was emitted\n", >> > x_pkt->header.opcode); >> > >> > -     r = amdgpu_fence_wait_polling(ring, ring->fence_drv.sync_seq, >> timeout); >> > +     r = amdgpu_fence_wait_polling(ring, seq, timeout); >> >        if (r < 1 || !*status_ptr) { >> > >> >                if (misc_op_str) >> > @@ -252,6 +258,10 @@ static int >> mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >        amdgpu_device_wb_free(adev, status_offset); >> >        return 0; >> > >> > +error_undo: >> > +     dev_err(adev->dev, "MES ring buffer is full.\n"); >> > +     amdgpu_ring_undo(ring); >> > + >> >   error_unlock_free: >> > spin_unlock_irqrestore(&mes->ring_lock, flags); >> > >> > diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c >> b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c >> > index c9f74231ad59..48e01206bcc4 100644 >> > --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c >> > +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c >> > @@ -154,7 +154,7 @@ static int >> mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >        const char *op_str, *misc_op_str; >> >        unsigned long flags; >> >        u64 status_gpu_addr; >> > -     u32 status_offset; >> > +     u32 seq, status_offset; >> >        u64 *status_ptr; >> >        signed long r; >> >        int ret; >> > @@ -182,6 +182,13 @@ static int >> mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >        if (r) >> >                goto error_unlock_free; >> > >> > +     seq = ++ring->fence_drv.sync_seq; >> > +     r = amdgpu_fence_wait_polling(ring, >> > +                                   seq - >> ring->fence_drv.num_fences_mask, >> >> That's what's amdgpu_fence_emit_polling() does anyway. >> >> So this here just moves the polling a bit earlier. >> >> I think we rather need to increase the MES ring size instead. >> >> Regards, >> Christian. >> >> >> > +                                   timeout); >> > +     if (r < 1) >> > +             goto error_undo; >> > + >> >        api_status = (struct MES_API_STATUS *)((char *)pkt + >> api_status_off); >> > api_status->api_completion_fence_addr = status_gpu_addr; >> > api_status->api_completion_fence_value = 1; >> > @@ -194,8 +201,7 @@ static int >> mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >        mes_status_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS; >> > mes_status_pkt.api_status.api_completion_fence_addr = >> >                ring->fence_drv.gpu_addr; >> > - mes_status_pkt.api_status.api_completion_fence_value = >> > -             ++ring->fence_drv.sync_seq; >> > + mes_status_pkt.api_status.api_completion_fence_value = seq; >> > >> >        amdgpu_ring_write_multiple(ring, &mes_status_pkt, >> > sizeof(mes_status_pkt) / 4); >> > @@ -215,7 +221,7 @@ static int >> mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >                dev_dbg(adev->dev, "MES msg=%d was emitted\n", >> > x_pkt->header.opcode); >> > >> > -     r = amdgpu_fence_wait_polling(ring, ring->fence_drv.sync_seq, >> timeout); >> > +     r = amdgpu_fence_wait_polling(ring, seq, timeout); >> >        if (r < 1 || !*status_ptr) { >> > >> >                if (misc_op_str) >> > @@ -238,6 +244,10 @@ static int >> mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes, >> >        amdgpu_device_wb_free(adev, status_offset); >> >        return 0; >> > >> > +error_undo: >> > +     dev_err(adev->dev, "MES ring buffer is full.\n"); >> > +     amdgpu_ring_undo(ring); >> > + >> >   error_unlock_free: >> > spin_unlock_irqrestore(&mes->ring_lock, flags); >> > >> > --------------DwP7akRhqonRfmaXCDBJuLt0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit What I meant is that the MES ring is now to small for the number of packets written to it.

Either reduce the num_hw_submission or increase the MES ring size.

E.g. see this code here in amdgpu_ring_init:

        if (ring->funcs->type == AMDGPU_RING_TYPE_KIQ)
                sched_hw_submission = max(sched_hw_submission, 256);
        else if (ring == &adev->sdma.instance[0].page)
                sched_hw_submission = 256;

We are basically just missing a case for the MES here as far as I can see.

Regards,
Christian.

Am 22.07.24 um 10:46 schrieb Xiao, Jack:

[AMD Official Use Only - AMD Internal Distribution Only]


>> Can you try to reduce num_hw_submission for the MES ring?

Smaller num_hw_submission should not help for this issue, for Mes work without drm scheduler like legacy kiq. Smaller num_hw_submission will result in smaller mes ring size and more waiting time.

Regards,
Jack

From: Christian König <ckoenig.leichtzumerken@gmail.com>
Sent: Monday, 22 July 2024 16:20
To: Xiao, Jack <Jack.Xiao@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu/mes: fix mes ring buffer overflow
 
Thx, but in that case this patch here then won't help either it just mitigates the problem.

Can you try to reduce num_hw_submission for the MES ring?

Thanks,
Christian.

Am 22.07.24 um 05:27 schrieb Xiao, Jack:

[AMD Official Use Only - AMD Internal Distribution Only]


>> I think we rather need to increase the MES ring size instead.

Unfortunately, it doesn't work. I guess mes firmware has limitation.

Regards,
Jack


From: Christian König <ckoenig.leichtzumerken@gmail.com>
Sent: Friday, 19 July 2024 23:44
To: Xiao, Jack <Jack.Xiao@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu/mes: fix mes ring buffer overflow
 
Am 19.07.24 um 11:16 schrieb Jack Xiao:
> wait memory room until enough before writing mes packets
> to avoid ring buffer overflow.
>
> Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 18 ++++++++++++++----
>   drivers/gpu/drm/amd/amdgpu/mes_v12_0.c | 18 ++++++++++++++----
>   2 files changed, 28 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> index 8ce51b9236c1..68c74adf79f1 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c
> @@ -168,7 +168,7 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>        const char *op_str, *misc_op_str;
>        unsigned long flags;
>        u64 status_gpu_addr;
> -     u32 status_offset;
> +     u32 seq, status_offset;
>        u64 *status_ptr;
>        signed long r;
>        int ret;
> @@ -196,6 +196,13 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>        if (r)
>                goto error_unlock_free;
>  
> +     seq = ++ring->fence_drv.sync_seq;
> +     r = amdgpu_fence_wait_polling(ring,
> +                                   seq - ring->fence_drv.num_fences_mask,
> +                                   timeout);
> +     if (r < 1)
> +             goto error_undo;
> +
>        api_status = (struct MES_API_STATUS *)((char *)pkt + api_status_off);
>        api_status->api_completion_fence_addr = status_gpu_addr;
>        api_status->api_completion_fence_value = 1;
> @@ -208,8 +215,7 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>        mes_status_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS;
>        mes_status_pkt.api_status.api_completion_fence_addr =
>                ring->fence_drv.gpu_addr;
> -     mes_status_pkt.api_status.api_completion_fence_value =
> -             ++ring->fence_drv.sync_seq;
> +     mes_status_pkt.api_status.api_completion_fence_value = seq;
>  
>        amdgpu_ring_write_multiple(ring, &mes_status_pkt,
>                                   sizeof(mes_status_pkt) / 4);
> @@ -229,7 +235,7 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>                dev_dbg(adev->dev, "MES msg=%d was emitted\n",
>                        x_pkt->header.opcode);
>  
> -     r = amdgpu_fence_wait_polling(ring, ring->fence_drv.sync_seq, timeout);
> +     r = amdgpu_fence_wait_polling(ring, seq, timeout);
>        if (r < 1 || !*status_ptr) {
>  
>                if (misc_op_str)
> @@ -252,6 +258,10 @@ static int mes_v11_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>        amdgpu_device_wb_free(adev, status_offset);
>        return 0;
>  
> +error_undo:
> +     dev_err(adev->dev, "MES ring buffer is full.\n");
> +     amdgpu_ring_undo(ring);
> +
>   error_unlock_free:
>        spin_unlock_irqrestore(&mes->ring_lock, flags);
>  
> diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> index c9f74231ad59..48e01206bcc4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/mes_v12_0.c
> @@ -154,7 +154,7 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>        const char *op_str, *misc_op_str;
>        unsigned long flags;
>        u64 status_gpu_addr;
> -     u32 status_offset;
> +     u32 seq, status_offset;
>        u64 *status_ptr;
>        signed long r;
>        int ret;
> @@ -182,6 +182,13 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>        if (r)
>                goto error_unlock_free;
>  
> +     seq = ++ring->fence_drv.sync_seq;
> +     r = amdgpu_fence_wait_polling(ring,
> +                                   seq - ring->fence_drv.num_fences_mask,

That's what's amdgpu_fence_emit_polling() does anyway.

So this here just moves the polling a bit earlier.

I think we rather need to increase the MES ring size instead.

Regards,
Christian.


> +                                   timeout);
> +     if (r < 1)
> +             goto error_undo;
> +
>        api_status = (struct MES_API_STATUS *)((char *)pkt + api_status_off);
>        api_status->api_completion_fence_addr = status_gpu_addr;
>        api_status->api_completion_fence_value = 1;
> @@ -194,8 +201,7 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>        mes_status_pkt.header.dwsize = API_FRAME_SIZE_IN_DWORDS;
>        mes_status_pkt.api_status.api_completion_fence_addr =
>                ring->fence_drv.gpu_addr;
> -     mes_status_pkt.api_status.api_completion_fence_value =
> -             ++ring->fence_drv.sync_seq;
> +     mes_status_pkt.api_status.api_completion_fence_value = seq;
>  
>        amdgpu_ring_write_multiple(ring, &mes_status_pkt,
>                                   sizeof(mes_status_pkt) / 4);
> @@ -215,7 +221,7 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>                dev_dbg(adev->dev, "MES msg=%d was emitted\n",
>                        x_pkt->header.opcode);
>  
> -     r = amdgpu_fence_wait_polling(ring, ring->fence_drv.sync_seq, timeout);
> +     r = amdgpu_fence_wait_polling(ring, seq, timeout);
>        if (r < 1 || !*status_ptr) {
>  
>                if (misc_op_str)
> @@ -238,6 +244,10 @@ static int mes_v12_0_submit_pkt_and_poll_completion(struct amdgpu_mes *mes,
>        amdgpu_device_wb_free(adev, status_offset);
>        return 0;
>  
> +error_undo:
> +     dev_err(adev->dev, "MES ring buffer is full.\n");
> +     amdgpu_ring_undo(ring);
> +
>   error_unlock_free:
>        spin_unlock_irqrestore(&mes->ring_lock, flags);
>  



--------------DwP7akRhqonRfmaXCDBJuLt0--