dma_buf_cycles_several_imports failed on the RTX 5080 Laptop GPU (NVIDIA 615.71.09, round job
m3-max-16620 at 600b535875) with "the chunks imported left: 0 right: 800". The device asked for a
split (a granule of 65536 bytes, 4 chunks a buffer), yet it made no sparse buffer and imported
no chunk. Every buffer fell back to a copy of its pages. The test's line said "the device binds
no sparse buffer over dma-bufs", which was wrong: a split had been asked for.
The granule was chosen from the sparse buffer's alignment alone. A dma-buf's memory types are
known only once its source has made it, so the split has to be safe for any type an import may
be of. Device::sparse_granule now asks for the memory requirements of a sparse buffer and of a
plain one, both made for dma-bufs. It splits only where the sparse buffer takes every
importable type (Memory::dma_buf_importable: allocatable, not protected, not lazily allocated)
that the plain buffer takes. There, wherever one chunk of the pages imports as a type the plain
buffer takes, each of several chunks imports as that type, which the sparse buffer takes too.
Elsewhere the granule is the request's length: one chunk, one plain buffer's import. The
buffer-making step moves into dma_buf_buffer_requirements, which serves both buffers.
importable_types is split out of dma_buf_candidates so that both use the same rule.
The test now says whether the device asked for a split. It checks that every request asked
alike, that each cycle made a sparse buffer where it split and none where it did not, and, as
before, that every chunk was imported.
Verified: with the change, NVIDIA 620.70.06 asks for no split and imports every buffer whole on
the RTX 3090 (potluck m3-max-16941) and the RTX 2080 (m3-max-16901): 20 cycles, 20 imports. RADV
on the 780M (Mesa 26.2.6) keeps its split (m3-max-16942): a granule of 65536 bytes, 4 chunks a
buffer, 20 sparse buffers.