mbox series

[v5,0/8] QAIC accel driver

Message ID 1679932497-30277-1-git-send-email-quic_jhugo@quicinc.com (mailing list archive)
Headers show
Series QAIC accel driver | expand

Message

Jeffrey Hugo March 27, 2023, 3:54 p.m. UTC
This series introduces a driver under the accel subsystem (QAIC -
Qualcomm AIC) for the Qualcomm Cloud AI 100 product (AIC100).  AIC100 is
a PCIe adapter card that hosts a dedicated machine learning inference
accelerator.

The previous version (v4) can be found at:
https://lore.kernel.org/all/1679325074-5494-1-git-send-email-quic_jhugo@quicinc.com/

v5:
-Drop version.h in mhi_qaic_cntl
-Remove DRM_RENDER_ALLOW on ioctls
-Use div_u64 in qaic_data for 32-bit architectures
-Documentation formatting changes
-cntl->cntrl for mhi controller instances
-char->u8 in mhi_controller

v4:
-Whitespace fixes
-Add MODULE_PARM_DESC for the module parameters
-Refactor qaic_open error handling
-Shorten mhi boot error message
-Remove extranious reset check
-Remove _ prefix in qaic_control structs
-Refactor encode_dma()
-Refactor __qaic_execute_bo_ioctl
-Remove extraniuous open_count checks
-List drm-misc tree in MAINTAINERS

v3:
-Various style updates and word smithing
-Remove unused function declarations
-Drop iommu workaround for sg lists and outdated reserve_pages()
-Remove unnecessary includes
-Refactor qaic_pci_probe()
-Use FIELD_PREP for ENCODE_SEM
-Gate qaic subdirectory on the kconfig symbol
-Add dri-devel@lists.freedesktop.org to MAINTAINERS entry
-Rename copy_sgt()
-Correct guard macro for qaic.h and cplusplus macro
-Add comment in qaic_mhi_remove
-Fix qaic_open use after free
-Use devm allocs in qaic_mhi_register_controller()
-Remove partition device ioctl.

v2:
-Addressed comments from RFC
-Reduced the code to the core minimum by dropping telemetery, etc
-Conversion to accel subsystem
-Dropped versioning
-Add mhi_qaic_cntl component
-Restructure the documentation
-Pull in a few fixes from the downstream tree

Jeffrey Hugo (7):
  accel/qaic: Add documentation for AIC100 accelerator driver
  accel/qaic: Add uapi and core driver file
  accel/qaic: Add MHI controller
  accel/qaic: Add control path
  accel/qaic: Add datapath
  accel/qaic: Add qaic driver to the build system
  MAINTAINERS: Add entry for QAIC driver

Pranjal Ramajor Asha Kanojiya (1):
  accel/qaic: Add mhi_qaic_cntl

 Documentation/accel/index.rst       |    1 +
 Documentation/accel/qaic/aic100.rst |  510 ++++++++++
 Documentation/accel/qaic/index.rst  |   13 +
 Documentation/accel/qaic/qaic.rst   |  170 ++++
 MAINTAINERS                         |   10 +
 drivers/accel/Kconfig               |    1 +
 drivers/accel/Makefile              |    1 +
 drivers/accel/qaic/Kconfig          |   23 +
 drivers/accel/qaic/Makefile         |   13 +
 drivers/accel/qaic/mhi_controller.c |  563 +++++++++++
 drivers/accel/qaic/mhi_controller.h |   16 +
 drivers/accel/qaic/mhi_qaic_ctrl.c  |  570 +++++++++++
 drivers/accel/qaic/mhi_qaic_ctrl.h  |   12 +
 drivers/accel/qaic/qaic.h           |  282 ++++++
 drivers/accel/qaic/qaic_control.c   | 1527 ++++++++++++++++++++++++++++
 drivers/accel/qaic/qaic_data.c      | 1903 +++++++++++++++++++++++++++++++++++
 drivers/accel/qaic/qaic_drv.c       |  647 ++++++++++++
 include/uapi/drm/qaic_accel.h       |  397 ++++++++
 18 files changed, 6659 insertions(+)
 create mode 100644 Documentation/accel/qaic/aic100.rst
 create mode 100644 Documentation/accel/qaic/index.rst
 create mode 100644 Documentation/accel/qaic/qaic.rst
 create mode 100644 drivers/accel/qaic/Kconfig
 create mode 100644 drivers/accel/qaic/Makefile
 create mode 100644 drivers/accel/qaic/mhi_controller.c
 create mode 100644 drivers/accel/qaic/mhi_controller.h
 create mode 100644 drivers/accel/qaic/mhi_qaic_ctrl.c
 create mode 100644 drivers/accel/qaic/mhi_qaic_ctrl.h
 create mode 100644 drivers/accel/qaic/qaic.h
 create mode 100644 drivers/accel/qaic/qaic_control.c
 create mode 100644 drivers/accel/qaic/qaic_data.c
 create mode 100644 drivers/accel/qaic/qaic_drv.c
 create mode 100644 include/uapi/drm/qaic_accel.h

