[PATCH V7 03/10] accel/amdxdna: Support hardware mailbox
Mike Lothian
mike at fireburn.co.uk
Fri Dec 6 16:41:22 UTC 2024
On Fri, 6 Dec 2024 at 16:26, Jeffrey Hugo <quic_jhugo at quicinc.com> wrote:
>
> On 12/5/2024 8:44 AM, Mike Lothian wrote:
> > Hi
> >
> > I needed to add the following to get things compiling for me
> >
> >
> > diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c
> > b/drivers/accel/amdxdna/amdxdna_mailbox.c
> > index fe684f463b945..79b9801935e71 100644
> > --- a/drivers/accel/amdxdna/amdxdna_mailbox.c
> > +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
> > @@ -6,6 +6,7 @@
> > #include <drm/drm_device.h>
> > #include <drm/drm_managed.h>
> > #include <linux/bitfield.h>
> > +#include <linux/interrupt.h>
> > #include <linux/iopoll.h>
>
> Looking at the code, this is valid. However, I'm not sure why this is
> broken for you and not others. Do you have any ideas? How are you
> building this? Is the tree and/or defconfig unique in some way?
>
> > #define CREATE_TRACE_POINTS
> >
> >
> > I also had to rename the firmware in /lib/firmware/amdnpu/1502_00/
> > from npu.sbin.1.5.2.380 to npu.sbin
> >
> > Cheers
> >
> > Mike
> >
>
I'm building with clang 19.1.5, this is on linus's tree 6.13-rc1
I've applied AMD-XDNA-driver and AMD-NPU-driver-improvements series
These are the errors I see without the above patch:
drivers/accel/amdxdna/amdxdna_mailbox.c:342:8: error: unknown type
name 'irqreturn_t'
342 | static irqreturn_t mailbox_irq_handler(int irq, void *p)
| ^
drivers/accel/amdxdna/amdxdna_mailbox.c:352:9: error: use of
undeclared identifier 'IRQ_HANDLED'
352 | return IRQ_HANDLED;
| ^
drivers/accel/amdxdna/amdxdna_mailbox.c:380:4: error: call to
undeclared function 'disable_irq'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration]
380 | disable_irq(mb_chann->msix_irq);
| ^
drivers/accel/amdxdna/amdxdna_mailbox.c:497:8: error: call to
undeclared function 'request_irq'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration]
497 | ret = request_irq(mb_irq, mailbox_irq_handler, 0,
MAILBOX_NAME, mb_chann);
| ^
drivers/accel/amdxdna/amdxdna_mailbox.c:521:2: error: call to
undeclared function 'free_irq'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration]
521 | free_irq(mb_chann->msix_irq, mb_chann);
| ^
drivers/accel/amdxdna/amdxdna_mailbox.c:538:2: error: call to
undeclared function 'disable_irq'; ISO C99 and later do not support
implicit function declarations [-Wimplicit-function-declaration]
538 | disable_irq(mb_chann->msix_irq);
| ^
6 errors generated.
With the patch applied I then got firmware issues so I had to rename
the newly upstreamed firmware, I'm not sure of the code needs to load
the versioned file or if the file needs renamed in linux-firmware
I'm attaching my .config
Cheers
Mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dotconfig.tar.xz
Type: application/x-xz
Size: 27212 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20241206/667502f0/attachment-0001.xz>
More information about the dri-devel
mailing list