Re: [PATCH v3 14/33] gpu: nova-core: add the falcon DMA and suspend helpers for r000 boot
From: John Hubbard
Date: Mon Sep 21 2026 - 22:40:18 EST
On 9/18/26 3:07 PM, Timur Tabi wrote:
> On Thu, 2026-09-17 at 18:07 -0700, John Hubbard wrote:
>>
>
>> + pub(crate) fn raw_dma_transfer(
>> + &self,
>> + ctx_dma: u32,
>> + src_addr: u64,
>> + target_mem: FalconMem,
>> + src: FalconDmaSrcOffset,
>> + dst_offset: u32,
>> + len: u32,
>> + ) -> Result {
>> + const DMA_LEN: u32 = num::usize_into_u32::<{ MEM_BLOCK_ALIGNMENT }>();
>> +
>> + if src_addr % u64::from(DMA_LEN) > 0 {
>> + dev_err!(
>> + self.dev,
>> + "raw DMA: source address {:#x} not 256B-aligned\n",
>
> You use MEM_BLOCK_ALIGNMENT to determine the alignment, but you hard-code "256" in the error
> string.
OK, fixed in v4: the message formats the constant, and the doc comment
cites MEM_BLOCK_ALIGNMENT in place of the number.
thanks,
--
John Hubbard