Trivial style fixes
Subsystems (2)
cover Trivial style fixes
Hi
Browsing through my endless list of branches I found a few with random cleanups that I fix while rading the code. They tend to be forgotten over the time and never sent. This time I decided to send them. And I have plenty more :-)
Andi
Andi Shyti (4):
drm/i915/gt: Fix typos in comments
drm/i915/gt: Fix SPDX license format
drm/i915/gt: Remove trailing blank lines
drm/i915/gt: Use proper sleeping functions for timeouts shorter than
20ms
drivers/gpu/drm/i915/gt/intel_gtt.c | 1 - drivers/gpu/drm/i915/gt/intel_lrc.c | 1 - drivers/gpu/drm/i915/gt/intel_migrate.c | 2 +- drivers/gpu/drm/i915/gt/intel_mocs.c | 1 - drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- drivers/gpu/drm/i915/gt/intel_wopcm.h | 3 +-- drivers/gpu/drm/i915/gt/selftest_rc6.c | 3 ++- drivers/gpu/drm/i915/gt/selftest_tlb.c | 2 +- 8 files changed, 6 insertions(+), 9 deletions(-)
Signature · 1 line
2.47.2
PATCH 1/4 drm/i915/gt: Fix typos in comments
upto -> up to
acknowledgement -> acknowledgment
--- drivers/gpu/drm/i915/gt/intel_migrate.c | 2 +- drivers/gpu/drm/i915/gt/intel_reset.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gt/intel_migrate.c +1 -1
@@ -643,7 +643,7 @@ calculate_chunk_sz(struct drm_i915_private *i915, bool src_is_lmem, {if (ccs_bytes_to_cpy && !src_is_lmem)/* -* When CHUNK_SZ is passed all the pages upto CHUNK_SZ +* When CHUNK_SZ is passed all the pages up to CHUNK_SZ * will be taken for the blt. in Flat-ccs supported * platform Smem obj will have more pages than required * for main memory hence limit it to the required size
drivers/gpu/drm/i915/gt/intel_reset.c +1 -1
@@ -162,7 +162,7 @@ static int i915_do_reset(struct intel_gt *gt,struct pci_dev *pdev =to_pci_dev (gt->i915->drm.dev);int err; -/* Assert reset for at least 50 usec, and wait for acknowledgement. */ +/* Assert reset for at least 50 usec, and wait for acknowledgment */ pci_write_config_byte (pdev,I915_GDRST ,GRDOM_RESET_ENABLE );udelay (50 ); err =_wait_for_atomic (i915_in_reset (pdev),50000 ,0 );
Signature · 1 line
2.47.2
Re: [PATCH 1/4] drm/i915/gt: Fix typos in comments
Hi
Quoted 2 lines · Andi Shyti
upto -> up to
acknowledgement -> acknowledgment
Both spellings are correct.
Signature · 2 lines
Best regards, Sebastian
Re: [PATCH 1/4] drm/i915/gt: Fix typos in comments
Hi Sebastian,
Quoted 4 lines · Sebastian Brzezinka
Quoted 2 lines · Andi Shyti
upto -> up to
acknowledgement -> acknowledgmentBoth spellings are correct.
thanks a lot for checking this, you are right! The former is UK english and we don't change it. I will drop this patch as it's not worth sending a patch for such a small change.
Thanks for looking into it and for your review.
Andi
PATCH 2/4 drm/i915/gt: Fix SPDX license format
In reply to Andi ShytiHeader files need to declare the SPDX under /* ... */ style comments at the beginning of the file.
--- drivers/gpu/drm/i915/gt/intel_wopcm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/gt/intel_wopcm.h +1 -2
@@ -1,6 +1,5 @@ +/* SPDX-License-Identifier: MIT */ /* -* SPDX-License-Identifier: MIT -* * Copyright © 2017-2018 Intel Corporation */
Signature · 1 line
2.47.2
Re: [PATCH 2/4] drm/i915/gt: Fix SPDX license format
Hi Andi
Quoted 1 line
Header files need to declare the SPDX under /* ... */ style
All files modified in this patch series start with:
// SPDX-License-Identifier: MIT
rather than:
/* SPDX-License-Identifier: MIT */
As a note:
:~/linux/drm-tip/drivers/gpu/drm/i915$ rg "// SPDX-License-Identifier: " | wc -l 242 :~/linux/drm-tip/drivers/gpu/drm/i915$ rg "/* SPDX-License-Identifier: " | wc -l 696
are those styles interchangable or is one preferred over the other? I am just curious seeing both are being used.
Best Regards,
Krzysztof
Re: [PATCH 2/4] drm/i915/gt: Fix SPDX license format
Quoted 6 lines · Krzysztof Karas
Quoted 1 line
Header files need to declare the SPDX under /* ... */ style
All files modified in this patch series start with:
// SPDX-License-Identifier: MIT
rather than:
/* SPDX-License-Identifier: MIT */
Quoted 8 lines
As a note:
:~/linux/drm-tip/drivers/gpu/drm/i915$ rg "// SPDX-License-Identifier: " | wc -l 242 :~/linux/drm-tip/drivers/gpu/drm/i915$ rg "/* SPDX-License-Identifier: " | wc -l 696are those styles interchangable or is one preferred over the other? I am just curious seeing both are being used.
It's an ugly mess that for some reason people have accepted from the beginning. The SPDX license has a different format for .c and .h file :/
Andi
RE: [PATCH 2/4] drm/i915/gt: Fix SPDX license format
HI Andi,
Quoted 15 lines · Krzysztof Karas
Quoted 14 lines
Quoted 1 line
Header files need to declare the SPDX under /* ... */ style
All files modified in this patch series start with:
// SPDX-License-Identifier: MIT
rather than:
/* SPDX-License-Identifier: MIT */As a note:
:~/linux/drm-tip/drivers/gpu/drm/i915$ rg "// SPDX-License-Identifier: " | wc -l 242 :~/linux/drm-tip/drivers/gpu/drm/i915$ rg "/* SPDX-License-Identifier: " | wc -l 696
Quoted 7 lines
Quoted 2 lines
are those styles interchangable or is one preferred over the other? I am just curious seeing both are being used.
It's an ugly mess that for some reason people have accepted from the beginning. The SPDX license has a different format for .c and .h file :/
Andi
A similar change is required in selftests/mock_timeline.h header also.
As per https://docs.kernel.org/process/license-rules.html,
for ASM files also required this style: /* SPDX-License-Identifier: <SPDX License Expression> */
There are two asm files hsw.asm and ivb.asm under i915/gt/shaders/clear_kernel. It will be better if we update the license style in asm files as well.
Regards,
Nitin
PATCH 3/4 drm/i915/gt: Remove trailing blank lines
In reply to Andi ShytiRemove useless blank lines before and after the brackets.
--- drivers/gpu/drm/i915/gt/intel_gtt.c | 1 - drivers/gpu/drm/i915/gt/intel_lrc.c | 1 - drivers/gpu/drm/i915/gt/intel_mocs.c | 1 - 3 files changed, 3 deletions(-)
drivers/gpu/drm/i915/gt/intel_gtt.c +0 -1
@@ -176,7 +176,6 @@ static void clear_vm_list(struct list_head *list)i915_vma_destroy_locked (vma);i915_gem_object_put (obj); } - } }
drivers/gpu/drm/i915/gt/intel_lrc.c +0 -1
@@ -751,7 +751,6 @@ static int lrc_ring_indirect_offset(const struct intel_engine_cs *engine)static int lrc_ring_cmd_buf_cctl (const struct intel_engine_cs *engine) { -if (GRAPHICS_VER_FULL (engine->i915) >=IP_VER (12 ,55 ))/* * Note that the CSFE context has a dummy slot for CMD_BUF_CCTL
drivers/gpu/drm/i915/gt/intel_mocs.c +0 -1
@@ -314,7 +314,6 @@ static const struct drm_i915_mocs_entry icl_mocs_table[] = { };static const struct drm_i915_mocs_entry dg1_mocs_table[] = { -/* UC */ MOCS_ENTRY (1 ,0 ,L3_1_UC ),/* WB - L3 */
Signature · 1 line
2.47.2
RE: [PATCH 3/4] drm/i915/gt: Remove trailing blank lines
Hi Andi,
Quoted 55 lines
-----Original Message-----
From: Intel-gfx <[email protected]> On Behalf Of Andi Shyti
Sent: Friday, March 14, 2025 7:42 AM
To: intel-gfx <[email protected]>
Cc: Andi Shyti <[email protected]>; Andi Shyti <[email protected]>
Subject: [PATCH 3/4] drm/i915/gt: Remove trailing blank linesRemove useless blank lines before and after the brackets.
Signed-off-by Andi Shyti <[email protected]>---
drivers/gpu/drm/i915/gt/intel_gtt.c| 1 -drivers/gpu/drm/i915/gt/intel_lrc.c|
1 -drivers/gpu/drm/i915/gt/intel_mocs.c| 1 -3 files changed, 3 deletions(-)drivers/gpu/drm/i915/gt/intel_gtt.c +0
-1@@ -176,7 +176,6 @@ static void clear_vm_list(struct list_head *list)i915_vma_destroy_locked (vma);i915_gem_object_put (obj); } - } }drivers/gpu/drm/i915/gt/intel_lrc.c +0
-1@@ -751,7 +751,6 @@ static int lrc_ring_indirect_offset(const struct intel_engine_cs *engine)static int lrc_ring_cmd_buf_cctl (const struct intel_engine_cs *engine) { -if (GRAPHICS_VER_FULL (engine->i915) >=IP_VER (12 ,55 ))/* * Note that the CSFE context has a dummy slot for
CMD_BUF_CCTLdiff --gita/drivers/gpu/drm/i915/gt/intel_mocs.cb/drivers/gpu/drm/i915/gt/intel_mocs.c
indexcf41d325712e..5dd8121f4b15100644drivers/gpu/drm/i915/gt/intel_mocs.c +0
-2@@ -314,7 +314,6 @@ static const struct drm_i915_mocs_entry icl_mocs_table[] = { };static const struct drm_i915_mocs_entry dg1_mocs_table[] = { -/* UC */ MOCS_ENTRY (1 ,0 ,L3_1_UC ),/* WB - L3 */ --
Quoted 1 line
2.47.2
The patch looks good to me.
PATCH 4/4 drm/i915/gt: Use proper sleeping functions for timeouts shorter than 20ms
In reply to Andi Shytimsleep is very unprecise for timeouts shorter than 20 milliseconds and most probably will sleep longer. Use uslee_range() instead.
--- drivers/gpu/drm/i915/gt/selftest_rc6.c | 3 ++- drivers/gpu/drm/i915/gt/selftest_tlb.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gt/selftest_rc6.c +2 -1
@@ -60,7 +60,8 @@ int live_rc6_manual(void *arg)/* Force RC6 off for starters */ __intel_rc6_disable (rc6); -msleep (1 );/* wakeup is not immediate, takes about 100us on icl */ +/* wakeup is not immediate, takes about 100us on icl */ +usleep_range (1000 ,2000 ); res[0 ] =rc6_residency (rc6);
drivers/gpu/drm/i915/gt/selftest_tlb.c +1 -1
@@ -143,7 +143,7 @@ pte_tlbinv(struct intel_context *ce,if (ce->engine->class ==OTHER_CLASS )msleep (200 );else -msleep (10 ); +usleep_range (10000 ,20000 );if (va == vb) {if (!i915_request_completed (rq)) {
Signature · 1 line
2.47.2
RE: [PATCH 4/4] drm/i915/gt: Use proper sleeping functions for timeouts shorter than 20ms
Hi Andi,
Quoted 6 lines
Subject: [PATCH 4/4] drm/i915/gt: Use proper sleeping functions for timeouts shorter than 20ms
msleep is very unprecise for timeouts shorter than 20 milliseconds and most probably will sleep longer. Use
uslee_range()instead.
Typo:
%s/uslee_range()/usleep_range()
With typo fix, the patch looks good to me.
Quoted 38 lines
Signed-off-by Andi Shyti <[email protected]>--- drivers/gpu/drm/i915/gt/selftest_rc6.c | 3 ++- drivers/gpu/drm/i915/gt/selftest_tlb.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)drivers/gpu/drm/i915/gt/selftest_rc6.c +2
-1@@ -60,7 +60,8 @@ int live_rc6_manual(void *arg)/* Force RC6 off for starters */ __intel_rc6_disable (rc6); -msleep (1 );/* wakeup is not immediate, takes about 100us on icl */ +/* wakeup is not immediate, takes about 100us on icl */ +usleep_range (1000 ,2000 ); res[0 ] =rc6_residency (rc6);drivers/gpu/drm/i915/gt/selftest_tlb.c +1
-2@@ -143,7 +143,7 @@ pte_tlbinv(struct intel_context *ce,if (ce->engine->class ==OTHER_CLASS )msleep (200 );else -msleep (10 ); +usleep_range (10000 ,20000 );if (va == vb) {if (!i915_request_completed (rq)) { --2.47.2
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for Trivial style fixes
In reply to Andi Shyti== Series Details ==
== Series Details ==
Series: Trivial style fixes
URL : https://patchwork.freedesktop.org/series/146278/
State : warning
== Summary ==
Error: dim checkpatch failed6f2c9455289e drm/i915/gt: Fix typos in comments
-:6: WARNING:TYPO_SPELLING: 'upto' may be misspelled - perhaps 'up to'? #6:
upto -> up to
^^^^
-:7: WARNING:TYPO_SPELLING: 'acknowledgement' may be misspelled - perhaps 'acknowledgment'? #7:
acknowledgement -> acknowledgment
^^^^^^^^^^^^^^^
total: 0 errors, 2 warnings, 0 checks, 16 lines checked485bc8f3e0be drm/i915/gt: Fix SPDX license formatd9992d83cb54 drm/i915/gt: Remove trailing blank lines958dca2127ae drm/i915/gt: Use proper sleeping functions for timeouts shorter than 20ms -:7: WARNING:TYPO_SPELLING: 'unprecise' may be misspelled - perhaps 'imprecise'? #7:
msleep is very unprecise for timeouts shorter than 20
^^^^^^^^^
total: 0 errors, 1 warnings, 0 checks, 17 lines checked
Patchwork
CI✗ Fi.CI.SPARSE: warning for Trivial style fixes
In reply to Andi Shyti== Series Details ==
== Series Details ==
Series: Trivial style fixes
URL : https://patchwork.freedesktop.org/series/146278/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
Hi Andi
Quoted 4 lines · Andi Shyti
Hi
Browsing through my endless list of branches I found a few with random cleanups that I fix while rading the code. They tend to be
s/rading/reading
The whole series looks good in my opinion.
Signature · 2 lines
Best regards, Sebastian
Hi Andi,
Quoted 6 lines
Hi
Browsing through my endless list of branches I found a few with random cleanups that I fix while rading the code. They tend to be forgotten over the time and never sent. This time I decided to send them.
The patches look good:
on the whole series.
Quoted 1 line
And I have plenty more :-)
Can't wait! :)
Best Regards,
Krzysztof