]> git.ipfire.org Git - thirdparty/linux.git/commit
gpu: nova-core: register: add fields dispatcher internal rule
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 18 Jul 2025 07:26:15 +0000 (16:26 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Fri, 15 Aug 2025 03:02:55 +0000 (12:02 +0900)
commit7a9cb3dfb07d3e29c0eeebb26b11a34a19a889a4
tree145aec5f908bbac4fbd27cea5f53ba90d187189b
parent9b2379f02423801d372bc588d38b62a1fa6cd05f
gpu: nova-core: register: add fields dispatcher internal rule

Fields are complex and cumbersome to match in a rule, and were only
captured in order to generate the field accessors. However, there are
other places (like the `Debug` and `Default` implementations) where we
would benefit from having access to at least some of the field
information, but refrained from doing so because it would have meant
matching the whole fields in a rule more complex than we need.

Introduce a new `@fields_dispatcher` internal rule that captures all the
field information and passes it to `@field_accessors`. It does not
provide any functional change in itself, but allows us to reuse the
captured field information partially to provide better `Debug` and
`Default` implementations in following patches.

Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Link: https://lore.kernel.org/r/20250718-nova-regs-v2-10-7b6a762aa1cd@nvidia.com
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/regs/macros.rs