diff mbox series

[09/17] drm/i915/switcheroo: use struct drm_device based logging

Message ID 20200402114819.17232-9-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series [01/17] drm/i915/audio: use struct drm_device based logging | expand

Commit Message

Jani Nikula April 2, 2020, 11:48 a.m. UTC
Convert all the pr_* logging macros to the struct drm_device based
macros to provide device specific logging.

No functional changes.

Cc: Wambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/i915_switcheroo.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Wambui Karuga April 8, 2020, 8:12 a.m. UTC | #1
On Thu, 2 Apr 2020, Jani Nikula wrote:

> Convert all the pr_* logging macros to the struct drm_device based
> macros to provide device specific logging.
>
> No functional changes.
>
> Cc: Wambui Karuga <wambui.karugax@gmail.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Wambui Karuga <wambui.karugax@gmail.com>

> ---
> drivers/gpu/drm/i915/i915_switcheroo.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_switcheroo.c b/drivers/gpu/drm/i915/i915_switcheroo.c
> index ed69b5d4a375..b3a24eac21f1 100644
> --- a/drivers/gpu/drm/i915/i915_switcheroo.c
> +++ b/drivers/gpu/drm/i915/i915_switcheroo.c
> @@ -20,14 +20,14 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev,
> 	}
>
> 	if (state == VGA_SWITCHEROO_ON) {
> -		pr_info("switched on\n");
> +		drm_info(&i915->drm, "switched on\n");
> 		i915->drm.switch_power_state = DRM_SWITCH_POWER_CHANGING;
> 		/* i915 resume handler doesn't set to D0 */
> 		pci_set_power_state(pdev, PCI_D0);
> 		i915_resume_switcheroo(i915);
> 		i915->drm.switch_power_state = DRM_SWITCH_POWER_ON;
> 	} else {
> -		pr_info("switched off\n");
> +		drm_info(&i915->drm, "switched off\n");
> 		i915->drm.switch_power_state = DRM_SWITCH_POWER_CHANGING;
> 		i915_suspend_switcheroo(i915, pmm);
> 		i915->drm.switch_power_state = DRM_SWITCH_POWER_OFF;
> -- 
> 2.20.1
>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_switcheroo.c b/drivers/gpu/drm/i915/i915_switcheroo.c
index ed69b5d4a375..b3a24eac21f1 100644
--- a/drivers/gpu/drm/i915/i915_switcheroo.c
+++ b/drivers/gpu/drm/i915/i915_switcheroo.c
@@ -20,14 +20,14 @@  static void i915_switcheroo_set_state(struct pci_dev *pdev,
 	}
 
 	if (state == VGA_SWITCHEROO_ON) {
-		pr_info("switched on\n");
+		drm_info(&i915->drm, "switched on\n");
 		i915->drm.switch_power_state = DRM_SWITCH_POWER_CHANGING;
 		/* i915 resume handler doesn't set to D0 */
 		pci_set_power_state(pdev, PCI_D0);
 		i915_resume_switcheroo(i915);
 		i915->drm.switch_power_state = DRM_SWITCH_POWER_ON;
 	} else {
-		pr_info("switched off\n");
+		drm_info(&i915->drm, "switched off\n");
 		i915->drm.switch_power_state = DRM_SWITCH_POWER_CHANGING;
 		i915_suspend_switcheroo(i915, pmm);
 		i915->drm.switch_power_state = DRM_SWITCH_POWER_OFF;