Re: [PATCH] drm/amdgpu : Increase the mes log buffer size as per new MES FW version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 25, 2024 at 7:52 PM Liu, Shaoyun <Shaoyun.Liu@xxxxxxx> wrote:
>
> [AMD Official Use Only - General]
>
> It can  cause page fault  when the  log size exceed the  page size .

I think we should make sure this patch goes back to stable for all
kernel versions where the logging is enabled.

Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>

Alex


>
> -----Original Message-----
> From: Kuehling, Felix <Felix.Kuehling@xxxxxxx>
> Sent: Monday, March 25, 2024 2:58 PM
> To: Liu, Shaoyun <Shaoyun.Liu@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH] drm/amdgpu : Increase the mes log buffer size as per new MES FW version
>
>
> On 2024-03-22 12:49, shaoyunl wrote:
> >  From MES version 0x54, the log entry increased and require the log
> > buffer size to be increased. The 16k is maximum size agreed
>
> What happens when you run the new firmware on an old kernel that only allocates 4KB?
>
> Regards,
>    Felix
>
>
> >
> > Signed-off-by: shaoyunl <shaoyun.liu@xxxxxxx>
> > ---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c | 5 ++---
> >   drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h | 1 +
> >   2 files changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
> > index 9ace848e174c..78e4f88f5134 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c
> > @@ -103,7 +103,7 @@ static int amdgpu_mes_event_log_init(struct amdgpu_device *adev)
> >       if (!amdgpu_mes_log_enable)
> >               return 0;
> >
> > -     r = amdgpu_bo_create_kernel(adev, PAGE_SIZE, PAGE_SIZE,
> > +     r = amdgpu_bo_create_kernel(adev, AMDGPU_MES_LOG_BUFFER_SIZE,
> > +PAGE_SIZE,
> >                                   AMDGPU_GEM_DOMAIN_GTT,
> >                                   &adev->mes.event_log_gpu_obj,
> >                                   &adev->mes.event_log_gpu_addr, @@ -1548,12 +1548,11 @@
> > static int amdgpu_debugfs_mes_event_log_show(struct seq_file *m, void *unused)
> >       uint32_t *mem = (uint32_t *)(adev->mes.event_log_cpu_addr);
> >
> >       seq_hex_dump(m, "", DUMP_PREFIX_OFFSET, 32, 4,
> > -                  mem, PAGE_SIZE, false);
> > +                  mem, AMDGPU_MES_LOG_BUFFER_SIZE, false);
> >
> >       return 0;
> >   }
> >
> > -
> >   DEFINE_SHOW_ATTRIBUTE(amdgpu_debugfs_mes_event_log);
> >
> >   #endif
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
> > index 7d4f93fea937..4c8fc3117ef8 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mes.h
> > @@ -52,6 +52,7 @@ enum amdgpu_mes_priority_level {
> >
> >   #define AMDGPU_MES_PROC_CTX_SIZE 0x1000 /* one page area */
> >   #define AMDGPU_MES_GANG_CTX_SIZE 0x1000 /* one page area */
> > +#define AMDGPU_MES_LOG_BUFFER_SIZE 0x4000 /* Maximu log buffer size
> > +for MES */
> >
> >   struct amdgpu_mes_funcs;
> >




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux