Skip to contentSkip to conversation

drm/i915/guc : Unifying seq_puts messages

PATCH Superseded Sujaritha Sundaresan 3 participants 5 messages Oct 3, 2017 – Oct 4, 2017

Subsystems (2)

v5 of 10 Superseded Latest is v10 →

lore
Share & tools
lore
#0 lore raw

PATCH v5 1/5 drm/i915/guc : Unifying seq_puts messages

Unifying the various seq_puts messages to the simplest one

v2: Clarifying the commit message (Anusha)

v3: Unify seq_puts messages, Re-factoring code as per review (Michal)

v4: Rebase

v5: Separated into a separate patch

Cc Michal Wajdeczko <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Oscar Mateo <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +5 -5
index 847f8e8..53e40dd 100644
@@ -1616,7 +1616,7 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
 	struct drm_i915_private *dev_priv = node_to_i915(m->private);
 
 	if (!HAS_FBC(dev_priv)) {
-		seq_puts(m, "FBC unsupported on this chipset\n");
+		seq_puts(m, "not supported\n");
 		return 0;
 	}
 
@@ -1783,7 +1783,7 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)
 	unsigned int max_gpu_freq, min_gpu_freq;
 
 	if (!HAS_LLC(dev_priv)) {
-		seq_puts(m, "unsupported on this chipset\n");
+		seq_puts(m, "not supported\n");
 		return 0;
 	}
 
@@ -2654,7 +2654,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
 	bool enabled = false;
 
 	if (!HAS_PSR(dev_priv)) {
-		seq_puts(m, "PSR not supported\n");
+		seq_puts(m, "not supported\n");
 		return 0;
 	}
 
@@ -2807,7 +2807,7 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
 	struct pci_dev *pdev = dev_priv->drm.pdev;
 
 	if (!HAS_RUNTIME_PM(dev_priv))
-		seq_puts(m, "Runtime power management not supported\n");
+		seq_puts(m, "not supported\n");
 
 	seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->gt.awake));
 	seq_printf(m, "IRQs disabled: %s\n",
@@ -3683,7 +3683,7 @@ static void drrs_status_per_crtc(struct seq_file *m,
 		mutex_unlock(&drrs->mutex);
 	} else {
 		/* DRRS not supported. Print the VBT parameter*/
-		seq_puts(m, "\tDRRS Supported : No");
+		seq_puts(m, "not supported\n");
 	}
 	seq_puts(m, "\n");
 }
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 60 lines · Sujaritha Sundaresan

Unifying the various seq_puts messages to the simplest one

v2: Clarifying the commit message (Anusha)

v3: Unify seq_puts messages, Re-factoring code as per review (Michal)

v4: Rebase

v5: Separated into a separate patch

Cc Michal Wajdeczko <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Oscar Mateo <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
---
  drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +4 -4
index 847f8e8..53e40dd 100644
@@ -1616,7 +1616,7 @@ static int i915_fbc_status(struct seq_file *m, void *unused)
  	struct drm_i915_private *dev_priv = node_to_i915(m->private);
 
  	if (!HAS_FBC(dev_priv)) {
-		seq_puts(m, "FBC unsupported on this chipset\n");
+		seq_puts(m, "not supported\n");
  		return 0;
  	}
 
@@ -1783,7 +1783,7 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)
  	unsigned int max_gpu_freq, min_gpu_freq;
 
  	if (!HAS_LLC(dev_priv)) {
-		seq_puts(m, "unsupported on this chipset\n");
+		seq_puts(m, "not supported\n");
  		return 0;
  	}
 
@@ -2654,7 +2654,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
  	bool enabled = false;
 
  	if (!HAS_PSR(dev_priv)) {
-		seq_puts(m, "PSR not supported\n");
+		seq_puts(m, "not supported\n");
  		return 0;
  	}
 
@@ -2807,7 +2807,7 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
  	struct pci_dev *pdev = dev_priv->drm.pdev;
 
  	if (!HAS_RUNTIME_PM(dev_priv))
