* [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros.
@ 2020-01-31 9:34 Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 1/5] drm/i915: conversion to drm_device logging macros when drm_i915_private is present Wambui Karuga
` (7 more replies)
0 siblings, 8 replies; 11+ messages in thread
From: Wambui Karuga @ 2020-01-31 9:34 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel; +Cc: intel-gfx
This patch series continues the conversion of the printk based logging
macros to the struct drm_device based logging macros in drm/i915. This
series focuses on the root drm/i915 driver folder with patches achieved
manually and using coccinelle.
Wambui Karuga (5):
drm/i915: conversion to drm_device logging macros when
drm_i915_private is present.
drm/i915/debugfs: conversion to drm_device based logging macros.
drm/i915/cmd_parser: conversion to struct drm_device logging macros.
drm/i915/perf: conversion to struct drm_device based logging macros.
drm/i915/pci: conversion to drm_device based logging macros.
drivers/gpu/drm/i915/i915_cmd_parser.c | 29 +++--
drivers/gpu/drm/i915/i915_debugfs.c | 44 ++++---
drivers/gpu/drm/i915/i915_drv.c | 126 ++++++++++--------
drivers/gpu/drm/i915/i915_gem_fence_reg.c | 2 +-
drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +-
drivers/gpu/drm/i915/i915_irq.c | 92 ++++++++------
drivers/gpu/drm/i915/i915_pci.c | 3 +-
drivers/gpu/drm/i915/i915_perf.c | 148 ++++++++++++++--------
drivers/gpu/drm/i915/i915_sysfs.c | 19 ++-
9 files changed, 279 insertions(+), 187 deletions(-)
--
2.25.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Intel-gfx] [PATCH 1/5] drm/i915: conversion to drm_device logging macros when drm_i915_private is present.
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
@ 2020-01-31 9:34 ` Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 2/5] drm/i915/debugfs: conversion to drm_device based logging macros Wambui Karuga
` (6 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Wambui Karuga @ 2020-01-31 9:34 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel; +Cc: intel-gfx
Converts various instances of the printk drm logging macros to the
struct drm_device based logging macros in the drm/i915 folder using the
following coccinelle script that transforms based on the existence of
the struct drm_i915_private device pointer:
@@
identifier fn, T;
@@
fn(...) {
...
struct drm_i915_private *T = ...;
<+...
(
-DRM_INFO(
+drm_info(&T->drm,
...)
|
-DRM_ERROR(
+drm_err(&T->drm,
...)
|
-DRM_WARN(
+drm_warn(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_ATOMIC(
+drm_dbg_atomic(&T->drm,
...)
)
...+>
}
@@
identifier fn, T;
@@
fn(...,struct drm_i915_private *T,...) {
<+...
(
-DRM_INFO(
+drm_info(&T->drm,
...)
|
-DRM_ERROR(
+drm_err(&T->drm,
...)
|
-DRM_WARN(
+drm_warn(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_ATOMIC(
+drm_dbg_atomic(&T->drm,
...)
)
...+>
}
Checkpatch warnings were fixed manually.
Instances of the DRM_DEBUG macro were not converted due to lack of a
consensus of an analogous struct drm_device based macro.
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 23 ++--
drivers/gpu/drm/i915/i915_drv.c | 126 ++++++++++++----------
drivers/gpu/drm/i915/i915_gem_fence_reg.c | 2 +-
drivers/gpu/drm/i915/i915_gem_gtt.c | 3 +-
drivers/gpu/drm/i915/i915_irq.c | 92 +++++++++-------
drivers/gpu/drm/i915/i915_perf.c | 5 +-
drivers/gpu/drm/i915/i915_sysfs.c | 19 ++--
7 files changed, 156 insertions(+), 114 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 27cb4e219322..350ebfe79de4 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2161,7 +2161,7 @@ i915_edp_psr_debug_set(void *data, u64 val)
if (!CAN_PSR(dev_priv))
return -ENODEV;
- DRM_DEBUG_KMS("Setting PSR debug to %llx\n", val);
+ drm_dbg_kms(&dev_priv->drm, "Setting PSR debug to %llx\n", val);
wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
@@ -3998,10 +3998,11 @@ static ssize_t i915_hpd_storm_ctl_write(struct file *file,
return -EINVAL;
if (new_threshold > 0)
- DRM_DEBUG_KMS("Setting HPD storm detection threshold to %d\n",
- new_threshold);
+ drm_dbg_kms(&dev_priv->drm,
+ "Setting HPD storm detection threshold to %d\n",
+ new_threshold);
else
- DRM_DEBUG_KMS("Disabling HPD storm detection\n");
+ drm_dbg_kms(&dev_priv->drm, "Disabling HPD storm detection\n");
spin_lock_irq(&dev_priv->irq_lock);
hotplug->hpd_storm_threshold = new_threshold;
@@ -4078,8 +4079,8 @@ static ssize_t i915_hpd_short_storm_ctl_write(struct file *file,
else if (kstrtobool(tmp, &new_state) != 0)
return -EINVAL;
- DRM_DEBUG_KMS("%sabling HPD short storm detection\n",
- new_state ? "En" : "Dis");
+ drm_dbg_kms(&dev_priv->drm, "%sabling HPD short storm detection\n",
+ new_state ? "En" : "Dis");
spin_lock_irq(&dev_priv->irq_lock);
hotplug->hpd_short_storm_enabled = new_state;
@@ -4149,8 +4150,9 @@ static int i915_drrs_ctl_set(void *data, u64 val)
if (encoder->type != INTEL_OUTPUT_EDP)
continue;
- DRM_DEBUG_DRIVER("Manually %sabling DRRS. %llu\n",
- val ? "en" : "dis", val);
+ drm_dbg(&dev_priv->drm,
+ "Manually %sabling DRRS. %llu\n",
+ val ? "en" : "dis", val);
intel_dp = enc_to_intel_dp(encoder);
if (val)
@@ -4208,8 +4210,9 @@ i915_fifo_underrun_reset_write(struct file *filp,
}
if (!ret && crtc_state->hw.active) {
- DRM_DEBUG_KMS("Re-arming FIFO underruns on pipe %c\n",
- pipe_name(intel_crtc->pipe));
+ drm_dbg_kms(&dev_priv->drm,
+ "Re-arming FIFO underruns on pipe %c\n",
+ pipe_name(intel_crtc->pipe));
intel_crtc_arm_fifo_underrun(intel_crtc, crtc_state);
}
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 4661c5f1f297..516536234e97 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -152,7 +152,7 @@ static int i915_get_bridge_dev(struct drm_i915_private *dev_priv)
dev_priv->bridge_dev =
pci_get_domain_bus_and_slot(domain, 0, PCI_DEVFN(0, 0));
if (!dev_priv->bridge_dev) {
- DRM_ERROR("bridge device not found\n");
+ drm_err(&dev_priv->drm, "bridge device not found\n");
return -1;
}
return 0;
@@ -189,7 +189,7 @@ intel_alloc_mchbar_resource(struct drm_i915_private *dev_priv)
0, pcibios_align_resource,
dev_priv->bridge_dev);
if (ret) {
- DRM_DEBUG_DRIVER("failed bus alloc: %d\n", ret);
+ drm_dbg(&dev_priv->drm, "failed bus alloc: %d\n", ret);
dev_priv->mch_res.start = 0;
return ret;
}
@@ -409,7 +409,7 @@ static int i915_workqueues_init(struct drm_i915_private *dev_priv)
out_free_wq:
destroy_workqueue(dev_priv->wq);
out_err:
- DRM_ERROR("Failed to allocate workqueues.\n");
+ drm_err(&dev_priv->drm, "Failed to allocate workqueues.\n");
return -ENOMEM;
}
@@ -440,7 +440,7 @@ static void intel_detect_preproduction_hw(struct drm_i915_private *dev_priv)
pre |= IS_KBL_REVID(dev_priv, 0, KBL_REVID_A0);
if (pre) {
- DRM_ERROR("This is a pre-production stepping. "
+ drm_err(&dev_priv->drm, "This is a pre-production stepping. "
"It may not be fully functional.\n");
add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
}
@@ -751,9 +751,10 @@ skl_dram_get_dimm_info(struct drm_i915_private *dev_priv,
dimm->ranks = skl_get_dimm_ranks(val);
}
- DRM_DEBUG_KMS("CH%u DIMM %c size: %u GB, width: X%u, ranks: %u, 16Gb DIMMs: %s\n",
- channel, dimm_name, dimm->size, dimm->width, dimm->ranks,
- yesno(skl_is_16gb_dimm(dimm)));
+ drm_dbg_kms(&dev_priv->drm,
+ "CH%u DIMM %c size: %u GB, width: X%u, ranks: %u, 16Gb DIMMs: %s\n",
+ channel, dimm_name, dimm->size, dimm->width, dimm->ranks,
+ yesno(skl_is_16gb_dimm(dimm)));
}
static int
@@ -767,7 +768,7 @@ skl_dram_get_channel_info(struct drm_i915_private *dev_priv,
channel, 'S', val >> 16);
if (ch->dimm_l.size == 0 && ch->dimm_s.size == 0) {
- DRM_DEBUG_KMS("CH%u not populated\n", channel);
+ drm_dbg_kms(&dev_priv->drm, "CH%u not populated\n", channel);
return -EINVAL;
}
@@ -782,8 +783,8 @@ skl_dram_get_channel_info(struct drm_i915_private *dev_priv,
skl_is_16gb_dimm(&ch->dimm_l) ||
skl_is_16gb_dimm(&ch->dimm_s);
- DRM_DEBUG_KMS("CH%u ranks: %u, 16Gb DIMMs: %s\n",
- channel, ch->ranks, yesno(ch->is_16gb_dimm));
+ drm_dbg_kms(&dev_priv->drm, "CH%u ranks: %u, 16Gb DIMMs: %s\n",
+ channel, ch->ranks, yesno(ch->is_16gb_dimm));
return 0;
}
@@ -816,7 +817,8 @@ skl_dram_get_channels_info(struct drm_i915_private *dev_priv)
dram_info->num_channels++;
if (dram_info->num_channels == 0) {
- DRM_INFO("Number of memory channels is zero\n");
+ drm_info(&dev_priv->drm,
+ "Number of memory channels is zero\n");
return -EINVAL;
}
@@ -831,7 +833,8 @@ skl_dram_get_channels_info(struct drm_i915_private *dev_priv)
dram_info->ranks = max(ch0.ranks, ch1.ranks);
if (dram_info->ranks == 0) {
- DRM_INFO("couldn't get memory rank information\n");
+ drm_info(&dev_priv->drm,
+ "couldn't get memory rank information\n");
return -EINVAL;
}
@@ -839,8 +842,8 @@ skl_dram_get_channels_info(struct drm_i915_private *dev_priv)
dram_info->symmetric_memory = intel_is_dram_symmetric(&ch0, &ch1);
- DRM_DEBUG_KMS("Memory configuration is symmetric? %s\n",
- yesno(dram_info->symmetric_memory));
+ drm_dbg_kms(&dev_priv->drm, "Memory configuration is symmetric? %s\n",
+ yesno(dram_info->symmetric_memory));
return 0;
}
@@ -874,7 +877,8 @@ skl_get_dram_info(struct drm_i915_private *dev_priv)
int ret;
dram_info->type = skl_get_dram_type(dev_priv);
- DRM_DEBUG_KMS("DRAM type: %s\n", intel_dram_type_str(dram_info->type));
+ drm_dbg_kms(&dev_priv->drm, "DRAM type: %s\n",
+ intel_dram_type_str(dram_info->type));
ret = skl_dram_get_channels_info(dev_priv);
if (ret)
@@ -888,7 +892,8 @@ skl_get_dram_info(struct drm_i915_private *dev_priv)
mem_freq_khz * 8;
if (dram_info->bandwidth_kbps == 0) {
- DRM_INFO("Couldn't get system memory bandwidth\n");
+ drm_info(&dev_priv->drm,
+ "Couldn't get system memory bandwidth\n");
return -EINVAL;
}
@@ -995,7 +1000,8 @@ bxt_get_dram_info(struct drm_i915_private *dev_priv)
dram_info->bandwidth_kbps = (mem_freq_khz * num_active_channels * 4);
if (dram_info->bandwidth_kbps == 0) {
- DRM_INFO("Couldn't get system memory bandwidth\n");
+ drm_info(&dev_priv->drm,
+ "Couldn't get system memory bandwidth\n");
return -EINVAL;
}
@@ -1019,10 +1025,11 @@ bxt_get_dram_info(struct drm_i915_private *dev_priv)
dram_info->type != INTEL_DRAM_UNKNOWN &&
dram_info->type != type);
- DRM_DEBUG_KMS("CH%u DIMM size: %u GB, width: X%u, ranks: %u, type: %s\n",
- i - BXT_D_CR_DRP0_DUNIT_START,
- dimm.size, dimm.width, dimm.ranks,
- intel_dram_type_str(type));
+ drm_dbg_kms(&dev_priv->drm,
+ "CH%u DIMM size: %u GB, width: X%u, ranks: %u, type: %s\n",
+ i - BXT_D_CR_DRP0_DUNIT_START,
+ dimm.size, dimm.width, dimm.ranks,
+ intel_dram_type_str(type));
/*
* If any of the channel is single rank channel,
@@ -1040,7 +1047,7 @@ bxt_get_dram_info(struct drm_i915_private *dev_priv)
if (dram_info->type == INTEL_DRAM_UNKNOWN ||
dram_info->ranks == 0) {
- DRM_INFO("couldn't get memory information\n");
+ drm_info(&dev_priv->drm, "couldn't get memory information\n");
return -EINVAL;
}
@@ -1071,12 +1078,12 @@ intel_get_dram_info(struct drm_i915_private *dev_priv)
if (ret)
return;
- DRM_DEBUG_KMS("DRAM bandwidth: %u kBps, channels: %u\n",
- dram_info->bandwidth_kbps,
- dram_info->num_channels);
+ drm_dbg_kms(&dev_priv->drm, "DRAM bandwidth: %u kBps, channels: %u\n",
+ dram_info->bandwidth_kbps,
+ dram_info->num_channels);
- DRM_DEBUG_KMS("DRAM ranks: %u, 16Gb DIMMs: %s\n",
- dram_info->ranks, yesno(dram_info->is_16gb_dimm));
+ drm_dbg_kms(&dev_priv->drm, "DRAM ranks: %u, 16Gb DIMMs: %s\n",
+ dram_info->ranks, yesno(dram_info->is_16gb_dimm));
}
static u32 gen9_edram_size_mb(struct drm_i915_private *dev_priv, u32 cap)
@@ -1186,7 +1193,7 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
ret = i915_ggtt_enable_hw(dev_priv);
if (ret) {
- DRM_ERROR("failed to enable GGTT\n");
+ drm_err(&dev_priv->drm, "failed to enable GGTT\n");
goto err_mem_regions;
}
@@ -1202,7 +1209,7 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
if (IS_GEN(dev_priv, 2)) {
ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(30));
if (ret) {
- DRM_ERROR("failed to set DMA mask\n");
+ drm_err(&dev_priv->drm, "failed to set DMA mask\n");
goto err_mem_regions;
}
@@ -1220,7 +1227,7 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
if (ret) {
- DRM_ERROR("failed to set DMA mask\n");
+ drm_err(&dev_priv->drm, "failed to set DMA mask\n");
goto err_mem_regions;
}
@@ -1252,7 +1259,7 @@ static int i915_driver_hw_probe(struct drm_i915_private *dev_priv)
*/
if (INTEL_GEN(dev_priv) >= 5) {
if (pci_enable_msi(pdev) < 0)
- DRM_DEBUG_DRIVER("can't enable MSI");
+ drm_dbg(&dev_priv->drm, "can't enable MSI");
}
ret = intel_gvt_init(dev_priv);
@@ -1328,7 +1335,8 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
/* Depends on sysfs having been initialized */
i915_perf_register(dev_priv);
} else
- DRM_ERROR("Failed to register driver for userspace access!\n");
+ drm_err(&dev_priv->drm,
+ "Failed to register driver for userspace access!\n");
if (HAS_DISPLAY(dev_priv) && INTEL_DISPLAY_ENABLED(dev_priv)) {
/* Must be done after probing outputs */
@@ -1410,11 +1418,12 @@ static void i915_welcome_messages(struct drm_i915_private *dev_priv)
}
if (IS_ENABLED(CONFIG_DRM_I915_DEBUG))
- DRM_INFO("DRM_I915_DEBUG enabled\n");
+ drm_info(&dev_priv->drm, "DRM_I915_DEBUG enabled\n");
if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM))
- DRM_INFO("DRM_I915_DEBUG_GEM enabled\n");
+ drm_info(&dev_priv->drm, "DRM_I915_DEBUG_GEM enabled\n");
if (IS_ENABLED(CONFIG_DRM_I915_DEBUG_RUNTIME_PM))
- DRM_INFO("DRM_I915_DEBUG_RUNTIME_PM enabled\n");
+ drm_info(&dev_priv->drm,
+ "DRM_I915_DEBUG_RUNTIME_PM enabled\n");
}
static struct drm_i915_private *
@@ -1771,7 +1780,7 @@ static int i915_drm_suspend_late(struct drm_device *dev, bool hibernation)
ret = vlv_suspend_complete(dev_priv);
if (ret) {
- DRM_ERROR("Suspend complete failed: %d\n", ret);
+ drm_err(&dev_priv->drm, "Suspend complete failed: %d\n", ret);
intel_power_domains_resume(dev_priv);
goto out;
@@ -1830,7 +1839,7 @@ static int i915_drm_resume(struct drm_device *dev)
ret = i915_ggtt_enable_hw(dev_priv);
if (ret)
- DRM_ERROR("failed to re-enable GGTT\n");
+ drm_err(&dev_priv->drm, "failed to re-enable GGTT\n");
i915_ggtt_resume(&dev_priv->ggtt);
i915_gem_restore_fences(&dev_priv->ggtt);
@@ -1919,7 +1928,8 @@ static int i915_drm_resume_early(struct drm_device *dev)
*/
ret = pci_set_power_state(pdev, PCI_D0);
if (ret) {
- DRM_ERROR("failed to set PCI D0 power state (%d)\n", ret);
+ drm_err(&dev_priv->drm,
+ "failed to set PCI D0 power state (%d)\n", ret);
return ret;
}
@@ -1946,8 +1956,9 @@ static int i915_drm_resume_early(struct drm_device *dev)
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
ret = vlv_resume_prepare(dev_priv, false);
if (ret)
- DRM_ERROR("Resume prepare failed: %d, continuing anyway\n",
- ret);
+ drm_err(&dev_priv->drm,
+ "Resume prepare failed: %d, continuing anyway\n",
+ ret);
intel_uncore_resume_early(&dev_priv->uncore);
@@ -2358,8 +2369,9 @@ int vlv_force_gfx_clock(struct drm_i915_private *dev_priv, bool force_on)
VLV_GFX_CLK_STATUS_BIT,
20);
if (err)
- DRM_ERROR("timeout waiting for GFX clock force-on (%08x)\n",
- I915_READ(VLV_GTLC_SURVIVABILITY_REG));
+ drm_err(&dev_priv->drm,
+ "timeout waiting for GFX clock force-on (%08x)\n",
+ I915_READ(VLV_GTLC_SURVIVABILITY_REG));
return err;
}
@@ -2382,7 +2394,7 @@ static int vlv_allow_gt_wake(struct drm_i915_private *dev_priv, bool allow)
err = vlv_wait_for_pw_status(dev_priv, mask, val);
if (err)
- DRM_ERROR("timeout disabling GT waking\n");
+ drm_err(&dev_priv->drm, "timeout disabling GT waking\n");
return err;
}
@@ -2404,8 +2416,9 @@ static void vlv_wait_for_gt_wells(struct drm_i915_private *dev_priv,
* reset and we are trying to force the machine to sleep.
*/
if (vlv_wait_for_pw_status(dev_priv, mask, val))
- DRM_DEBUG_DRIVER("timeout waiting for GT wells to go %s\n",
- onoff(wait_for_on));
+ drm_dbg(&dev_priv->drm,
+ "timeout waiting for GT wells to go %s\n",
+ onoff(wait_for_on));
}
static void vlv_check_no_gt_access(struct drm_i915_private *dev_priv)
@@ -2413,7 +2426,8 @@ static void vlv_check_no_gt_access(struct drm_i915_private *dev_priv)
if (!(I915_READ(VLV_GTLC_PW_STATUS) & VLV_GTLC_ALLOWWAKEERR))
return;
- DRM_DEBUG_DRIVER("GT register access while GT waking disabled\n");
+ drm_dbg(&dev_priv->drm,
+ "GT register access while GT waking disabled\n");
I915_WRITE(VLV_GTLC_PW_STATUS, VLV_GTLC_ALLOWWAKEERR);
}
@@ -2499,7 +2513,7 @@ static int intel_runtime_suspend(struct device *kdev)
if (drm_WARN_ON_ONCE(&dev_priv->drm, !HAS_RUNTIME_PM(dev_priv)))
return -ENODEV;
- DRM_DEBUG_KMS("Suspending device\n");
+ drm_dbg_kms(&dev_priv->drm, "Suspending device\n");
disable_rpm_wakeref_asserts(rpm);
@@ -2521,7 +2535,8 @@ static int intel_runtime_suspend(struct device *kdev)
ret = vlv_suspend_complete(dev_priv);
if (ret) {
- DRM_ERROR("Runtime suspend failed, disabling it (%d)\n", ret);
+ drm_err(&dev_priv->drm,
+ "Runtime suspend failed, disabling it (%d)\n", ret);
intel_uncore_runtime_resume(&dev_priv->uncore);
intel_runtime_pm_enable_interrupts(dev_priv);
@@ -2539,7 +2554,8 @@ static int intel_runtime_suspend(struct device *kdev)
intel_runtime_pm_driver_release(rpm);
if (intel_uncore_arm_unclaimed_mmio_detection(&dev_priv->uncore))
- DRM_ERROR("Unclaimed access detected prior to suspending\n");
+ drm_err(&dev_priv->drm,
+ "Unclaimed access detected prior to suspending\n");
rpm->suspended = true;
@@ -2571,7 +2587,7 @@ static int intel_runtime_suspend(struct device *kdev)
if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
intel_hpd_poll_init(dev_priv);
- DRM_DEBUG_KMS("Device suspended\n");
+ drm_dbg_kms(&dev_priv->drm, "Device suspended\n");
return 0;
}
@@ -2584,7 +2600,7 @@ static int intel_runtime_resume(struct device *kdev)
if (drm_WARN_ON_ONCE(&dev_priv->drm, !HAS_RUNTIME_PM(dev_priv)))
return -ENODEV;
- DRM_DEBUG_KMS("Resuming device\n");
+ drm_dbg_kms(&dev_priv->drm, "Resuming device\n");
drm_WARN_ON_ONCE(&dev_priv->drm, atomic_read(&rpm->wakeref_count));
disable_rpm_wakeref_asserts(rpm);
@@ -2592,7 +2608,8 @@ static int intel_runtime_resume(struct device *kdev)
intel_opregion_notify_adapter(dev_priv, PCI_D0);
rpm->suspended = false;
if (intel_uncore_unclaimed_mmio(&dev_priv->uncore))
- DRM_DEBUG_DRIVER("Unclaimed access during suspend, bios?\n");
+ drm_dbg(&dev_priv->drm,
+ "Unclaimed access during suspend, bios?\n");
intel_display_power_resume(dev_priv);
@@ -2623,9 +2640,10 @@ static int intel_runtime_resume(struct device *kdev)
enable_rpm_wakeref_asserts(rpm);
if (ret)
- DRM_ERROR("Runtime resume failed, disabling it (%d)\n", ret);
+ drm_err(&dev_priv->drm,
+ "Runtime resume failed, disabling it (%d)\n", ret);
else
- DRM_DEBUG_KMS("Device resumed\n");
+ drm_dbg_kms(&dev_priv->drm, "Device resumed\n");
return ret;
}
diff --git a/drivers/gpu/drm/i915/i915_gem_fence_reg.c b/drivers/gpu/drm/i915/i915_gem_fence_reg.c
index 6c54d78bea7b..049cd3785347 100644
--- a/drivers/gpu/drm/i915/i915_gem_fence_reg.c
+++ b/drivers/gpu/drm/i915/i915_gem_fence_reg.c
@@ -714,7 +714,7 @@ static void detect_bit_6_swizzle(struct i915_ggtt *ggtt)
}
if (dcc == 0xffffffff) {
- DRM_ERROR("Couldn't read from MCHBAR. "
+ drm_err(&i915->drm, "Couldn't read from MCHBAR. "
"Disabling tiling.\n");
swizzle_x = I915_BIT_6_SWIZZLE_UNKNOWN;
swizzle_y = I915_BIT_6_SWIZZLE_UNKNOWN;
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
index e039eb56900f..e7834fa1e0ac 100644
--- a/drivers/gpu/drm/i915/i915_gem_gtt.c
+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
@@ -63,7 +63,8 @@ void i915_gem_gtt_finish_pages(struct drm_i915_gem_object *obj,
/* XXX This does not prevent more requests being submitted! */
if (intel_gt_retire_requests_timeout(ggtt->vm.gt,
-MAX_SCHEDULE_TIMEOUT)) {
- DRM_ERROR("Failed to wait for idle; VT'd may hang.\n");
+ drm_err(&dev_priv->drm,
+ "Failed to wait for idle; VT'd may hang.\n");
/* Wait a bit, in hopes it avoids the hang */
udelay(10);
}
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 5c2b419c0603..de75bc53dc40 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -788,8 +788,9 @@ bool i915_get_crtc_scanoutpos(struct drm_device *dev, unsigned int index,
mode->private_flags & I915_MODE_FLAG_USE_SCANLINE_COUNTER;
if (drm_WARN_ON(&dev_priv->drm, !mode->crtc_clock)) {
- DRM_DEBUG_DRIVER("trying to get scanoutpos for disabled "
- "pipe %c\n", pipe_name(pipe));
+ drm_dbg(&dev_priv->drm,
+ "trying to get scanoutpos for disabled "
+ "pipe %c\n", pipe_name(pipe));
return false;
}
@@ -1176,8 +1177,9 @@ static void intel_get_hpd_pins(struct drm_i915_private *dev_priv,
*long_mask |= BIT(pin);
}
- DRM_DEBUG_DRIVER("hotplug event received, stat 0x%08x, dig 0x%08x, pins 0x%08x, long 0x%08x\n",
- hotplug_trigger, dig_hotplug_reg, *pin_mask, *long_mask);
+ drm_dbg(&dev_priv->drm,
+ "hotplug event received, stat 0x%08x, dig 0x%08x, pins 0x%08x, long 0x%08x\n",
+ hotplug_trigger, dig_hotplug_reg, *pin_mask, *long_mask);
}
@@ -1718,8 +1720,8 @@ static void ibx_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
if (pch_iir & SDE_AUDIO_POWER_MASK) {
int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK) >>
SDE_AUDIO_POWER_SHIFT);
- DRM_DEBUG_DRIVER("PCH audio power change on port %d\n",
- port_name(port));
+ drm_dbg(&dev_priv->drm, "PCH audio power change on port %d\n",
+ port_name(port));
}
if (pch_iir & SDE_AUX_MASK)
@@ -1729,25 +1731,26 @@ static void ibx_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
gmbus_irq_handler(dev_priv);
if (pch_iir & SDE_AUDIO_HDCP_MASK)
- DRM_DEBUG_DRIVER("PCH HDCP audio interrupt\n");
+ drm_dbg(&dev_priv->drm, "PCH HDCP audio interrupt\n");
if (pch_iir & SDE_AUDIO_TRANS_MASK)
- DRM_DEBUG_DRIVER("PCH transcoder audio interrupt\n");
+ drm_dbg(&dev_priv->drm, "PCH transcoder audio interrupt\n");
if (pch_iir & SDE_POISON)
- DRM_ERROR("PCH poison interrupt\n");
+ drm_err(&dev_priv->drm, "PCH poison interrupt\n");
if (pch_iir & SDE_FDI_MASK)
for_each_pipe(dev_priv, pipe)
- DRM_DEBUG_DRIVER(" pipe %c FDI IIR: 0x%08x\n",
- pipe_name(pipe),
- I915_READ(FDI_RX_IIR(pipe)));
+ drm_dbg(&dev_priv->drm, " pipe %c FDI IIR: 0x%08x\n",
+ pipe_name(pipe),
+ I915_READ(FDI_RX_IIR(pipe)));
if (pch_iir & (SDE_TRANSB_CRC_DONE | SDE_TRANSA_CRC_DONE))
- DRM_DEBUG_DRIVER("PCH transcoder CRC done interrupt\n");
+ drm_dbg(&dev_priv->drm, "PCH transcoder CRC done interrupt\n");
if (pch_iir & (SDE_TRANSB_CRC_ERR | SDE_TRANSA_CRC_ERR))
- DRM_DEBUG_DRIVER("PCH transcoder CRC error interrupt\n");
+ drm_dbg(&dev_priv->drm,
+ "PCH transcoder CRC error interrupt\n");
if (pch_iir & SDE_TRANSA_FIFO_UNDER)
intel_pch_fifo_underrun_irq_handler(dev_priv, PIPE_A);
@@ -1762,7 +1765,7 @@ static void ivb_err_int_handler(struct drm_i915_private *dev_priv)
enum pipe pipe;
if (err_int & ERR_INT_POISON)
- DRM_ERROR("Poison interrupt\n");
+ drm_err(&dev_priv->drm, "Poison interrupt\n");
for_each_pipe(dev_priv, pipe) {
if (err_int & ERR_INT_FIFO_UNDERRUN(pipe))
@@ -1785,7 +1788,7 @@ static void cpt_serr_int_handler(struct drm_i915_private *dev_priv)
enum pipe pipe;
if (serr_int & SERR_INT_POISON)
- DRM_ERROR("PCH poison interrupt\n");
+ drm_err(&dev_priv->drm, "PCH poison interrupt\n");
for_each_pipe(dev_priv, pipe)
if (serr_int & SERR_INT_TRANS_FIFO_UNDERRUN(pipe))
@@ -1804,8 +1807,8 @@ static void cpt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
if (pch_iir & SDE_AUDIO_POWER_MASK_CPT) {
int port = ffs((pch_iir & SDE_AUDIO_POWER_MASK_CPT) >>
SDE_AUDIO_POWER_SHIFT_CPT);
- DRM_DEBUG_DRIVER("PCH audio power change on port %c\n",
- port_name(port));
+ drm_dbg(&dev_priv->drm, "PCH audio power change on port %c\n",
+ port_name(port));
}
if (pch_iir & SDE_AUX_MASK_CPT)
@@ -1815,16 +1818,16 @@ static void cpt_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
gmbus_irq_handler(dev_priv);
if (pch_iir & SDE_AUDIO_CP_REQ_CPT)
- DRM_DEBUG_DRIVER("Audio CP request interrupt\n");
+ drm_dbg(&dev_priv->drm, "Audio CP request interrupt\n");
if (pch_iir & SDE_AUDIO_CP_CHG_CPT)
- DRM_DEBUG_DRIVER("Audio CP change interrupt\n");
+ drm_dbg(&dev_priv->drm, "Audio CP change interrupt\n");
if (pch_iir & SDE_FDI_MASK_CPT)
for_each_pipe(dev_priv, pipe)
- DRM_DEBUG_DRIVER(" pipe %c FDI IIR: 0x%08x\n",
- pipe_name(pipe),
- I915_READ(FDI_RX_IIR(pipe)));
+ drm_dbg(&dev_priv->drm, " pipe %c FDI IIR: 0x%08x\n",
+ pipe_name(pipe),
+ I915_READ(FDI_RX_IIR(pipe)));
if (pch_iir & SDE_ERROR_CPT)
cpt_serr_int_handler(dev_priv);
@@ -1961,7 +1964,7 @@ static void ilk_display_irq_handler(struct drm_i915_private *dev_priv,
intel_opregion_asle_intr(dev_priv);
if (de_iir & DE_POISON)
- DRM_ERROR("Poison interrupt\n");
+ drm_err(&dev_priv->drm, "Poison interrupt\n");
for_each_pipe(dev_priv, pipe) {
if (de_iir & DE_PIPE_VBLANK(pipe))
@@ -2162,7 +2165,8 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
if (pin_mask)
intel_hpd_irq_handler(dev_priv, pin_mask, long_mask);
else
- DRM_ERROR("Unexpected DE HPD interrupt 0x%08x\n", iir);
+ drm_err(&dev_priv->drm,
+ "Unexpected DE HPD interrupt 0x%08x\n", iir);
}
static u32 gen8_de_port_aux_mask(struct drm_i915_private *dev_priv)
@@ -2235,7 +2239,7 @@ gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
}
if (!found)
- DRM_ERROR("Unexpected DE Misc interrupt\n");
+ drm_err(&dev_priv->drm, "Unexpected DE Misc interrupt\n");
}
static irqreturn_t
@@ -2252,7 +2256,8 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
ret = IRQ_HANDLED;
gen8_de_misc_irq_handler(dev_priv, iir);
} else {
- DRM_ERROR("The master control interrupt lied (DE MISC)!\n");
+ drm_err(&dev_priv->drm,
+ "The master control interrupt lied (DE MISC)!\n");
}
}
@@ -2263,7 +2268,8 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
ret = IRQ_HANDLED;
gen11_hpd_irq_handler(dev_priv, iir);
} else {
- DRM_ERROR("The master control interrupt lied, (DE HPD)!\n");
+ drm_err(&dev_priv->drm,
+ "The master control interrupt lied, (DE HPD)!\n");
}
}
@@ -2303,10 +2309,12 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
}
if (!found)
- DRM_ERROR("Unexpected DE Port interrupt\n");
+ drm_err(&dev_priv->drm,
+ "Unexpected DE Port interrupt\n");
}
else
- DRM_ERROR("The master control interrupt lied (DE PORT)!\n");
+ drm_err(&dev_priv->drm,
+ "The master control interrupt lied (DE PORT)!\n");
}
for_each_pipe(dev_priv, pipe) {
@@ -2317,7 +2325,8 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
iir = I915_READ(GEN8_DE_PIPE_IIR(pipe));
if (!iir) {
- DRM_ERROR("The master control interrupt lied (DE PIPE)!\n");
+ drm_err(&dev_priv->drm,
+ "The master control interrupt lied (DE PIPE)!\n");
continue;
}
@@ -2335,9 +2344,10 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
fault_errors = iir & gen8_de_pipe_fault_mask(dev_priv);
if (fault_errors)
- DRM_ERROR("Fault errors on pipe %c: 0x%08x\n",
- pipe_name(pipe),
- fault_errors);
+ drm_err(&dev_priv->drm,
+ "Fault errors on pipe %c: 0x%08x\n",
+ pipe_name(pipe),
+ fault_errors);
}
if (HAS_PCH_SPLIT(dev_priv) && !HAS_PCH_NOP(dev_priv) &&
@@ -2363,7 +2373,8 @@ gen8_de_irq_handler(struct drm_i915_private *dev_priv, u32 master_ctl)
* Like on previous PCH there seems to be something
* fishy going on with forwarding PCH interrupts.
*/
- DRM_DEBUG_DRIVER("The master control interrupt lied (SDE)!\n");
+ drm_dbg(&dev_priv->drm,
+ "The master control interrupt lied (SDE)!\n");
}
}
@@ -3169,8 +3180,9 @@ static void __bxt_hpd_detection_setup(struct drm_i915_private *dev_priv,
PORTB_HOTPLUG_ENABLE |
PORTC_HOTPLUG_ENABLE;
- DRM_DEBUG_KMS("Invert bit setting: hp_ctl:%x hp_port:%x\n",
- hotplug, enabled_irqs);
+ drm_dbg_kms(&dev_priv->drm,
+ "Invert bit setting: hp_ctl:%x hp_port:%x\n",
+ hotplug, enabled_irqs);
hotplug &= ~BXT_DDI_HPD_INVERT_MASK;
/*
@@ -3553,7 +3565,8 @@ static void i8xx_error_irq_handler(struct drm_i915_private *dev_priv,
DRM_DEBUG("Master Error: EIR 0x%04x\n", eir);
if (eir_stuck)
- DRM_DEBUG_DRIVER("EIR stuck: 0x%04x, masked\n", eir_stuck);
+ drm_dbg(&dev_priv->drm, "EIR stuck: 0x%04x, masked\n",
+ eir_stuck);
}
static void i9xx_error_irq_ack(struct drm_i915_private *dev_priv,
@@ -3590,7 +3603,8 @@ static void i9xx_error_irq_handler(struct drm_i915_private *dev_priv,
DRM_DEBUG("Master Error, EIR 0x%08x\n", eir);
if (eir_stuck)
- DRM_DEBUG_DRIVER("EIR stuck: 0x%08x, masked\n", eir_stuck);
+ drm_dbg(&dev_priv->drm, "EIR stuck: 0x%08x, masked\n",
+ eir_stuck);
}
static irqreturn_t i8xx_irq_handler(int irq, void *arg)
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index 535a12520dba..b5249ee5bda6 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -1598,7 +1598,7 @@ static int alloc_oa_buffer(struct i915_perf_stream *stream)
bo = i915_gem_object_create_shmem(stream->perf->i915, OA_BUFFER_SIZE);
if (IS_ERR(bo)) {
- DRM_ERROR("Failed to allocate OA buffer\n");
+ drm_err(&i915->drm, "Failed to allocate OA buffer\n");
return PTR_ERR(bo);
}
@@ -1680,7 +1680,8 @@ static int alloc_noa_wait(struct i915_perf_stream *stream)
bo = i915_gem_object_create_internal(i915, 4096);
if (IS_ERR(bo)) {
- DRM_ERROR("Failed to allocate NOA wait batchbuffer\n");
+ drm_err(&i915->drm,
+ "Failed to allocate NOA wait batchbuffer\n");
return PTR_ERR(bo);
}
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index 0cef3130db05..c14d762bd652 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -525,7 +525,7 @@ static ssize_t error_state_write(struct file *file, struct kobject *kobj,
struct device *kdev = kobj_to_dev(kobj);
struct drm_i915_private *dev_priv = kdev_minor_to_i915(kdev);
- DRM_DEBUG_DRIVER("Resetting error state\n");
+ drm_dbg(&dev_priv->drm, "Resetting error state\n");
i915_reset_error_state(dev_priv);
return count;
@@ -564,31 +564,36 @@ void i915_setup_sysfs(struct drm_i915_private *dev_priv)
ret = sysfs_merge_group(&kdev->kobj,
&rc6_attr_group);
if (ret)
- DRM_ERROR("RC6 residency sysfs setup failed\n");
+ drm_err(&dev_priv->drm,
+ "RC6 residency sysfs setup failed\n");
}
if (HAS_RC6p(dev_priv)) {
ret = sysfs_merge_group(&kdev->kobj,
&rc6p_attr_group);
if (ret)
- DRM_ERROR("RC6p residency sysfs setup failed\n");
+ drm_err(&dev_priv->drm,
+ "RC6p residency sysfs setup failed\n");
}
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
ret = sysfs_merge_group(&kdev->kobj,
&media_rc6_attr_group);
if (ret)
- DRM_ERROR("Media RC6 residency sysfs setup failed\n");
+ drm_err(&dev_priv->drm,
+ "Media RC6 residency sysfs setup failed\n");
}
#endif
if (HAS_L3_DPF(dev_priv)) {
ret = device_create_bin_file(kdev, &dpf_attrs);
if (ret)
- DRM_ERROR("l3 parity sysfs setup failed\n");
+ drm_err(&dev_priv->drm,
+ "l3 parity sysfs setup failed\n");
if (NUM_L3_SLICES(dev_priv) > 1) {
ret = device_create_bin_file(kdev,
&dpf_attrs_1);
if (ret)
- DRM_ERROR("l3 parity slice 1 setup failed\n");
+ drm_err(&dev_priv->drm,
+ "l3 parity slice 1 setup failed\n");
}
}
@@ -598,7 +603,7 @@ void i915_setup_sysfs(struct drm_i915_private *dev_priv)
else if (INTEL_GEN(dev_priv) >= 6)
ret = sysfs_create_files(&kdev->kobj, gen6_attrs);
if (ret)
- DRM_ERROR("RPS sysfs setup failed\n");
+ drm_err(&dev_priv->drm, "RPS sysfs setup failed\n");
i915_setup_error_capture(kdev);
}
--
2.25.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Intel-gfx] [PATCH 2/5] drm/i915/debugfs: conversion to drm_device based logging macros.
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 1/5] drm/i915: conversion to drm_device logging macros when drm_i915_private is present Wambui Karuga
@ 2020-01-31 9:34 ` Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 3/5] drm/i915/cmd_parser: conversion to struct drm_device " Wambui Karuga
` (5 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Wambui Karuga @ 2020-01-31 9:34 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel; +Cc: intel-gfx
Manual conversion of printk based logging macros to the struct
drm_device based logging macros in i915/i915_debugfs.c.
Also involves extracting the struct drm_i915_private device from various
intel types to use in the macros.
This does not convert various instances of the DRM_DEBUG macro due to
the lack of an analogous struct drm_device based logging macro.
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 350ebfe79de4..6eaa9c72126c 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2845,7 +2845,8 @@ static ssize_t i915_ipc_status_write(struct file *file, const char __user *ubuf,
with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) {
if (!dev_priv->ipc_enabled && enable)
- DRM_INFO("Enabling IPC: WM will be proper only after next commit\n");
+ drm_info(&dev_priv->drm,
+ "Enabling IPC: WM will be proper only after next commit\n");
dev_priv->wm.distrust_bios_wm = true;
dev_priv->ipc_enabled = enable;
intel_enable_ipc(dev_priv);
@@ -3054,7 +3055,8 @@ static ssize_t i915_displayport_test_active_write(struct file *file,
if (IS_ERR(input_buffer))
return PTR_ERR(input_buffer);
- DRM_DEBUG_DRIVER("Copied %d bytes from user\n", (unsigned int)len);
+ drm_dbg(&to_i915(dev)->drm,
+ "Copied %d bytes from user\n", (unsigned int)len);
drm_connector_list_iter_begin(dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
@@ -3073,7 +3075,8 @@ static ssize_t i915_displayport_test_active_write(struct file *file,
status = kstrtoint(input_buffer, 10, &val);
if (status < 0)
break;
- DRM_DEBUG_DRIVER("Got %d for test active\n", val);
+ drm_dbg(&to_i915(dev)->drm,
+ "Got %d for test active\n", val);
/* To prevent erroneous activation of the compliance
* testing code, only accept an actual value of 1 here
*/
@@ -3642,7 +3645,8 @@ i915_cache_sharing_set(void *data, u64 val)
if (val > 3)
return -EINVAL;
- DRM_DEBUG_DRIVER("Manually setting uncore sharing to %llu\n", val);
+ drm_dbg(&dev_priv->drm,
+ "Manually setting uncore sharing to %llu\n", val);
with_intel_runtime_pm(&dev_priv->runtime_pm, wakeref) {
u32 snpcr;
@@ -4442,20 +4446,21 @@ static ssize_t i915_dsc_fec_support_write(struct file *file,
struct drm_connector *connector =
((struct seq_file *)file->private_data)->private;
struct intel_encoder *encoder = intel_attached_encoder(to_intel_connector(connector));
+ struct drm_i915_private *i915 = to_i915(encoder->base.dev);
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
if (len == 0)
return 0;
- DRM_DEBUG_DRIVER("Copied %zu bytes from user to force DSC\n",
- len);
+ drm_dbg(&i915->drm,
+ "Copied %zu bytes from user to force DSC\n", len);
ret = kstrtobool_from_user(ubuf, len, &dsc_enable);
if (ret < 0)
return ret;
- DRM_DEBUG_DRIVER("Got %s for DSC Enable\n",
- (dsc_enable) ? "true" : "false");
+ drm_dbg(&i915->drm, "Got %s for DSC Enable\n",
+ (dsc_enable) ? "true" : "false");
intel_dp->force_dsc_en = dsc_enable;
*offp += len;
--
2.25.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Intel-gfx] [PATCH 3/5] drm/i915/cmd_parser: conversion to struct drm_device logging macros.
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 1/5] drm/i915: conversion to drm_device logging macros when drm_i915_private is present Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 2/5] drm/i915/debugfs: conversion to drm_device based logging macros Wambui Karuga
@ 2020-01-31 9:34 ` Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 4/5] drm/i915/perf: conversion to struct drm_device based " Wambui Karuga
` (4 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Wambui Karuga @ 2020-01-31 9:34 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel; +Cc: intel-gfx
Manually convert printk based drm logging macros to the struct
drm_device based logging macros in i915/i915_cmd_parser.c.
This also involves extracting the drm_i915_private device from various
intel types for use in the macros.
Instances of the DRM_DEBUG macro are not converted due to the lack of a
similar struct drm_device based logging macro.
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
drivers/gpu/drm/i915/i915_cmd_parser.c | 29 +++++++++++++++-----------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_cmd_parser.c b/drivers/gpu/drm/i915/i915_cmd_parser.c
index a0e437aa65b7..189b573d02be 100644
--- a/drivers/gpu/drm/i915/i915_cmd_parser.c
+++ b/drivers/gpu/drm/i915/i915_cmd_parser.c
@@ -803,10 +803,11 @@ static bool validate_cmds_sorted(const struct intel_engine_cs *engine,
u32 curr = desc->cmd.value & desc->cmd.mask;
if (curr < previous) {
- DRM_ERROR("CMD: %s [%d] command table not sorted: "
- "table=%d entry=%d cmd=0x%08X prev=0x%08X\n",
- engine->name, engine->id,
- i, j, curr, previous);
+ drm_err(&engine->i915->drm,
+ "CMD: %s [%d] command table not sorted: "
+ "table=%d entry=%d cmd=0x%08X prev=0x%08X\n",
+ engine->name, engine->id,
+ i, j, curr, previous);
ret = false;
}
@@ -829,10 +830,11 @@ static bool check_sorted(const struct intel_engine_cs *engine,
u32 curr = i915_mmio_reg_offset(reg_table[i].addr);
if (curr < previous) {
- DRM_ERROR("CMD: %s [%d] register table not sorted: "
- "entry=%d reg=0x%08X prev=0x%08X\n",
- engine->name, engine->id,
- i, curr, previous);
+ drm_err(&engine->i915->drm,
+ "CMD: %s [%d] register table not sorted: "
+ "entry=%d reg=0x%08X prev=0x%08X\n",
+ engine->name, engine->id,
+ i, curr, previous);
ret = false;
}
@@ -1010,18 +1012,21 @@ void intel_engine_init_cmd_parser(struct intel_engine_cs *engine)
}
if (!validate_cmds_sorted(engine, cmd_tables, cmd_table_count)) {
- DRM_ERROR("%s: command descriptions are not sorted\n",
- engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: command descriptions are not sorted\n",
+ engine->name);
return;
}
if (!validate_regs_sorted(engine)) {
- DRM_ERROR("%s: registers are not sorted\n", engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: registers are not sorted\n", engine->name);
return;
}
ret = init_hash_table(engine, cmd_tables, cmd_table_count);
if (ret) {
- DRM_ERROR("%s: initialised failed!\n", engine->name);
+ drm_err(&engine->i915->drm,
+ "%s: initialised failed!\n", engine->name);
fini_hash_table(engine);
return;
}
--
2.25.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Intel-gfx] [PATCH 4/5] drm/i915/perf: conversion to struct drm_device based logging macros.
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
` (2 preceding siblings ...)
2020-01-31 9:34 ` [Intel-gfx] [PATCH 3/5] drm/i915/cmd_parser: conversion to struct drm_device " Wambui Karuga
@ 2020-01-31 9:34 ` Wambui Karuga
2020-02-04 9:34 ` Jani Nikula
2020-01-31 9:34 ` [Intel-gfx] [PATCH 5/5] drm/i915/pci: conversion to " Wambui Karuga
` (3 subsequent siblings)
7 siblings, 1 reply; 11+ messages in thread
From: Wambui Karuga @ 2020-01-31 9:34 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel; +Cc: intel-gfx
Manual conversion of instances of printk based drm logging macros to the
struct drm_device based logging macros in i915/i915_perf.c.
Also involves extraction of the struct drm_i915_private device from
various intel types for use in the macros.
Instances of the DRM_DEBUG printk macro were not converted due to the
lack of an analogous struct drm_device based logging macro.
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
drivers/gpu/drm/i915/i915_perf.c | 143 ++++++++++++++++++++-----------
1 file changed, 91 insertions(+), 52 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
index b5249ee5bda6..53ba31278be7 100644
--- a/drivers/gpu/drm/i915/i915_perf.c
+++ b/drivers/gpu/drm/i915/i915_perf.c
@@ -555,8 +555,9 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream)
aging_tail = hw_tail;
stream->oa_buffer.aging_timestamp = now;
} else {
- DRM_ERROR("Ignoring spurious out of range OA buffer tail pointer = %x\n",
- hw_tail);
+ drm_err(&stream->perf->i915->drm,
+ "Ignoring spurious out of range OA buffer tail pointer = %x\n",
+ hw_tail);
}
}
@@ -745,7 +746,8 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
*/
if (drm_WARN_ON(&uncore->i915->drm,
(OA_BUFFER_SIZE - head) < report_size)) {
- DRM_ERROR("Spurious OA head ptr: non-integral report offset\n");
+ drm_err(&uncore->i915->drm,
+ "Spurious OA head ptr: non-integral report offset\n");
break;
}
@@ -926,8 +928,9 @@ static int gen8_oa_read(struct i915_perf_stream *stream,
if (ret)
return ret;
- DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n",
- stream->period_exponent);
+ drm_dbg(&stream->perf->i915->drm,
+ "OA buffer overflow (exponent = %d): force restart\n",
+ stream->period_exponent);
stream->perf->ops.oa_disable(stream);
stream->perf->ops.oa_enable(stream);
@@ -1041,7 +1044,8 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream,
*/
if (drm_WARN_ON(&uncore->i915->drm,
(OA_BUFFER_SIZE - head) < report_size)) {
- DRM_ERROR("Spurious OA head ptr: non-integral report offset\n");
+ drm_err(&uncore->i915->drm,
+ "Spurious OA head ptr: non-integral report offset\n");
break;
}
@@ -1152,8 +1156,9 @@ static int gen7_oa_read(struct i915_perf_stream *stream,
if (ret)
return ret;
- DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n",
- stream->period_exponent);
+ drm_dbg(&stream->perf->i915->drm,
+ "OA buffer overflow (exponent = %d): force restart\n",
+ stream->period_exponent);
stream->perf->ops.oa_disable(stream);
stream->perf->ops.oa_enable(stream);
@@ -1339,9 +1344,10 @@ static int oa_get_render_ctx_id(struct i915_perf_stream *stream)
ce->tag = stream->specific_ctx_id;
- DRM_DEBUG_DRIVER("filtering on ctx_id=0x%x ctx_id_mask=0x%x\n",
- stream->specific_ctx_id,
- stream->specific_ctx_id_mask);
+ drm_dbg(&stream->perf->i915->drm,
+ "filtering on ctx_id=0x%x ctx_id_mask=0x%x\n",
+ stream->specific_ctx_id,
+ stream->specific_ctx_id_mask);
return 0;
}
@@ -2657,7 +2663,8 @@ static void gen7_oa_disable(struct i915_perf_stream *stream)
if (intel_wait_for_register(uncore,
GEN7_OACONTROL, GEN7_OACONTROL_ENABLE, 0,
50))
- DRM_ERROR("wait for OA to be disabled timed out\n");
+ drm_err(&stream->perf->i915->drm,
+ "wait for OA to be disabled timed out\n");
}
static void gen8_oa_disable(struct i915_perf_stream *stream)
@@ -2668,7 +2675,8 @@ static void gen8_oa_disable(struct i915_perf_stream *stream)
if (intel_wait_for_register(uncore,
GEN8_OACONTROL, GEN8_OA_COUNTER_ENABLE, 0,
50))
- DRM_ERROR("wait for OA to be disabled timed out\n");
+ drm_err(&stream->perf->i915->drm,
+ "wait for OA to be disabled timed out\n");
}
static void gen12_oa_disable(struct i915_perf_stream *stream)
@@ -2680,7 +2688,8 @@ static void gen12_oa_disable(struct i915_perf_stream *stream)
GEN12_OAG_OACONTROL,
GEN12_OAG_OACONTROL_OA_COUNTER_ENABLE, 0,
50))
- DRM_ERROR("wait for OA to be disabled timed out\n");
+ drm_err(&stream->perf->i915->drm,
+ "wait for OA to be disabled timed out\n");
}
/**
@@ -3347,8 +3356,9 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
specific_ctx = i915_gem_context_lookup(file_priv, ctx_handle);
if (!specific_ctx) {
- DRM_DEBUG("Failed to look up context with ID %u for opening perf stream\n",
- ctx_handle);
+ drm_dbg(&specific_ctx->i915->drm,
+ "Failed to look up context with ID %u for opening perf stream\n",
+ ctx_handle);
ret = -ENOENT;
goto err;
}
@@ -3381,7 +3391,8 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
if (props->hold_preemption) {
if (!props->single_context) {
- DRM_DEBUG("preemption disable with no context\n");
+ drm_dbg(&perf->i915->drm,
+ "preemption disable with no context\n");
ret = -EINVAL;
goto err;
}
@@ -3395,7 +3406,8 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
*/
if (privileged_op &&
i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
- DRM_DEBUG("Insufficient privileges to open i915 perf stream\n");
+ drm_dbg(&perf->i915->drm,
+ "Insufficient privileges to open i915 perf stream\n");
ret = -EACCES;
goto err_ctx;
}
@@ -3487,7 +3499,7 @@ static int read_properties_unlocked(struct i915_perf *perf,
memset(props, 0, sizeof(struct perf_open_properties));
if (!n_props) {
- DRM_DEBUG("No i915 perf properties given\n");
+ drm_dbg(&perf->i915->drm, "No i915 perf properties given\n");
return -EINVAL;
}
@@ -3496,7 +3508,7 @@ static int read_properties_unlocked(struct i915_perf *perf,
I915_ENGINE_CLASS_RENDER,
0);
if (!props->engine) {
- DRM_DEBUG("No RENDER-capable engines\n");
+ drm_dbg(&perf->i915->drm, "No RENDER-capable engines\n");
return -EINVAL;
}
@@ -3507,7 +3519,8 @@ static int read_properties_unlocked(struct i915_perf *perf,
* from userspace.
*/
if (n_props >= DRM_I915_PERF_PROP_MAX) {
- DRM_DEBUG("More i915 perf properties specified than exist\n");
+ drm_dbg(&perf->i915->drm,
+ "More i915 perf properties specified than exist\n");
return -EINVAL;
}
@@ -3525,7 +3538,8 @@ static int read_properties_unlocked(struct i915_perf *perf,
return ret;
if (id == 0 || id >= DRM_I915_PERF_PROP_MAX) {
- DRM_DEBUG("Unknown i915 perf property ID\n");
+ drm_dbg(&perf->i915->drm,
+ "Unknown i915 perf property ID\n");
return -EINVAL;
}
@@ -3540,28 +3554,32 @@ static int read_properties_unlocked(struct i915_perf *perf,
break;
case DRM_I915_PERF_PROP_OA_METRICS_SET:
if (value == 0) {
- DRM_DEBUG("Unknown OA metric set ID\n");
+ drm_dbg(&perf->i915->drm,
+ "Unknown OA metric set ID\n");
return -EINVAL;
}
props->metrics_set = value;
break;
case DRM_I915_PERF_PROP_OA_FORMAT:
if (value == 0 || value >= I915_OA_FORMAT_MAX) {
- DRM_DEBUG("Out-of-range OA report format %llu\n",
- value);
+ drm_dbg(&perf->i915->drm,
+ "Out-of-range OA report format %llu\n",
+ value);
return -EINVAL;
}
if (!perf->oa_formats[value].size) {
- DRM_DEBUG("Unsupported OA report format %llu\n",
- value);
+ drm_dbg(&perf->i915->drm,
+ "Unsupported OA report format %llu\n",
+ value);
return -EINVAL;
}
props->oa_format = value;
break;
case DRM_I915_PERF_PROP_OA_EXPONENT:
if (value > OA_EXPONENT_MAX) {
- DRM_DEBUG("OA timer exponent too high (> %u)\n",
- OA_EXPONENT_MAX);
+ drm_dbg(&perf->i915->drm,
+ "OA timer exponent too high (> %u)\n",
+ OA_EXPONENT_MAX);
return -EINVAL;
}
@@ -3589,8 +3607,9 @@ static int read_properties_unlocked(struct i915_perf *perf,
if (oa_freq_hz > i915_oa_max_sample_rate &&
!capable(CAP_SYS_ADMIN)) {
- DRM_DEBUG("OA exponent would exceed the max sampling frequency (sysctl dev.i915.oa_max_sample_rate) %uHz without root privileges\n",
- i915_oa_max_sample_rate);
+ drm_dbg(&perf->i915->drm,
+ "OA exponent would exceed the max sampling frequency (sysctl dev.i915.oa_max_sample_rate) %uHz without root privileges\n",
+ i915_oa_max_sample_rate);
return -EACCES;
}
@@ -3645,7 +3664,8 @@ int i915_perf_open_ioctl(struct drm_device *dev, void *data,
int ret;
if (!perf->i915) {
- DRM_DEBUG("i915 perf interface not available for this system\n");
+ drm_dbg(&to_i915(dev)->drm,
+ "i915 perf interface not available for this system\n");
return -ENOTSUPP;
}
@@ -3653,7 +3673,8 @@ int i915_perf_open_ioctl(struct drm_device *dev, void *data,
I915_PERF_FLAG_FD_NONBLOCK |
I915_PERF_FLAG_DISABLED;
if (param->flags & ~known_open_flags) {
- DRM_DEBUG("Unknown drm_i915_perf_open_param flag\n");
+ drm_dbg(&perf->i915->drm,
+ "Unknown drm_i915_perf_open_param flag\n");
return -EINVAL;
}
@@ -3927,7 +3948,8 @@ static struct i915_oa_reg *alloc_oa_regs(struct i915_perf *perf,
goto addr_err;
if (!is_valid(perf, addr)) {
- DRM_DEBUG("Invalid oa_reg address: %X\n", addr);
+ drm_dbg(&perf->i915->drm,
+ "Invalid oa_reg address: %X\n", addr);
err = -EINVAL;
goto addr_err;
}
@@ -4001,30 +4023,35 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
int err, id;
if (!perf->i915) {
- DRM_DEBUG("i915 perf interface not available for this system\n");
+ drm_dbg(&to_i915(dev)->drm,
+ "i915 perf interface not available for this system\n");
return -ENOTSUPP;
}
if (!perf->metrics_kobj) {
- DRM_DEBUG("OA metrics weren't advertised via sysfs\n");
+ drm_dbg(&perf->i915->drm,
+ "OA metrics weren't advertised via sysfs\n");
return -EINVAL;
}
if (i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
- DRM_DEBUG("Insufficient privileges to add i915 OA config\n");
+ drm_dbg(&perf->i915->drm,
+ "Insufficient privileges to add i915 OA config\n");
return -EACCES;
}
if ((!args->mux_regs_ptr || !args->n_mux_regs) &&
(!args->boolean_regs_ptr || !args->n_boolean_regs) &&
(!args->flex_regs_ptr || !args->n_flex_regs)) {
- DRM_DEBUG("No OA registers given\n");
+ drm_dbg(&perf->i915->drm,
+ "No OA registers given\n");
return -EINVAL;
}
oa_config = kzalloc(sizeof(*oa_config), GFP_KERNEL);
if (!oa_config) {
- DRM_DEBUG("Failed to allocate memory for the OA config\n");
+ drm_dbg(&perf->i915->drm,
+ "Failed to allocate memory for the OA config\n");
return -ENOMEM;
}
@@ -4032,7 +4059,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
kref_init(&oa_config->ref);
if (!uuid_is_valid(args->uuid)) {
- DRM_DEBUG("Invalid uuid format for OA config\n");
+ drm_dbg(&perf->i915->drm,
+ "Invalid uuid format for OA config\n");
err = -EINVAL;
goto reg_err;
}
@@ -4049,7 +4077,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
args->n_mux_regs);
if (IS_ERR(regs)) {
- DRM_DEBUG("Failed to create OA config for mux_regs\n");
+ drm_dbg(&perf->i915->drm,
+ "Failed to create OA config for mux_regs\n");
err = PTR_ERR(regs);
goto reg_err;
}
@@ -4062,7 +4091,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
args->n_boolean_regs);
if (IS_ERR(regs)) {
- DRM_DEBUG("Failed to create OA config for b_counter_regs\n");
+ drm_dbg(&perf->i915->drm,
+ "Failed to create OA config for b_counter_regs\n");
err = PTR_ERR(regs);
goto reg_err;
}
@@ -4081,7 +4111,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
args->n_flex_regs);
if (IS_ERR(regs)) {
- DRM_DEBUG("Failed to create OA config for flex_regs\n");
+ drm_dbg(&perf->i915->drm,
+ "Failed to create OA config for flex_regs\n");
err = PTR_ERR(regs);
goto reg_err;
}
@@ -4097,7 +4128,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
*/
idr_for_each_entry(&perf->metrics_idr, tmp, id) {
if (!strcmp(tmp->uuid, oa_config->uuid)) {
- DRM_DEBUG("OA config already exists with this uuid\n");
+ drm_dbg(&perf->i915->drm,
+ "OA config already exists with this uuid\n");
err = -EADDRINUSE;
goto sysfs_err;
}
@@ -4105,7 +4137,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
err = create_dynamic_oa_sysfs_entry(perf, oa_config);
if (err) {
- DRM_DEBUG("Failed to create sysfs entry for OA config\n");
+ drm_dbg(&perf->i915->drm,
+ "Failed to create sysfs entry for OA config\n");
goto sysfs_err;
}
@@ -4114,14 +4147,16 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
oa_config, 2,
0, GFP_KERNEL);
if (oa_config->id < 0) {
- DRM_DEBUG("Failed to create sysfs entry for OA config\n");
+ drm_dbg(&perf->i915->drm,
+ "Failed to create sysfs entry for OA config\n");
err = oa_config->id;
goto sysfs_err;
}
mutex_unlock(&perf->metrics_lock);
- DRM_DEBUG("Added config %s id=%i\n", oa_config->uuid, oa_config->id);
+ drm_dbg(&perf->i915->drm,
+ "Added config %s id=%i\n", oa_config->uuid, oa_config->id);
return oa_config->id;
@@ -4129,7 +4164,7 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
mutex_unlock(&perf->metrics_lock);
reg_err:
i915_oa_config_put(oa_config);
- DRM_DEBUG("Failed to add new OA config\n");
+ drm_dbg(&perf->i915->drm, "Failed to add new OA config\n");
return err;
}
@@ -4153,12 +4188,14 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
int ret;
if (!perf->i915) {
- DRM_DEBUG("i915 perf interface not available for this system\n");
+ drm_dbg(&to_i915(dev)->drm,
+ "i915 perf interface not available for this system\n");
return -ENOTSUPP;
}
if (i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
- DRM_DEBUG("Insufficient privileges to remove i915 OA config\n");
+ drm_dbg(&perf->i915->drm,
+ "Insufficient privileges to remove i915 OA config\n");
return -EACCES;
}
@@ -4168,7 +4205,8 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
oa_config = idr_find(&perf->metrics_idr, *arg);
if (!oa_config) {
- DRM_DEBUG("Failed to remove unknown OA config\n");
+ drm_dbg(&perf->i915->drm,
+ "Failed to remove unknown OA config\n");
ret = -ENOENT;
goto err_unlock;
}
@@ -4181,7 +4219,8 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
mutex_unlock(&perf->metrics_lock);
- DRM_DEBUG("Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
+ drm_dbg(&perf->i915->drm,
+ "Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
i915_oa_config_put(oa_config);
--
2.25.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Intel-gfx] [PATCH 5/5] drm/i915/pci: conversion to drm_device based logging macros.
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
` (3 preceding siblings ...)
2020-01-31 9:34 ` [Intel-gfx] [PATCH 4/5] drm/i915/perf: conversion to struct drm_device based " Wambui Karuga
@ 2020-01-31 9:34 ` Wambui Karuga
2020-01-31 12:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: conversion to new struct " Patchwork
` (2 subsequent siblings)
7 siblings, 0 replies; 11+ messages in thread
From: Wambui Karuga @ 2020-01-31 9:34 UTC (permalink / raw)
To: jani.nikula, joonas.lahtinen, rodrigo.vivi, airlied, daniel; +Cc: intel-gfx
Manual conversion of instances of printk based drm logging macros to the
struct drm_device based logging macros in i915/i915_pci.c.
Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
---
drivers/gpu/drm/i915/i915_pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 741bffc22867..6413f22356ae 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -960,7 +960,8 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (intel_info->require_force_probe &&
!force_probe(pdev->device, i915_modparams.force_probe)) {
- DRM_INFO("Your graphics device %04x is not properly supported by the driver in this\n"
+ drm_info(&pdev_to_i915(pdev)->drm,
+ "Your graphics device %04x is not properly supported by the driver in this\n"
"kernel version. To force driver probe anyway, use i915.force_probe=%04x\n"
"module parameter or CONFIG_DRM_I915_FORCE_PROBE=%04x configuration option,\n"
"or (recommended) check for kernel updates.\n",
--
2.25.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: conversion to new struct drm_device based logging macros.
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
` (4 preceding siblings ...)
2020-01-31 9:34 ` [Intel-gfx] [PATCH 5/5] drm/i915/pci: conversion to " Wambui Karuga
@ 2020-01-31 12:46 ` Patchwork
2020-01-31 13:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-02-03 13:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-01-31 12:46 UTC (permalink / raw)
To: Wambui Karuga; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: conversion to new struct drm_device based logging macros.
URL : https://patchwork.freedesktop.org/series/72812/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
be9ed48fe6e7 drm/i915: conversion to drm_device logging macros when drm_i915_private is present.
-:86: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#86:
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
total: 0 errors, 1 warnings, 0 checks, 727 lines checked
5e3766f431a0 drm/i915/debugfs: conversion to drm_device based logging macros.
-:15: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#15:
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
total: 0 errors, 1 warnings, 0 checks, 61 lines checked
cf40c77787e9 drm/i915/cmd_parser: conversion to struct drm_device logging macros.
-:15: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#15:
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
total: 0 errors, 1 warnings, 0 checks, 55 lines checked
629879bbcc3c drm/i915/perf: conversion to struct drm_device based logging macros.
-:15: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#15:
References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
-:310: WARNING:OOM_MESSAGE: Possible unnecessary 'out of memory' message
#310: FILE: drivers/gpu/drm/i915/i915_perf.c:4053:
if (!oa_config) {
+ drm_dbg(&perf->i915->drm,
total: 0 errors, 2 warnings, 0 checks, 385 lines checked
9b2c54ed27f3 drm/i915/pci: conversion to drm_device based logging macros.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: conversion to new struct drm_device based logging macros.
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
` (5 preceding siblings ...)
2020-01-31 12:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: conversion to new struct " Patchwork
@ 2020-01-31 13:16 ` Patchwork
2020-02-03 13:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-01-31 13:16 UTC (permalink / raw)
To: Wambui Karuga; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: conversion to new struct drm_device based logging macros.
URL : https://patchwork.freedesktop.org/series/72812/
State : success
== Summary ==
CI Bug Log - changes from CI_DRM_7850 -> Patchwork_16352
====================================================
Summary
-------
**SUCCESS**
No regressions found.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/index.html
Known issues
------------
Here are the changes found in Patchwork_16352 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live_hangcheck:
- fi-icl-u2: [PASS][1] -> [INCOMPLETE][2] ([fdo#108569])
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-icl-u2/igt@i915_selftest@live_hangcheck.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-icl-u2/igt@i915_selftest@live_hangcheck.html
* igt@kms_chamelium@hdmi-crc-fast:
- fi-icl-u2: [PASS][3] -> [FAIL][4] ([fdo#109635] / [i915#217])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-icl-u2/igt@kms_chamelium@hdmi-crc-fast.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-icl-u2/igt@kms_chamelium@hdmi-crc-fast.html
* igt@kms_frontbuffer_tracking@basic:
- fi-hsw-peppy: [PASS][5] -> [DMESG-WARN][6] ([i915#44])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
#### Possible fixes ####
* igt@gem_close_race@basic-threads:
- fi-byt-n2820: [TIMEOUT][7] ([fdo#112271] / [i915#1084] / [i915#816]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-byt-n2820/igt@gem_close_race@basic-threads.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-byt-n2820/igt@gem_close_race@basic-threads.html
* igt@gem_exec_store@basic-all:
- fi-apl-guc: [TIMEOUT][9] ([fdo#112271]) -> [PASS][10] +8 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-apl-guc/igt@gem_exec_store@basic-all.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-apl-guc/igt@gem_exec_store@basic-all.html
* igt@gem_exec_suspend@basic-s4-devices:
- fi-tgl-y: [FAIL][11] ([CI#94]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-tgl-y/igt@gem_exec_suspend@basic-s4-devices.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-tgl-y/igt@gem_exec_suspend@basic-s4-devices.html
* igt@gem_tiled_fence_blits@basic:
- fi-apl-guc: [SKIP][13] ([fdo#109271]) -> [PASS][14] +47 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-apl-guc/igt@gem_tiled_fence_blits@basic.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-apl-guc/igt@gem_tiled_fence_blits@basic.html
* igt@kms_addfb_basic@bad-pitch-32:
- fi-tgl-y: [DMESG-WARN][15] ([CI#94] / [i915#402]) -> [PASS][16] +1 similar issue
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-tgl-y/igt@kms_addfb_basic@bad-pitch-32.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-tgl-y/igt@kms_addfb_basic@bad-pitch-32.html
#### Warnings ####
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][17] ([fdo#111407]) -> [FAIL][18] ([fdo#111096] / [i915#323])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
* igt@runner@aborted:
- fi-byt-n2820: [FAIL][19] ([i915#816]) -> [FAIL][20] ([i915#999])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/fi-byt-n2820/igt@runner@aborted.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/fi-byt-n2820/igt@runner@aborted.html
[CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109635]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096
[fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084
[i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
[i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
[i915#816]: https://gitlab.freedesktop.org/drm/intel/issues/816
[i915#999]: https://gitlab.freedesktop.org/drm/intel/issues/999
Participating hosts (43 -> 41)
------------------------------
Additional (6): fi-bdw-5557u fi-byt-j1900 fi-snb-2520m fi-whl-u fi-elk-e7500 fi-kbl-r
Missing (8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ilk-650 fi-kbl-7560u fi-byt-clapper fi-bdw-samus
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7850 -> Patchwork_16352
CI-20190529: 20190529
CI_DRM_7850: ae66f2257648ce52c51298506977baa32873c9d5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5407: a9d69f51dadbcbc53527671f87572d05c3370cba @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16352: 9b2c54ed27f3d82dd194b1201a4bd5412e994cdc @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
9b2c54ed27f3 drm/i915/pci: conversion to drm_device based logging macros.
629879bbcc3c drm/i915/perf: conversion to struct drm_device based logging macros.
cf40c77787e9 drm/i915/cmd_parser: conversion to struct drm_device logging macros.
5e3766f431a0 drm/i915/debugfs: conversion to drm_device based logging macros.
be9ed48fe6e7 drm/i915: conversion to drm_device logging macros when drm_i915_private is present.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: conversion to new struct drm_device based logging macros.
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
` (6 preceding siblings ...)
2020-01-31 13:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
@ 2020-02-03 13:54 ` Patchwork
7 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2020-02-03 13:54 UTC (permalink / raw)
To: Wambui Karuga; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: conversion to new struct drm_device based logging macros.
URL : https://patchwork.freedesktop.org/series/72812/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_7850_full -> Patchwork_16352_full
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_16352_full absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_16352_full, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_16352_full:
### IGT changes ###
#### Possible regressions ####
* igt@gem_exec_suspend@basic-s4-devices:
- shard-iclb: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb8/igt@gem_exec_suspend@basic-s4-devices.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb6/igt@gem_exec_suspend@basic-s4-devices.html
Known issues
------------
Here are the changes found in Patchwork_16352_full that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_caching@read-writes:
- shard-hsw: [PASS][3] -> [FAIL][4] ([i915#694])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-hsw6/igt@gem_caching@read-writes.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-hsw6/igt@gem_caching@read-writes.html
* igt@gem_ctx_persistence@vcs1-mixed-process:
- shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#112080]) +19 similar issues
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb4/igt@gem_ctx_persistence@vcs1-mixed-process.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb3/igt@gem_ctx_persistence@vcs1-mixed-process.html
* igt@gem_exec_balancer@hang:
- shard-tglb: [PASS][7] -> [TIMEOUT][8] ([fdo#112271])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-tglb5/igt@gem_exec_balancer@hang.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-tglb2/igt@gem_exec_balancer@hang.html
* igt@gem_exec_schedule@in-order-bsd:
- shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +4 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb6/igt@gem_exec_schedule@in-order-bsd.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb2/igt@gem_exec_schedule@in-order-bsd.html
* igt@gem_exec_schedule@pi-distinct-iova-bsd:
- shard-iclb: [PASS][11] -> [SKIP][12] ([i915#677])
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb6/igt@gem_exec_schedule@pi-distinct-iova-bsd.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb1/igt@gem_exec_schedule@pi-distinct-iova-bsd.html
* igt@gem_exec_schedule@preempt-queue-bsd1:
- shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#109276]) +32 similar issues
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb2/igt@gem_exec_schedule@preempt-queue-bsd1.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb7/igt@gem_exec_schedule@preempt-queue-bsd1.html
* igt@gen9_exec_parse@allowed-single:
- shard-skl: [PASS][15] -> [TIMEOUT][16] ([i915#716])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl6/igt@gen9_exec_parse@allowed-single.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl4/igt@gen9_exec_parse@allowed-single.html
* igt@i915_pm_dc@dc5-dpms:
- shard-iclb: [PASS][17] -> [FAIL][18] ([i915#447])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb7/igt@i915_pm_dc@dc5-dpms.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb3/igt@i915_pm_dc@dc5-dpms.html
* igt@i915_pm_dc@dc6-psr:
- shard-iclb: [PASS][19] -> [FAIL][20] ([i915#454])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb5/igt@i915_pm_dc@dc6-psr.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb8/igt@i915_pm_dc@dc6-psr.html
* igt@kms_flip@flip-vs-expired-vblank:
- shard-skl: [PASS][21] -> [FAIL][22] ([i915#79]) +1 similar issue
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl5/igt@kms_flip@flip-vs-expired-vblank.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl1/igt@kms_flip@flip-vs-expired-vblank.html
* igt@kms_flip@flip-vs-expired-vblank-interruptible:
- shard-glk: [PASS][23] -> [FAIL][24] ([i915#79])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-glk3/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-glk6/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-apl: [PASS][25] -> [DMESG-WARN][26] ([i915#180]) +1 similar issue
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-apl7/igt@kms_flip@flip-vs-suspend-interruptible.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-apl3/igt@kms_flip@flip-vs-suspend-interruptible.html
* igt@kms_plane_alpha_blend@pipe-b-coverage-7efc:
- shard-skl: [PASS][27] -> [FAIL][28] ([fdo#108145] / [i915#265])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl7/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl5/igt@kms_plane_alpha_blend@pipe-b-coverage-7efc.html
* igt@kms_psr@psr2_sprite_plane_move:
- shard-iclb: [PASS][29] -> [SKIP][30] ([fdo#109441]) +3 similar issues
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb5/igt@kms_psr@psr2_sprite_plane_move.html
* igt@kms_setmode@basic:
- shard-apl: [PASS][31] -> [FAIL][32] ([i915#31])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-apl6/igt@kms_setmode@basic.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-apl7/igt@kms_setmode@basic.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-kbl: [PASS][33] -> [DMESG-WARN][34] ([i915#180]) +5 similar issues
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-kbl6/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-kbl7/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
#### Possible fixes ####
* igt@gem_exec_async@concurrent-writes-bsd:
- shard-iclb: [SKIP][35] ([fdo#112146]) -> [PASS][36] +6 similar issues
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb4/igt@gem_exec_async@concurrent-writes-bsd.html
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb8/igt@gem_exec_async@concurrent-writes-bsd.html
* igt@gem_exec_balancer@hang:
- shard-iclb: [TIMEOUT][37] ([fdo#112271]) -> [PASS][38]
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb4/igt@gem_exec_balancer@hang.html
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb8/igt@gem_exec_balancer@hang.html
* igt@gem_exec_parallel@vcs1-fds:
- shard-iclb: [SKIP][39] ([fdo#112080]) -> [PASS][40] +12 similar issues
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb6/igt@gem_exec_parallel@vcs1-fds.html
[40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb1/igt@gem_exec_parallel@vcs1-fds.html
* igt@gem_exec_schedule@pi-shared-iova-bsd:
- shard-iclb: [SKIP][41] ([i915#677]) -> [PASS][42] +1 similar issue
[41]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb1/igt@gem_exec_schedule@pi-shared-iova-bsd.html
[42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb6/igt@gem_exec_schedule@pi-shared-iova-bsd.html
* igt@gem_ppgtt@flink-and-close-vma-leak:
- shard-hsw: [FAIL][43] ([i915#644]) -> [PASS][44]
[43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-hsw7/igt@gem_ppgtt@flink-and-close-vma-leak.html
[44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-hsw5/igt@gem_ppgtt@flink-and-close-vma-leak.html
* igt@gem_softpin@noreloc-s3:
- shard-apl: [DMESG-WARN][45] ([i915#180]) -> [PASS][46]
[45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-apl6/igt@gem_softpin@noreloc-s3.html
[46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-apl8/igt@gem_softpin@noreloc-s3.html
* igt@gem_tiled_blits@normal:
- shard-hsw: [FAIL][47] ([i915#694]) -> [PASS][48]
[47]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-hsw6/igt@gem_tiled_blits@normal.html
[48]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-hsw6/igt@gem_tiled_blits@normal.html
* igt@i915_pm_rps@reset:
- shard-iclb: [FAIL][49] ([i915#413]) -> [PASS][50]
[49]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb6/igt@i915_pm_rps@reset.html
[50]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb5/igt@i915_pm_rps@reset.html
* igt@kms_color@pipe-b-ctm-negative:
- shard-skl: [DMESG-WARN][51] ([i915#109]) -> [PASS][52] +2 similar issues
[51]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl1/igt@kms_color@pipe-b-ctm-negative.html
[52]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl1/igt@kms_color@pipe-b-ctm-negative.html
* igt@kms_cursor_crc@pipe-a-cursor-alpha-opaque:
- shard-skl: [FAIL][53] ([i915#54]) -> [PASS][54]
[53]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl7/igt@kms_cursor_crc@pipe-a-cursor-alpha-opaque.html
[54]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl9/igt@kms_cursor_crc@pipe-a-cursor-alpha-opaque.html
* igt@kms_flip@flip-vs-suspend-interruptible:
- shard-snb: [DMESG-WARN][55] ([i915#42]) -> [PASS][56]
[55]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-snb5/igt@kms_flip@flip-vs-suspend-interruptible.html
[56]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-snb1/igt@kms_flip@flip-vs-suspend-interruptible.html
* igt@kms_flip@plain-flip-ts-check-interruptible:
- shard-skl: [FAIL][57] ([i915#34]) -> [PASS][58]
[57]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl9/igt@kms_flip@plain-flip-ts-check-interruptible.html
[58]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl5/igt@kms_flip@plain-flip-ts-check-interruptible.html
* igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite:
- shard-skl: [FAIL][59] ([i915#49]) -> [PASS][60]
[59]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html
[60]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl9/igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite.html
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- shard-kbl: [DMESG-WARN][61] ([i915#180]) -> [PASS][62] +4 similar issues
[61]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-kbl7/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
[62]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-kbl2/igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a.html
* igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min:
- shard-skl: [FAIL][63] ([fdo#108145]) -> [PASS][64] +1 similar issue
[63]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl6/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
[64]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl10/igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min.html
* igt@kms_plane_multiple@atomic-pipe-b-tiling-y:
- shard-skl: [DMESG-WARN][65] ([IGT#6]) -> [PASS][66]
[65]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl6/igt@kms_plane_multiple@atomic-pipe-b-tiling-y.html
[66]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl10/igt@kms_plane_multiple@atomic-pipe-b-tiling-y.html
* igt@kms_psr@psr2_cursor_render:
- shard-iclb: [SKIP][67] ([fdo#109441]) -> [PASS][68] +2 similar issues
[67]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb8/igt@kms_psr@psr2_cursor_render.html
[68]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb2/igt@kms_psr@psr2_cursor_render.html
* igt@kms_setmode@basic:
- shard-hsw: [FAIL][69] ([i915#31]) -> [PASS][70]
[69]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-hsw5/igt@kms_setmode@basic.html
[70]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-hsw7/igt@kms_setmode@basic.html
* igt@kms_universal_plane@universal-plane-pipe-c-functional:
- shard-kbl: [FAIL][71] ([i915#331]) -> [PASS][72]
[71]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-kbl4/igt@kms_universal_plane@universal-plane-pipe-c-functional.html
[72]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-kbl4/igt@kms_universal_plane@universal-plane-pipe-c-functional.html
* igt@kms_vblank@pipe-a-ts-continuation-suspend:
- shard-skl: [INCOMPLETE][73] ([i915#69]) -> [PASS][74]
[73]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-skl4/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
[74]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-skl1/igt@kms_vblank@pipe-a-ts-continuation-suspend.html
* igt@prime_busy@hang-bsd2:
- shard-iclb: [SKIP][75] ([fdo#109276]) -> [PASS][76] +21 similar issues
[75]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb3/igt@prime_busy@hang-bsd2.html
[76]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb4/igt@prime_busy@hang-bsd2.html
#### Warnings ####
* igt@gem_ctx_isolation@vcs1-nonpriv:
- shard-iclb: [FAIL][77] ([IGT#28]) -> [SKIP][78] ([fdo#112080]) +1 similar issue
[77]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-iclb2/igt@gem_ctx_isolation@vcs1-nonpriv.html
[78]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-iclb7/igt@gem_ctx_isolation@vcs1-nonpriv.html
* igt@i915_pm_dc@dc6-psr:
- shard-tglb: [FAIL][79] ([i915#454]) -> [SKIP][80] ([i915#468])
[79]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7850/shard-tglb3/igt@i915_pm_dc@dc6-psr.html
[80]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/shard-tglb2/igt@i915_pm_dc@dc6-psr.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[IGT#28]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/28
[IGT#6]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/issues/6
[fdo#108145]: https://bugs.freedesktop.org/show_bug.cgi?id=108145
[fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276
[fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
[fdo#112080]: https://bugs.freedesktop.org/show_bug.cgi?id=112080
[fdo#112146]: https://bugs.freedesktop.org/show_bug.cgi?id=112146
[fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271
[i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
[i915#180]: https://gitlab.freedesktop.org/drm/intel/issues/180
[i915#265]: https://gitlab.freedesktop.org/drm/intel/issues/265
[i915#31]: https://gitlab.freedesktop.org/drm/intel/issues/31
[i915#331]: https://gitlab.freedesktop.org/drm/intel/issues/331
[i915#34]: https://gitlab.freedesktop.org/drm/intel/issues/34
[i915#413]: https://gitlab.freedesktop.org/drm/intel/issues/413
[i915#42]: https://gitlab.freedesktop.org/drm/intel/issues/42
[i915#447]: https://gitlab.freedesktop.org/drm/intel/issues/447
[i915#454]: https://gitlab.freedesktop.org/drm/intel/issues/454
[i915#468]: https://gitlab.freedesktop.org/drm/intel/issues/468
[i915#49]: https://gitlab.freedesktop.org/drm/intel/issues/49
[i915#54]: https://gitlab.freedesktop.org/drm/intel/issues/54
[i915#644]: https://gitlab.freedesktop.org/drm/intel/issues/644
[i915#677]: https://gitlab.freedesktop.org/drm/intel/issues/677
[i915#69]: https://gitlab.freedesktop.org/drm/intel/issues/69
[i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694
[i915#716]: https://gitlab.freedesktop.org/drm/intel/issues/716
[i915#79]: https://gitlab.freedesktop.org/drm/intel/issues/79
Participating hosts (10 -> 10)
------------------------------
No changes in participating hosts
Build changes
-------------
* CI: CI-20190529 -> None
* Linux: CI_DRM_7850 -> Patchwork_16352
CI-20190529: 20190529
CI_DRM_7850: ae66f2257648ce52c51298506977baa32873c9d5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5407: a9d69f51dadbcbc53527671f87572d05c3370cba @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_16352: 9b2c54ed27f3d82dd194b1201a4bd5412e994cdc @ git://anongit.freedesktop.org/gfx-ci/linux
piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16352/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH 4/5] drm/i915/perf: conversion to struct drm_device based logging macros.
2020-01-31 9:34 ` [Intel-gfx] [PATCH 4/5] drm/i915/perf: conversion to struct drm_device based " Wambui Karuga
@ 2020-02-04 9:34 ` Jani Nikula
2020-02-04 9:36 ` Jani Nikula
0 siblings, 1 reply; 11+ messages in thread
From: Jani Nikula @ 2020-02-04 9:34 UTC (permalink / raw)
To: Wambui Karuga, joonas.lahtinen, rodrigo.vivi, airlied, daniel; +Cc: intel-gfx
On Fri, 31 Jan 2020, Wambui Karuga <wambui.karugax@gmail.com> wrote:
> Manual conversion of instances of printk based drm logging macros to the
> struct drm_device based logging macros in i915/i915_perf.c.
> Also involves extraction of the struct drm_i915_private device from
> various intel types for use in the macros.
>
> Instances of the DRM_DEBUG printk macro were not converted due to the
> lack of an analogous struct drm_device based logging macro.
That's not true for this patch.
BR,
Jani.
>
> References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
> ---
> drivers/gpu/drm/i915/i915_perf.c | 143 ++++++++++++++++++++-----------
> 1 file changed, 91 insertions(+), 52 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
> index b5249ee5bda6..53ba31278be7 100644
> --- a/drivers/gpu/drm/i915/i915_perf.c
> +++ b/drivers/gpu/drm/i915/i915_perf.c
> @@ -555,8 +555,9 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream)
> aging_tail = hw_tail;
> stream->oa_buffer.aging_timestamp = now;
> } else {
> - DRM_ERROR("Ignoring spurious out of range OA buffer tail pointer = %x\n",
> - hw_tail);
> + drm_err(&stream->perf->i915->drm,
> + "Ignoring spurious out of range OA buffer tail pointer = %x\n",
> + hw_tail);
> }
> }
>
> @@ -745,7 +746,8 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
> */
> if (drm_WARN_ON(&uncore->i915->drm,
> (OA_BUFFER_SIZE - head) < report_size)) {
> - DRM_ERROR("Spurious OA head ptr: non-integral report offset\n");
> + drm_err(&uncore->i915->drm,
> + "Spurious OA head ptr: non-integral report offset\n");
> break;
> }
>
> @@ -926,8 +928,9 @@ static int gen8_oa_read(struct i915_perf_stream *stream,
> if (ret)
> return ret;
>
> - DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n",
> - stream->period_exponent);
> + drm_dbg(&stream->perf->i915->drm,
> + "OA buffer overflow (exponent = %d): force restart\n",
> + stream->period_exponent);
>
> stream->perf->ops.oa_disable(stream);
> stream->perf->ops.oa_enable(stream);
> @@ -1041,7 +1044,8 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream,
> */
> if (drm_WARN_ON(&uncore->i915->drm,
> (OA_BUFFER_SIZE - head) < report_size)) {
> - DRM_ERROR("Spurious OA head ptr: non-integral report offset\n");
> + drm_err(&uncore->i915->drm,
> + "Spurious OA head ptr: non-integral report offset\n");
> break;
> }
>
> @@ -1152,8 +1156,9 @@ static int gen7_oa_read(struct i915_perf_stream *stream,
> if (ret)
> return ret;
>
> - DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n",
> - stream->period_exponent);
> + drm_dbg(&stream->perf->i915->drm,
> + "OA buffer overflow (exponent = %d): force restart\n",
> + stream->period_exponent);
>
> stream->perf->ops.oa_disable(stream);
> stream->perf->ops.oa_enable(stream);
> @@ -1339,9 +1344,10 @@ static int oa_get_render_ctx_id(struct i915_perf_stream *stream)
>
> ce->tag = stream->specific_ctx_id;
>
> - DRM_DEBUG_DRIVER("filtering on ctx_id=0x%x ctx_id_mask=0x%x\n",
> - stream->specific_ctx_id,
> - stream->specific_ctx_id_mask);
> + drm_dbg(&stream->perf->i915->drm,
> + "filtering on ctx_id=0x%x ctx_id_mask=0x%x\n",
> + stream->specific_ctx_id,
> + stream->specific_ctx_id_mask);
>
> return 0;
> }
> @@ -2657,7 +2663,8 @@ static void gen7_oa_disable(struct i915_perf_stream *stream)
> if (intel_wait_for_register(uncore,
> GEN7_OACONTROL, GEN7_OACONTROL_ENABLE, 0,
> 50))
> - DRM_ERROR("wait for OA to be disabled timed out\n");
> + drm_err(&stream->perf->i915->drm,
> + "wait for OA to be disabled timed out\n");
> }
>
> static void gen8_oa_disable(struct i915_perf_stream *stream)
> @@ -2668,7 +2675,8 @@ static void gen8_oa_disable(struct i915_perf_stream *stream)
> if (intel_wait_for_register(uncore,
> GEN8_OACONTROL, GEN8_OA_COUNTER_ENABLE, 0,
> 50))
> - DRM_ERROR("wait for OA to be disabled timed out\n");
> + drm_err(&stream->perf->i915->drm,
> + "wait for OA to be disabled timed out\n");
> }
>
> static void gen12_oa_disable(struct i915_perf_stream *stream)
> @@ -2680,7 +2688,8 @@ static void gen12_oa_disable(struct i915_perf_stream *stream)
> GEN12_OAG_OACONTROL,
> GEN12_OAG_OACONTROL_OA_COUNTER_ENABLE, 0,
> 50))
> - DRM_ERROR("wait for OA to be disabled timed out\n");
> + drm_err(&stream->perf->i915->drm,
> + "wait for OA to be disabled timed out\n");
> }
>
> /**
> @@ -3347,8 +3356,9 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
>
> specific_ctx = i915_gem_context_lookup(file_priv, ctx_handle);
> if (!specific_ctx) {
> - DRM_DEBUG("Failed to look up context with ID %u for opening perf stream\n",
> - ctx_handle);
> + drm_dbg(&specific_ctx->i915->drm,
> + "Failed to look up context with ID %u for opening perf stream\n",
> + ctx_handle);
> ret = -ENOENT;
> goto err;
> }
> @@ -3381,7 +3391,8 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
>
> if (props->hold_preemption) {
> if (!props->single_context) {
> - DRM_DEBUG("preemption disable with no context\n");
> + drm_dbg(&perf->i915->drm,
> + "preemption disable with no context\n");
> ret = -EINVAL;
> goto err;
> }
> @@ -3395,7 +3406,8 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
> */
> if (privileged_op &&
> i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
> - DRM_DEBUG("Insufficient privileges to open i915 perf stream\n");
> + drm_dbg(&perf->i915->drm,
> + "Insufficient privileges to open i915 perf stream\n");
> ret = -EACCES;
> goto err_ctx;
> }
> @@ -3487,7 +3499,7 @@ static int read_properties_unlocked(struct i915_perf *perf,
> memset(props, 0, sizeof(struct perf_open_properties));
>
> if (!n_props) {
> - DRM_DEBUG("No i915 perf properties given\n");
> + drm_dbg(&perf->i915->drm, "No i915 perf properties given\n");
> return -EINVAL;
> }
>
> @@ -3496,7 +3508,7 @@ static int read_properties_unlocked(struct i915_perf *perf,
> I915_ENGINE_CLASS_RENDER,
> 0);
> if (!props->engine) {
> - DRM_DEBUG("No RENDER-capable engines\n");
> + drm_dbg(&perf->i915->drm, "No RENDER-capable engines\n");
> return -EINVAL;
> }
>
> @@ -3507,7 +3519,8 @@ static int read_properties_unlocked(struct i915_perf *perf,
> * from userspace.
> */
> if (n_props >= DRM_I915_PERF_PROP_MAX) {
> - DRM_DEBUG("More i915 perf properties specified than exist\n");
> + drm_dbg(&perf->i915->drm,
> + "More i915 perf properties specified than exist\n");
> return -EINVAL;
> }
>
> @@ -3525,7 +3538,8 @@ static int read_properties_unlocked(struct i915_perf *perf,
> return ret;
>
> if (id == 0 || id >= DRM_I915_PERF_PROP_MAX) {
> - DRM_DEBUG("Unknown i915 perf property ID\n");
> + drm_dbg(&perf->i915->drm,
> + "Unknown i915 perf property ID\n");
> return -EINVAL;
> }
>
> @@ -3540,28 +3554,32 @@ static int read_properties_unlocked(struct i915_perf *perf,
> break;
> case DRM_I915_PERF_PROP_OA_METRICS_SET:
> if (value == 0) {
> - DRM_DEBUG("Unknown OA metric set ID\n");
> + drm_dbg(&perf->i915->drm,
> + "Unknown OA metric set ID\n");
> return -EINVAL;
> }
> props->metrics_set = value;
> break;
> case DRM_I915_PERF_PROP_OA_FORMAT:
> if (value == 0 || value >= I915_OA_FORMAT_MAX) {
> - DRM_DEBUG("Out-of-range OA report format %llu\n",
> - value);
> + drm_dbg(&perf->i915->drm,
> + "Out-of-range OA report format %llu\n",
> + value);
> return -EINVAL;
> }
> if (!perf->oa_formats[value].size) {
> - DRM_DEBUG("Unsupported OA report format %llu\n",
> - value);
> + drm_dbg(&perf->i915->drm,
> + "Unsupported OA report format %llu\n",
> + value);
> return -EINVAL;
> }
> props->oa_format = value;
> break;
> case DRM_I915_PERF_PROP_OA_EXPONENT:
> if (value > OA_EXPONENT_MAX) {
> - DRM_DEBUG("OA timer exponent too high (> %u)\n",
> - OA_EXPONENT_MAX);
> + drm_dbg(&perf->i915->drm,
> + "OA timer exponent too high (> %u)\n",
> + OA_EXPONENT_MAX);
> return -EINVAL;
> }
>
> @@ -3589,8 +3607,9 @@ static int read_properties_unlocked(struct i915_perf *perf,
>
> if (oa_freq_hz > i915_oa_max_sample_rate &&
> !capable(CAP_SYS_ADMIN)) {
> - DRM_DEBUG("OA exponent would exceed the max sampling frequency (sysctl dev.i915.oa_max_sample_rate) %uHz without root privileges\n",
> - i915_oa_max_sample_rate);
> + drm_dbg(&perf->i915->drm,
> + "OA exponent would exceed the max sampling frequency (sysctl dev.i915.oa_max_sample_rate) %uHz without root privileges\n",
> + i915_oa_max_sample_rate);
> return -EACCES;
> }
>
> @@ -3645,7 +3664,8 @@ int i915_perf_open_ioctl(struct drm_device *dev, void *data,
> int ret;
>
> if (!perf->i915) {
> - DRM_DEBUG("i915 perf interface not available for this system\n");
> + drm_dbg(&to_i915(dev)->drm,
> + "i915 perf interface not available for this system\n");
> return -ENOTSUPP;
> }
>
> @@ -3653,7 +3673,8 @@ int i915_perf_open_ioctl(struct drm_device *dev, void *data,
> I915_PERF_FLAG_FD_NONBLOCK |
> I915_PERF_FLAG_DISABLED;
> if (param->flags & ~known_open_flags) {
> - DRM_DEBUG("Unknown drm_i915_perf_open_param flag\n");
> + drm_dbg(&perf->i915->drm,
> + "Unknown drm_i915_perf_open_param flag\n");
> return -EINVAL;
> }
>
> @@ -3927,7 +3948,8 @@ static struct i915_oa_reg *alloc_oa_regs(struct i915_perf *perf,
> goto addr_err;
>
> if (!is_valid(perf, addr)) {
> - DRM_DEBUG("Invalid oa_reg address: %X\n", addr);
> + drm_dbg(&perf->i915->drm,
> + "Invalid oa_reg address: %X\n", addr);
> err = -EINVAL;
> goto addr_err;
> }
> @@ -4001,30 +4023,35 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
> int err, id;
>
> if (!perf->i915) {
> - DRM_DEBUG("i915 perf interface not available for this system\n");
> + drm_dbg(&to_i915(dev)->drm,
> + "i915 perf interface not available for this system\n");
> return -ENOTSUPP;
> }
>
> if (!perf->metrics_kobj) {
> - DRM_DEBUG("OA metrics weren't advertised via sysfs\n");
> + drm_dbg(&perf->i915->drm,
> + "OA metrics weren't advertised via sysfs\n");
> return -EINVAL;
> }
>
> if (i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
> - DRM_DEBUG("Insufficient privileges to add i915 OA config\n");
> + drm_dbg(&perf->i915->drm,
> + "Insufficient privileges to add i915 OA config\n");
> return -EACCES;
> }
>
> if ((!args->mux_regs_ptr || !args->n_mux_regs) &&
> (!args->boolean_regs_ptr || !args->n_boolean_regs) &&
> (!args->flex_regs_ptr || !args->n_flex_regs)) {
> - DRM_DEBUG("No OA registers given\n");
> + drm_dbg(&perf->i915->drm,
> + "No OA registers given\n");
> return -EINVAL;
> }
>
> oa_config = kzalloc(sizeof(*oa_config), GFP_KERNEL);
> if (!oa_config) {
> - DRM_DEBUG("Failed to allocate memory for the OA config\n");
> + drm_dbg(&perf->i915->drm,
> + "Failed to allocate memory for the OA config\n");
> return -ENOMEM;
> }
>
> @@ -4032,7 +4059,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
> kref_init(&oa_config->ref);
>
> if (!uuid_is_valid(args->uuid)) {
> - DRM_DEBUG("Invalid uuid format for OA config\n");
> + drm_dbg(&perf->i915->drm,
> + "Invalid uuid format for OA config\n");
> err = -EINVAL;
> goto reg_err;
> }
> @@ -4049,7 +4077,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
> args->n_mux_regs);
>
> if (IS_ERR(regs)) {
> - DRM_DEBUG("Failed to create OA config for mux_regs\n");
> + drm_dbg(&perf->i915->drm,
> + "Failed to create OA config for mux_regs\n");
> err = PTR_ERR(regs);
> goto reg_err;
> }
> @@ -4062,7 +4091,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
> args->n_boolean_regs);
>
> if (IS_ERR(regs)) {
> - DRM_DEBUG("Failed to create OA config for b_counter_regs\n");
> + drm_dbg(&perf->i915->drm,
> + "Failed to create OA config for b_counter_regs\n");
> err = PTR_ERR(regs);
> goto reg_err;
> }
> @@ -4081,7 +4111,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
> args->n_flex_regs);
>
> if (IS_ERR(regs)) {
> - DRM_DEBUG("Failed to create OA config for flex_regs\n");
> + drm_dbg(&perf->i915->drm,
> + "Failed to create OA config for flex_regs\n");
> err = PTR_ERR(regs);
> goto reg_err;
> }
> @@ -4097,7 +4128,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
> */
> idr_for_each_entry(&perf->metrics_idr, tmp, id) {
> if (!strcmp(tmp->uuid, oa_config->uuid)) {
> - DRM_DEBUG("OA config already exists with this uuid\n");
> + drm_dbg(&perf->i915->drm,
> + "OA config already exists with this uuid\n");
> err = -EADDRINUSE;
> goto sysfs_err;
> }
> @@ -4105,7 +4137,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>
> err = create_dynamic_oa_sysfs_entry(perf, oa_config);
> if (err) {
> - DRM_DEBUG("Failed to create sysfs entry for OA config\n");
> + drm_dbg(&perf->i915->drm,
> + "Failed to create sysfs entry for OA config\n");
> goto sysfs_err;
> }
>
> @@ -4114,14 +4147,16 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
> oa_config, 2,
> 0, GFP_KERNEL);
> if (oa_config->id < 0) {
> - DRM_DEBUG("Failed to create sysfs entry for OA config\n");
> + drm_dbg(&perf->i915->drm,
> + "Failed to create sysfs entry for OA config\n");
> err = oa_config->id;
> goto sysfs_err;
> }
>
> mutex_unlock(&perf->metrics_lock);
>
> - DRM_DEBUG("Added config %s id=%i\n", oa_config->uuid, oa_config->id);
> + drm_dbg(&perf->i915->drm,
> + "Added config %s id=%i\n", oa_config->uuid, oa_config->id);
>
> return oa_config->id;
>
> @@ -4129,7 +4164,7 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
> mutex_unlock(&perf->metrics_lock);
> reg_err:
> i915_oa_config_put(oa_config);
> - DRM_DEBUG("Failed to add new OA config\n");
> + drm_dbg(&perf->i915->drm, "Failed to add new OA config\n");
> return err;
> }
>
> @@ -4153,12 +4188,14 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
> int ret;
>
> if (!perf->i915) {
> - DRM_DEBUG("i915 perf interface not available for this system\n");
> + drm_dbg(&to_i915(dev)->drm,
> + "i915 perf interface not available for this system\n");
> return -ENOTSUPP;
> }
>
> if (i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
> - DRM_DEBUG("Insufficient privileges to remove i915 OA config\n");
> + drm_dbg(&perf->i915->drm,
> + "Insufficient privileges to remove i915 OA config\n");
> return -EACCES;
> }
>
> @@ -4168,7 +4205,8 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
>
> oa_config = idr_find(&perf->metrics_idr, *arg);
> if (!oa_config) {
> - DRM_DEBUG("Failed to remove unknown OA config\n");
> + drm_dbg(&perf->i915->drm,
> + "Failed to remove unknown OA config\n");
> ret = -ENOENT;
> goto err_unlock;
> }
> @@ -4181,7 +4219,8 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
>
> mutex_unlock(&perf->metrics_lock);
>
> - DRM_DEBUG("Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
> + drm_dbg(&perf->i915->drm,
> + "Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
>
> i915_oa_config_put(oa_config);
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Intel-gfx] [PATCH 4/5] drm/i915/perf: conversion to struct drm_device based logging macros.
2020-02-04 9:34 ` Jani Nikula
@ 2020-02-04 9:36 ` Jani Nikula
0 siblings, 0 replies; 11+ messages in thread
From: Jani Nikula @ 2020-02-04 9:36 UTC (permalink / raw)
To: Wambui Karuga, joonas.lahtinen, rodrigo.vivi, airlied, daniel; +Cc: intel-gfx
On Tue, 04 Feb 2020, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Fri, 31 Jan 2020, Wambui Karuga <wambui.karugax@gmail.com> wrote:
>> Manual conversion of instances of printk based drm logging macros to the
>> struct drm_device based logging macros in i915/i915_perf.c.
>> Also involves extraction of the struct drm_i915_private device from
>> various intel types for use in the macros.
>>
>> Instances of the DRM_DEBUG printk macro were not converted due to the
>> lack of an analogous struct drm_device based logging macro.
>
> That's not true for this patch.
Pushed all other patches, thanks.
BR,
Jani.
>
> BR,
> Jani.
>
>>
>> References: https://lists.freedesktop.org/archives/dri-devel/2020-January/253381.html
>> Signed-off-by: Wambui Karuga <wambui.karugax@gmail.com>
>> ---
>> drivers/gpu/drm/i915/i915_perf.c | 143 ++++++++++++++++++++-----------
>> 1 file changed, 91 insertions(+), 52 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c
>> index b5249ee5bda6..53ba31278be7 100644
>> --- a/drivers/gpu/drm/i915/i915_perf.c
>> +++ b/drivers/gpu/drm/i915/i915_perf.c
>> @@ -555,8 +555,9 @@ static bool oa_buffer_check_unlocked(struct i915_perf_stream *stream)
>> aging_tail = hw_tail;
>> stream->oa_buffer.aging_timestamp = now;
>> } else {
>> - DRM_ERROR("Ignoring spurious out of range OA buffer tail pointer = %x\n",
>> - hw_tail);
>> + drm_err(&stream->perf->i915->drm,
>> + "Ignoring spurious out of range OA buffer tail pointer = %x\n",
>> + hw_tail);
>> }
>> }
>>
>> @@ -745,7 +746,8 @@ static int gen8_append_oa_reports(struct i915_perf_stream *stream,
>> */
>> if (drm_WARN_ON(&uncore->i915->drm,
>> (OA_BUFFER_SIZE - head) < report_size)) {
>> - DRM_ERROR("Spurious OA head ptr: non-integral report offset\n");
>> + drm_err(&uncore->i915->drm,
>> + "Spurious OA head ptr: non-integral report offset\n");
>> break;
>> }
>>
>> @@ -926,8 +928,9 @@ static int gen8_oa_read(struct i915_perf_stream *stream,
>> if (ret)
>> return ret;
>>
>> - DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n",
>> - stream->period_exponent);
>> + drm_dbg(&stream->perf->i915->drm,
>> + "OA buffer overflow (exponent = %d): force restart\n",
>> + stream->period_exponent);
>>
>> stream->perf->ops.oa_disable(stream);
>> stream->perf->ops.oa_enable(stream);
>> @@ -1041,7 +1044,8 @@ static int gen7_append_oa_reports(struct i915_perf_stream *stream,
>> */
>> if (drm_WARN_ON(&uncore->i915->drm,
>> (OA_BUFFER_SIZE - head) < report_size)) {
>> - DRM_ERROR("Spurious OA head ptr: non-integral report offset\n");
>> + drm_err(&uncore->i915->drm,
>> + "Spurious OA head ptr: non-integral report offset\n");
>> break;
>> }
>>
>> @@ -1152,8 +1156,9 @@ static int gen7_oa_read(struct i915_perf_stream *stream,
>> if (ret)
>> return ret;
>>
>> - DRM_DEBUG("OA buffer overflow (exponent = %d): force restart\n",
>> - stream->period_exponent);
>> + drm_dbg(&stream->perf->i915->drm,
>> + "OA buffer overflow (exponent = %d): force restart\n",
>> + stream->period_exponent);
>>
>> stream->perf->ops.oa_disable(stream);
>> stream->perf->ops.oa_enable(stream);
>> @@ -1339,9 +1344,10 @@ static int oa_get_render_ctx_id(struct i915_perf_stream *stream)
>>
>> ce->tag = stream->specific_ctx_id;
>>
>> - DRM_DEBUG_DRIVER("filtering on ctx_id=0x%x ctx_id_mask=0x%x\n",
>> - stream->specific_ctx_id,
>> - stream->specific_ctx_id_mask);
>> + drm_dbg(&stream->perf->i915->drm,
>> + "filtering on ctx_id=0x%x ctx_id_mask=0x%x\n",
>> + stream->specific_ctx_id,
>> + stream->specific_ctx_id_mask);
>>
>> return 0;
>> }
>> @@ -2657,7 +2663,8 @@ static void gen7_oa_disable(struct i915_perf_stream *stream)
>> if (intel_wait_for_register(uncore,
>> GEN7_OACONTROL, GEN7_OACONTROL_ENABLE, 0,
>> 50))
>> - DRM_ERROR("wait for OA to be disabled timed out\n");
>> + drm_err(&stream->perf->i915->drm,
>> + "wait for OA to be disabled timed out\n");
>> }
>>
>> static void gen8_oa_disable(struct i915_perf_stream *stream)
>> @@ -2668,7 +2675,8 @@ static void gen8_oa_disable(struct i915_perf_stream *stream)
>> if (intel_wait_for_register(uncore,
>> GEN8_OACONTROL, GEN8_OA_COUNTER_ENABLE, 0,
>> 50))
>> - DRM_ERROR("wait for OA to be disabled timed out\n");
>> + drm_err(&stream->perf->i915->drm,
>> + "wait for OA to be disabled timed out\n");
>> }
>>
>> static void gen12_oa_disable(struct i915_perf_stream *stream)
>> @@ -2680,7 +2688,8 @@ static void gen12_oa_disable(struct i915_perf_stream *stream)
>> GEN12_OAG_OACONTROL,
>> GEN12_OAG_OACONTROL_OA_COUNTER_ENABLE, 0,
>> 50))
>> - DRM_ERROR("wait for OA to be disabled timed out\n");
>> + drm_err(&stream->perf->i915->drm,
>> + "wait for OA to be disabled timed out\n");
>> }
>>
>> /**
>> @@ -3347,8 +3356,9 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
>>
>> specific_ctx = i915_gem_context_lookup(file_priv, ctx_handle);
>> if (!specific_ctx) {
>> - DRM_DEBUG("Failed to look up context with ID %u for opening perf stream\n",
>> - ctx_handle);
>> + drm_dbg(&specific_ctx->i915->drm,
>> + "Failed to look up context with ID %u for opening perf stream\n",
>> + ctx_handle);
>> ret = -ENOENT;
>> goto err;
>> }
>> @@ -3381,7 +3391,8 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
>>
>> if (props->hold_preemption) {
>> if (!props->single_context) {
>> - DRM_DEBUG("preemption disable with no context\n");
>> + drm_dbg(&perf->i915->drm,
>> + "preemption disable with no context\n");
>> ret = -EINVAL;
>> goto err;
>> }
>> @@ -3395,7 +3406,8 @@ i915_perf_open_ioctl_locked(struct i915_perf *perf,
>> */
>> if (privileged_op &&
>> i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
>> - DRM_DEBUG("Insufficient privileges to open i915 perf stream\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Insufficient privileges to open i915 perf stream\n");
>> ret = -EACCES;
>> goto err_ctx;
>> }
>> @@ -3487,7 +3499,7 @@ static int read_properties_unlocked(struct i915_perf *perf,
>> memset(props, 0, sizeof(struct perf_open_properties));
>>
>> if (!n_props) {
>> - DRM_DEBUG("No i915 perf properties given\n");
>> + drm_dbg(&perf->i915->drm, "No i915 perf properties given\n");
>> return -EINVAL;
>> }
>>
>> @@ -3496,7 +3508,7 @@ static int read_properties_unlocked(struct i915_perf *perf,
>> I915_ENGINE_CLASS_RENDER,
>> 0);
>> if (!props->engine) {
>> - DRM_DEBUG("No RENDER-capable engines\n");
>> + drm_dbg(&perf->i915->drm, "No RENDER-capable engines\n");
>> return -EINVAL;
>> }
>>
>> @@ -3507,7 +3519,8 @@ static int read_properties_unlocked(struct i915_perf *perf,
>> * from userspace.
>> */
>> if (n_props >= DRM_I915_PERF_PROP_MAX) {
>> - DRM_DEBUG("More i915 perf properties specified than exist\n");
>> + drm_dbg(&perf->i915->drm,
>> + "More i915 perf properties specified than exist\n");
>> return -EINVAL;
>> }
>>
>> @@ -3525,7 +3538,8 @@ static int read_properties_unlocked(struct i915_perf *perf,
>> return ret;
>>
>> if (id == 0 || id >= DRM_I915_PERF_PROP_MAX) {
>> - DRM_DEBUG("Unknown i915 perf property ID\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Unknown i915 perf property ID\n");
>> return -EINVAL;
>> }
>>
>> @@ -3540,28 +3554,32 @@ static int read_properties_unlocked(struct i915_perf *perf,
>> break;
>> case DRM_I915_PERF_PROP_OA_METRICS_SET:
>> if (value == 0) {
>> - DRM_DEBUG("Unknown OA metric set ID\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Unknown OA metric set ID\n");
>> return -EINVAL;
>> }
>> props->metrics_set = value;
>> break;
>> case DRM_I915_PERF_PROP_OA_FORMAT:
>> if (value == 0 || value >= I915_OA_FORMAT_MAX) {
>> - DRM_DEBUG("Out-of-range OA report format %llu\n",
>> - value);
>> + drm_dbg(&perf->i915->drm,
>> + "Out-of-range OA report format %llu\n",
>> + value);
>> return -EINVAL;
>> }
>> if (!perf->oa_formats[value].size) {
>> - DRM_DEBUG("Unsupported OA report format %llu\n",
>> - value);
>> + drm_dbg(&perf->i915->drm,
>> + "Unsupported OA report format %llu\n",
>> + value);
>> return -EINVAL;
>> }
>> props->oa_format = value;
>> break;
>> case DRM_I915_PERF_PROP_OA_EXPONENT:
>> if (value > OA_EXPONENT_MAX) {
>> - DRM_DEBUG("OA timer exponent too high (> %u)\n",
>> - OA_EXPONENT_MAX);
>> + drm_dbg(&perf->i915->drm,
>> + "OA timer exponent too high (> %u)\n",
>> + OA_EXPONENT_MAX);
>> return -EINVAL;
>> }
>>
>> @@ -3589,8 +3607,9 @@ static int read_properties_unlocked(struct i915_perf *perf,
>>
>> if (oa_freq_hz > i915_oa_max_sample_rate &&
>> !capable(CAP_SYS_ADMIN)) {
>> - DRM_DEBUG("OA exponent would exceed the max sampling frequency (sysctl dev.i915.oa_max_sample_rate) %uHz without root privileges\n",
>> - i915_oa_max_sample_rate);
>> + drm_dbg(&perf->i915->drm,
>> + "OA exponent would exceed the max sampling frequency (sysctl dev.i915.oa_max_sample_rate) %uHz without root privileges\n",
>> + i915_oa_max_sample_rate);
>> return -EACCES;
>> }
>>
>> @@ -3645,7 +3664,8 @@ int i915_perf_open_ioctl(struct drm_device *dev, void *data,
>> int ret;
>>
>> if (!perf->i915) {
>> - DRM_DEBUG("i915 perf interface not available for this system\n");
>> + drm_dbg(&to_i915(dev)->drm,
>> + "i915 perf interface not available for this system\n");
>> return -ENOTSUPP;
>> }
>>
>> @@ -3653,7 +3673,8 @@ int i915_perf_open_ioctl(struct drm_device *dev, void *data,
>> I915_PERF_FLAG_FD_NONBLOCK |
>> I915_PERF_FLAG_DISABLED;
>> if (param->flags & ~known_open_flags) {
>> - DRM_DEBUG("Unknown drm_i915_perf_open_param flag\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Unknown drm_i915_perf_open_param flag\n");
>> return -EINVAL;
>> }
>>
>> @@ -3927,7 +3948,8 @@ static struct i915_oa_reg *alloc_oa_regs(struct i915_perf *perf,
>> goto addr_err;
>>
>> if (!is_valid(perf, addr)) {
>> - DRM_DEBUG("Invalid oa_reg address: %X\n", addr);
>> + drm_dbg(&perf->i915->drm,
>> + "Invalid oa_reg address: %X\n", addr);
>> err = -EINVAL;
>> goto addr_err;
>> }
>> @@ -4001,30 +4023,35 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>> int err, id;
>>
>> if (!perf->i915) {
>> - DRM_DEBUG("i915 perf interface not available for this system\n");
>> + drm_dbg(&to_i915(dev)->drm,
>> + "i915 perf interface not available for this system\n");
>> return -ENOTSUPP;
>> }
>>
>> if (!perf->metrics_kobj) {
>> - DRM_DEBUG("OA metrics weren't advertised via sysfs\n");
>> + drm_dbg(&perf->i915->drm,
>> + "OA metrics weren't advertised via sysfs\n");
>> return -EINVAL;
>> }
>>
>> if (i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
>> - DRM_DEBUG("Insufficient privileges to add i915 OA config\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Insufficient privileges to add i915 OA config\n");
>> return -EACCES;
>> }
>>
>> if ((!args->mux_regs_ptr || !args->n_mux_regs) &&
>> (!args->boolean_regs_ptr || !args->n_boolean_regs) &&
>> (!args->flex_regs_ptr || !args->n_flex_regs)) {
>> - DRM_DEBUG("No OA registers given\n");
>> + drm_dbg(&perf->i915->drm,
>> + "No OA registers given\n");
>> return -EINVAL;
>> }
>>
>> oa_config = kzalloc(sizeof(*oa_config), GFP_KERNEL);
>> if (!oa_config) {
>> - DRM_DEBUG("Failed to allocate memory for the OA config\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Failed to allocate memory for the OA config\n");
>> return -ENOMEM;
>> }
>>
>> @@ -4032,7 +4059,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>> kref_init(&oa_config->ref);
>>
>> if (!uuid_is_valid(args->uuid)) {
>> - DRM_DEBUG("Invalid uuid format for OA config\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Invalid uuid format for OA config\n");
>> err = -EINVAL;
>> goto reg_err;
>> }
>> @@ -4049,7 +4077,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>> args->n_mux_regs);
>>
>> if (IS_ERR(regs)) {
>> - DRM_DEBUG("Failed to create OA config for mux_regs\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Failed to create OA config for mux_regs\n");
>> err = PTR_ERR(regs);
>> goto reg_err;
>> }
>> @@ -4062,7 +4091,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>> args->n_boolean_regs);
>>
>> if (IS_ERR(regs)) {
>> - DRM_DEBUG("Failed to create OA config for b_counter_regs\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Failed to create OA config for b_counter_regs\n");
>> err = PTR_ERR(regs);
>> goto reg_err;
>> }
>> @@ -4081,7 +4111,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>> args->n_flex_regs);
>>
>> if (IS_ERR(regs)) {
>> - DRM_DEBUG("Failed to create OA config for flex_regs\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Failed to create OA config for flex_regs\n");
>> err = PTR_ERR(regs);
>> goto reg_err;
>> }
>> @@ -4097,7 +4128,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>> */
>> idr_for_each_entry(&perf->metrics_idr, tmp, id) {
>> if (!strcmp(tmp->uuid, oa_config->uuid)) {
>> - DRM_DEBUG("OA config already exists with this uuid\n");
>> + drm_dbg(&perf->i915->drm,
>> + "OA config already exists with this uuid\n");
>> err = -EADDRINUSE;
>> goto sysfs_err;
>> }
>> @@ -4105,7 +4137,8 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>>
>> err = create_dynamic_oa_sysfs_entry(perf, oa_config);
>> if (err) {
>> - DRM_DEBUG("Failed to create sysfs entry for OA config\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Failed to create sysfs entry for OA config\n");
>> goto sysfs_err;
>> }
>>
>> @@ -4114,14 +4147,16 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>> oa_config, 2,
>> 0, GFP_KERNEL);
>> if (oa_config->id < 0) {
>> - DRM_DEBUG("Failed to create sysfs entry for OA config\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Failed to create sysfs entry for OA config\n");
>> err = oa_config->id;
>> goto sysfs_err;
>> }
>>
>> mutex_unlock(&perf->metrics_lock);
>>
>> - DRM_DEBUG("Added config %s id=%i\n", oa_config->uuid, oa_config->id);
>> + drm_dbg(&perf->i915->drm,
>> + "Added config %s id=%i\n", oa_config->uuid, oa_config->id);
>>
>> return oa_config->id;
>>
>> @@ -4129,7 +4164,7 @@ int i915_perf_add_config_ioctl(struct drm_device *dev, void *data,
>> mutex_unlock(&perf->metrics_lock);
>> reg_err:
>> i915_oa_config_put(oa_config);
>> - DRM_DEBUG("Failed to add new OA config\n");
>> + drm_dbg(&perf->i915->drm, "Failed to add new OA config\n");
>> return err;
>> }
>>
>> @@ -4153,12 +4188,14 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
>> int ret;
>>
>> if (!perf->i915) {
>> - DRM_DEBUG("i915 perf interface not available for this system\n");
>> + drm_dbg(&to_i915(dev)->drm,
>> + "i915 perf interface not available for this system\n");
>> return -ENOTSUPP;
>> }
>>
>> if (i915_perf_stream_paranoid && !capable(CAP_SYS_ADMIN)) {
>> - DRM_DEBUG("Insufficient privileges to remove i915 OA config\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Insufficient privileges to remove i915 OA config\n");
>> return -EACCES;
>> }
>>
>> @@ -4168,7 +4205,8 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
>>
>> oa_config = idr_find(&perf->metrics_idr, *arg);
>> if (!oa_config) {
>> - DRM_DEBUG("Failed to remove unknown OA config\n");
>> + drm_dbg(&perf->i915->drm,
>> + "Failed to remove unknown OA config\n");
>> ret = -ENOENT;
>> goto err_unlock;
>> }
>> @@ -4181,7 +4219,8 @@ int i915_perf_remove_config_ioctl(struct drm_device *dev, void *data,
>>
>> mutex_unlock(&perf->metrics_lock);
>>
>> - DRM_DEBUG("Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
>> + drm_dbg(&perf->i915->drm,
>> + "Removed config %s id=%i\n", oa_config->uuid, oa_config->id);
>>
>> i915_oa_config_put(oa_config);
--
Jani Nikula, Intel Open Source Graphics Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2020-02-04 9:36 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-31 9:34 [Intel-gfx] [PATCH 0/5] drm/i915: conversion to new struct drm_device based logging macros Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 1/5] drm/i915: conversion to drm_device logging macros when drm_i915_private is present Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 2/5] drm/i915/debugfs: conversion to drm_device based logging macros Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 3/5] drm/i915/cmd_parser: conversion to struct drm_device " Wambui Karuga
2020-01-31 9:34 ` [Intel-gfx] [PATCH 4/5] drm/i915/perf: conversion to struct drm_device based " Wambui Karuga
2020-02-04 9:34 ` Jani Nikula
2020-02-04 9:36 ` Jani Nikula
2020-01-31 9:34 ` [Intel-gfx] [PATCH 5/5] drm/i915/pci: conversion to " Wambui Karuga
2020-01-31 12:46 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: conversion to new struct " Patchwork
2020-01-31 13:16 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-02-03 13:54 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
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.