dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning
@ 2023-11-05 21:00 Hunter Chasens
  2023-11-06  5:15 ` Bagas Sanjaya
  2023-11-06 11:36 ` Lazar, Lijo
  0 siblings, 2 replies; 8+ messages in thread
From: Hunter Chasens @ 2023-11-05 21:00 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-doc, Xinhui.Pan, amd-gfx, dri-devel, Hunter Chasens,
	alexander.deucher, evan.quan, christian.koenig

Resolves Sphinx unexpected indentation warning when compiling
documentation (e.g. `make htmldocs`). Replaces tabs with spaces and adds
a literal block to keep vertical formatting of the
example power state list.

Signed-off-by: Hunter Chasens <hunter.chasens18@ncf.edu>
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 517b9fb4624c..703fe2542258 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -990,11 +990,14 @@ static ssize_t amdgpu_get_pp_features(struct device *dev,
  * the power state and the clock information for those levels. If deep sleep is
  * applied to a clock, the level will be denoted by a special level 'S:'
  * E.g.,
- *	S: 19Mhz *
- *	0: 615Mhz
- *	1: 800Mhz
- *	2: 888Mhz
- *	3: 1000Mhz
+ *
+ * ::
+ *
+ *  S: 19Mhz *
+ *  0: 615Mhz
+ *  1: 800Mhz
+ *  2: 888Mhz
+ *  3: 1000Mhz
  *
  *
  * To manually adjust these states, first select manual using
-- 
2.39.3


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning
  2023-11-05 21:00 [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning Hunter Chasens
@ 2023-11-06  5:15 ` Bagas Sanjaya
  2023-11-06  5:26   ` Randy Dunlap
  2023-11-06 11:36 ` Lazar, Lijo
  1 sibling, 1 reply; 8+ messages in thread
From: Bagas Sanjaya @ 2023-11-06  5:15 UTC (permalink / raw)
  To: Hunter Chasens, Linux Kernel Mailing List
  Cc: Lijo Lazar, Linux Documentation, Xinhui.Pan, amd-gfx,
	Linux DRI Development, alexander.deucher, evan.quan,
	christian.koenig

[-- Attachment #1: Type: text/plain, Size: 1030 bytes --]

On Sun, Nov 05, 2023 at 04:00:44PM -0500, Hunter Chasens wrote:
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 517b9fb4624c..703fe2542258 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -990,11 +990,14 @@ static ssize_t amdgpu_get_pp_features(struct device *dev,
>   * the power state and the clock information for those levels. If deep sleep is
>   * applied to a clock, the level will be denoted by a special level 'S:'
>   * E.g.,
> - *	S: 19Mhz *
> - *	0: 615Mhz
> - *	1: 800Mhz
> - *	2: 888Mhz
> - *	3: 1000Mhz
> + *
> + * ::
> + *
> + *  S: 19Mhz *
> + *  0: 615Mhz
> + *  1: 800Mhz
> + *  2: 888Mhz
> + *  3: 1000Mhz
>   *
>   *
>   * To manually adjust these states, first select manual using

LGTM, thanks!

Fixes: 615585d09b33 ("Documentation/amdgpu: Modify pp_dpm_*clk details")
Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning
  2023-11-06  5:15 ` Bagas Sanjaya
@ 2023-11-06  5:26   ` Randy Dunlap
  2023-11-06  8:14     ` Bagas Sanjaya
  0 siblings, 1 reply; 8+ messages in thread
From: Randy Dunlap @ 2023-11-06  5:26 UTC (permalink / raw)
  To: Bagas Sanjaya, Hunter Chasens, Linux Kernel Mailing List
  Cc: Lijo Lazar, Linux Documentation, Xinhui.Pan, amd-gfx,
	Linux DRI Development, alexander.deucher, evan.quan,
	christian.koenig



On 11/5/23 21:15, Bagas Sanjaya wrote:
> On Sun, Nov 05, 2023 at 04:00:44PM -0500, Hunter Chasens wrote:
>> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> index 517b9fb4624c..703fe2542258 100644
>> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> @@ -990,11 +990,14 @@ static ssize_t amdgpu_get_pp_features(struct device *dev,
>>   * the power state and the clock information for those levels. If deep sleep is
>>   * applied to a clock, the level will be denoted by a special level 'S:'
>>   * E.g.,
>> - *	S: 19Mhz *
>> - *	0: 615Mhz
>> - *	1: 800Mhz
>> - *	2: 888Mhz
>> - *	3: 1000Mhz
>> + *
>> + * ::
>> + *
>> + *  S: 19Mhz *
>> + *  0: 615Mhz
>> + *  1: 800Mhz
>> + *  2: 888Mhz
>> + *  3: 1000Mhz
>>   *
>>   *
>>   * To manually adjust these states, first select manual using
> 
> LGTM, thanks!
> 
> Fixes: 615585d09b33 ("Documentation/amdgpu: Modify pp_dpm_*clk details")
> Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
> 

but can it be done without being so obvious about using Sphinx (or is it ReST?)
in source files?

e.g.: (not tested)

 * E.g.:
 * *	S: 19Mhz *
 * *	0: 615Mhz
 * *	1: 800Mhz
 * *	2: 888Mhz
 * *	3: 1000Mhz

This is what I have seen done in quite a few source files.

Oh well, lots of files are already infected, so WTH. :(

-- 
~Randy

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning
  2023-11-06  5:26   ` Randy Dunlap
@ 2023-11-06  8:14     ` Bagas Sanjaya
  2023-11-06 10:15       ` Jani Nikula
  0 siblings, 1 reply; 8+ messages in thread
From: Bagas Sanjaya @ 2023-11-06  8:14 UTC (permalink / raw)
  To: Randy Dunlap, Hunter Chasens, Linux Kernel Mailing List
  Cc: Lijo Lazar, Linux Documentation, Xinhui.Pan, amd-gfx,
	Linux DRI Development, alexander.deucher, evan.quan,
	christian.koenig

[-- Attachment #1: Type: text/plain, Size: 1456 bytes --]

On Sun, Nov 05, 2023 at 09:26:26PM -0800, Randy Dunlap wrote:
> 
> 
> On 11/5/23 21:15, Bagas Sanjaya wrote:
> > On Sun, Nov 05, 2023 at 04:00:44PM -0500, Hunter Chasens wrote:
> >> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> >> index 517b9fb4624c..703fe2542258 100644
> >> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> >> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> >> @@ -990,11 +990,14 @@ static ssize_t amdgpu_get_pp_features(struct device *dev,
> >>   * the power state and the clock information for those levels. If deep sleep is
> >>   * applied to a clock, the level will be denoted by a special level 'S:'
> >>   * E.g.,
> >> - *	S: 19Mhz *
> >> - *	0: 615Mhz
> >> - *	1: 800Mhz
> >> - *	2: 888Mhz
> >> - *	3: 1000Mhz
> >> + *
> >> + * ::
> >> + *
> >> + *  S: 19Mhz *
> >> + *  0: 615Mhz
> >> + *  1: 800Mhz
> >> + *  2: 888Mhz
> >> + *  3: 1000Mhz
> >>   *
> >>   *
> >>   * To manually adjust these states, first select manual using
> > 
> > LGTM, thanks!
> > 
> > Fixes: 615585d09b33 ("Documentation/amdgpu: Modify pp_dpm_*clk details")
> > Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
> > 
> 
> but can it be done without being so obvious about using Sphinx (or is it ReST?)
> in source files?

Yes, the comment is included in Documentation/gpu/amdgpu/thermal.rst, so reST
syntax applies there.

-- 
An old man doll... just what I always wanted! - Clara

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning
  2023-11-06  8:14     ` Bagas Sanjaya
@ 2023-11-06 10:15       ` Jani Nikula
  2023-11-06 19:06         ` Hunter Chasens
  0 siblings, 1 reply; 8+ messages in thread
From: Jani Nikula @ 2023-11-06 10:15 UTC (permalink / raw)
  To: Bagas Sanjaya, Randy Dunlap, Hunter Chasens, Linux Kernel Mailing List
  Cc: Lijo Lazar, Linux Documentation, Xinhui.Pan,
	Linux DRI Development, amd-gfx, alexander.deucher, evan.quan,
	christian.koenig

On Mon, 06 Nov 2023, Bagas Sanjaya <bagasdotme@gmail.com> wrote:
> On Sun, Nov 05, 2023 at 09:26:26PM -0800, Randy Dunlap wrote:
>> 
>> 
>> On 11/5/23 21:15, Bagas Sanjaya wrote:
>> > On Sun, Nov 05, 2023 at 04:00:44PM -0500, Hunter Chasens wrote:
>> >> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> >> index 517b9fb4624c..703fe2542258 100644
>> >> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> >> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
>> >> @@ -990,11 +990,14 @@ static ssize_t amdgpu_get_pp_features(struct device *dev,
>> >>   * the power state and the clock information for those levels. If deep sleep is
>> >>   * applied to a clock, the level will be denoted by a special level 'S:'
>> >>   * E.g.,
>> >> - *	S: 19Mhz *
>> >> - *	0: 615Mhz
>> >> - *	1: 800Mhz
>> >> - *	2: 888Mhz
>> >> - *	3: 1000Mhz
>> >> + *
>> >> + * ::

The literal block marker :: could be added at the end of the preceding
paragraph, so it doesn't stand out so much. See [1].

BR,
Jani.

[1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#literal-blocks

>> >> + *
>> >> + *  S: 19Mhz *
>> >> + *  0: 615Mhz
>> >> + *  1: 800Mhz
>> >> + *  2: 888Mhz
>> >> + *  3: 1000Mhz
>> >>   *
>> >>   *
>> >>   * To manually adjust these states, first select manual using
>> > 
>> > LGTM, thanks!
>> > 
>> > Fixes: 615585d09b33 ("Documentation/amdgpu: Modify pp_dpm_*clk details")
>> > Reviewed-by: Bagas Sanjaya <bagasdotme@gmail.com>
>> > 
>> 
>> but can it be done without being so obvious about using Sphinx (or is it ReST?)
>> in source files?
>
> Yes, the comment is included in Documentation/gpu/amdgpu/thermal.rst, so reST
> syntax applies there.

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning
  2023-11-05 21:00 [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning Hunter Chasens
  2023-11-06  5:15 ` Bagas Sanjaya
@ 2023-11-06 11:36 ` Lazar, Lijo
  1 sibling, 0 replies; 8+ messages in thread
From: Lazar, Lijo @ 2023-11-06 11:36 UTC (permalink / raw)
  To: Hunter Chasens, linux-kernel
  Cc: linux-doc, Xinhui.Pan, dri-devel, amd-gfx, alexander.deucher,
	evan.quan, christian.koenig



On 11/6/2023 2:30 AM, Hunter Chasens wrote:
> Resolves Sphinx unexpected indentation warning when compiling
> documentation (e.g. `make htmldocs`). Replaces tabs with spaces and adds
> a literal block to keep vertical formatting of the
> example power state list.
> 
> Signed-off-by: Hunter Chasens <hunter.chasens18@ncf.edu>

Thanks!
	Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
> ---
>   drivers/gpu/drm/amd/pm/amdgpu_pm.c | 13 ++++++++-----
>   1 file changed, 8 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 517b9fb4624c..703fe2542258 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -990,11 +990,14 @@ static ssize_t amdgpu_get_pp_features(struct device *dev,
>    * the power state and the clock information for those levels. If deep sleep is
>    * applied to a clock, the level will be denoted by a special level 'S:'
>    * E.g.,
> - *	S: 19Mhz *
> - *	0: 615Mhz
> - *	1: 800Mhz
> - *	2: 888Mhz
> - *	3: 1000Mhz
> + *
> + * ::
> + *
> + *  S: 19Mhz *
> + *  0: 615Mhz
> + *  1: 800Mhz
> + *  2: 888Mhz
> + *  3: 1000Mhz
>    *
>    *
>    * To manually adjust these states, first select manual using

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning
  2023-11-06 10:15       ` Jani Nikula
@ 2023-11-06 19:06         ` Hunter Chasens
  2023-11-06 19:50           ` Randy Dunlap
  0 siblings, 1 reply; 8+ messages in thread
From: Hunter Chasens @ 2023-11-06 19:06 UTC (permalink / raw)
  To: Jani Nikula
  Cc: Xinhui.Pan, Linux Documentation, Linux DRI Development,
	Lijo Lazar, Linux Kernel Mailing List, amd-gfx, Randy Dunlap,
	Bagas Sanjaya, alexander.deucher, evan.quan, christian.koenig

First, apologies to Jani Nikula. I accedently top posted on the other thread.
My email client is giving me a hard time. The following works and, if 
everyone agrees, I'll send out a v2.

 * E.g.::
 *
 *  S: 19Mhz *
 *  0: 615Mhz
 *  1: 800Mhz
 *  2: 888Mhz
 *  3: 1000Mhz

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning
  2023-11-06 19:06         ` Hunter Chasens
@ 2023-11-06 19:50           ` Randy Dunlap
  0 siblings, 0 replies; 8+ messages in thread
From: Randy Dunlap @ 2023-11-06 19:50 UTC (permalink / raw)
  To: Hunter Chasens, Jani Nikula
  Cc: Lijo Lazar, Linux Documentation, Xinhui.Pan,
	Linux Kernel Mailing List, amd-gfx, Linux DRI Development,
	Bagas Sanjaya, alexander.deucher, evan.quan, christian.koenig



On 11/6/23 11:06, Hunter Chasens wrote:
> First, apologies to Jani Nikula. I accedently top posted on the other thread.
> My email client is giving me a hard time. The following works and, if 
> everyone agrees, I'll send out a v2.
> 
>  * E.g.::
>  *
>  *  S: 19Mhz *
>  *  0: 615Mhz
>  *  1: 800Mhz
>  *  2: 888Mhz
>  *  3: 1000Mhz

Please do.
Thanks.

-- 
~Randy

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-11-06 19:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-05 21:00 [PATCH v1] drm: amd: Resolve Sphinx unexpected indentation warning Hunter Chasens
2023-11-06  5:15 ` Bagas Sanjaya
2023-11-06  5:26   ` Randy Dunlap
2023-11-06  8:14     ` Bagas Sanjaya
2023-11-06 10:15       ` Jani Nikula
2023-11-06 19:06         ` Hunter Chasens
2023-11-06 19:50           ` Randy Dunlap
2023-11-06 11:36 ` Lazar, Lijo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).