Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jiaxing Hu <gahing@gahingwoo.com>
To: royalnet026@gmail.com
Cc: tomeu@tomeuvizoso.net, heiko@sntech.de,
	chaoyi.chen@rock-chips.com, alchark@flipper.net,
	dri-devel@lists.freedesktop.org,
	linux-rockchip@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 08/10] accel/rocket: add RK3576 NPU (RKNN) support
Date: Mon, 17 Aug 2026 22:20:21 +1200	[thread overview]
Message-ID: <20260817102021.1226525-1-gahing@gahingwoo.com> (raw)
In-Reply-To: <20260817100046.24872-1-royalnet026@gmail.com>

Hi Igor,

First, I sent you to the wrong counts. The two predicates disagree only
where oc mod 32 falls between 17 and 31, since modulo true implies parity
true and never the reverse. At 40 and 72 both forms emit the same word, so
I withdraw them. By the same arithmetic only 56, 88 and 120 of your eight
carry any parity versus modulo content. The rest still establish something
better, that the upstream constant computes whole at five remainders on
RK3588. Discriminating counts nobody has run are 20, 50, 60, 90 and 114.

Take the code from the merge request rather than my working branch, it has
no knobs in it.

  https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/43804

  R_DPU(0x4050, (DIV_ROUND_UP(output_channels, FEATURE_ATOMIC_SIZE) & 1)
                   ? 0x80011011 : 0x80011111);

output_channels is task->output_channels_real, the unpadded count, and
FEATURE_ATOMIC_SIZE is 16.

Do not put my two words in an RK3588 build. Against registers.xml

  field         upstream 0x124   mine 0x80011111   mine 0x80011011
  RGP_CNTER            0                8                 8
  RESERVED_0           0               34                34
  SIZE_E_2             1                1                 0
  SIZE_E_1             1                0                 0
  SIZE_E_0             1                4                 4
  OW_SRC               0                1                 1

Mine differ from each other in SIZE_E_2 alone and from yours in five
further fields. Those five are common to both of my words so they do not
confound an A against B, but none of them has ever run on an RK3588, and
if both arms fail for that reason the oc 64 control goes down with them.

Use your own constant with bit 8 cleared instead, 0x124 where the
predicate is true and 0x024 where it is false. That takes SIZE_E_2 from 1
to 0, the same move my words make. It assumes the three SIZE_E fields move
independently, which neither of us has shown.

Bit 8 does something on RK3576. The table I sent on the 16th forced
SIZE_E_2 to 1 with every other field identical, and 16 output channels
went from 16 of 16 to a job timeout, 41 from 41 of 41 to 0 of 41. Whether
it is the only field that matters is open, and the sweep I promised before
the series went out covers RGP_CNTER, OW_SRC and two reserved bits but not
SIZE_E_1 or SIZE_E_0, which are just as fitted.

Of your three offers the oc 64 control is the one I want, both ways, since
that is the side I lost. A count at 20 or 60 would be the first
discriminating point outside 24 modulo 32. And yes to the generator and
the scorer, the refusal to emit a constant reference channel is a better
guard than mine.

You are right that none of this touches the timeout. Every modulo run that
lost channels also raised one, at three counts, and I cannot yet tell
whether the register causes it or both follow from something else.

Jiaxing


  reply	other threads:[~2026-08-17 10:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  9:40 [PATCH v7 00/10] accel/rocket: RK3576 NPU (RKNN) enablement Jiaxing Hu
2026-08-12  9:40 ` [PATCH v7 01/10] accel/rocket: take the completion register writes under job_lock Jiaxing Hu
2026-08-12 12:47   ` Igor Paunovic
2026-08-12  9:40 ` [PATCH v7 02/10] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-08-13  7:04   ` Krzysztof Kozlowski
2026-08-12  9:40 ` [PATCH v7 03/10] dt-bindings: power: rockchip: allow resets in a power domain node Jiaxing Hu
2026-08-13  7:06   ` Krzysztof Kozlowski
2026-08-14  8:21     ` Jiaxing Hu
2026-08-12  9:40 ` [PATCH v7 04/10] dt-bindings: iommu: rockchip: allow the RK3576 NPU MMU clock set Jiaxing Hu
2026-08-12 10:45   ` Diederik de Haas
2026-08-13  9:27     ` Jiaxing Hu
2026-08-12  9:41 ` [PATCH v7 05/10] pmdomain/rockchip: add optional per-domain power-on settle delay Jiaxing Hu
2026-08-12  9:41 ` [PATCH v7 06/10] pmdomain/rockchip: cycle optional power-domain resets on power-on Jiaxing Hu
2026-08-12  9:41 ` [PATCH v7 07/10] accel/rocket: select the per-core clock and reset counts from match data Jiaxing Hu
2026-08-12  9:41 ` [PATCH v7 08/10] accel/rocket: add RK3576 NPU (RKNN) support Jiaxing Hu
2026-08-12 12:48   ` Igor Paunovic
2026-08-13  9:26     ` Jiaxing Hu
2026-08-13  9:56       ` Igor Paunovic
2026-08-14  8:26         ` Jiaxing Hu
2026-08-14 11:08           ` Igor Paunovic
     [not found]   ` <20260814110841.11238-1-royalnet026@gmail.com>
2026-08-15  3:12     ` Jiaxing Hu
2026-08-15 13:05       ` Igor Paunovic
2026-08-16  4:12         ` Jiaxing Hu
2026-08-16 18:53           ` Igor Paunovic
2026-08-16 19:58             ` Jiaxing Hu
2026-08-16 20:25               ` Igor Paunovic
2026-08-17  8:31                 ` Jiaxing Hu
2026-08-17  9:45                 ` Jiaxing Hu
2026-08-17 10:00                   ` Igor Paunovic
2026-08-17 10:20                     ` Jiaxing Hu [this message]
2026-08-17 11:05                       ` Igor Paunovic
2026-08-12  9:41 ` [PATCH v7 09/10] arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes Jiaxing Hu
2026-08-12  9:41 ` [PATCH v7 10/10] arm64: dts: rockchip: rk3576-rock-4d: enable NPU Jiaxing Hu
2026-08-12 10:20   ` Chaoyi Chen

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=20260817102021.1226525-1-gahing@gahingwoo.com \
    --to=gahing@gahingwoo.com \
    --cc=alchark@flipper.net \
    --cc=chaoyi.chen@rock-chips.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=royalnet026@gmail.com \
    --cc=tomeu@tomeuvizoso.net \
    /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