On Mon, Oct 9, 2017 at 12:42 AM, Rex Zhu <Rex.Zhu at amd.com> wrote: > this allow allocate system memmoy for smu > debug usage. > > Change-Id: Iac0489e528395448abeaf23a22cd6a1031a5b55b > Signed-off-by: Rex Zhu <Rex.Zhu at amd.com> I'd prefer to expose this via debugfs so we can enable/disable it on the fly. We can clamp the size based on the gart size and if we want a larger buffer, just tell the user to change amdgpu.gart_size Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++++ > 2 files changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > index 07a699d..3a79d41 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h > @@ -132,6 +132,7 @@ > #ifdef CONFIG_DRM_AMDGPU_CIK > extern int amdgpu_cik_support; > #endif > +extern uint amdgpu_smu_memory_pool_size; > > #define AMDGPU_DEFAULT_GTT_SIZE_MB 3072ULL /* 3GB by default */ > #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > index 374a7a1..a7b6732 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > @@ -125,6 +125,7 @@ > int amdgpu_job_hang_limit = 0; > int amdgpu_lbpw = -1; > int amdgpu_compute_multipipe = -1; > +uint amdgpu_smu_memory_pool_size = 0; > > MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes"); > module_param_named(vramlimit, amdgpu_vram_limit, int, 0600); > @@ -300,6 +301,10 @@ > module_param_named(cik_support, amdgpu_cik_support, int, 0444); > #endif > > +MODULE_PARM_DESC(smu_memory_pool_size, > + "Allocate system memory for smu debug usage, 0 = disable," > + "0x1 = 256Mbyte, 0x2 = 512Mbyte, 0x4 = 1 Gbyte, 0x8 = 2GByte"); > +module_param_named(smu_memory_pool_size, amdgpu_smu_memory_pool_size, uint, 0444); > > static const struct pci_device_id pciidlist[] = { > #ifdef CONFIG_DRM_AMDGPU_SI > -- > 1.9.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx