Commit e92cbf38 authored by Wambui Karuga's avatar Wambui Karuga Committed by Jani Nikula

drm/i915/bios: convert to struct drm_device logging macros.

This replaces the printk based logging macros with the struct drm_device
based logging macros.
This conversion was achieved using the following coccinelle script that
transforms based on the existence of a struct drm_i915_private device:
@rule1@
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(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
)
...+>
}

@rule2@
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(
+drm_dbg(&T->drm,
...)
|
-DRM_DEBUG_KMS(
+drm_dbg_kms(&T->drm,
...)
|
-DRM_DEBUG_DRIVER(
+drm_dbg(&T->drm,
...)
)
...+>
}

Formatting warnings by checkpatch are addressed manually.
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200121134559.17355-3-wambui.karugax@gmail.com
parent 45e84648
...@@ -230,15 +230,18 @@ parse_panel_options(struct drm_i915_private *dev_priv, ...@@ -230,15 +230,18 @@ parse_panel_options(struct drm_i915_private *dev_priv,
if (ret >= 0) { if (ret >= 0) {
WARN_ON(ret > 0xf); WARN_ON(ret > 0xf);
panel_type = ret; panel_type = ret;
DRM_DEBUG_KMS("Panel type: %d (OpRegion)\n", panel_type); drm_dbg_kms(&dev_priv->drm, "Panel type: %d (OpRegion)\n",
panel_type);
} else { } else {
if (lvds_options->panel_type > 0xf) { if (lvds_options->panel_type > 0xf) {
DRM_DEBUG_KMS("Invalid VBT panel type 0x%x\n", drm_dbg_kms(&dev_priv->drm,
"Invalid VBT panel type 0x%x\n",
lvds_options->panel_type); lvds_options->panel_type);
return; return;
} }
panel_type = lvds_options->panel_type; panel_type = lvds_options->panel_type;
DRM_DEBUG_KMS("Panel type: %d (VBT)\n", panel_type); drm_dbg_kms(&dev_priv->drm, "Panel type: %d (VBT)\n",
panel_type);
} }
dev_priv->vbt.panel_type = panel_type; dev_priv->vbt.panel_type = panel_type;
...@@ -253,15 +256,17 @@ parse_panel_options(struct drm_i915_private *dev_priv, ...@@ -253,15 +256,17 @@ parse_panel_options(struct drm_i915_private *dev_priv,
switch (drrs_mode) { switch (drrs_mode) {
case 0: case 0:
dev_priv->vbt.drrs_type = STATIC_DRRS_SUPPORT; dev_priv->vbt.drrs_type = STATIC_DRRS_SUPPORT;
DRM_DEBUG_KMS("DRRS supported mode is static\n"); drm_dbg_kms(&dev_priv->drm, "DRRS supported mode is static\n");
break; break;
case 2: case 2:
dev_priv->vbt.drrs_type = SEAMLESS_DRRS_SUPPORT; dev_priv->vbt.drrs_type = SEAMLESS_DRRS_SUPPORT;
DRM_DEBUG_KMS("DRRS supported mode is seamless\n"); drm_dbg_kms(&dev_priv->drm,
"DRRS supported mode is seamless\n");
break; break;
default: default:
dev_priv->vbt.drrs_type = DRRS_NOT_SUPPORTED; dev_priv->vbt.drrs_type = DRRS_NOT_SUPPORTED;
DRM_DEBUG_KMS("DRRS not supported (VBT input)\n"); drm_dbg_kms(&dev_priv->drm,
"DRRS not supported (VBT input)\n");
break; break;
} }
} }
...@@ -298,7 +303,8 @@ parse_lfp_panel_dtd(struct drm_i915_private *dev_priv, ...@@ -298,7 +303,8 @@ parse_lfp_panel_dtd(struct drm_i915_private *dev_priv,
dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode; dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
DRM_DEBUG_KMS("Found panel mode in BIOS VBT legacy lfp table:\n"); drm_dbg_kms(&dev_priv->drm,
"Found panel mode in BIOS VBT legacy lfp table:\n");
drm_mode_debug_printmodeline(panel_fixed_mode); drm_mode_debug_printmodeline(panel_fixed_mode);
fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data, fp_timing = get_lvds_fp_timing(bdb, lvds_lfp_data,
...@@ -309,7 +315,8 @@ parse_lfp_panel_dtd(struct drm_i915_private *dev_priv, ...@@ -309,7 +315,8 @@ parse_lfp_panel_dtd(struct drm_i915_private *dev_priv,
if (fp_timing->x_res == panel_fixed_mode->hdisplay && if (fp_timing->x_res == panel_fixed_mode->hdisplay &&
fp_timing->y_res == panel_fixed_mode->vdisplay) { fp_timing->y_res == panel_fixed_mode->vdisplay) {
dev_priv->vbt.bios_lvds_val = fp_timing->lvds_reg_val; dev_priv->vbt.bios_lvds_val = fp_timing->lvds_reg_val;
DRM_DEBUG_KMS("VBT initial LVDS value %x\n", drm_dbg_kms(&dev_priv->drm,
"VBT initial LVDS value %x\n",
dev_priv->vbt.bios_lvds_val); dev_priv->vbt.bios_lvds_val);
} }
} }
...@@ -329,19 +336,21 @@ parse_generic_dtd(struct drm_i915_private *dev_priv, ...@@ -329,19 +336,21 @@ parse_generic_dtd(struct drm_i915_private *dev_priv,
return; return;
if (generic_dtd->gdtd_size < sizeof(struct generic_dtd_entry)) { if (generic_dtd->gdtd_size < sizeof(struct generic_dtd_entry)) {
DRM_ERROR("GDTD size %u is too small.\n", drm_err(&dev_priv->drm, "GDTD size %u is too small.\n",
generic_dtd->gdtd_size); generic_dtd->gdtd_size);
return; return;
} else if (generic_dtd->gdtd_size != } else if (generic_dtd->gdtd_size !=
sizeof(struct generic_dtd_entry)) { sizeof(struct generic_dtd_entry)) {
DRM_ERROR("Unexpected GDTD size %u\n", generic_dtd->gdtd_size); drm_err(&dev_priv->drm, "Unexpected GDTD size %u\n",
generic_dtd->gdtd_size);
/* DTD has unknown fields, but keep going */ /* DTD has unknown fields, but keep going */
} }
num_dtd = (get_blocksize(generic_dtd) - num_dtd = (get_blocksize(generic_dtd) -
sizeof(struct bdb_generic_dtd)) / generic_dtd->gdtd_size; sizeof(struct bdb_generic_dtd)) / generic_dtd->gdtd_size;
if (dev_priv->vbt.panel_type >= num_dtd) { if (dev_priv->vbt.panel_type >= num_dtd) {
DRM_ERROR("Panel type %d not found in table of %d DTD's\n", drm_err(&dev_priv->drm,
"Panel type %d not found in table of %d DTD's\n",
dev_priv->vbt.panel_type, num_dtd); dev_priv->vbt.panel_type, num_dtd);
return; return;
} }
...@@ -383,7 +392,8 @@ parse_generic_dtd(struct drm_i915_private *dev_priv, ...@@ -383,7 +392,8 @@ parse_generic_dtd(struct drm_i915_private *dev_priv,
else else
panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC; panel_fixed_mode->flags |= DRM_MODE_FLAG_NVSYNC;
DRM_DEBUG_KMS("Found panel mode in BIOS VBT generic dtd table:\n"); drm_dbg_kms(&dev_priv->drm,
"Found panel mode in BIOS VBT generic dtd table:\n");
drm_mode_debug_printmodeline(panel_fixed_mode); drm_mode_debug_printmodeline(panel_fixed_mode);
dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode; dev_priv->vbt.lfp_lvds_vbt_mode = panel_fixed_mode;
...@@ -420,7 +430,8 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, ...@@ -420,7 +430,8 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
return; return;
if (backlight_data->entry_size != sizeof(backlight_data->data[0])) { if (backlight_data->entry_size != sizeof(backlight_data->data[0])) {
DRM_DEBUG_KMS("Unsupported backlight data entry size %u\n", drm_dbg_kms(&dev_priv->drm,
"Unsupported backlight data entry size %u\n",
backlight_data->entry_size); backlight_data->entry_size);
return; return;
} }
...@@ -429,7 +440,8 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, ...@@ -429,7 +440,8 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
dev_priv->vbt.backlight.present = entry->type == BDB_BACKLIGHT_TYPE_PWM; dev_priv->vbt.backlight.present = entry->type == BDB_BACKLIGHT_TYPE_PWM;
if (!dev_priv->vbt.backlight.present) { if (!dev_priv->vbt.backlight.present) {
DRM_DEBUG_KMS("PWM backlight not present in VBT (type %u)\n", drm_dbg_kms(&dev_priv->drm,
"PWM backlight not present in VBT (type %u)\n",
entry->type); entry->type);
return; return;
} }
...@@ -447,7 +459,8 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, ...@@ -447,7 +459,8 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv,
dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz; dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm; dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm;
dev_priv->vbt.backlight.min_brightness = entry->min_brightness; dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
DRM_DEBUG_KMS("VBT backlight PWM modulation frequency %u Hz, " drm_dbg_kms(&dev_priv->drm,
"VBT backlight PWM modulation frequency %u Hz, "
"active %s, min brightness %u, level %u, controller %u\n", "active %s, min brightness %u, level %u, controller %u\n",
dev_priv->vbt.backlight.pwm_freq_hz, dev_priv->vbt.backlight.pwm_freq_hz,
dev_priv->vbt.backlight.active_low_pwm ? "low" : "high", dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
...@@ -467,7 +480,8 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv, ...@@ -467,7 +480,8 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv,
index = i915_modparams.vbt_sdvo_panel_type; index = i915_modparams.vbt_sdvo_panel_type;
if (index == -2) { if (index == -2) {
DRM_DEBUG_KMS("Ignore SDVO panel mode from BIOS VBT tables.\n"); drm_dbg_kms(&dev_priv->drm,
"Ignore SDVO panel mode from BIOS VBT tables.\n");
return; return;
} }
...@@ -493,7 +507,8 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv, ...@@ -493,7 +507,8 @@ parse_sdvo_panel_data(struct drm_i915_private *dev_priv,
dev_priv->vbt.sdvo_lvds_vbt_mode = panel_fixed_mode; dev_priv->vbt.sdvo_lvds_vbt_mode = panel_fixed_mode;
DRM_DEBUG_KMS("Found SDVO panel mode in BIOS VBT tables:\n"); drm_dbg_kms(&dev_priv->drm,
"Found SDVO panel mode in BIOS VBT tables:\n");
drm_mode_debug_printmodeline(panel_fixed_mode); drm_mode_debug_printmodeline(panel_fixed_mode);
} }
...@@ -538,7 +553,8 @@ parse_general_features(struct drm_i915_private *dev_priv, ...@@ -538,7 +553,8 @@ parse_general_features(struct drm_i915_private *dev_priv,
} else { } else {
dev_priv->vbt.orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN; dev_priv->vbt.orientation = DRM_MODE_PANEL_ORIENTATION_UNKNOWN;
} }
DRM_DEBUG_KMS("BDB_GENERAL_FEATURES int_tv_support %d int_crt_support %d lvds_use_ssc %d lvds_ssc_freq %d display_clock_mode %d fdi_rx_polarity_inverted %d\n", drm_dbg_kms(&dev_priv->drm,
"BDB_GENERAL_FEATURES int_tv_support %d int_crt_support %d lvds_use_ssc %d lvds_ssc_freq %d display_clock_mode %d fdi_rx_polarity_inverted %d\n",
dev_priv->vbt.int_tv_support, dev_priv->vbt.int_tv_support,
dev_priv->vbt.int_crt_support, dev_priv->vbt.int_crt_support,
dev_priv->vbt.lvds_use_ssc, dev_priv->vbt.lvds_use_ssc,
...@@ -566,7 +582,7 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) ...@@ -566,7 +582,7 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version)
* accurate and doesn't have to be, as long as it's not too strict. * accurate and doesn't have to be, as long as it's not too strict.
*/ */
if (!IS_GEN_RANGE(dev_priv, 3, 7)) { if (!IS_GEN_RANGE(dev_priv, 3, 7)) {
DRM_DEBUG_KMS("Skipping SDVO device mapping\n"); drm_dbg_kms(&dev_priv->drm, "Skipping SDVO device mapping\n");
return; return;
} }
...@@ -584,10 +600,12 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) ...@@ -584,10 +600,12 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version)
if (child->dvo_port != DEVICE_PORT_DVOB && if (child->dvo_port != DEVICE_PORT_DVOB &&
child->dvo_port != DEVICE_PORT_DVOC) { child->dvo_port != DEVICE_PORT_DVOC) {
/* skip the incorrect SDVO port */ /* skip the incorrect SDVO port */
DRM_DEBUG_KMS("Incorrect SDVO port. Skip it\n"); drm_dbg_kms(&dev_priv->drm,
"Incorrect SDVO port. Skip it\n");
continue; continue;
} }
DRM_DEBUG_KMS("the SDVO device with slave addr %2x is found on" drm_dbg_kms(&dev_priv->drm,
"the SDVO device with slave addr %2x is found on"
" %s port\n", " %s port\n",
child->slave_addr, child->slave_addr,
(child->dvo_port == DEVICE_PORT_DVOB) ? (child->dvo_port == DEVICE_PORT_DVOB) ?
...@@ -600,20 +618,21 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) ...@@ -600,20 +618,21 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version)
mapping->ddc_pin = child->ddc_pin; mapping->ddc_pin = child->ddc_pin;
mapping->i2c_pin = child->i2c_pin; mapping->i2c_pin = child->i2c_pin;
mapping->initialized = 1; mapping->initialized = 1;
DRM_DEBUG_KMS("SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n", drm_dbg_kms(&dev_priv->drm,
mapping->dvo_port, "SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n",
mapping->slave_addr, mapping->dvo_port, mapping->slave_addr,
mapping->dvo_wiring, mapping->dvo_wiring, mapping->ddc_pin,
mapping->ddc_pin,
mapping->i2c_pin); mapping->i2c_pin);
} else { } else {
DRM_DEBUG_KMS("Maybe one SDVO port is shared by " drm_dbg_kms(&dev_priv->drm,
"Maybe one SDVO port is shared by "
"two SDVO device.\n"); "two SDVO device.\n");
} }
if (child->slave2_addr) { if (child->slave2_addr) {
/* Maybe this is a SDVO device with multiple inputs */ /* Maybe this is a SDVO device with multiple inputs */
/* And the mapping info is not added */ /* And the mapping info is not added */
DRM_DEBUG_KMS("there exists the slave2_addr. Maybe this" drm_dbg_kms(&dev_priv->drm,
"there exists the slave2_addr. Maybe this"
" is a SDVO device with multiple inputs.\n"); " is a SDVO device with multiple inputs.\n");
} }
count++; count++;
...@@ -621,7 +640,8 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) ...@@ -621,7 +640,8 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version)
if (!count) { if (!count) {
/* No SDVO device info is found */ /* No SDVO device info is found */
DRM_DEBUG_KMS("No SDVO device info is found in VBT\n"); drm_dbg_kms(&dev_priv->drm,
"No SDVO device info is found in VBT\n");
} }
} }
...@@ -662,7 +682,8 @@ parse_driver_features(struct drm_i915_private *dev_priv, ...@@ -662,7 +682,8 @@ parse_driver_features(struct drm_i915_private *dev_priv,
} }
if (bdb->version < 228) { if (bdb->version < 228) {
DRM_DEBUG_KMS("DRRS State Enabled:%d\n", driver->drrs_enabled); drm_dbg_kms(&dev_priv->drm, "DRRS State Enabled:%d\n",
driver->drrs_enabled);
/* /*
* If DRRS is not supported, drrs_type has to be set to 0. * If DRRS is not supported, drrs_type has to be set to 0.
* This is because, VBT is configured in such a way that * This is because, VBT is configured in such a way that
...@@ -740,7 +761,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -740,7 +761,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
dev_priv->vbt.edp.rate = DP_LINK_BW_2_7; dev_priv->vbt.edp.rate = DP_LINK_BW_2_7;
break; break;
default: default:
DRM_DEBUG_KMS("VBT has unknown eDP link rate value %u\n", drm_dbg_kms(&dev_priv->drm,
"VBT has unknown eDP link rate value %u\n",
edp_link_params->rate); edp_link_params->rate);
break; break;
} }
...@@ -756,7 +778,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -756,7 +778,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
dev_priv->vbt.edp.lanes = 4; dev_priv->vbt.edp.lanes = 4;
break; break;
default: default:
DRM_DEBUG_KMS("VBT has unknown eDP lane count value %u\n", drm_dbg_kms(&dev_priv->drm,
"VBT has unknown eDP lane count value %u\n",
edp_link_params->lanes); edp_link_params->lanes);
break; break;
} }
...@@ -775,7 +798,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -775,7 +798,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_3; dev_priv->vbt.edp.preemphasis = DP_TRAIN_PRE_EMPH_LEVEL_3;
break; break;
default: default:
DRM_DEBUG_KMS("VBT has unknown eDP pre-emphasis value %u\n", drm_dbg_kms(&dev_priv->drm,
"VBT has unknown eDP pre-emphasis value %u\n",
edp_link_params->preemphasis); edp_link_params->preemphasis);
break; break;
} }
...@@ -794,7 +818,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -794,7 +818,8 @@ parse_edp(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_3; dev_priv->vbt.edp.vswing = DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
break; break;
default: default:
DRM_DEBUG_KMS("VBT has unknown eDP voltage swing value %u\n", drm_dbg_kms(&dev_priv->drm,
"VBT has unknown eDP voltage swing value %u\n",
edp_link_params->vswing); edp_link_params->vswing);
break; break;
} }
...@@ -822,7 +847,7 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -822,7 +847,7 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
psr = find_section(bdb, BDB_PSR); psr = find_section(bdb, BDB_PSR);
if (!psr) { if (!psr) {
DRM_DEBUG_KMS("No PSR BDB found.\n"); drm_dbg_kms(&dev_priv->drm, "No PSR BDB found.\n");
return; return;
} }
...@@ -849,7 +874,8 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -849,7 +874,8 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
dev_priv->vbt.psr.lines_to_wait = PSR_8_LINES_TO_WAIT; dev_priv->vbt.psr.lines_to_wait = PSR_8_LINES_TO_WAIT;
break; break;
default: default:
DRM_DEBUG_KMS("VBT has unknown PSR lines to wait %u\n", drm_dbg_kms(&dev_priv->drm,
"VBT has unknown PSR lines to wait %u\n",
psr_table->lines_to_wait); psr_table->lines_to_wait);
break; break;
} }
...@@ -872,7 +898,8 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -872,7 +898,8 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
dev_priv->vbt.psr.tp1_wakeup_time_us = 0; dev_priv->vbt.psr.tp1_wakeup_time_us = 0;
break; break;
default: default:
DRM_DEBUG_KMS("VBT tp1 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n", drm_dbg_kms(&dev_priv->drm,
"VBT tp1 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n",
psr_table->tp1_wakeup_time); psr_table->tp1_wakeup_time);
/* fallthrough */ /* fallthrough */
case 2: case 2:
...@@ -891,7 +918,8 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb) ...@@ -891,7 +918,8 @@ parse_psr(struct drm_i915_private *dev_priv, const struct bdb_header *bdb)
dev_priv->vbt.psr.tp2_tp3_wakeup_time_us = 0; dev_priv->vbt.psr.tp2_tp3_wakeup_time_us = 0;
break; break;
default: default:
DRM_DEBUG_KMS("VBT tp2_tp3 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n", drm_dbg_kms(&dev_priv->drm,
"VBT tp2_tp3 wakeup time value %d is outside range[0-3], defaulting to max value 2500us\n",
psr_table->tp2_tp3_wakeup_time); psr_table->tp2_tp3_wakeup_time);
/* fallthrough */ /* fallthrough */
case 2: case 2:
...@@ -998,11 +1026,11 @@ parse_mipi_config(struct drm_i915_private *dev_priv, ...@@ -998,11 +1026,11 @@ parse_mipi_config(struct drm_i915_private *dev_priv,
*/ */
start = find_section(bdb, BDB_MIPI_CONFIG); start = find_section(bdb, BDB_MIPI_CONFIG);
if (!start) { if (!start) {
DRM_DEBUG_KMS("No MIPI config BDB found"); drm_dbg_kms(&dev_priv->drm, "No MIPI config BDB found");
return; return;
} }
DRM_DEBUG_DRIVER("Found MIPI Config block, panel index = %d\n", drm_dbg(&dev_priv->drm, "Found MIPI Config block, panel index = %d\n",
panel_type); panel_type);
/* /*
...@@ -1271,7 +1299,8 @@ static void fixup_mipi_sequences(struct drm_i915_private *dev_priv) ...@@ -1271,7 +1299,8 @@ static void fixup_mipi_sequences(struct drm_i915_private *dev_priv)
if (!len) if (!len)
return; return;
DRM_DEBUG_KMS("Using init OTP fragment to deassert reset\n"); drm_dbg_kms(&dev_priv->drm,
"Using init OTP fragment to deassert reset\n");
/* Copy the fragment, update seq byte and terminate it */ /* Copy the fragment, update seq byte and terminate it */
init_otp = (u8 *)dev_priv->vbt.dsi.sequence[MIPI_SEQ_INIT_OTP]; init_otp = (u8 *)dev_priv->vbt.dsi.sequence[MIPI_SEQ_INIT_OTP];
...@@ -1306,18 +1335,21 @@ parse_mipi_sequence(struct drm_i915_private *dev_priv, ...@@ -1306,18 +1335,21 @@ parse_mipi_sequence(struct drm_i915_private *dev_priv,
sequence = find_section(bdb, BDB_MIPI_SEQUENCE); sequence = find_section(bdb, BDB_MIPI_SEQUENCE);
if (!sequence) { if (!sequence) {
DRM_DEBUG_KMS("No MIPI Sequence found, parsing complete\n"); drm_dbg_kms(&dev_priv->drm,
"No MIPI Sequence found, parsing complete\n");
return; return;
} }
/* Fail gracefully for forward incompatible sequence block. */ /* Fail gracefully for forward incompatible sequence block. */
if (sequence->version >= 4) { if (sequence->version >= 4) {
DRM_ERROR("Unable to parse MIPI Sequence Block v%u\n", drm_err(&dev_priv->drm,
"Unable to parse MIPI Sequence Block v%u\n",
sequence->version); sequence->version);
return; return;
} }
DRM_DEBUG_DRIVER("Found MIPI sequence block v%u\n", sequence->version); drm_dbg(&dev_priv->drm, "Found MIPI sequence block v%u\n",
sequence->version);
seq_data = find_panel_sequence_block(sequence, panel_type, &seq_size); seq_data = find_panel_sequence_block(sequence, panel_type, &seq_size);
if (!seq_data) if (!seq_data)
...@@ -1334,13 +1366,15 @@ parse_mipi_sequence(struct drm_i915_private *dev_priv, ...@@ -1334,13 +1366,15 @@ parse_mipi_sequence(struct drm_i915_private *dev_priv,
break; break;
if (seq_id >= MIPI_SEQ_MAX) { if (seq_id >= MIPI_SEQ_MAX) {
DRM_ERROR("Unknown sequence %u\n", seq_id); drm_err(&dev_priv->drm, "Unknown sequence %u\n",
seq_id);
goto err; goto err;
} }
/* Log about presence of sequences we won't run. */ /* Log about presence of sequences we won't run. */
if (seq_id == MIPI_SEQ_TEAR_ON || seq_id == MIPI_SEQ_TEAR_OFF) if (seq_id == MIPI_SEQ_TEAR_ON || seq_id == MIPI_SEQ_TEAR_OFF)
DRM_DEBUG_KMS("Unsupported sequence %u\n", seq_id); drm_dbg_kms(&dev_priv->drm,
"Unsupported sequence %u\n", seq_id);
dev_priv->vbt.dsi.sequence[seq_id] = data + index; dev_priv->vbt.dsi.sequence[seq_id] = data + index;
...@@ -1349,7 +1383,8 @@ parse_mipi_sequence(struct drm_i915_private *dev_priv, ...@@ -1349,7 +1383,8 @@ parse_mipi_sequence(struct drm_i915_private *dev_priv,
else else
index = goto_next_sequence(data, index, seq_size); index = goto_next_sequence(data, index, seq_size);
if (!index) { if (!index) {
DRM_ERROR("Invalid sequence %u\n", seq_id); drm_err(&dev_priv->drm, "Invalid sequence %u\n",
seq_id);
goto err; goto err;
} }
} }
...@@ -1360,7 +1395,7 @@ parse_mipi_sequence(struct drm_i915_private *dev_priv, ...@@ -1360,7 +1395,7 @@ parse_mipi_sequence(struct drm_i915_private *dev_priv,
fixup_mipi_sequences(dev_priv); fixup_mipi_sequences(dev_priv);
DRM_DEBUG_DRIVER("MIPI related VBT parsing complete\n"); drm_dbg(&dev_priv->drm, "MIPI related VBT parsing complete\n");
return; return;
err: err:
...@@ -1385,13 +1420,15 @@ parse_compression_parameters(struct drm_i915_private *i915, ...@@ -1385,13 +1420,15 @@ parse_compression_parameters(struct drm_i915_private *i915,
if (params) { if (params) {
/* Sanity checks */ /* Sanity checks */
if (params->entry_size != sizeof(params->data[0])) { if (params->entry_size != sizeof(params->data[0])) {
DRM_DEBUG_KMS("VBT: unsupported compression param entry size\n"); drm_dbg_kms(&i915->drm,
"VBT: unsupported compression param entry size\n");
return; return;
} }
block_size = get_blocksize(params); block_size = get_blocksize(params);
if (block_size < sizeof(*params)) { if (block_size < sizeof(*params)) {
DRM_DEBUG_KMS("VBT: expected 16 compression param entries\n"); drm_dbg_kms(&i915->drm,
"VBT: expected 16 compression param entries\n");
return; return;
} }
} }
...@@ -1403,12 +1440,14 @@ parse_compression_parameters(struct drm_i915_private *i915, ...@@ -1403,12 +1440,14 @@ parse_compression_parameters(struct drm_i915_private *i915,
continue; continue;
if (!params) { if (!params) {
DRM_DEBUG_KMS("VBT: compression params not available\n"); drm_dbg_kms(&i915->drm,
"VBT: compression params not available\n");
continue; continue;
} }
if (child->compression_method_cps) { if (child->compression_method_cps) {
DRM_DEBUG_KMS("VBT: CPS compression not supported\n"); drm_dbg_kms(&i915->drm,
"VBT: CPS compression not supported\n");
continue; continue;
} }
...@@ -1456,7 +1495,8 @@ static void sanitize_ddc_pin(struct drm_i915_private *dev_priv, ...@@ -1456,7 +1495,8 @@ static void sanitize_ddc_pin(struct drm_i915_private *dev_priv,
p = get_port_by_ddc_pin(dev_priv, info->alternate_ddc_pin); p = get_port_by_ddc_pin(dev_priv, info->alternate_ddc_pin);
if (p != PORT_NONE) { if (p != PORT_NONE) {
DRM_DEBUG_KMS("port %c trying to use the same DDC pin (0x%x) as port %c, " drm_dbg_kms(&dev_priv->drm,
"port %c trying to use the same DDC pin (0x%x) as port %c, "
"disabling port %c DVI/HDMI support\n", "disabling port %c DVI/HDMI support\n",
port_name(port), info->alternate_ddc_pin, port_name(port), info->alternate_ddc_pin,
port_name(p), port_name(p)); port_name(p), port_name(p));
...@@ -1507,7 +1547,8 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv, ...@@ -1507,7 +1547,8 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
p = get_port_by_aux_ch(dev_priv, info->alternate_aux_channel); p = get_port_by_aux_ch(dev_priv, info->alternate_aux_channel);
if (p != PORT_NONE) { if (p != PORT_NONE) {
DRM_DEBUG_KMS("port %c trying to use the same AUX CH (0x%x) as port %c, " drm_dbg_kms(&dev_priv->drm,
"port %c trying to use the same AUX CH (0x%x) as port %c, "
"disabling port %c DP support\n", "disabling port %c DP support\n",
port_name(port), info->alternate_aux_channel, port_name(port), info->alternate_aux_channel,
port_name(p), port_name(p)); port_name(p), port_name(p));
...@@ -1570,7 +1611,8 @@ static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin) ...@@ -1570,7 +1611,8 @@ static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
if (vbt_pin < n_entries && ddc_pin_map[vbt_pin] != 0) if (vbt_pin < n_entries && ddc_pin_map[vbt_pin] != 0)
return ddc_pin_map[vbt_pin]; return ddc_pin_map[vbt_pin];
DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", drm_dbg_kms(&dev_priv->drm,
"Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n",
vbt_pin); vbt_pin);
return 0; return 0;
} }
...@@ -1622,7 +1664,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, ...@@ -1622,7 +1664,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
info = &dev_priv->vbt.ddi_port_info[port]; info = &dev_priv->vbt.ddi_port_info[port];
if (info->child) { if (info->child) {
DRM_DEBUG_KMS("More than one child device for port %c in VBT, using the first.\n", drm_dbg_kms(&dev_priv->drm,
"More than one child device for port %c in VBT, using the first.\n",
port_name(port)); port_name(port));
return; return;
} }
...@@ -1634,7 +1677,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, ...@@ -1634,7 +1677,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
is_edp = is_dp && (child->device_type & DEVICE_TYPE_INTERNAL_CONNECTOR); is_edp = is_dp && (child->device_type & DEVICE_TYPE_INTERNAL_CONNECTOR);
if (port == PORT_A && is_dvi && INTEL_GEN(dev_priv) < 12) { if (port == PORT_A && is_dvi && INTEL_GEN(dev_priv) < 12) {
DRM_DEBUG_KMS("VBT claims port A supports DVI%s, ignoring\n", drm_dbg_kms(&dev_priv->drm,
"VBT claims port A supports DVI%s, ignoring\n",
is_hdmi ? "/HDMI" : ""); is_hdmi ? "/HDMI" : "");
is_dvi = false; is_dvi = false;
is_hdmi = false; is_hdmi = false;
...@@ -1651,7 +1695,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, ...@@ -1651,7 +1695,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
if (bdb_version >= 209) if (bdb_version >= 209)
info->supports_tbt = child->tbt; info->supports_tbt = child->tbt;
DRM_DEBUG_KMS("Port %c VBT info: CRT:%d DVI:%d HDMI:%d DP:%d eDP:%d LSPCON:%d USB-Type-C:%d TBT:%d DSC:%d\n", drm_dbg_kms(&dev_priv->drm,
"Port %c VBT info: CRT:%d DVI:%d HDMI:%d DP:%d eDP:%d LSPCON:%d USB-Type-C:%d TBT:%d DSC:%d\n",
port_name(port), is_crt, is_dvi, is_hdmi, is_dp, is_edp, port_name(port), is_crt, is_dvi, is_hdmi, is_dp, is_edp,
HAS_LSPCON(dev_priv) && child->lspcon, HAS_LSPCON(dev_priv) && child->lspcon,
info->supports_typec_usb, info->supports_tbt, info->supports_typec_usb, info->supports_tbt,
...@@ -1665,7 +1710,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, ...@@ -1665,7 +1710,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
info->alternate_ddc_pin = ddc_pin; info->alternate_ddc_pin = ddc_pin;
sanitize_ddc_pin(dev_priv, port); sanitize_ddc_pin(dev_priv, port);
} else { } else {
DRM_DEBUG_KMS("Port %c has invalid DDC pin %d, " drm_dbg_kms(&dev_priv->drm,
"Port %c has invalid DDC pin %d, "
"sticking to defaults\n", "sticking to defaults\n",
port_name(port), ddc_pin); port_name(port), ddc_pin);
} }
...@@ -1680,7 +1726,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, ...@@ -1680,7 +1726,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
if (bdb_version >= 158) { if (bdb_version >= 158) {
/* The VBT HDMI level shift values match the table we have. */ /* The VBT HDMI level shift values match the table we have. */
u8 hdmi_level_shift = child->hdmi_level_shifter_value; u8 hdmi_level_shift = child->hdmi_level_shifter_value;
DRM_DEBUG_KMS("VBT HDMI level shift for port %c: %d\n", drm_dbg_kms(&dev_priv->drm,
"VBT HDMI level shift for port %c: %d\n",
port_name(port), port_name(port),
hdmi_level_shift); hdmi_level_shift);
info->hdmi_level_shift = hdmi_level_shift; info->hdmi_level_shift = hdmi_level_shift;
...@@ -1706,7 +1753,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, ...@@ -1706,7 +1753,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
} }
if (max_tmds_clock) if (max_tmds_clock)
DRM_DEBUG_KMS("VBT HDMI max TMDS clock for port %c: %d kHz\n", drm_dbg_kms(&dev_priv->drm,
"VBT HDMI max TMDS clock for port %c: %d kHz\n",
port_name(port), max_tmds_clock); port_name(port), max_tmds_clock);
info->max_tmds_clock = max_tmds_clock; info->max_tmds_clock = max_tmds_clock;
} }
...@@ -1714,10 +1762,12 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, ...@@ -1714,10 +1762,12 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
/* Parse the I_boost config for SKL and above */ /* Parse the I_boost config for SKL and above */
if (bdb_version >= 196 && child->iboost) { if (bdb_version >= 196 && child->iboost) {
info->dp_boost_level = translate_iboost(child->dp_iboost_level); info->dp_boost_level = translate_iboost(child->dp_iboost_level);
DRM_DEBUG_KMS("VBT (e)DP boost level for port %c: %d\n", drm_dbg_kms(&dev_priv->drm,
"VBT (e)DP boost level for port %c: %d\n",
port_name(port), info->dp_boost_level); port_name(port), info->dp_boost_level);
info->hdmi_boost_level = translate_iboost(child->hdmi_iboost_level); info->hdmi_boost_level = translate_iboost(child->hdmi_iboost_level);
DRM_DEBUG_KMS("VBT HDMI boost level for port %c: %d\n", drm_dbg_kms(&dev_priv->drm,
"VBT HDMI boost level for port %c: %d\n",
port_name(port), info->hdmi_boost_level); port_name(port), info->hdmi_boost_level);
} }
...@@ -1738,7 +1788,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, ...@@ -1738,7 +1788,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv,
info->dp_max_link_rate = 162000; info->dp_max_link_rate = 162000;
break; break;
} }
DRM_DEBUG_KMS("VBT DP max link rate for port %c: %d\n", drm_dbg_kms(&dev_priv->drm,
"VBT DP max link rate for port %c: %d\n",
port_name(port), info->dp_max_link_rate); port_name(port), info->dp_max_link_rate);
} }
...@@ -1773,19 +1824,21 @@ parse_general_definitions(struct drm_i915_private *dev_priv, ...@@ -1773,19 +1824,21 @@ parse_general_definitions(struct drm_i915_private *dev_priv,
defs = find_section(bdb, BDB_GENERAL_DEFINITIONS); defs = find_section(bdb, BDB_GENERAL_DEFINITIONS);
if (!defs) { if (!defs) {
DRM_DEBUG_KMS("No general definition block is found, no devices defined.\n"); drm_dbg_kms(&dev_priv->drm,
"No general definition block is found, no devices defined.\n");
return; return;
} }
block_size = get_blocksize(defs); block_size = get_blocksize(defs);
if (block_size < sizeof(*defs)) { if (block_size < sizeof(*defs)) {
DRM_DEBUG_KMS("General definitions block too small (%u)\n", drm_dbg_kms(&dev_priv->drm,
"General definitions block too small (%u)\n",
block_size); block_size);
return; return;
} }
bus_pin = defs->crt_ddc_gmbus_pin; bus_pin = defs->crt_ddc_gmbus_pin;
DRM_DEBUG_KMS("crt_ddc_bus_pin: %d\n", bus_pin); drm_dbg_kms(&dev_priv->drm, "crt_ddc_bus_pin: %d\n", bus_pin);
if (intel_gmbus_is_valid_pin(dev_priv, bus_pin)) if (intel_gmbus_is_valid_pin(dev_priv, bus_pin))
dev_priv->vbt.crt_ddc_pin = bus_pin; dev_priv->vbt.crt_ddc_pin = bus_pin;
...@@ -1804,18 +1857,21 @@ parse_general_definitions(struct drm_i915_private *dev_priv, ...@@ -1804,18 +1857,21 @@ parse_general_definitions(struct drm_i915_private *dev_priv,
} else { } else {
expected_size = sizeof(*child); expected_size = sizeof(*child);
BUILD_BUG_ON(sizeof(*child) < 39); BUILD_BUG_ON(sizeof(*child) < 39);
DRM_DEBUG_DRIVER("Expected child device config size for VBT version %u not known; assuming %u\n", drm_dbg(&dev_priv->drm,
"Expected child device config size for VBT version %u not known; assuming %u\n",
bdb->version, expected_size); bdb->version, expected_size);
} }
/* Flag an error for unexpected size, but continue anyway. */ /* Flag an error for unexpected size, but continue anyway. */
if (defs->child_dev_size != expected_size) if (defs->child_dev_size != expected_size)
DRM_ERROR("Unexpected child device config size %u (expected %u for VBT version %u)\n", drm_err(&dev_priv->drm,
"Unexpected child device config size %u (expected %u for VBT version %u)\n",
defs->child_dev_size, expected_size, bdb->version); defs->child_dev_size, expected_size, bdb->version);
/* The legacy sized child device config is the minimum we need. */ /* The legacy sized child device config is the minimum we need. */
if (defs->child_dev_size < LEGACY_CHILD_DEVICE_CONFIG_SIZE) { if (defs->child_dev_size < LEGACY_CHILD_DEVICE_CONFIG_SIZE) {
DRM_DEBUG_KMS("Child device config size %u is too small.\n", drm_dbg_kms(&dev_priv->drm,
"Child device config size %u is too small.\n",
defs->child_dev_size); defs->child_dev_size);
return; return;
} }
...@@ -1828,7 +1884,8 @@ parse_general_definitions(struct drm_i915_private *dev_priv, ...@@ -1828,7 +1884,8 @@ parse_general_definitions(struct drm_i915_private *dev_priv,
if (!child->device_type) if (!child->device_type)
continue; continue;
DRM_DEBUG_KMS("Found VBT child device with type 0x%x\n", drm_dbg_kms(&dev_priv->drm,
"Found VBT child device with type 0x%x\n",
child->device_type); child->device_type);
devdata = kzalloc(sizeof(*devdata), GFP_KERNEL); devdata = kzalloc(sizeof(*devdata), GFP_KERNEL);
...@@ -1847,7 +1904,8 @@ parse_general_definitions(struct drm_i915_private *dev_priv, ...@@ -1847,7 +1904,8 @@ parse_general_definitions(struct drm_i915_private *dev_priv,
} }
if (list_empty(&dev_priv->vbt.display_devices)) if (list_empty(&dev_priv->vbt.display_devices))
DRM_DEBUG_KMS("no child dev is parsed from VBT\n"); drm_dbg_kms(&dev_priv->drm,
"no child dev is parsed from VBT\n");
} }
/* Common defaults which may be overridden by VBT. */ /* Common defaults which may be overridden by VBT. */
...@@ -1880,7 +1938,8 @@ init_vbt_defaults(struct drm_i915_private *dev_priv) ...@@ -1880,7 +1938,8 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)
*/ */
dev_priv->vbt.lvds_ssc_freq = intel_bios_ssc_frequency(dev_priv, dev_priv->vbt.lvds_ssc_freq = intel_bios_ssc_frequency(dev_priv,
!HAS_PCH_SPLIT(dev_priv)); !HAS_PCH_SPLIT(dev_priv));
DRM_DEBUG_KMS("Set default to SSC at %d kHz\n", dev_priv->vbt.lvds_ssc_freq); drm_dbg_kms(&dev_priv->drm, "Set default to SSC at %d kHz\n",
dev_priv->vbt.lvds_ssc_freq);
} }
/* Defaults to initialize only if there is no VBT. */ /* Defaults to initialize only if there is no VBT. */
...@@ -1990,13 +2049,14 @@ static struct vbt_header *oprom_get_vbt(struct drm_i915_private *dev_priv) ...@@ -1990,13 +2049,14 @@ static struct vbt_header *oprom_get_vbt(struct drm_i915_private *dev_priv)
goto err_unmap_oprom; goto err_unmap_oprom;
if (sizeof(struct vbt_header) > size) { if (sizeof(struct vbt_header) > size) {
DRM_DEBUG_DRIVER("VBT header incomplete\n"); drm_dbg(&dev_priv->drm, "VBT header incomplete\n");
goto err_unmap_oprom; goto err_unmap_oprom;
} }
vbt_size = ioread16(p + offsetof(struct vbt_header, vbt_size)); vbt_size = ioread16(p + offsetof(struct vbt_header, vbt_size));
if (vbt_size > size) { if (vbt_size > size) {
DRM_DEBUG_DRIVER("VBT incomplete (vbt_size overflows)\n"); drm_dbg(&dev_priv->drm,
"VBT incomplete (vbt_size overflows)\n");
goto err_unmap_oprom; goto err_unmap_oprom;
} }
...@@ -2039,7 +2099,8 @@ void intel_bios_init(struct drm_i915_private *dev_priv) ...@@ -2039,7 +2099,8 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
INIT_LIST_HEAD(&dev_priv->vbt.display_devices); INIT_LIST_HEAD(&dev_priv->vbt.display_devices);
if (!HAS_DISPLAY(dev_priv) || !INTEL_DISPLAY_ENABLED(dev_priv)) { if (!HAS_DISPLAY(dev_priv) || !INTEL_DISPLAY_ENABLED(dev_priv)) {
DRM_DEBUG_KMS("Skipping VBT init due to disabled display.\n"); drm_dbg_kms(&dev_priv->drm,
"Skipping VBT init due to disabled display.\n");
return; return;
} }
...@@ -2053,12 +2114,13 @@ void intel_bios_init(struct drm_i915_private *dev_priv) ...@@ -2053,12 +2114,13 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
vbt = oprom_vbt; vbt = oprom_vbt;
DRM_DEBUG_KMS("Found valid VBT in PCI ROM\n"); drm_dbg_kms(&dev_priv->drm, "Found valid VBT in PCI ROM\n");
} }
bdb = get_bdb_header(vbt); bdb = get_bdb_header(vbt);
DRM_DEBUG_KMS("VBT signature \"%.*s\", BDB version %d\n", drm_dbg_kms(&dev_priv->drm,
"VBT signature \"%.*s\", BDB version %d\n",
(int)sizeof(vbt->signature), vbt->signature, bdb->version); (int)sizeof(vbt->signature), vbt->signature, bdb->version);
/* Grab useful general definitions */ /* Grab useful general definitions */
...@@ -2084,7 +2146,8 @@ void intel_bios_init(struct drm_i915_private *dev_priv) ...@@ -2084,7 +2146,8 @@ void intel_bios_init(struct drm_i915_private *dev_priv)
out: out:
if (!vbt) { if (!vbt) {
DRM_INFO("Failed to find VBIOS tables (VBT)\n"); drm_info(&dev_priv->drm,
"Failed to find VBIOS tables (VBT)\n");
init_vbt_missing_defaults(dev_priv); init_vbt_missing_defaults(dev_priv);
} }
...@@ -2369,7 +2432,8 @@ bool intel_bios_is_dsi_present(struct drm_i915_private *dev_priv, ...@@ -2369,7 +2432,8 @@ bool intel_bios_is_dsi_present(struct drm_i915_private *dev_priv,
} else if (dvo_port == DVO_PORT_MIPIB || } else if (dvo_port == DVO_PORT_MIPIB ||
dvo_port == DVO_PORT_MIPIC || dvo_port == DVO_PORT_MIPIC ||
dvo_port == DVO_PORT_MIPID) { dvo_port == DVO_PORT_MIPID) {
DRM_DEBUG_KMS("VBT has unsupported DSI port %c\n", drm_dbg_kms(&dev_priv->drm,
"VBT has unsupported DSI port %c\n",
port_name(dvo_port - DVO_PORT_MIPIA)); port_name(dvo_port - DVO_PORT_MIPIA));
} }
} }
...@@ -2522,7 +2586,8 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv, ...@@ -2522,7 +2586,8 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv,
if (!info->alternate_aux_channel) { if (!info->alternate_aux_channel) {
aux_ch = (enum aux_ch)port; aux_ch = (enum aux_ch)port;
DRM_DEBUG_KMS("using AUX %c for port %c (platform default)\n", drm_dbg_kms(&dev_priv->drm,
"using AUX %c for port %c (platform default)\n",
aux_ch_name(aux_ch), port_name(port)); aux_ch_name(aux_ch), port_name(port));
return aux_ch; return aux_ch;
} }
...@@ -2555,7 +2620,7 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv, ...@@ -2555,7 +2620,7 @@ enum aux_ch intel_bios_port_aux_ch(struct drm_i915_private *dev_priv,
break; break;
} }
DRM_DEBUG_KMS("using AUX %c for port %c (VBT)\n", drm_dbg_kms(&dev_priv->drm, "using AUX %c for port %c (VBT)\n",
aux_ch_name(aux_ch), port_name(port)); aux_ch_name(aux_ch), port_name(port));
return aux_ch; return aux_ch;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment