Re: [PATCH v3] drm/amdgpu: update documentation for amdgpu_drv.c

2018-07-05 Thread Christian König
Mhm, double checking that I now knew why my memory fooled me: We use 0 
as infinite timeout in radeon.


Maybe we should change amdgpu to do the same and reject negative values.

Christian.

Am 05.07.2018 um 16:54 schrieb Christian König:

Sounds like my memory fooled me, but we should document that as well.

Christian.

Am 05.07.2018 um 16:47 schrieb Jiang, Sonny:


Change it to,

Value 0 is invalidated, will be adjusted to 1. Negative values 
mean 'infinite timeout' (MAX_JIFFY_OFFSET).



Thanks,

Sonny


*From:* Christian König 
*Sent:* Thursday, July 5, 2018 3:30:28 AM
*To:* Jiang, Sonny; amd-gfx@lists.freedesktop.org
*Subject:* Re: [PATCH v3] drm/amdgpu: update documentation for 
amdgpu_drv.c

Am 04.07.2018 um 20:20 schrieb Sonny Jiang:
> [SNIP]
>
> +/**
> + * DOC: lockup_timeout (int)
> + * Set GPU scheduler timeout value in ms. It must be > 0.  The 
default is 1.

> + */
>   MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0 
(default 1)");

>   module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);

Actually the description here is incorrect, a value of 0 is handled as
infinite timeout IIRC. Please fix while at it.

Apart from that the patch is Acked-by: Christian König
.

Christian.




___
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


Re: [PATCH v3] drm/amdgpu: update documentation for amdgpu_drv.c

2018-07-05 Thread Christian König

Sounds like my memory fooled me, but we should document that as well.

Christian.

Am 05.07.2018 um 16:47 schrieb Jiang, Sonny:


Change it to,

Value 0 is invalidated, will be adjusted to 1. Negative values 
mean 'infinite timeout' (MAX_JIFFY_OFFSET).



Thanks,

Sonny


*From:* Christian König 
*Sent:* Thursday, July 5, 2018 3:30:28 AM
*To:* Jiang, Sonny; amd-gfx@lists.freedesktop.org
*Subject:* Re: [PATCH v3] drm/amdgpu: update documentation for 
amdgpu_drv.c

Am 04.07.2018 um 20:20 schrieb Sonny Jiang:
> [SNIP]
>
> +/**
> + * DOC: lockup_timeout (int)
> + * Set GPU scheduler timeout value in ms. It must be > 0.  The 
default is 1.

> + */
>   MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0 
(default 1)");

>   module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);

Actually the description here is incorrect, a value of 0 is handled as
infinite timeout IIRC. Please fix while at it.

Apart from that the patch is Acked-by: Christian König
.

Christian.


___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH v3] drm/amdgpu: update documentation for amdgpu_drv.c

2018-07-05 Thread Jiang, Sonny
Change it to,

Value 0 is invalidated, will be adjusted to 1.  Negative values mean 
'infinite timeout' (MAX_JIFFY_OFFSET).


Thanks,

Sonny


From: Christian König 
Sent: Thursday, July 5, 2018 3:30:28 AM
To: Jiang, Sonny; amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3] drm/amdgpu: update documentation for amdgpu_drv.c

Am 04.07.2018 um 20:20 schrieb Sonny Jiang:
> [SNIP]
>
> +/**
> + * DOC: lockup_timeout (int)
> + * Set GPU scheduler timeout value in ms. It must be > 0.  The default is 
> 1.
> + */
>   MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0 (default 
> 1)");
>   module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);

Actually the description here is incorrect, a value of 0 is handled as
infinite timeout IIRC. Please fix while at it.

Apart from that the patch is Acked-by: Christian König
.

Christian.
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH v3] drm/amdgpu: update documentation for amdgpu_drv.c

2018-07-05 Thread Christian König

Am 04.07.2018 um 20:20 schrieb Sonny Jiang:

[SNIP]
  
+/**

+ * DOC: lockup_timeout (int)
+ * Set GPU scheduler timeout value in ms. It must be > 0.  The default is 
1.
+ */
  MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0 (default 
1)");
  module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);


Actually the description here is incorrect, a value of 0 is handled as 
infinite timeout IIRC. Please fix while at it.


Apart from that the patch is Acked-by: Christian König 
.


Christian.
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[PATCH v3] drm/amdgpu: update documentation for amdgpu_drv.c

2018-07-04 Thread Sonny Jiang
Signed-off-by: Sonny Jiang 
Acked-by: Junwei Zhang 
---
 Documentation/gpu/amdgpu.rst|   7 +
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 370 +++-
 2 files changed, 370 insertions(+), 7 deletions(-)

diff --git a/Documentation/gpu/amdgpu.rst b/Documentation/gpu/amdgpu.rst
index 765c2a3..a740e49 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 963578c..72874cd 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 
- */
-
 /*
  * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
  * All Rights Reserved.
@@ -136,102 +129,299 @@ int amdgpu_gpu_recovery = -1; /* auto */
 int amdgpu_emu_mode = 0;
 uint amdgpu_smu_memory_pool_size = 0;
 
