* [PATCH] drm/panfrost: cleanup comments
@ 2022-03-01 12:43 ` trix
0 siblings, 0 replies; 6+ messages in thread
From: trix @ 2022-03-01 12:43 UTC (permalink / raw)
To: robh, tomeu.vizoso, steven.price, alyssa.rosenzweig, airlied, daniel
Cc: dri-devel, linux-kernel, Tom Rix
From: Tom Rix <trix@redhat.com>
For spdx
change tab to space delimiter
Use // for *.c
Replacements
commited to committed, use multiline comment style
regsiters to registers
initialze to initialize
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_issues.h | 6 ++++--
drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_regs.h | 2 +-
5 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 96bb5a4656278..94b6f0a19c83a 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -562,7 +562,7 @@ static int panfrost_probe(struct platform_device *pdev)
pfdev->coherent = device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT;
- /* Allocate and initialze the DRM device. */
+ /* Allocate and initialize the DRM device. */
ddev = drm_dev_alloc(&panfrost_drm_driver, &pdev->dev);
if (IS_ERR(ddev))
return PTR_ERR(ddev);
diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
index b0142341e2235..77e7cb6d1ae3b 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2019 Arm Ltd.
*
* Based on msm_gem_freedreno.c:
diff --git a/drivers/gpu/drm/panfrost/panfrost_issues.h b/drivers/gpu/drm/panfrost/panfrost_issues.h
index 8e59d765bf19f..4e7cf979ee67a 100644
--- a/drivers/gpu/drm/panfrost/panfrost_issues.h
+++ b/drivers/gpu/drm/panfrost/panfrost_issues.h
@@ -13,8 +13,10 @@
* to care about.
*/
enum panfrost_hw_issue {
- /* Need way to guarantee that all previously-translated memory accesses
- * are commited */
+ /*
+ * Need way to guarantee that all previously-translated memory accesses
+ * are committed
+ */
HW_ISSUE_6367,
/* On job complete with non-done the cache is not flushed */
diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
index 39562f2d11a47..d3f82b26a631d 100644
--- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0
/* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
#include <drm/panfrost_drm.h>
diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h
index 6c5a11ef1ee87..efe4b75149d35 100644
--- a/drivers/gpu/drm/panfrost/panfrost_regs.h
+++ b/drivers/gpu/drm/panfrost/panfrost_regs.h
@@ -292,7 +292,7 @@
#define AS_FAULTADDRESS_LO(as) (MMU_AS(as) + 0x20) /* (RO) Fault Address for address space n, low word */
#define AS_FAULTADDRESS_HI(as) (MMU_AS(as) + 0x24) /* (RO) Fault Address for address space n, high word */
#define AS_STATUS(as) (MMU_AS(as) + 0x28) /* (RO) Status flags for address space n */
-/* Additional Bifrost AS regsiters */
+/* Additional Bifrost AS registers */
#define AS_TRANSCFG_LO(as) (MMU_AS(as) + 0x30) /* (RW) Translation table configuration for address space n, low word */
#define AS_TRANSCFG_HI(as) (MMU_AS(as) + 0x34) /* (RW) Translation table configuration for address space n, high word */
#define AS_FAULTEXTRA_LO(as) (MMU_AS(as) + 0x38) /* (RO) Secondary fault address for address space n, low word */
--
2.26.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/panfrost: cleanup comments
@ 2022-03-01 12:43 ` trix
0 siblings, 0 replies; 6+ messages in thread
From: trix @ 2022-03-01 12:43 UTC (permalink / raw)
To: robh, tomeu.vizoso, steven.price, alyssa.rosenzweig, airlied, daniel
Cc: Tom Rix, linux-kernel, dri-devel
From: Tom Rix <trix@redhat.com>
For spdx
change tab to space delimiter
Use // for *.c
Replacements
commited to committed, use multiline comment style
regsiters to registers
initialze to initialize
Signed-off-by: Tom Rix <trix@redhat.com>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_issues.h | 6 ++++--
drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +-
drivers/gpu/drm/panfrost/panfrost_regs.h | 2 +-
5 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 96bb5a4656278..94b6f0a19c83a 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -562,7 +562,7 @@ static int panfrost_probe(struct platform_device *pdev)
pfdev->coherent = device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT;
- /* Allocate and initialze the DRM device. */
+ /* Allocate and initialize the DRM device. */
ddev = drm_dev_alloc(&panfrost_drm_driver, &pdev->dev);
if (IS_ERR(ddev))
return PTR_ERR(ddev);
diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
index b0142341e2235..77e7cb6d1ae3b 100644
--- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
+++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: GPL-2.0 */
+// SPDX-License-Identifier: GPL-2.0
/* Copyright (C) 2019 Arm Ltd.
*
* Based on msm_gem_freedreno.c:
diff --git a/drivers/gpu/drm/panfrost/panfrost_issues.h b/drivers/gpu/drm/panfrost/panfrost_issues.h
index 8e59d765bf19f..4e7cf979ee67a 100644
--- a/drivers/gpu/drm/panfrost/panfrost_issues.h
+++ b/drivers/gpu/drm/panfrost/panfrost_issues.h
@@ -13,8 +13,10 @@
* to care about.
*/
enum panfrost_hw_issue {
- /* Need way to guarantee that all previously-translated memory accesses
- * are commited */
+ /*
+ * Need way to guarantee that all previously-translated memory accesses
+ * are committed
+ */
HW_ISSUE_6367,
/* On job complete with non-done the cache is not flushed */
diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
index 39562f2d11a47..d3f82b26a631d 100644
--- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
+++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0
+// SPDX-License-Identifier: GPL-2.0
/* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
#include <drm/panfrost_drm.h>
diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h
index 6c5a11ef1ee87..efe4b75149d35 100644
--- a/drivers/gpu/drm/panfrost/panfrost_regs.h
+++ b/drivers/gpu/drm/panfrost/panfrost_regs.h
@@ -292,7 +292,7 @@
#define AS_FAULTADDRESS_LO(as) (MMU_AS(as) + 0x20) /* (RO) Fault Address for address space n, low word */
#define AS_FAULTADDRESS_HI(as) (MMU_AS(as) + 0x24) /* (RO) Fault Address for address space n, high word */
#define AS_STATUS(as) (MMU_AS(as) + 0x28) /* (RO) Status flags for address space n */
-/* Additional Bifrost AS regsiters */
+/* Additional Bifrost AS registers */
#define AS_TRANSCFG_LO(as) (MMU_AS(as) + 0x30) /* (RW) Translation table configuration for address space n, low word */
#define AS_TRANSCFG_HI(as) (MMU_AS(as) + 0x34) /* (RW) Translation table configuration for address space n, high word */
#define AS_FAULTEXTRA_LO(as) (MMU_AS(as) + 0x38) /* (RO) Secondary fault address for address space n, low word */
--
2.26.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panfrost: cleanup comments
2022-03-01 12:43 ` trix
@ 2022-03-02 9:09 ` Steven Price
-1 siblings, 0 replies; 6+ messages in thread
From: Steven Price @ 2022-03-02 9:09 UTC (permalink / raw)
To: trix, robh, tomeu.vizoso, alyssa.rosenzweig, airlied, daniel
Cc: dri-devel, linux-kernel
On 01/03/2022 12:43, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> For spdx
> change tab to space delimiter
> Use // for *.c
>
> Replacements
> commited to committed, use multiline comment style
> regsiters to registers
> initialze to initialize
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Thanks, most of the changes look reasonable (although I've never
understood the reason for using // for SPDX comments), but there's one
below that I think needs rethinking.
> ---
> drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
> drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +-
> drivers/gpu/drm/panfrost/panfrost_issues.h | 6 ++++--
> drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +-
> drivers/gpu/drm/panfrost/panfrost_regs.h | 2 +-
> 5 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 96bb5a4656278..94b6f0a19c83a 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -562,7 +562,7 @@ static int panfrost_probe(struct platform_device *pdev)
>
> pfdev->coherent = device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT;
>
> - /* Allocate and initialze the DRM device. */
> + /* Allocate and initialize the DRM device. */
> ddev = drm_dev_alloc(&panfrost_drm_driver, &pdev->dev);
> if (IS_ERR(ddev))
> return PTR_ERR(ddev);
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> index b0142341e2235..77e7cb6d1ae3b 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> @@ -1,4 +1,4 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> +// SPDX-License-Identifier: GPL-2.0
> /* Copyright (C) 2019 Arm Ltd.
> *
> * Based on msm_gem_freedreno.c:
> diff --git a/drivers/gpu/drm/panfrost/panfrost_issues.h b/drivers/gpu/drm/panfrost/panfrost_issues.h
> index 8e59d765bf19f..4e7cf979ee67a 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_issues.h
> +++ b/drivers/gpu/drm/panfrost/panfrost_issues.h
> @@ -13,8 +13,10 @@
> * to care about.
> */
> enum panfrost_hw_issue {
> - /* Need way to guarantee that all previously-translated memory accesses
> - * are commited */
> + /*
> + * Need way to guarantee that all previously-translated memory accesses
> + * are committed
> + */
This file has a whole load of multiline comments that don't technically
follow the coding style. Fixing just one comment makes the file
inconsistent. Note we recently had a discussion about this[1] and
decided to leave the comment style as is. And I have to admit in this
instance avoiding the extra mostly-blank lines makes the list easier to
read. The typo fix is obviously welcomed though!
[1] https://lore.kernel.org/r/c7331489-ad04-0f35-224e-164f144fb819%40arm.com
> HW_ISSUE_6367,
>
> /* On job complete with non-done the cache is not flushed */
> diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> index 39562f2d11a47..d3f82b26a631d 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> @@ -1,4 +1,4 @@
> -// SPDX-License-Identifier: GPL-2.0
> +// SPDX-License-Identifier: GPL-2.0
> /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
>
> #include <drm/panfrost_drm.h>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h
> index 6c5a11ef1ee87..efe4b75149d35 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_regs.h
> +++ b/drivers/gpu/drm/panfrost/panfrost_regs.h
> @@ -292,7 +292,7 @@
> #define AS_FAULTADDRESS_LO(as) (MMU_AS(as) + 0x20) /* (RO) Fault Address for address space n, low word */
> #define AS_FAULTADDRESS_HI(as) (MMU_AS(as) + 0x24) /* (RO) Fault Address for address space n, high word */
> #define AS_STATUS(as) (MMU_AS(as) + 0x28) /* (RO) Status flags for address space n */
> -/* Additional Bifrost AS regsiters */
> +/* Additional Bifrost AS registers */
> #define AS_TRANSCFG_LO(as) (MMU_AS(as) + 0x30) /* (RW) Translation table configuration for address space n, low word */
> #define AS_TRANSCFG_HI(as) (MMU_AS(as) + 0x34) /* (RW) Translation table configuration for address space n, high word */
> #define AS_FAULTEXTRA_LO(as) (MMU_AS(as) + 0x38) /* (RO) Secondary fault address for address space n, low word */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panfrost: cleanup comments
@ 2022-03-02 9:09 ` Steven Price
0 siblings, 0 replies; 6+ messages in thread
From: Steven Price @ 2022-03-02 9:09 UTC (permalink / raw)
To: trix, robh, tomeu.vizoso, alyssa.rosenzweig, airlied, daniel
Cc: linux-kernel, dri-devel
On 01/03/2022 12:43, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> For spdx
> change tab to space delimiter
> Use // for *.c
>
> Replacements
> commited to committed, use multiline comment style
> regsiters to registers
> initialze to initialize
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Thanks, most of the changes look reasonable (although I've never
understood the reason for using // for SPDX comments), but there's one
below that I think needs rethinking.
> ---
> drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
> drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +-
> drivers/gpu/drm/panfrost/panfrost_issues.h | 6 ++++--
> drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +-
> drivers/gpu/drm/panfrost/panfrost_regs.h | 2 +-
> 5 files changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 96bb5a4656278..94b6f0a19c83a 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -562,7 +562,7 @@ static int panfrost_probe(struct platform_device *pdev)
>
> pfdev->coherent = device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT;
>
> - /* Allocate and initialze the DRM device. */
> + /* Allocate and initialize the DRM device. */
> ddev = drm_dev_alloc(&panfrost_drm_driver, &pdev->dev);
> if (IS_ERR(ddev))
> return PTR_ERR(ddev);
> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> index b0142341e2235..77e7cb6d1ae3b 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
> @@ -1,4 +1,4 @@
> -/* SPDX-License-Identifier: GPL-2.0 */
> +// SPDX-License-Identifier: GPL-2.0
> /* Copyright (C) 2019 Arm Ltd.
> *
> * Based on msm_gem_freedreno.c:
> diff --git a/drivers/gpu/drm/panfrost/panfrost_issues.h b/drivers/gpu/drm/panfrost/panfrost_issues.h
> index 8e59d765bf19f..4e7cf979ee67a 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_issues.h
> +++ b/drivers/gpu/drm/panfrost/panfrost_issues.h
> @@ -13,8 +13,10 @@
> * to care about.
> */
> enum panfrost_hw_issue {
> - /* Need way to guarantee that all previously-translated memory accesses
> - * are commited */
> + /*
> + * Need way to guarantee that all previously-translated memory accesses
> + * are committed
> + */
This file has a whole load of multiline comments that don't technically
follow the coding style. Fixing just one comment makes the file
inconsistent. Note we recently had a discussion about this[1] and
decided to leave the comment style as is. And I have to admit in this
instance avoiding the extra mostly-blank lines makes the list easier to
read. The typo fix is obviously welcomed though!
[1] https://lore.kernel.org/r/c7331489-ad04-0f35-224e-164f144fb819%40arm.com
> HW_ISSUE_6367,
>
> /* On job complete with non-done the cache is not flushed */
> diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> index 39562f2d11a47..d3f82b26a631d 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> @@ -1,4 +1,4 @@
> -// SPDX-License-Identifier: GPL-2.0
> +// SPDX-License-Identifier: GPL-2.0
> /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
>
> #include <drm/panfrost_drm.h>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h
> index 6c5a11ef1ee87..efe4b75149d35 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_regs.h
> +++ b/drivers/gpu/drm/panfrost/panfrost_regs.h
> @@ -292,7 +292,7 @@
> #define AS_FAULTADDRESS_LO(as) (MMU_AS(as) + 0x20) /* (RO) Fault Address for address space n, low word */
> #define AS_FAULTADDRESS_HI(as) (MMU_AS(as) + 0x24) /* (RO) Fault Address for address space n, high word */
> #define AS_STATUS(as) (MMU_AS(as) + 0x28) /* (RO) Status flags for address space n */
> -/* Additional Bifrost AS regsiters */
> +/* Additional Bifrost AS registers */
> #define AS_TRANSCFG_LO(as) (MMU_AS(as) + 0x30) /* (RW) Translation table configuration for address space n, low word */
> #define AS_TRANSCFG_HI(as) (MMU_AS(as) + 0x34) /* (RW) Translation table configuration for address space n, high word */
> #define AS_FAULTEXTRA_LO(as) (MMU_AS(as) + 0x38) /* (RO) Secondary fault address for address space n, low word */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panfrost: cleanup comments
2022-03-02 9:09 ` Steven Price
@ 2022-03-02 12:18 ` Tom Rix
-1 siblings, 0 replies; 6+ messages in thread
From: Tom Rix @ 2022-03-02 12:18 UTC (permalink / raw)
To: Steven Price, robh, tomeu.vizoso, alyssa.rosenzweig, airlied, daniel
Cc: dri-devel, linux-kernel
On 3/2/22 1:09 AM, Steven Price wrote:
> On 01/03/2022 12:43, trix@redhat.com wrote:
>> From: Tom Rix <trix@redhat.com>
>>
>> For spdx
>> change tab to space delimiter
>> Use // for *.c
>>
>> Replacements
>> commited to committed, use multiline comment style
>> regsiters to registers
>> initialze to initialize
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
> Thanks, most of the changes look reasonable (although I've never
> understood the reason for using // for SPDX comments), but there's one
> below that I think needs rethinking.
>
>> ---
>> drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
>> drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +-
>> drivers/gpu/drm/panfrost/panfrost_issues.h | 6 ++++--
>> drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +-
>> drivers/gpu/drm/panfrost/panfrost_regs.h | 2 +-
>> 5 files changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
>> index 96bb5a4656278..94b6f0a19c83a 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
>> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
>> @@ -562,7 +562,7 @@ static int panfrost_probe(struct platform_device *pdev)
>>
>> pfdev->coherent = device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT;
>>
>> - /* Allocate and initialze the DRM device. */
>> + /* Allocate and initialize the DRM device. */
>> ddev = drm_dev_alloc(&panfrost_drm_driver, &pdev->dev);
>> if (IS_ERR(ddev))
>> return PTR_ERR(ddev);
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
>> index b0142341e2235..77e7cb6d1ae3b 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
>> +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
>> @@ -1,4 +1,4 @@
>> -/* SPDX-License-Identifier: GPL-2.0 */
>> +// SPDX-License-Identifier: GPL-2.0
>> /* Copyright (C) 2019 Arm Ltd.
>> *
>> * Based on msm_gem_freedreno.c:
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_issues.h b/drivers/gpu/drm/panfrost/panfrost_issues.h
>> index 8e59d765bf19f..4e7cf979ee67a 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_issues.h
>> +++ b/drivers/gpu/drm/panfrost/panfrost_issues.h
>> @@ -13,8 +13,10 @@
>> * to care about.
>> */
>> enum panfrost_hw_issue {
>> - /* Need way to guarantee that all previously-translated memory accesses
>> - * are commited */
>> + /*
>> + * Need way to guarantee that all previously-translated memory accesses
>> + * are committed
>> + */
> This file has a whole load of multiline comments that don't technically
> follow the coding style. Fixing just one comment makes the file
> inconsistent. Note we recently had a discussion about this[1] and
> decided to leave the comment style as is. And I have to admit in this
> instance avoiding the extra mostly-blank lines makes the list easier to
> read. The typo fix is obviously welcomed though!
I'll switch this back in a respin.
Thanks
Tom
>
> [1] https://lore.kernel.org/r/c7331489-ad04-0f35-224e-164f144fb819%40arm.com
>
>> HW_ISSUE_6367,
>>
>> /* On job complete with non-done the cache is not flushed */
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
>> index 39562f2d11a47..d3f82b26a631d 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
>> +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
>> @@ -1,4 +1,4 @@
>> -// SPDX-License-Identifier: GPL-2.0
>> +// SPDX-License-Identifier: GPL-2.0
>> /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
>>
>> #include <drm/panfrost_drm.h>
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h
>> index 6c5a11ef1ee87..efe4b75149d35 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_regs.h
>> +++ b/drivers/gpu/drm/panfrost/panfrost_regs.h
>> @@ -292,7 +292,7 @@
>> #define AS_FAULTADDRESS_LO(as) (MMU_AS(as) + 0x20) /* (RO) Fault Address for address space n, low word */
>> #define AS_FAULTADDRESS_HI(as) (MMU_AS(as) + 0x24) /* (RO) Fault Address for address space n, high word */
>> #define AS_STATUS(as) (MMU_AS(as) + 0x28) /* (RO) Status flags for address space n */
>> -/* Additional Bifrost AS regsiters */
>> +/* Additional Bifrost AS registers */
>> #define AS_TRANSCFG_LO(as) (MMU_AS(as) + 0x30) /* (RW) Translation table configuration for address space n, low word */
>> #define AS_TRANSCFG_HI(as) (MMU_AS(as) + 0x34) /* (RW) Translation table configuration for address space n, high word */
>> #define AS_FAULTEXTRA_LO(as) (MMU_AS(as) + 0x38) /* (RO) Secondary fault address for address space n, low word */
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panfrost: cleanup comments
@ 2022-03-02 12:18 ` Tom Rix
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rix @ 2022-03-02 12:18 UTC (permalink / raw)
To: Steven Price, robh, tomeu.vizoso, alyssa.rosenzweig, airlied, daniel
Cc: linux-kernel, dri-devel
On 3/2/22 1:09 AM, Steven Price wrote:
> On 01/03/2022 12:43, trix@redhat.com wrote:
>> From: Tom Rix <trix@redhat.com>
>>
>> For spdx
>> change tab to space delimiter
>> Use // for *.c
>>
>> Replacements
>> commited to committed, use multiline comment style
>> regsiters to registers
>> initialze to initialize
>>
>> Signed-off-by: Tom Rix <trix@redhat.com>
> Thanks, most of the changes look reasonable (although I've never
> understood the reason for using // for SPDX comments), but there's one
> below that I think needs rethinking.
>
>> ---
>> drivers/gpu/drm/panfrost/panfrost_drv.c | 2 +-
>> drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c | 2 +-
>> drivers/gpu/drm/panfrost/panfrost_issues.h | 6 ++++--
>> drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +-
>> drivers/gpu/drm/panfrost/panfrost_regs.h | 2 +-
>> 5 files changed, 8 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
>> index 96bb5a4656278..94b6f0a19c83a 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
>> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
>> @@ -562,7 +562,7 @@ static int panfrost_probe(struct platform_device *pdev)
>>
>> pfdev->coherent = device_get_dma_attr(&pdev->dev) == DEV_DMA_COHERENT;
>>
>> - /* Allocate and initialze the DRM device. */
>> + /* Allocate and initialize the DRM device. */
>> ddev = drm_dev_alloc(&panfrost_drm_driver, &pdev->dev);
>> if (IS_ERR(ddev))
>> return PTR_ERR(ddev);
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
>> index b0142341e2235..77e7cb6d1ae3b 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
>> +++ b/drivers/gpu/drm/panfrost/panfrost_gem_shrinker.c
>> @@ -1,4 +1,4 @@
>> -/* SPDX-License-Identifier: GPL-2.0 */
>> +// SPDX-License-Identifier: GPL-2.0
>> /* Copyright (C) 2019 Arm Ltd.
>> *
>> * Based on msm_gem_freedreno.c:
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_issues.h b/drivers/gpu/drm/panfrost/panfrost_issues.h
>> index 8e59d765bf19f..4e7cf979ee67a 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_issues.h
>> +++ b/drivers/gpu/drm/panfrost/panfrost_issues.h
>> @@ -13,8 +13,10 @@
>> * to care about.
>> */
>> enum panfrost_hw_issue {
>> - /* Need way to guarantee that all previously-translated memory accesses
>> - * are commited */
>> + /*
>> + * Need way to guarantee that all previously-translated memory accesses
>> + * are committed
>> + */
> This file has a whole load of multiline comments that don't technically
> follow the coding style. Fixing just one comment makes the file
> inconsistent. Note we recently had a discussion about this[1] and
> decided to leave the comment style as is. And I have to admit in this
> instance avoiding the extra mostly-blank lines makes the list easier to
> read. The typo fix is obviously welcomed though!
I'll switch this back in a respin.
Thanks
Tom
>
> [1] https://lore.kernel.org/r/c7331489-ad04-0f35-224e-164f144fb819%40arm.com
>
>> HW_ISSUE_6367,
>>
>> /* On job complete with non-done the cache is not flushed */
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
>> index 39562f2d11a47..d3f82b26a631d 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
>> +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
>> @@ -1,4 +1,4 @@
>> -// SPDX-License-Identifier: GPL-2.0
>> +// SPDX-License-Identifier: GPL-2.0
>> /* Copyright 2019 Linaro, Ltd, Rob Herring <robh@kernel.org> */
>>
>> #include <drm/panfrost_drm.h>
>> diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h
>> index 6c5a11ef1ee87..efe4b75149d35 100644
>> --- a/drivers/gpu/drm/panfrost/panfrost_regs.h
>> +++ b/drivers/gpu/drm/panfrost/panfrost_regs.h
>> @@ -292,7 +292,7 @@
>> #define AS_FAULTADDRESS_LO(as) (MMU_AS(as) + 0x20) /* (RO) Fault Address for address space n, low word */
>> #define AS_FAULTADDRESS_HI(as) (MMU_AS(as) + 0x24) /* (RO) Fault Address for address space n, high word */
>> #define AS_STATUS(as) (MMU_AS(as) + 0x28) /* (RO) Status flags for address space n */
>> -/* Additional Bifrost AS regsiters */
>> +/* Additional Bifrost AS registers */
>> #define AS_TRANSCFG_LO(as) (MMU_AS(as) + 0x30) /* (RW) Translation table configuration for address space n, low word */
>> #define AS_TRANSCFG_HI(as) (MMU_AS(as) + 0x34) /* (RW) Translation table configuration for address space n, high word */
>> #define AS_FAULTEXTRA_LO(as) (MMU_AS(as) + 0x38) /* (RO) Secondary fault address for address space n, low word */
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-03-02 12:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-01 12:43 [PATCH] drm/panfrost: cleanup comments trix
2022-03-01 12:43 ` trix
2022-03-02 9:09 ` Steven Price
2022-03-02 9:09 ` Steven Price
2022-03-02 12:18 ` Tom Rix
2022-03-02 12:18 ` Tom Rix
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.