Comments

Jeffrey Hugo April 3, 2023, 5:22 p.m. UTC | #1
On 3/27/2023 9:54 AM, Jeffrey Hugo wrote:
> This series introduces a driver under the accel subsystem (QAIC -
> Qualcomm AIC) for the Qualcomm Cloud AI 100 product (AIC100).  AIC100 is
> a PCIe adapter card that hosts a dedicated machine learning inference
> accelerator.
> 
> The previous version (v4) can be found at:
> https://lore.kernel.org/all/1679325074-5494-1-git-send-email-quic_jhugo@quicinc.com/

Looks like things have been silent on this revision and we have a number 
of review tags already.  Seems like this series is ready for merge.

I'd like to see this queued for 6.4 if possible.  Given that we are at 
6.3-rc5, it seems like this would need to be merged now(ish) to make 6.4.

Jacek, since you have commit permissions in drm-misc and are an active 
Accel maintainer, I wonder if it would be appropriate for you to merge 
this series to drm-misc.  Thoughts?

-Jeff
Jacek Lawrynowicz April 5, 2023, 11:26 a.m. UTC | #2
Hi,

On 03.04.2023 19:22, Jeffrey Hugo wrote:
> On 3/27/2023 9:54 AM, Jeffrey Hugo wrote:
>> This series introduces a driver under the accel subsystem (QAIC -
>> Qualcomm AIC) for the Qualcomm Cloud AI 100 product (AIC100).  AIC100 is
>> a PCIe adapter card that hosts a dedicated machine learning inference
>> accelerator.
>>
>> The previous version (v4) can be found at:
>> https://lore.kernel.org/all/1679325074-5494-1-git-send-email-quic_jhugo@quicinc.com/
> 
> Looks like things have been silent on this revision and we have a number of review tags already.  Seems like this series is ready for merge.
> 
> I'd like to see this queued for 6.4 if possible.  Given that we are at 6.3-rc5, it seems like this would need to be merged now(ish) to make 6.4.
> 
> Jacek, since you have commit permissions in drm-misc and are an active Accel maintainer, I wonder if it would be appropriate for you to merge this series to drm-misc.  Thoughts?

I'm would be happy to merge it but I think it needs to be acked by Oded first.

Regards,
Jacek
Oded Gabbay April 5, 2023, 12:35 p.m. UTC | #3
On Wed, Apr 5, 2023 at 2:26 PM Jacek Lawrynowicz
<jacek.lawrynowicz@linux.intel.com> wrote:
>
> Hi,
>
> On 03.04.2023 19:22, Jeffrey Hugo wrote:
> > On 3/27/2023 9:54 AM, Jeffrey Hugo wrote:
> >> This series introduces a driver under the accel subsystem (QAIC -
> >> Qualcomm AIC) for the Qualcomm Cloud AI 100 product (AIC100).  AIC100 is
> >> a PCIe adapter card that hosts a dedicated machine learning inference
> >> accelerator.
> >>
> >> The previous version (v4) can be found at:
> >> https://lore.kernel.org/all/1679325074-5494-1-git-send-email-quic_jhugo@quicinc.com/
> >
> > Looks like things have been silent on this revision and we have a number of review tags already.  Seems like this series is ready for merge.
> >
> > I'd like to see this queued for 6.4 if possible.  Given that we are at 6.3-rc5, it seems like this would need to be merged now(ish) to make 6.4.
> >
> > Jacek, since you have commit permissions in drm-misc and are an active Accel maintainer, I wonder if it would be appropriate for you to merge this series to drm-misc.  Thoughts?
>
> I'm would be happy to merge it but I think it needs to be acked by Oded first.
>
> Regards,
> Jacek

Hi,
Entire patch-set is:
Acked-by: Oded Gabbay <ogabbay@kernel.org>

