ac/spm,radv,radeonsi: configure the SPM sample interval in common code

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38577>
This commit is contained in:
Samuel Pitoiset 2025-11-20 15:08:36 +01:00 committed by Marge Bot
parent 9a61eaa1e3
commit 0cc4e16c70
3 changed files with 3 additions and 2 deletions

View file

@ -620,6 +620,9 @@ bool ac_init_spm(const struct radeon_info *info,
} }
} }
/* Configure the sample interval to default to 4096 clk. */
spm->sample_interval = 4096;
/* On GFX11-11.5, the data size written by the hw is in units of segment. */ /* On GFX11-11.5, the data size written by the hw is in units of segment. */
spm->ptr_granularity = spm->ptr_granularity =
(info->gfx_level == GFX11 || info->gfx_level == GFX11_5) ? 32 : 1; (info->gfx_level == GFX11 || info->gfx_level == GFX11_5) ? 32 : 1;

View file

@ -93,7 +93,6 @@ radv_spm_init(struct radv_device *device)
return false; return false;
device->spm.buffer_size = 32 * 1024 * 1024; /* Default to 32MB. */ device->spm.buffer_size = 32 * 1024 * 1024; /* Default to 32MB. */
device->spm.sample_interval = 4096; /* Default to 4096 clk. */
if (!radv_spm_init_bo(device)) if (!radv_spm_init_bo(device))
return false; return false;

View file

@ -720,7 +720,6 @@ si_spm_init_bo(struct si_context *sctx)
uint64_t size = 32 * 1024 * 1024; /* Default to 32MB. */ uint64_t size = 32 * 1024 * 1024; /* Default to 32MB. */
sctx->spm.buffer_size = size; sctx->spm.buffer_size = size;
sctx->spm.sample_interval = 4096; /* Default to 4096 clk. */
sctx->spm.bo = ws->buffer_create( sctx->spm.bo = ws->buffer_create(
ws, size, 4096, ws, size, 4096,