Skip to contentSkip to conversation

drm/amdgpu: Fix style issues in amdgpu_psp.c

PATCH In review Praful Swarnakar 3 participants 3 messages Jul 27, 2023 – Jul 29, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix style issues in amdgpu_psp.c

Fixes the following to align to linux coding style:

WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments should align the * on each line

Cc Christian König <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Guchun Chen <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 28 ++++++++++++++-----------
 1 file changed, 16 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +16 -12
index 4e428060a1fa..1d0516e904b1 100644
@@ -438,14 +438,15 @@ static int psp_sw_init(void *handle)
 			/* If psp runtime database exists, then
 			 * only enable two stage memory training
 			 * when TWO_STAGE_DRAM_TRAINING bit is set
-			 * in runtime database */
+			 * in runtime database
+			 */
 			mem_training_ctx->enable_mem_training = true;
 		}
 
 	} else {
-		/* If psp runtime database doesn't exist or
-		 * is invalid, force enable two stage memory
-		 * training */
+		/* If psp runtime database doesn't exist or is
+		 * invalid, force enable two stage memory training
+		 */
 		mem_training_ctx->enable_mem_training = true;
 	}
 
@@ -797,7 +798,8 @@ static int psp_tmr_init(struct psp_context *psp)
 	tmr_size = PSP_TMR_SIZE(psp->adev);
 
 	/* For ASICs support RLC autoload, psp will parse the toc
-	 * and calculate the total size of TMR needed */
+	 * and calculate the total size of TMR needed
+	 */
 	if (!amdgpu_sriov_vf(psp->adev) &&
 	    psp->toc.start_addr &&
 	    psp->toc.size_bytes &&
@@ -1137,9 +1139,9 @@ int psp_ta_init_shared_buf(struct psp_context *psp,
 				  struct ta_mem_context *mem_ctx)
 {
 	/*
-	* Allocate 16k memory aligned to 4k from Frame Buffer (local
-	* physical) for ta to host memory
-	*/
+	 * Allocate 16k memory aligned to 4k from Frame Buffer (local
+	 * physical) for ta to host memory
+	 */
 	return amdgpu_bo_create_kernel(psp->adev, mem_ctx->shared_mem_size,
 				      PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM |
 				      AMDGPU_GEM_DOMAIN_GTT,
@@ -1728,7 +1730,8 @@ int psp_ras_trigger_error(struct psp_context *psp,
 		return -EINVAL;
 
 	/* If err_event_athub occurs error inject was successful, however
-	   return status from TA is no long reliable */
+	 *  return status from TA is no long reliable
+	 */
 	if (amdgpu_ras_intr_triggered())
 		return 0;
 
@@ -2577,7 +2580,8 @@ static int psp_load_non_psp_fw(struct psp_context *psp)
 		     ucode->ucode_id == AMDGPU_UCODE_ID_SDMA2 ||
 		     ucode->ucode_id == AMDGPU_UCODE_ID_SDMA3))
 			/* PSP only receive one SDMA fw for sienna_cichlid,
-			 * as all four sdma fw are same */
+			 * as all four sdma fw are same
+			 */
 			continue;
 
 		psp_print_fw_hdr(psp, ucode);
@@ -2642,8 +2646,8 @@ static int psp_load_fw(struct amdgpu_device *adev)
 		if (adev->gmc.xgmi.num_physical_nodes > 1) {
 			ret = psp_xgmi_initialize(psp, false, true);
 			/* Warning the XGMI seesion initialize failure
-			* Instead of stop driver initialization
-			*/
+			 * Instead of stop driver initialization
+			 */
 			if (ret)
 				dev_err(psp->adev->dev,
 					"XGMI: Failed to initialize XGMI session\n");
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[Public]

Regards,
Guchun

Quoted 110 lines

-----Original Message-----
From: Swarnakar, Praful <[email protected]>
Sent: Thursday, July 27, 2023 11:47 AM
To: Koenig, Christian <[email protected]>; Deucher, Alexander <[email protected]>; Chen, Guchun <[email protected]>
Cc: [email protected]; Swarnakar, Praful <[email protected]>
Subject: [PATCH] drm/amdgpu: Fix style issues in amdgpu_psp.c

Fixes the following to align to linux coding style:

WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments should align the * on each line

Cc Christian König <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Guchun Chen <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 28 ++++++++++++++---------
--
 1 file changed, 16 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +10 -8
index 4e428060a1fa..1d0516e904b1 100644
@@ -438,14 +438,15 @@ static int psp_sw_init(void *handle)
                      /* If psp runtime database exists, then
                       * only enable two stage memory training
                       * when TWO_STAGE_DRAM_TRAINING bit is set
-                      * in runtime database */
+                      * in runtime database
+                      */
                      mem_training_ctx->enable_mem_training = true;
              }
 
      } else {
-             /* If psp runtime database doesn't exist or
-              * is invalid, force enable two stage memory
-              * training */
+             /* If psp runtime database doesn't exist or is
+              * invalid, force enable two stage memory training
+              */
              mem_training_ctx->enable_mem_training = true;
      }
 
@@ -797,7 +798,8 @@ static int psp_tmr_init(struct psp_context *psp)
      tmr_size = PSP_TMR_SIZE(psp->adev);
 
      /* For ASICs support RLC autoload, psp will parse the toc
-      * and calculate the total size of TMR needed */
+      * and calculate the total size of TMR needed
+      */
      if (!amdgpu_sriov_vf(psp->adev) &&
          psp->toc.start_addr &&
          psp->toc.size_bytes &&
@@ -1137,9 +1139,9 @@ int psp_ta_init_shared_buf(struct psp_context
 *psp,
                                struct ta_mem_context *mem_ctx)
 {
      /*
-     * Allocate 16k memory aligned to 4k from Frame Buffer (local
-     * physical) for ta to host memory
-     */
+      * Allocate 16k memory aligned to 4k from Frame Buffer (local
+      * physical) for ta to host memory
+      */
      return amdgpu_bo_create_kernel(psp->adev, mem_ctx-
 >shared_mem_size,

PAGE_SIZE,
AMDGPU_GEM_DOMAIN_VRAM |
AMDGPU_GEM_DOMAIN_GTT,

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -2
@@ -1728,7 +1730,8 @@ int psp_ras_trigger_error(struct psp_context *psp,
              return -EINVAL;
 
      /* If err_event_athub occurs error inject was successful, however
-        return status from TA is no long reliable */
+      *  return status from TA is no long reliable
+      */
      if (amdgpu_ras_intr_triggered())
              return 0;
 
@@ -2577,7 +2580,8 @@ static int psp_load_non_psp_fw(struct
 psp_context *psp)
                   ucode->ucode_id == AMDGPU_UCODE_ID_SDMA2 ||
                   ucode->ucode_id == AMDGPU_UCODE_ID_SDMA3))
                      /* PSP only receive one SDMA fw for sienna_cichlid,
-                      * as all four sdma fw are same */
+                      * as all four sdma fw are same
+                      */
                      continue;
 
              psp_print_fw_hdr(psp, ucode);
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +2 -2
@@ -2642,8 +2646,8 @@ static int psp_load_fw(struct amdgpu_device
 *adev)
              if (adev->gmc.xgmi.num_physical_nodes > 1) {
                      ret = psp_xgmi_initialize(psp, false, true);
                      /* Warning the XGMI seesion initialize failure
-                     * Instead of stop driver initialization
-                     */
+                      * Instead of stop driver initialization
+                      */
                      if (ret)
                              dev_err(psp->adev->dev,

"XGMI: Failed to initialize XGMI
session\n");
--
2.25.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Praful Swarnakar

[Public]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Praful Swarnakar
Sent: Thursday, July 27, 2023 9:17 AM
To: Koenig, Christian <[email protected]>; Deucher, Alexander <[email protected]>; Chen, Guchun <[email protected]>
Cc: Swarnakar, Praful <[email protected]>; [email protected]
Subject: [PATCH] drm/amdgpu: Fix style issues in amdgpu_psp.c

Fixes the following to align to linux coding style:

WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments should align the * on each line

Cc Christian König <[email protected]>
Cc Alex Deucher <[email protected]>
Cc Guchun Chen <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 28 ++++++++++++++-----------
 1 file changed, 16 insertions(+), 12 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +16 -12
index 4e428060a1fa..1d0516e904b1 100644
@@ -438,14 +438,15 @@ static int psp_sw_init(void *handle)
                        /* If psp runtime database exists, then
                         * only enable two stage memory training
                         * when TWO_STAGE_DRAM_TRAINING bit is set
-                        * in runtime database */
+                        * in runtime database
+                        */
                        mem_training_ctx->enable_mem_training = true;
                }
 
        } else {
-               /* If psp runtime database doesn't exist or
-                * is invalid, force enable two stage memory
-                * training */
+               /* If psp runtime database doesn't exist or is
+                * invalid, force enable two stage memory training
+                */
                mem_training_ctx->enable_mem_training = true;
        }
 
@@ -797,7 +798,8 @@ static int psp_tmr_init(struct psp_context *psp)
        tmr_size = PSP_TMR_SIZE(psp->adev);
 
        /* For ASICs support RLC autoload, psp will parse the toc
-        * and calculate the total size of TMR needed */
+        * and calculate the total size of TMR needed
+        */
        if (!amdgpu_sriov_vf(psp->adev) &&
            psp->toc.start_addr &&
            psp->toc.size_bytes &&
@@ -1137,9 +1139,9 @@ int psp_ta_init_shared_buf(struct psp_context *psp,
                                  struct ta_mem_context *mem_ctx)
 {
        /*
-       * Allocate 16k memory aligned to 4k from Frame Buffer (local
-       * physical) for ta to host memory
-       */
+        * Allocate 16k memory aligned to 4k from Frame Buffer (local
+        * physical) for ta to host memory
+        */
        return amdgpu_bo_create_kernel(psp->adev, mem_ctx->shared_mem_size,
                                      PAGE_SIZE, AMDGPU_GEM_DOMAIN_VRAM |
                                      AMDGPU_GEM_DOMAIN_GTT,
@@ -1728,7 +1730,8 @@ int psp_ras_trigger_error(struct psp_context *psp,
                return -EINVAL;
 
        /* If err_event_athub occurs error inject was successful, however
-          return status from TA is no long reliable */
+        *  return status from TA is no long reliable
+        */
        if (amdgpu_ras_intr_triggered())
                return 0;
 
@@ -2577,7 +2580,8 @@ static int psp_load_non_psp_fw(struct psp_context *psp)
                     ucode->ucode_id == AMDGPU_UCODE_ID_SDMA2 ||
                     ucode->ucode_id == AMDGPU_UCODE_ID_SDMA3))
                        /* PSP only receive one SDMA fw for sienna_cichlid,
-                        * as all four sdma fw are same */
+                        * as all four sdma fw are same
+                        */
                        continue;
 
                psp_print_fw_hdr(psp, ucode);
@@ -2642,8 +2646,8 @@ static int psp_load_fw(struct amdgpu_device *adev)
                if (adev->gmc.xgmi.num_physical_nodes > 1) {
                        ret = psp_xgmi_initialize(psp, false, true);
                        /* Warning the XGMI seesion initialize failure
-                       * Instead of stop driver initialization
-                       */
+                        * Instead of stop driver initialization
+                        */
                        if (ret)
                                dev_err(psp->adev->dev,
                                        "XGMI: Failed to initialize XGMI session\n");

--
2.25.1