* [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c
@ 2018-06-27 18:14 Sonny Jiang
[not found] ` <1530123285-28043-1-git-send-email-sonny.jiang-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Sonny Jiang @ 2018-06-27 18:14 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Sonny Jiang
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 117 ++++++++++++++++++++++++++++++++
1 file changed, 117 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 6841497..8e418e4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -81,6 +81,123 @@
#define KMS_DRIVER_MINOR 26
#define KMS_DRIVER_PATCHLEVEL 0
+/**
+ * DOC: module_parameters
+ *
+ * - vramlimit (int) - Restrict the total amount of VRAM in MiB for testing. The default is 0 (Use full VRAM).
+ *
+ * - vis_vramlimit (int) - Restrict the amount of CPU visible VRAM in MiB for testing. The default is 0 (Use full CPU visible VRAM).
+ *
+ * - gartsize (uint) - Restrict the size of GART in Mib (32, 64, etc.) for testing. The default is -1 (The size depends on asic).
+ *
+ * - gttsize (int) - Restrict the size of GTT domain in MiB for testing. The default is -1 (3/4th the size of RAM).
+ *
+ * - moverate (int) - Set maximum buffer migration rate in MB/s. The default is -1 (8 MB/s).
+ *
+ * - benchmark (int) - Run benchmarks. The default is 0 (Skip benchmarks).
+ *
+ * - test (int) - Test BO GTT->VRAM and VRAM->GTT GPU copies. The default is 0 (Skip test, only set 1 to run test).
+ *
+ * - audio (int) - Set Audio. The default is -1 (Enabled), set 0 to disabled it.
+ *
+ * - disp_priority (int) - Set display Priority (0 = auto, 1 = normal, 2 = high). The default is 0.
+ *
+ * - hw_i2c (int) - To enable hw i2c engine. The default is 0 (Disabled).
+ *
+ * - pcie_gen2 (int) - To disable PCIE Gen2 mode (0 = disable, 1 = enable). The default is -1 (auto enabled).
+ *
+ * - msi (int) - To disable MSI functionality (1 = enable, 0 = disable). The default is -1 (auto, enabled).
+ *
+ * - lockup_timeout (int) - Set GPU scheduler timeout value in ms. It must be > 0. The default is 10000.
+ *
+ * - dpm (int) - Override for dynamic power management setting (1 = enable, 0 = disable). The default is -1 (auto).
+ *
+ * - fw_load_type (int) - Set different firmware loading type for debugging (0 = direct, 1 = SMU, 2 = PSP). The default is -1 (auto).
+ *
+ * - aspm (int) - To disable ASPM (1 = enable, 0 = disable). The default is -1 (auto enabled).
+ *
+ * - runpm (int) - Override for runtime power management control for dGPUs in PX/HG laptops. The amdgpu driver can dynamically power down
+ * the dGPU on PX/HG laptops when it is idle. The default is -1 (auto enable). Setting the value to 0 disables this functionality.
+ *
+ * - ip_block_mask (uint) - Override what IP blocks are enabled on the GPU. Each GPU is a collection of IP blocks (gfx, display, video,
+ * etc.). Use this parameter to disable specific blocks. Note that the IP blocks do not have a fixed index (e.g., you might have a device
+ * with multiple instances of an IP block) so the mask is board specific. The default is 0xffffffff (enable all blocks on a device).
+ *
+ * - bapm (int) - To disable BAPM (0 = disable). The default -1 (auto, enabled)
+ *
+ * - deep_color (int) - Set 1 to enable Deep Color support. The default is 0 (disabled).
+ *
+ * - vm_size (int) - Override the size of the GPU's per client virtual address space in GiB. The default is -1 (automatic for each asic).
+ *
+ * - vm_fragment_size (int) - Override VM fragment size in bits (4, 5, etc. 4 = 64K, 9 = 2M). The default is -1 (automatic for each asic).
+ *
+ * - vm_block_size (int) - Override VM page table size in bits (default depending on vm_size and hw setup). The default is -1 (automatic for each asic).
+ *
+ * - vm_fault_stop (int) - Stop on VM fault for debugging (0 = never, 1 = print first, 2 = always). The default is 0 (No stop).
+ *
+ * - vm_debug (int) - Debug VM handling (0 = disabled, 1 = enabled). The default is 0 (Disabled).
+ *
+ * - vm_update_mode (int) - Override VM update mode.
+ * Updated by using CPU (0 = never, 1 = Graphics only, 2 = Compute only, 3 = Both). The default is -1 (Only in large BAR(LB) systems Compute VM tables
+ * will be updated by CPU, otherwise 0, never)
+ *
+ * - vram_page_split (int) - Override the number of pages after we split VRAM allocations (default 512, -1 = disable). The default is 512.
+ *
+ * - exp_hw_support (int) - Enable experimental hw support (1 = enable). The default is 0 (disabled).
+ *
+ * - dc (int) - Disable Display Core driver for debugging (1 = enable, 0 = disable). The default is -1 (automatic for each asic).
+ *
+ * - sched_jobs (int) - Override the max number of jobs supported in the sw queue. The default is 32.
+ *
+ * - sched_hw_submission (int) - Override the max number of HW submissions. The default is 2.
+ *
+ * - ppfeaturemask (uint) - Override what power features are enabled. The default is 0xffff3fff (gfxoff(bit 15), overdriver(bit 14) disabled).
+ *
+ * - pcie_gen_cap (uint) - Override PCIE gen speed capabilities. The default is 0 (automatic for each asic).
+ *
+ * - pcie_lane_cap (uint) - Override PCIE lanes capabilities. The default is 0 (automatic for each asic).
+ *
+ * - cg_mask (uint) - Override what Clockgating features are enabled on GPU (0 = disable clock gating). The default is 0xffffffff (all enabled).
+ *
+ * - pg_mask (uint) - Override what Powergating features are enabled on GPU (0 = disable power gating). The default is 0xffffffff (all enabled).
+ *
+ * - sdma_phase_quantum (uint) - Override SDMA context switch phase quantum (x 1K GPU clock cycles, 0 = no change). The default is 32.
+ *
+ * - disable_cu (charp) - Set to disable CUs (It's set like se.sh.cu,...). The default is NULL.
+ *
+ * - virtual_display (charp) - Set to enable virtual display feature. This feature provides a virtual display hardware on headless boards
+ * or in virtualized environments. It will be set like xxxx:xx:xx.x,x;xxxx:xx:xx.x,x. The default is NULL.
+ *
+ * - ngg (int) - Set to enable Next Generation Graphics (1 = enable). The default is 0 (disabled).
+ *
+ * - prim_buf_per_se (int) - Override the size of Primitive Buffer per Shader Engine. The default is 0 (depending on gfx).
+ *
+ * - pos_buf_per_se (int) - Override the size of Position Buffer per Shader Engine. The default is 0 (depending on gfx).
+ *
+ * - cntl_sb_buf_per_se (int) - Override the size of Control Sideband per Shader Engine. The default is 0 (depending on gfx).
+ *
+ * - param_buf_per_se (int) - Override the size of Off-Chip Pramater Cache per Shader Engine. The default is 0 (depending on gfx).
+ *
+ * - job_hang_limit (int) - Set how much time allow a job hang and not drop it. The default is 0.
+ *
+ * - lbpw (int) - Override Load Balancing Per Watt (LBPW) support (1 = enable, 0 = disable). The default is -1 (auto enabled).
+ *
+ * - gpu_recovery (int) - Set to enable GPU recovery mechanism (1 = enable, 0 = disable). The default is -1 (auto, disabled except SRIOV).
+ *
+ * - emu_mode (int) - Set value 1 to enable emulation mode. The default is 0 (disabled).
+ *
+ * - si_support (int) - Set SI support driver. This parameter works after set config CONFIG_DRM_AMDGPU_SI. For SI asic, when radeon driver is
+ * enabled, set value 0 to use radeon driver, while set value 1 to use amdgpu driver. The default is using radeon driver when it available,
+ * otherwise using amdgpu driver.
+ *
+ * - cik_support (int) - Set CIK support driver. This parameter works after set config CONFIG_DRM_AMDGPU_CIK. For CIK asic, when radeon driver is
+ * enabled, set value 0 to use radeon driver, while set value 1 to use amdgpu driver. The default is using radeon driver when it available,
+ * otherwise using amdgpu driver.
+ *
+ * - smu_memory_pool_size (uint) - It is used to reserve gtt for smu debug usage, setting value 0 to disable it. The actual size is value * 256MiB.
+ * E.g. 0x1 = 256Mbyte, 0x2 = 512Mbyte, 0x4 = 1 Gbyte, 0x8 = 2GByte. The default is 0 (disabled).
+ */
+
int amdgpu_vram_limit = 0;
int amdgpu_vis_vram_limit = 0;
int amdgpu_gart_size = -1; /* auto */
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread[parent not found: <1530123285-28043-1-git-send-email-sonny.jiang-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c [not found] ` <1530123285-28043-1-git-send-email-sonny.jiang-5C7GfCeVMHo@public.gmane.org> @ 2018-06-28 2:27 ` Zhang, Jerry (Junwei) 2018-06-28 8:39 ` Michel Dänzer 1 sibling, 0 replies; 6+ messages in thread From: Zhang, Jerry (Junwei) @ 2018-06-28 2:27 UTC (permalink / raw) To: Sonny Jiang, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW On 06/28/2018 02:14 AM, Sonny Jiang wrote: > Signed-off-by: Sonny Jiang <sonny.jiang@amd.com> Nick work for amdgpu parameters. > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 117 ++++++++++++++++++++++++++++++++ > 1 file changed, 117 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > index 6841497..8e418e4 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > @@ -81,6 +81,123 @@ > #define KMS_DRIVER_MINOR 26 > #define KMS_DRIVER_PATCHLEVEL 0 > > +/** > + * DOC: module_parameters > + * > + * - vramlimit (int) - Restrict the total amount of VRAM in MiB for testing. The default is 0 (Use full VRAM). > + * > + * - vis_vramlimit (int) - Restrict the amount of CPU visible VRAM in MiB for testing. The default is 0 (Use full CPU visible VRAM). > + * > + * - gartsize (uint) - Restrict the size of GART in Mib (32, 64, etc.) for testing. The default is -1 (The size depends on asic). > + * > + * - gttsize (int) - Restrict the size of GTT domain in MiB for testing. The default is -1 (3/4th the size of RAM). Mmm, it a bit tricky to describe that. If 3G < vram_size < 3/4 RAM, the default value is vram_size, although the comment says 3/4 RAM. > + * > + * - moverate (int) - Set maximum buffer migration rate in MB/s. The default is -1 (8 MB/s). > + * > + * - benchmark (int) - Run benchmarks. The default is 0 (Skip benchmarks). > + * > + * - test (int) - Test BO GTT->VRAM and VRAM->GTT GPU copies. The default is 0 (Skip test, only set 1 to run test). > + * > + * - audio (int) - Set Audio. The default is -1 (Enabled), set 0 to disabled it. > + * > + * - disp_priority (int) - Set display Priority (0 = auto, 1 = normal, 2 = high). The default is 0. > + * > + * - hw_i2c (int) - To enable hw i2c engine. The default is 0 (Disabled). > + * > + * - pcie_gen2 (int) - To disable PCIE Gen2 mode (0 = disable, 1 = enable). The default is -1 (auto enabled). > + * > + * - msi (int) - To disable MSI functionality (1 = enable, 0 = disable). The default is -1 (auto, enabled). > + * > + * - lockup_timeout (int) - Set GPU scheduler timeout value in ms. It must be > 0. The default is 10000. > + * > + * - dpm (int) - Override for dynamic power management setting (1 = enable, 0 = disable). The default is -1 (auto). > + * > + * - fw_load_type (int) - Set different firmware loading type for debugging (0 = direct, 1 = SMU, 2 = PSP). The default is -1 (auto). > + * > + * - aspm (int) - To disable ASPM (1 = enable, 0 = disable). The default is -1 (auto enabled). > + * > + * - runpm (int) - Override for runtime power management control for dGPUs in PX/HG laptops. The amdgpu driver can dynamically power down > + * the dGPU on PX/HG laptops when it is idle. The default is -1 (auto enable). Setting the value to 0 disables this functionality. > + * > + * - ip_block_mask (uint) - Override what IP blocks are enabled on the GPU. Each GPU is a collection of IP blocks (gfx, display, video, > + * etc.). Use this parameter to disable specific blocks. Note that the IP blocks do not have a fixed index (e.g., you might have a device > + * with multiple instances of an IP block) so the mask is board specific. The default is 0xffffffff (enable all blocks on a device). > + * > + * - bapm (int) - To disable BAPM (0 = disable). The default -1 (auto, enabled) > + * > + * - deep_color (int) - Set 1 to enable Deep Color support. The default is 0 (disabled). > + * > + * - vm_size (int) - Override the size of the GPU's per client virtual address space in GiB. The default is -1 (automatic for each asic). > + * > + * - vm_fragment_size (int) - Override VM fragment size in bits (4, 5, etc. 4 = 64K, 9 = 2M). The default is -1 (automatic for each asic). > + * > + * - vm_block_size (int) - Override VM page table size in bits (default depending on vm_size and hw setup). The default is -1 (automatic for each asic). > + * > + * - vm_fault_stop (int) - Stop on VM fault for debugging (0 = never, 1 = print first, 2 = always). The default is 0 (No stop). > + * > + * - vm_debug (int) - Debug VM handling (0 = disabled, 1 = enabled). The default is 0 (Disabled). > + * > + * - vm_update_mode (int) - Override VM update mode. > + * Updated by using CPU (0 = never, 1 = Graphics only, 2 = Compute only, 3 = Both). The default is -1 (Only in large BAR(LB) systems Compute VM tables > + * will be updated by CPU, otherwise 0, never) > + * > + * - vram_page_split (int) - Override the number of pages after we split VRAM allocations (default 512, -1 = disable). The default is 512. > + * > + * - exp_hw_support (int) - Enable experimental hw support (1 = enable). The default is 0 (disabled). > + * > + * - dc (int) - Disable Display Core driver for debugging (1 = enable, 0 = disable). The default is -1 (automatic for each asic). > + * > + * - sched_jobs (int) - Override the max number of jobs supported in the sw queue. The default is 32. > + * > + * - sched_hw_submission (int) - Override the max number of HW submissions. The default is 2. > + * > + * - ppfeaturemask (uint) - Override what power features are enabled. The default is 0xffff3fff (gfxoff(bit 15), overdriver(bit 14) disabled). > + * > + * - pcie_gen_cap (uint) - Override PCIE gen speed capabilities. The default is 0 (automatic for each asic). > + * > + * - pcie_lane_cap (uint) - Override PCIE lanes capabilities. The default is 0 (automatic for each asic). > + * > + * - cg_mask (uint) - Override what Clockgating features are enabled on GPU (0 = disable clock gating). The default is 0xffffffff (all enabled). > + * > + * - pg_mask (uint) - Override what Powergating features are enabled on GPU (0 = disable power gating). The default is 0xffffffff (all enabled). > + * > + * - sdma_phase_quantum (uint) - Override SDMA context switch phase quantum (x 1K GPU clock cycles, 0 = no change). The default is 32. > + * > + * - disable_cu (charp) - Set to disable CUs (It's set like se.sh.cu,...). The default is NULL. > + * > + * - virtual_display (charp) - Set to enable virtual display feature. This feature provides a virtual display hardware on headless boards > + * or in virtualized environments. It will be set like xxxx:xx:xx.x,x;xxxx:xx:xx.x,x. The default is NULL. > + * > + * - ngg (int) - Set to enable Next Generation Graphics (1 = enable). The default is 0 (disabled). > + * > + * - prim_buf_per_se (int) - Override the size of Primitive Buffer per Shader Engine. The default is 0 (depending on gfx). > + * > + * - pos_buf_per_se (int) - Override the size of Position Buffer per Shader Engine. The default is 0 (depending on gfx). > + * > + * - cntl_sb_buf_per_se (int) - Override the size of Control Sideband per Shader Engine. The default is 0 (depending on gfx). > + * > + * - param_buf_per_se (int) - Override the size of Off-Chip Pramater Cache per Shader Engine. The default is 0 (depending on gfx). Above 4 sizes are in Byte. > + * > + * - job_hang_limit (int) - Set how much time allow a job hang and not drop it. The default is 0. > + * > + * - lbpw (int) - Override Load Balancing Per Watt (LBPW) support (1 = enable, 0 = disable). The default is -1 (auto enabled). > + * > + * - gpu_recovery (int) - Set to enable GPU recovery mechanism (1 = enable, 0 = disable). The default is -1 (auto, disabled except SRIOV). > + * > + * - emu_mode (int) - Set value 1 to enable emulation mode. The default is 0 (disabled). > + * > + * - si_support (int) - Set SI support driver. This parameter works after set config CONFIG_DRM_AMDGPU_SI. For SI asic, when radeon driver is > + * enabled, set value 0 to use radeon driver, while set value 1 to use amdgpu driver. The default is using radeon driver when it available, > + * otherwise using amdgpu driver. > + * > + * - cik_support (int) - Set CIK support driver. This parameter works after set config CONFIG_DRM_AMDGPU_CIK. For CIK asic, when radeon driver is > + * enabled, set value 0 to use radeon driver, while set value 1 to use amdgpu driver. The default is using radeon driver when it available, > + * otherwise using amdgpu driver. > + * > + * - smu_memory_pool_size (uint) - It is used to reserve gtt for smu debug usage, setting value 0 to disable it. The actual size is value * 256MiB. > + * E.g. 0x1 = 256Mbyte, 0x2 = 512Mbyte, 0x4 = 1 Gbyte, 0x8 = 2GByte. The default is 0 (disabled). > + */ > + > int amdgpu_vram_limit = 0; > int amdgpu_vis_vram_limit = 0; > int amdgpu_gart_size = -1; /* auto */ > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c [not found] ` <1530123285-28043-1-git-send-email-sonny.jiang-5C7GfCeVMHo@public.gmane.org> 2018-06-28 2:27 ` Zhang, Jerry (Junwei) @ 2018-06-28 8:39 ` Michel Dänzer [not found] ` <6a028ca5-f799-8cc8-fb74-7a036a428d80-otUistvHUpPR7s880joybQ@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Michel Dänzer @ 2018-06-28 8:39 UTC (permalink / raw) To: Sonny Jiang; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW Hi Sonny, would it be possible to put the documentation of each parameter directly next to its definition / declaration? Otherwise, I'm afraid the documentation will quickly fall out of date WRT the code. > +/** > + * DOC: module_parameters Otherwise, this needs to be referenced in Documentation/gpu/amdgpu.rst, or the contents of this comment don't show up in the generated documentation. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <6a028ca5-f799-8cc8-fb74-7a036a428d80-otUistvHUpPR7s880joybQ@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c [not found] ` <6a028ca5-f799-8cc8-fb74-7a036a428d80-otUistvHUpPR7s880joybQ@public.gmane.org> @ 2018-06-28 18:02 ` Jiang, Sonny [not found] ` <CY4PR12MB15119F358F68B52729D44B3CFD4F0-rpdhrqHFk06XKdXwTjA44gdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Jiang, Sonny @ 2018-06-28 18:02 UTC (permalink / raw) To: Michel Dänzer, Deucher, Alexander Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org [-- Attachment #1.1: Type: text/plain, Size: 955 bytes --] Hi Alex, What's your opinion about Michel's suggestion? Thanks, Sonny ________________________________ From: Michel Dänzer <michel-otUistvHUpPR7s880joybQ@public.gmane.org> Sent: Thursday, June 28, 2018 4:39:57 AM To: Jiang, Sonny Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Subject: Re: [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c Hi Sonny, would it be possible to put the documentation of each parameter directly next to its definition / declaration? Otherwise, I'm afraid the documentation will quickly fall out of date WRT the code. > +/** > + * DOC: module_parameters Otherwise, this needs to be referenced in Documentation/gpu/amdgpu.rst, or the contents of this comment don't show up in the generated documentation. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer [-- Attachment #1.2: Type: text/html, Size: 2335 bytes --] [-- Attachment #2: Type: text/plain, Size: 154 bytes --] _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CY4PR12MB15119F358F68B52729D44B3CFD4F0-rpdhrqHFk06XKdXwTjA44gdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c [not found] ` <CY4PR12MB15119F358F68B52729D44B3CFD4F0-rpdhrqHFk06XKdXwTjA44gdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> @ 2018-06-28 18:31 ` Alex Deucher [not found] ` <CADnq5_MiO9gTfavmOQeycbsaM8bczBx-iLRbxqi8Sc_hCE9B2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Alex Deucher @ 2018-06-28 18:31 UTC (permalink / raw) To: Jiang, Sonny Cc: Deucher, Alexander, Michel Dänzer, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org On Thu, Jun 28, 2018 at 2:02 PM, Jiang, Sonny <Sonny.Jiang@amd.com> wrote: > Hi Alex, > > > What's your opinion about Michel's suggestion? You should definitely update amdgpu.rst to include the new documentation section. As for whether to have separate sections or one big section for the parameters, I could go either way. If we have one big section, people will likely forget to update it when they add a new parameter. On the other hand, if we have separate sections for each option, people will likely forget to update amdgpu.rst to add the new parameter. Alex > > > Thanks, > > Sonny > > ________________________________ > From: Michel Dänzer <michel@daenzer.net> > Sent: Thursday, June 28, 2018 4:39:57 AM > To: Jiang, Sonny > Cc: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c > > > Hi Sonny, > > > would it be possible to put the documentation of each parameter directly > next to its definition / declaration? Otherwise, I'm afraid the > documentation will quickly fall out of date WRT the code. > > >> +/** >> + * DOC: module_parameters > > Otherwise, this needs to be referenced in Documentation/gpu/amdgpu.rst, > or the contents of this comment don't show up in the generated > documentation. > > > -- > Earthling Michel Dänzer | http://www.amd.com > Libre software enthusiast | Mesa and X developer > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx > _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CADnq5_MiO9gTfavmOQeycbsaM8bczBx-iLRbxqi8Sc_hCE9B2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c [not found] ` <CADnq5_MiO9gTfavmOQeycbsaM8bczBx-iLRbxqi8Sc_hCE9B2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2018-06-29 9:46 ` Michel Dänzer 0 siblings, 0 replies; 6+ messages in thread From: Michel Dänzer @ 2018-06-29 9:46 UTC (permalink / raw) To: Alex Deucher, Jiang, Sonny Cc: Deucher, Alexander, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org On 2018-06-28 08:31 PM, Alex Deucher wrote: > On Thu, Jun 28, 2018 at 2:02 PM, Jiang, Sonny <Sonny.Jiang@amd.com> wrote: >> Hi Alex, >> >> >> What's your opinion about Michel's suggestion? > > You should definitely update amdgpu.rst to include the new > documentation section. As for whether to have separate sections or > one big section for the parameters, I could go either way. If we have > one big section, people will likely forget to update it when they add > a new parameter. On the other hand, if we have separate sections for > each option, people will likely forget to update amdgpu.rst to add the > new parameter. I think it's easier to catch the latter in review, and while it is slightly annoying needing an entry for each parameter in amdgpu.rst, maybe it can serve as incentive against needlessly adding new module parameters. :) Right now there's a third possibility, see the diff below as an example. By referencing amdgpu_drv.c without a :doc: or :internal: stanza, each DOC comment is picked up automatically, with the text after DOC as the heading. However, this will break down if we want to add general DOC comments or function comments in amdgpu_drv.c. P.S. I cherry-picked some upstream fixes from the Documentation tree to amd-staging-drm-next, make htmldocs works again. diff --git a/Documentation/gpu/amdgpu.rst b/Documentation/gpu/amdgpu.rst index 765c2a32938f..a740e491dfcc 100644 --- a/Documentation/gpu/amdgpu.rst +++ b/Documentation/gpu/amdgpu.rst @@ -5,6 +5,13 @@ The drm/amdgpu driver supports all AMD Radeon GPUs based on the Graphics Core Next (GCN) architecture. +Module Parameters +================= + +The amdgpu driver supports the following module parameters: + +.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c + Core Driver Infrastructure ========================== diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index dcdc97d6dc44..ff0299879601 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c @@ -1,10 +1,3 @@ -/** - * \file amdgpu_drv.c - * AMD Amdgpu driver - * - * \author Gareth Hughes <gareth@valinux.com> - */ - /* * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California. * All Rights Reserved. @@ -136,6 +129,11 @@ int amdgpu_gpu_recovery = -1; /* auto */ int amdgpu_emu_mode = 0; uint amdgpu_smu_memory_pool_size = 0; +/** + * DOC: vramlimit + * + * Restrict VRAM for testing, in megabytes + */ MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes"); module_param_named(vramlimit, amdgpu_vram_limit, int, 0600); -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-06-29 9:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-27 18:14 [PATCH] drm/amdgpu: update documentation for amdgpu_drv.c Sonny Jiang
[not found] ` <1530123285-28043-1-git-send-email-sonny.jiang-5C7GfCeVMHo@public.gmane.org>
2018-06-28 2:27 ` Zhang, Jerry (Junwei)
2018-06-28 8:39 ` Michel Dänzer
[not found] ` <6a028ca5-f799-8cc8-fb74-7a036a428d80-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-06-28 18:02 ` Jiang, Sonny
[not found] ` <CY4PR12MB15119F358F68B52729D44B3CFD4F0-rpdhrqHFk06XKdXwTjA44gdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-06-28 18:31 ` Alex Deucher
[not found] ` <CADnq5_MiO9gTfavmOQeycbsaM8bczBx-iLRbxqi8Sc_hCE9B2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-06-29 9:46 ` Michel Dänzer
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.