Commit f54efb6a authored by Jani Nikula's avatar Jani Nikula

drm/i915/switcheroo: use struct drm_device based logging

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>
Reviewed-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200402114819.17232-9-jani.nikula@intel.com
parent 9b5d45b1
...@@ -20,14 +20,14 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev, ...@@ -20,14 +20,14 @@ static void i915_switcheroo_set_state(struct pci_dev *pdev,
} }
if (state == VGA_SWITCHEROO_ON) { 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->drm.switch_power_state = DRM_SWITCH_POWER_CHANGING;
/* i915 resume handler doesn't set to D0 */ /* i915 resume handler doesn't set to D0 */
pci_set_power_state(pdev, PCI_D0); pci_set_power_state(pdev, PCI_D0);
i915_resume_switcheroo(i915); i915_resume_switcheroo(i915);
i915->drm.switch_power_state = DRM_SWITCH_POWER_ON; i915->drm.switch_power_state = DRM_SWITCH_POWER_ON;
} else { } else {
pr_info("switched off\n"); drm_info(&i915->drm, "switched off\n");
i915->drm.switch_power_state = DRM_SWITCH_POWER_CHANGING; i915->drm.switch_power_state = DRM_SWITCH_POWER_CHANGING;
i915_suspend_switcheroo(i915, pmm); i915_suspend_switcheroo(i915, pmm);
i915->drm.switch_power_state = DRM_SWITCH_POWER_OFF; i915->drm.switch_power_state = DRM_SWITCH_POWER_OFF;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment