qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PULL 11/13] virtio-gpu: Handle resource blob commands


From: Dmitry Osipenko
Subject: Re: [PULL 11/13] virtio-gpu: Handle resource blob commands
Date: Fri, 1 Nov 2024 21:23:21 +0300
User-agent: Mozilla Thunderbird

On 11/1/24 20:16, Alex Bennée wrote:
> Also what is the subtlety behind using both stride and bytes_pp in the
> calculation. My naive thought would be:
> 
>   fb.bytes_pp * ss.r.width == fb.stride
> 
> Can anyone enlighten me?

GPUs want image line size to be aligned to a power of 2 value, like 64
bytes for example. This aligned size of the line is called stride.

GPU's DMA engine operates with a predefined granularity when it accesses
memory, it reads/writes memory chunks that are multiple of a stride.
GPUs almost never support memory accesses at a granularity of one byte,
like CPUs do it.

-- 
Best regards,
Dmitry



reply via email to

[Prev in Thread] Current Thread [Next in Thread]