+/**
+ * DOC: vramlimit (int)
+ * Restrict the total amount of VRAM in MiB for testing.  The default is 0 
(Use full VRAM).
+ */
 MODULE_PARM_DESC(vramlimit, "Restrict VRAM for testing, in megabytes");
 module_param_named(vramlimit, amdgpu_vram_limit, int, 0600);
 
+/**
+ * DOC: vis_vramlimit (int)
+ * Restrict the amount of CPU visible VRAM in MiB for testing.  The default is 
0 (Use full CPU visible VRAM).
+ */
 MODULE_PARM_DESC(vis_vramlimit, "Restrict visible VRAM for testing, in 
megabytes");
 module_param_named(vis_vramlimit, amdgpu_vis_vram_limit, int, 0444);
 
+/**
+ * DOC: gartsize (uint)
+ * Restrict the size of GART in Mib (32, 64, etc.) for testing. The default is 
-1 (The size depends on asic).
+ */
 MODULE_PARM_DESC(gartsize, "Size of GART to setup in megabytes (32, 64, etc., 
-1=auto)");
 module_param_named(gartsize, amdgpu_gart_size, uint, 0600);
 
+/**
+ * DOC: gttsize (int)
+ * Restrict the size of GTT domain in MiB for testing. The default is -1 (It's 
VRAM size if 3GB < VRAM < 3/4 RAM,
+ * otherwise 3/4 RAM size).
+ */
 MODULE_PARM_DESC(gttsize, "Size of the GTT domain in megabytes (-1 = auto)");
 module_param_named(gttsize, amdgpu_gtt_size, int, 0600);
 
+/**
+ * DOC: moverate (int)
+ * Set maximum buffer migration rate in MB/s. The default is -1 (8 MB/s).
+ */
 MODULE_PARM_DESC(moverate, "Maximum buffer migration rate in MB/s. (32, 64, 
etc., -1=auto, 0=1=disabled)");
 module_param_named(moverate, amdgpu_moverate, int, 0600);
 
+/**
+ * DOC: benchmark (int)
+ * Run benchmarks. The default is 0 (Skip benchmarks).
+ */
 MODULE_PARM_DESC(benchmark, "Run benchmark");
 module_param_named(benchmark, amdgpu_benchmarking, int, 0444);
 
+/**
+ * DOC: test (int)
+ * Test BO GTT->VRAM and VRAM->GTT GPU copies. The default is 0 (Skip test, 
only set 1 to run test).
+ */
 MODULE_PARM_DESC(test, "Run tests");
 module_param_named(test, amdgpu_testing, int, 0444);
 
+/**
+ * DOC: audio (int)
+ * Set Audio. The default is -1 (Enabled), set 0 to disabled it.
+ */
 MODULE_PARM_DESC(audio, "Audio enable (-1 = auto, 0 = disable, 1 = enable)");
 module_param_named(audio, amdgpu_audio, int, 0444);
 
+/**
+ * DOC: disp_priority (int)
+ * Set display Priority (0 = auto, 1 = normal, 2 = high). The default is 0.
+ */
 MODULE_PARM_DESC(disp_priority, "Display Priority (0 = auto, 1 = normal, 2 = 
high)");
 module_param_named(disp_priority, amdgpu_disp_priority, int, 0444);
 
+/**
+ * DOC: hw_i2c (int)
+ * To enable hw i2c engine. The default is 0 (Disabled).
+ */
 MODULE_PARM_DESC(hw_i2c, "hw i2c engine enable (0 = disable)");
 module_param_named(hw_i2c, amdgpu_hw_i2c, int, 0444);
 
+/**
+ * DOC: pcie_gen2 (int)
+ * To disable PCIE Gen2 mode (0 = disable, 1 = enable). The default is -1 
(auto, enabled).
+ */
 MODULE_PARM_DESC(pcie_gen2, "PCIE Gen2 mode (-1 = auto, 0 = disable, 1 = 
enable)");
 module_param_named(pcie_gen2, amdgpu_pcie_gen2, int, 0444);
 
+/**
+ * DOC: msi (int)
+ * To disable MSI functionality (1 = enable, 0 = disable). The default is -1 
(auto, enabled).
+ */
 MODULE_PARM_DESC(msi, "MSI support (1 = enable, 0 = disable, -1 = auto)");
 module_param_named(msi, amdgpu_msi, int, 0444);
 
+/**
+ * DOC: lockup_timeout (int)
+ * Set GPU scheduler timeout value in ms. It must be > 0.  The default is 
1.
+ */
 MODULE_PARM_DESC(lockup_timeout, "GPU lockup timeout in ms > 0 (default 
1)");
 module_param_named(lockup_timeout, amdgpu_lockup_timeout, int, 0444);
 
+/**
+ * DOC: dpm (int)
+ * Override for dynamic power management setting (1 = enable, 0 = disable). 
The default is -1 (auto).
+ */
 MODULE_PARM_DESC(dpm, "DPM support (1 = enable, 0 = disable, -1 = auto)");
 module_param_named(dpm, amdgpu_dpm, int, 0444);