dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bagas Sanjaya <bagasdotme@gmail.com>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>,
	ogabbay@kernel.org, airlied@gmail.com, daniel@ffwll.ch,
	jacek.lawrynowicz@linux.intel.com,
	stanislaw.gruszka@linux.intel.com
Cc: dafna@fastmail.com, linux-doc@vger.kernel.org,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	quic_ajitpals@quicinc.com, quic_pkanojiy@quicinc.com,
	quic_carlv@quicinc.com
Subject: Re: [PATCH v4 1/8] accel/qaic: Add documentation for AIC100 accelerator driver
Date: Wed, 22 Mar 2023 11:39:43 +0700	[thread overview]
Message-ID: <ZBqGj+gyl4c5Yz7E@debian.me> (raw)
In-Reply-To: <aa2ee071-952b-f8b5-bfcf-53cef99478be@quicinc.com>

[-- Attachment #1: Type: text/plain, Size: 10323 bytes --]

On Tue, Mar 21, 2023 at 03:52:11PM -0600, Jeffrey Hugo wrote:
> > > +
> > > +Request field descriptions:
> > > +
> > > +| req_id- request ID. A request FIFO element and a response FIFO element with
> > > +|         the same request ID refer to the same command.
> > > +
> > > +| seq_id- sequence ID within a request. Ignored by the DMA Bridge.
> > > +
> > > +| pcie_dma_cmd- describes the DMA element of this request.
> > > +| 	Bit(7) is the force msi flag, which overrides the DMA Bridge MSI logic
> > > +| 		and generates a MSI when this request is complete, and QSM
> > > +| 		configures the DMA Bridge to look at this bit.
> > > +| 	Bits(6:5) are reserved.
> > > +| 	Bit(4) is the completion code flag, and indicates that the DMA Bridge
> > > +| 		shall generate a response FIFO element when this request is
> > > +| 		complete.
> > > +| 	Bit(3) indicates if this request is a linked list transfer(0) or a bulk
> > > +| 		transfer(1).
> > > +| 	Bit(2) is reserved.
> > > +| 	Bits(1:0) indicate the type of transfer. No transfer(0), to device(1),
> > > +| 		from device(2). Value 3 is illegal.
> > > +
> > > +| pcie_dma_source_addr- source address for a bulk transfer, or the address of
> > > +|         the linked list.
> > > +
> > > +| pcie_dma_dest_addr- destination address for a bulk transfer.
> > > +
> > > +| pcie_dma_len- length of the bulk transfer. Note that the size of this field
> > > +| 	limits transfers to 4G in size.
> > > +
> > > +| doorbell_addr- address of the doorbell to ring when this request is complete.
> > > +
> > > +| doorbell_attr- doorbell attributes.
> > > +| 	Bit(7) indicates if a write to a doorbell is to occur.
> > > +| 	Bits(6:2) are reserved.
> > > +| 	Bits(1:0) contain the encoding of the doorbell length. 0 is 32-bit,
> > > +| 		1 is 16-bit, 2 is 8-bit, 3 is reserved. The doorbell address
> > > +| 		must be naturally aligned to the specified length.
> > > +
> > > +| doorbell_data- data to write to the doorbell. Only the bits corresponding to
> > > +| 	the doorbell length are valid.
> > > +
> > > +| sem_cmdN- semaphore command.
> > > +| 	Bit(31) indicates this semaphore command is enabled.
> > > +| 	Bit(30) is the to-device DMA fence. Block this request until all
> > > +| 		to-device DMA transfers are complete.
> > > +| 	Bit(29) is the from-device DMA fence. Block this request until all
> > > +| 		from-device DMA transfers are complete.
> > > +| 	Bits(28:27) are reserved.
> > > +| 	Bits(26:24) are the semaphore command. 0 is NOP. 1 is init with the
> > > +| 		specified value. 2 is increment. 3 is decrement. 4 is wait
> > > +| 		until the semaphore is equal to the specified value. 5 is wait
> > > +| 		until the semaphore is greater or equal to the specified value.
> > > +| 		6 is "P", wait until semaphore is greater than 0, then
> > > +| 		decrement by 1. 7 is reserved.
> > > +| 	Bit(23) is reserved.
> > > +| 	Bit(22) is the semaphore sync. 0 is post sync, which means that the
> > > +| 		semaphore operation is done after the DMA transfer. 1 is
> > > +| 		presync, which gates the DMA transfer. Only one presync is
> > > +| 		allowed per request.
> > > +| 	Bit(21) is reserved.
> > > +| 	Bits(20:16) is the index of the semaphore to operate on.
> > > +| 	Bits(15:12) are reserved.
> > > +| 	Bits(11:0) are the semaphore value to use in operations.
> > 
> > What about bullet lists?
> 
> It doesn't feel like the above fits into a bullet list structure.  Do you
> have an example reference, or can you transform a small section of the above
> to illustrate what you are thinking?
> 

Oops, sorry for suggesting the wrong construct.

Definition lists fit in this case, since there are request fields along
with their individual descriptions. For bit lists, bullet lists should
suffice.

Here is the illustration diff:

diff --git a/Documentation/accel/qaic/aic100.rst b/Documentation/accel/qaic/aic100.rst
index 7ed95bb164bbeb..4d438fd8121451 100644
--- a/Documentation/accel/qaic/aic100.rst
+++ b/Documentation/accel/qaic/aic100.rst
@@ -308,67 +308,79 @@ A request FIFO element has the following structure:
 
 Request field descriptions:
 
-| req_id- request ID. A request FIFO element and a response FIFO element with
-|         the same request ID refer to the same command.
+  req_id
+      request ID. A request FIFO element and a response FIFO element with
+      the same request ID refer to the same command.
 
-| seq_id- sequence ID within a request. Ignored by the DMA Bridge.
+  seq_id
+      sequence ID within a request. Ignored by the DMA Bridge.
 
-| pcie_dma_cmd- describes the DMA element of this request.
-| 	Bit(7) is the force msi flag, which overrides the DMA Bridge MSI logic
-| 		and generates a MSI when this request is complete, and QSM
-| 		configures the DMA Bridge to look at this bit.
-| 	Bits(6:5) are reserved.
-| 	Bit(4) is the completion code flag, and indicates that the DMA Bridge
-| 		shall generate a response FIFO element when this request is
-| 		complete.
-| 	Bit(3) indicates if this request is a linked list transfer(0) or a bulk
-| 		transfer(1).
-| 	Bit(2) is reserved.
-| 	Bits(1:0) indicate the type of transfer. No transfer(0), to device(1),
-| 		from device(2). Value 3 is illegal.
+  pcie_dma_cmd
+      describes the DMA element of this request.
 
-| pcie_dma_source_addr- source address for a bulk transfer, or the address of
-|         the linked list.
+      * Bit(7) is the force msi flag, which overrides the DMA Bridge MSI logic
+        and generates a MSI when this request is complete, and QSM
+        configures the DMA Bridge to look at this bit.
+      * Bits(6:5) are reserved.
+      * Bit(4) is the completion code flag, and indicates that the DMA Bridge
+        shall generate a response FIFO element when this request is
+        complete.
+      * Bit(3) indicates if this request is a linked list transfer(0) or a bulk
+      * transfer(1).
+      * Bit(2) is reserved.
+      * Bits(1:0) indicate the type of transfer. No transfer(0), to device(1),
+      * from device(2). Value 3 is illegal.
 
-| pcie_dma_dest_addr- destination address for a bulk transfer.
+  pcie_dma_source_addr
+      source address for a bulk transfer, or the address of  the linked list.
 
-| pcie_dma_len- length of the bulk transfer. Note that the size of this field
-| 	limits transfers to 4G in size.
+  pcie_dma_dest_addr
+      destination address for a bulk transfer.
 
-| doorbell_addr- address of the doorbell to ring when this request is complete.
+  pcie_dma_len
+      length of the bulk transfer. Note that the size of this field
+      limits transfers to 4G in size.
 
-| doorbell_attr- doorbell attributes.
-| 	Bit(7) indicates if a write to a doorbell is to occur.
-| 	Bits(6:2) are reserved.
-| 	Bits(1:0) contain the encoding of the doorbell length. 0 is 32-bit,
-| 		1 is 16-bit, 2 is 8-bit, 3 is reserved. The doorbell address
-| 		must be naturally aligned to the specified length.
+  doorbell_addr
+      address of the doorbell to ring when this request is complete.
 
-| doorbell_data- data to write to the doorbell. Only the bits corresponding to
-| 	the doorbell length are valid.
+  doorbell_attr
+      doorbell attributes.
 
-| sem_cmdN- semaphore command.
-| 	Bit(31) indicates this semaphore command is enabled.
-| 	Bit(30) is the to-device DMA fence. Block this request until all
-| 		to-device DMA transfers are complete.
-| 	Bit(29) is the from-device DMA fence. Block this request until all
-| 		from-device DMA transfers are complete.
-| 	Bits(28:27) are reserved.
-| 	Bits(26:24) are the semaphore command. 0 is NOP. 1 is init with the
-| 		specified value. 2 is increment. 3 is decrement. 4 is wait
-| 		until the semaphore is equal to the specified value. 5 is wait
-| 		until the semaphore is greater or equal to the specified value.
-| 		6 is "P", wait until semaphore is greater than 0, then
-| 		decrement by 1. 7 is reserved.
-| 	Bit(23) is reserved.
-| 	Bit(22) is the semaphore sync. 0 is post sync, which means that the
-| 		semaphore operation is done after the DMA transfer. 1 is
-| 		presync, which gates the DMA transfer. Only one presync is
-| 		allowed per request.
-| 	Bit(21) is reserved.
-| 	Bits(20:16) is the index of the semaphore to operate on.
-| 	Bits(15:12) are reserved.
-| 	Bits(11:0) are the semaphore value to use in operations.
+      * Bit(7) indicates if a write to a doorbell is to occur.
+      * Bits(6:2) are reserved.
+      * Bits(1:0) contain the encoding of the doorbell length. 0 is 32-bit,
+        1 is 16-bit, 2 is 8-bit, 3 is reserved. The doorbell address
+        must be naturally aligned to the specified length.
+
+  doorbell_data
+      data to write to the doorbell. Only the bits corresponding to
+      the doorbell length are valid.
+
+  sem_cmdN
+      semaphore command.
+
+      * Bit(31) indicates this semaphore command is enabled.
+      * Bit(30) is the to-device DMA fence. Block this request until all
+        to-device DMA transfers are complete.
+      * Bit(29) is the from-device DMA fence. Block this request until all
+        from-device DMA transfers are complete.
+      * Bits(28:27) are reserved.
+        Bits(26:24) are the semaphore command. 0 is NOP. 1 is init with the
+        specified value. 2 is increment. 3 is decrement. 4 is wait
+        until the semaphore is equal to the specified value. 5 is wait
+        until the semaphore is greater or equal to the specified value.
+        6 is "P", wait until semaphore is greater than 0, then
+        decrement by 1. 7 is reserved.
+      * Bit(23) is reserved.
+      * Bit(22) is the semaphore sync. 0 is post sync, which means that the
+        semaphore operation is done after the DMA transfer. 1 is
+      * presync, which gates the DMA transfer. Only one presync is
+      * allowed per request.
+      * Bit(21) is reserved.
+      * Bits(20:16) is the index of the semaphore to operate on.
+      * Bits(15:12) are reserved.
+      * Bits(11:0) are the semaphore value to use in operations.
 
 Overall, a request is processed in 4 steps:
 

Thanks.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2023-03-22  4:39 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 15:11 [PATCH v4 0/8] QAIC accel driver Jeffrey Hugo
2023-03-20 15:11 ` [PATCH v4 1/8] accel/qaic: Add documentation for AIC100 accelerator driver Jeffrey Hugo
2023-03-21 13:31   ` Bagas Sanjaya
2023-03-21 21:52     ` Jeffrey Hugo
2023-03-22  4:39       ` Bagas Sanjaya [this message]
2023-03-22 15:22         ` Jeffrey Hugo
2023-03-20 15:11 ` [PATCH v4 2/8] accel/qaic: Add uapi and core driver file Jeffrey Hugo
2023-03-21 10:34   ` Oded Gabbay
2023-03-21 15:07     ` Jeffrey Hugo
2023-03-22  8:08   ` Jacek Lawrynowicz
2023-03-20 15:11 ` [PATCH v4 3/8] accel/qaic: Add MHI controller Jeffrey Hugo
2023-03-22  7:51   ` Jacek Lawrynowicz
2023-03-24 10:26   ` Manivannan Sadhasivam
2023-03-24 15:26     ` Jeffrey Hugo
2023-03-27  6:59       ` Manivannan Sadhasivam
2023-03-27 14:34         ` Jeffrey Hugo
2023-03-20 15:11 ` [PATCH v4 4/8] accel/qaic: Add control path Jeffrey Hugo
2023-03-22  7:51   ` Jacek Lawrynowicz
2023-03-20 15:11 ` [PATCH v4 5/8] accel/qaic: Add datapath Jeffrey Hugo
2023-03-22  7:52   ` Jacek Lawrynowicz
2023-03-20 15:11 ` [PATCH v4 6/8] accel/qaic: Add mhi_qaic_cntl Jeffrey Hugo
2023-03-20 18:10   ` kernel test robot
2023-03-20 19:06   ` Jeffrey Hugo
2023-03-22  8:11     ` Jacek Lawrynowicz
2023-03-22 14:11       ` Jeffrey Hugo
2023-03-20 15:11 ` [PATCH v4 7/8] accel/qaic: Add qaic driver to the build system Jeffrey Hugo
2023-03-21  1:25   ` kernel test robot
2023-03-21  2:27   ` kernel test robot
2023-03-22  8:03   ` Jacek Lawrynowicz
2023-03-22 14:08     ` Jeffrey Hugo
2023-03-20 15:11 ` [PATCH v4 8/8] MAINTAINERS: Add entry for QAIC driver Jeffrey Hugo
2023-03-22  7:49   ` Jacek Lawrynowicz

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=ZBqGj+gyl4c5Yz7E@debian.me \
    --to=bagasdotme@gmail.com \
    --cc=airlied@gmail.com \
    --cc=dafna@fastmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jacek.lawrynowicz@linux.intel.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=ogabbay@kernel.org \
    --cc=quic_ajitpals@quicinc.com \
    --cc=quic_carlv@quicinc.com \
    --cc=quic_jhugo@quicinc.com \
    --cc=quic_pkanojiy@quicinc.com \
    --cc=stanislaw.gruszka@linux.intel.com \
    /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