Thanks,
Oded
Daniel Vetter April 5, 2023, 1:27 p.m. UTC | #4
On Wed, Apr 05, 2023 at 03:35:19PM +0300, Oded Gabbay wrote:
> On Wed, Apr 5, 2023 at 2:26 PM Jacek Lawrynowicz
> <jacek.lawrynowicz@linux.intel.com> wrote:
> >
> > Hi,
> >
> > On 03.04.2023 19:22, Jeffrey Hugo wrote:
> > > On 3/27/2023 9:54 AM, Jeffrey Hugo wrote:
> > >> This series introduces a driver under the accel subsystem (QAIC -
> > >> Qualcomm AIC) for the Qualcomm Cloud AI 100 product (AIC100).  AIC100 is
> > >> a PCIe adapter card that hosts a dedicated machine learning inference
> > >> accelerator.
> > >>
> > >> The previous version (v4) can be found at:
> > >> https://lore.kernel.org/all/1679325074-5494-1-git-send-email-quic_jhugo@quicinc.com/
> > >
> > > Looks like things have been silent on this revision and we have a number of review tags already.  Seems like this series is ready for merge.
> > >
> > > I'd like to see this queued for 6.4 if possible.  Given that we are at 6.3-rc5, it seems like this would need to be merged now(ish) to make 6.4.
> > >
> > > Jacek, since you have commit permissions in drm-misc and are an active Accel maintainer, I wonder if it would be appropriate for you to merge this series to drm-misc.  Thoughts?
> >
> > I'm would be happy to merge it but I think it needs to be acked by Oded first.
> >
> > Regards,
> > Jacek
> 
> Hi,
> Entire patch-set is:
> Acked-by: Oded Gabbay <ogabbay@kernel.org>

Once Jacke has pushed this I htink it would also be good to get Jeffrey
commit rights for drm-misc, so that in the future bugfixes for the qaic
driver can be pushed directly by the qaic team. Still with acks/r-b
requirements as per usual, and I guess for anything bigger/new uapi an ack
from oded is needed.

https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc

Cheers, Daniel
Jeffrey Hugo April 5, 2023, 2:28 p.m. UTC | #5
On 4/5/2023 7:27 AM, Daniel Vetter wrote:
> On Wed, Apr 05, 2023 at 03:35:19PM +0300, Oded Gabbay wrote:
>> On Wed, Apr 5, 2023 at 2:26 PM Jacek Lawrynowicz
>> <jacek.lawrynowicz@linux.intel.com> wrote:
>>>
>>> Hi,
>>>
>>> On 03.04.2023 19:22, Jeffrey Hugo wrote:
>>>> On 3/27/2023 9:54 AM, Jeffrey Hugo wrote:
>>>>> This series introduces a driver under the accel subsystem (QAIC -
>>>>> Qualcomm AIC) for the Qualcomm Cloud AI 100 product (AIC100).  AIC100 is
>>>>> a PCIe adapter card that hosts a dedicated machine learning inference
>>>>> accelerator.
>>>>>
>>>>> The previous version (v4) can be found at:
>>>>> https://lore.kernel.org/all/1679325074-5494-1-git-send-email-quic_jhugo@quicinc.com/
>>>>
>>>> Looks like things have been silent on this revision and we have a number of review tags already.  Seems like this series is ready for merge.
>>>>
>>>> I'd like to see this queued for 6.4 if possible.  Given that we are at 6.3-rc5, it seems like this would need to be merged now(ish) to make 6.4.
>>>>
>>>> Jacek, since you have commit permissions in drm-misc and are an active Accel maintainer, I wonder if it would be appropriate for you to merge this series to drm-misc.  Thoughts?
>>>
>>> I'm would be happy to merge it but I think it needs to be acked by Oded first.
>>>
>>> Regards,
>>> Jacek
>>
>> Hi,
>> Entire patch-set is:
>> Acked-by: Oded Gabbay <ogabbay@kernel.org>
> 
> Once Jacke has pushed this I htink it would also be good to get Jeffrey
> commit rights for drm-misc, so that in the future bugfixes for the qaic
> driver can be pushed directly by the qaic team. Still with acks/r-b
> requirements as per usual, and I guess for anything bigger/new uapi an ack
> from oded is needed.
> 
> https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc
> 
> Cheers, Daniel

Yep.  This is the plan per my understanding.

-Jeff
Jacek Lawrynowicz April 6, 2023, 6:34 a.m. UTC | #6
I've merged the patchset to drm-misc-next.
Congrats Jeffrey :)

On 05.04.2023 16:28, Jeffrey Hugo wrote:
> On 4/5/2023 7:27 AM, Daniel Vetter wrote:
>> On Wed, Apr 05, 2023 at 03:35:19PM +0300, Oded Gabbay wrote:
>>> On Wed, Apr 5, 2023 at 2:26 PM Jacek Lawrynowicz
>>> <jacek.lawrynowicz@linux.intel.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> On 03.04.2023 19:22, Jeffrey Hugo wrote:
>>>>> On 3/27/2023 9:54 AM, Jeffrey Hugo wrote:
>>>>>> This series introduces a driver under the accel subsystem (QAIC -
>>>>>> Qualcomm AIC) for the Qualcomm Cloud AI 100 product (AIC100).  AIC100 is
>>>>>> a PCIe adapter card that hosts a dedicated machine learning inference
>>>>>> accelerator.
>>>>>>
>>>>>> The previous version (v4) can be found at:
>>>>>> https://lore.kernel.org/all/1679325074-5494-1-git-send-email-quic_jhugo@quicinc.com/
>>>>>
>>>>> Looks like things have been silent on this revision and we have a number of review tags already.  Seems like this series is ready for merge.
>>>>>
>>>>> I'd like to see this queued for 6.4 if possible.  Given that we are at 6.3-rc5, it seems like this would need to be merged now(ish) to make 6.4.
>>>>>
>>>>> Jacek, since you have commit permissions in drm-misc and are an active Accel maintainer, I wonder if it would be appropriate for you to merge this series to drm-misc.  Thoughts?
>>>>
>>>> I'm would be happy to merge it but I think it needs to be acked by Oded first.
>>>>
>>>> Regards,
>>>> Jacek
>>>
>>> Hi,
>>> Entire patch-set is:
>>> Acked-by: Oded Gabbay <ogabbay@kernel.org>
>>
>> Once Jacke has pushed this I htink it would also be good to get Jeffrey
>> commit rights for drm-misc, so that in the future bugfixes for the qaic
>> driver can be pushed directly by the qaic team. Still with acks/r-b
>> requirements as per usual, and I guess for anything bigger/new uapi an ack
>> from oded is needed.
>>
>> https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc
>>
>> Cheers, Daniel
> 
> Yep.  This is the plan per my understanding.
> 
> -Jeff
Jeffrey Hugo April 6, 2023, 1:15 p.m. UTC | #7
On 4/6/2023 12:34 AM, Jacek Lawrynowicz wrote:
> I've merged the patchset to drm-misc-next.
> Congrats Jeffrey :)

Thanks!

> 
> On 05.04.2023 16:28, Jeffrey Hugo wrote:
>> On 4/5/2023 7:27 AM, Daniel Vetter wrote:
>>> On Wed, Apr 05, 2023 at 03:35:19PM +0300, Oded Gabbay wrote:
>>>> On Wed, Apr 5, 2023 at 2:26 PM Jacek Lawrynowicz
>>>> <jacek.lawrynowicz@linux.intel.com> wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> On 03.04.2023 19:22, Jeffrey Hugo wrote:
>>>>>> On 3/27/2023 9:54 AM, Jeffrey Hugo wrote:
>>>>>>> This series introduces a driver under the accel subsystem (QAIC -
>>>>>>> Qualcomm AIC) for the Qualcomm Cloud AI 100 product (AIC100).  AIC100 is
>>>>>>> a PCIe adapter card that hosts a dedicated machine learning inference
>>>>>>> accelerator.
>>>>>>>
>>>>>>> The previous version (v4) can be found at:
>>>>>>> https://lore.kernel.org/all/1679325074-5494-1-git-send-email-quic_jhugo@quicinc.com/
>>>>>>
>>>>>> Looks like things have been silent on this revision and we have a number of review tags already.  Seems like this series is ready for merge.
>>>>>>
>>>>>> I'd like to see this queued for 6.4 if possible.  Given that we are at 6.3-rc5, it seems like this would need to be merged now(ish) to make 6.4.
>>>>>>
>>>>>> Jacek, since you have commit permissions in drm-misc and are an active Accel maintainer, I wonder if it would be appropriate for you to merge this series to drm-misc.  Thoughts?
>>>>>
>>>>> I'm would be happy to merge it but I think it needs to be acked by Oded first.
>>>>>
>>>>> Regards,
>>>>> Jacek
>>>>
>>>> Hi,
>>>> Entire patch-set is:
>>>> Acked-by: Oded Gabbay <ogabbay@kernel.org>
>>>
>>> Once Jacke has pushed this I htink it would also be good to get Jeffrey
>>> commit rights for drm-misc, so that in the future bugfixes for the qaic
>>> driver can be pushed directly by the qaic team. Still with acks/r-b
>>> requirements as per usual, and I guess for anything bigger/new uapi an ack
>>> from oded is needed.
>>>
>>> https://drm.pages.freedesktop.org/maintainer-tools/commit-access.html#drm-misc
>>>
>>> Cheers, Daniel
>>
>> Yep.  This is the plan per my understanding.
>>
>> -Jeff