-		seq_puts(m, "Runtime power management not supported\n");
+		seq_puts(m, "not supported\n");
 
  	seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->gt.awake));
  	seq_printf(m, "IRQs disabled: %s\n",

drivers/gpu/drm/i915/i915_debugfs.c static void drrs_status_per_crtc(struct seq_file *m, · line 3686

Quoted 5 lines
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -3683,7 +3683,7 @@ static void drrs_status_per_crtc(struct seq_file *m,
  		mutex_unlock(&drrs->mutex);
  	} else {
  		/* DRRS not supported. Print the VBT parameter*/
-		seq_puts(m, "\tDRRS Supported : No");
+		seq_puts(m, "not supported\n");

There is corresponding "Yes" seq_puts above. Please update that as well.
Commit subject looks little ambiguous. can we say unify seq_puts messages for feature support.

drivers/gpu/drm/i915/i915_debugfs.c static void drrs_status_per_crtc(struct seq_file *m, · line 3689

Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c +0 -0
  	}
  	seq_puts(m, "\n");
  }

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
Quoted 48 lines · Sagar Arun Kamble
Quoted 45 lines · Sujaritha Sundaresan

Unifying the various seq_puts messages to the simplest one

v2: Clarifying the commit message (Anusha)

v3: Unify seq_puts messages, Re-factoring code as per review (Michal)

v4: Rebase

v5: Separated into a separate patch

Cc Michal Wajdeczko <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Oscar Mateo <[email protected]>
Cc Sagar Arun Kamble <[email protected]>
---
  drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
index 847f8e8..53e40dd 100644
@@ -1616,7 +1616,7 @@ static int i915_fbc_status(struct seq_file *m,  
 void *unused)
  	struct drm_i915_private *dev_priv = node_to_i915(m->private);
    	if (!HAS_FBC(dev_priv)) {
-		seq_puts(m, "FBC unsupported on this chipset\n");
+		seq_puts(m, "not supported\n");
  		return 0;
  	}
  @@ -1783,7 +1783,7 @@ static int i915_ring_freq_table(struct seq_file  

*m, void *unused)

  	unsigned int max_gpu_freq, min_gpu_freq;
    	if (!HAS_LLC(dev_priv)) {
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
-		seq_puts(m, "unsupported on this chipset\n");
+		seq_puts(m, "not supported\n");
  		return 0;
  	}
  @@ -2654,7 +2654,7 @@ static int i915_edp_psr_status(struct seq_file  

*m, void *data)

  	bool enabled = false;
    	if (!HAS_PSR(dev_priv)) {
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
-		seq_puts(m, "PSR not supported\n");
+		seq_puts(m, "not supported\n");
Quoted 8 lines

drivers/gpu/drm/i915/i915_debugfs.c static int i915_runtime_pm_status(struct seq_file *m, void *unused) · line 2810

Quoted 8 lines

return 0;
}
@@ -2807,7 +2807,7 @@ static int i915_runtime_pm_status(struct
seq_file *m, void *unused)

  	struct pci_dev *pdev = dev_priv->drm.pdev;
    	if (!HAS_RUNTIME_PM(dev_priv))
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
-		seq_puts(m, "Runtime power management not supported\n");
+		seq_puts(m, "not supported\n");

This one also does not fit into unified "early return" pattern.

Quoted 14 lines

drivers/gpu/drm/i915/i915_debugfs.c static void drrs_status_per_crtc(struct seq_file · line 3687

Quoted 9 lines
    	seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->gt.awake));

seq_printf(m, "IRQs disabled: %s\n",

drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -3683,7 +3683,7 @@ static void drrs_status_per_crtc(struct seq_file  
 *m,
  		mutex_unlock(&drrs->mutex);
  	} else {
  		/* DRRS not supported. Print the VBT parameter*/
-		seq_puts(m, "\tDRRS Supported : No");
+		seq_puts(m, "not supported\n");

There is corresponding "Yes" seq_puts above. Please update that as well.
Commit subject looks little ambiguous. can we say unify seq_puts messages for feature support.

Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c +0 -0
  	}
  	seq_puts(m, "\n");
  }

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#3 lore raw
Quoted 49 lines · Michal Wajdeczko
Quoted 47 lines · Sagar Arun Kamble
Quoted 44 lines · Sujaritha Sundaresan

Unifying the various seq_puts messages to the simplest one

v2: Clarifying the commit message (Anusha)

v3: Unify seq_puts messages, Re-factoring code as per review (Michal)

v4: Rebase

v5: Separated into a separate patch

Cc Michal Wajdeczko <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Oscar Mateo <[email protected]>
Cc Sagar Arun Kamble <[email protected]>

---
  drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----

  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
index 847f8e8..53e40dd 100644
@@ -1616,7 +1616,7 @@ static int i915_fbc_status(struct seq_file *m, 
 void *unused)
       struct drm_i915_private *dev_priv = node_to_i915(m->private);
         if (!HAS_FBC(dev_priv)) {
-        seq_puts(m, "FBC unsupported on this chipset\n");
+        seq_puts(m, "not supported\n");
           return 0;
       }
   @@ -1783,7 +1783,7 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)

      unsigned int max_gpu_freq, min_gpu_freq;
        if (!HAS_LLC(dev_priv)) {
-        seq_puts(m, "unsupported on this chipset\n");
+        seq_puts(m, "not supported\n");
          return 0;
      }
  @@ -2654,7 +2654,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data) bool enabled = false;
        if (!HAS_PSR(dev_priv)) {
-        seq_puts(m, "PSR not supported\n");
+        seq_puts(m, "not supported\n");
          return 0;

Quoted 8 lines
Quoted 6 lines
Quoted 6 lines

      }
  @@ -2807,7 +2807,7 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused) struct pci_dev *pdev = dev_priv->drm.pdev;
        if (!HAS_RUNTIME_PM(dev_priv))
-        seq_puts(m, "Runtime power management not supported\n");
+        seq_puts(m, "not supported\n");

This one also does not fit into unified "early return" pattern.

Will revert this one.

Quoted 12 lines
Quoted 12 lines

drivers/gpu/drm/i915/i915_debugfs.c static void drrs_status_per_crtc(struct · line 3687

Quoted 10 lines

        seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->gt.awake)); seq_printf(m, "IRQs disabled: %s\n",

drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -3683,7 +3683,7 @@ static void drrs_status_per_crtc(struct 
 seq_file *m,
           mutex_unlock(&drrs->mutex);
       } else {
           /* DRRS not supported. Print the VBT parameter*/
-        seq_puts(m, "\tDRRS Supported : No");
+        seq_puts(m, "not supported\n");

There is corresponding "Yes" seq_puts above. Please update that as well.
Commit subject looks little ambiguous. can we say unify seq_puts messages for feature support.

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c +0 -0
       }
       seq_puts(m, "\n");

  }

 Thanks for the review.

Regards,

Sujaritha
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

author
#4 lore raw
In reply to Sagar Arun Kamble
Quoted 55 lines · Sagar Arun Kamble
Quoted 52 lines · Sujaritha Sundaresan

Unifying the various seq_puts messages to the simplest one

v2: Clarifying the commit message (Anusha)

v3: Unify seq_puts messages, Re-factoring code as per review (Michal)

v4: Rebase

v5: Separated into a separate patch

Cc Michal Wajdeczko <[email protected]>
Cc Anusha Srivatsa <[email protected]>
Cc Oscar Mateo <[email protected]>
Cc Sagar Arun Kamble <[email protected]>

---
  drivers/gpu/drm/i915/i915_debugfs.c | 10 +++++-----

  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
index 847f8e8..53e40dd 100644
@@ -1616,7 +1616,7 @@ static int i915_fbc_status(struct seq_file *m, 
 void *unused)
       struct drm_i915_private *dev_priv = node_to_i915(m->private);
         if (!HAS_FBC(dev_priv)) {
-        seq_puts(m, "FBC unsupported on this chipset\n");
+        seq_puts(m, "not supported\n");
           return 0;
       }
   @@ -1783,7 +1783,7 @@ static int i915_ring_freq_table(struct seq_file *m, void *unused)

      unsigned int max_gpu_freq, min_gpu_freq;
        if (!HAS_LLC(dev_priv)) {
-        seq_puts(m, "unsupported on this chipset\n");
+        seq_puts(m, "not supported\n");
          return 0;
      }
  @@ -2654,7 +2654,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data) bool enabled = false;
        if (!HAS_PSR(dev_priv)) {
-        seq_puts(m, "PSR not supported\n");
+        seq_puts(m, "not supported\n");
          return 0;
      }
  @@ -2807,7 +2807,7 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused) struct pci_dev *pdev = dev_priv->drm.pdev;
        if (!HAS_RUNTIME_PM(dev_priv))
-        seq_puts(m, "Runtime power management not supported\n");
+        seq_puts(m, "not supported\n");
        seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->gt.awake)); seq_printf(m, "IRQs disabled: %s\n",

Quoted 8 lines

drivers/gpu/drm/i915/i915_debugfs.c static void drrs_status_per_crtc(struct · line 3687

Quoted 7 lines
drivers/gpu/drm/i915/i915_debugfs.c +1 -1
@@ -3683,7 +3683,7 @@ static void drrs_status_per_crtc(struct 
 seq_file *m,
           mutex_unlock(&drrs->mutex);
       } else {
           /* DRRS not supported. Print the VBT parameter*/
-        seq_puts(m, "\tDRRS Supported : No");
+        seq_puts(m, "not supported\n");

There is corresponding "Yes" seq_puts above. Please update that as well.

Will do.

Quoted 1 line

Commit subject looks little ambiguous. can we say unify seq_puts messages for feature support.

Yes, I will clarify the commit message.

Quoted 4 lines
Quoted 3 lines
drivers/gpu/drm/i915/i915_debugfs.c +0 -0
       }
       seq_puts(m, "\n");

  }

Thanks for the review,

Regards,

Sujaritha
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx