Commit 78108b7c authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Use crtc->name in debug messages

We have crtc->name, so let's use that in debug messages instead
of just printing the more or less useless object ID.

v2: Rebased due to intel_dpll_mgr.c, slap on a commit message
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1464371966-15190-2-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent f3261156
...@@ -4278,8 +4278,9 @@ int skl_update_scaler_crtc(struct intel_crtc_state *state) ...@@ -4278,8 +4278,9 @@ int skl_update_scaler_crtc(struct intel_crtc_state *state)
struct intel_crtc *intel_crtc = to_intel_crtc(state->base.crtc); struct intel_crtc *intel_crtc = to_intel_crtc(state->base.crtc);
const struct drm_display_mode *adjusted_mode = &state->base.adjusted_mode; const struct drm_display_mode *adjusted_mode = &state->base.adjusted_mode;
DRM_DEBUG_KMS("Updating scaler for [CRTC:%i] scaler_user index %u.%u\n", DRM_DEBUG_KMS("Updating scaler for [CRTC:%d:%s] scaler_user index %u.%u\n",
intel_crtc->base.base.id, intel_crtc->pipe, SKL_CRTC_INDEX); intel_crtc->base.base.id, intel_crtc->base.name,
intel_crtc->pipe, SKL_CRTC_INDEX);
return skl_update_scaler(state, !state->base.active, SKL_CRTC_INDEX, return skl_update_scaler(state, !state->base.active, SKL_CRTC_INDEX,
&state->scaler_state.scaler_id, BIT(DRM_ROTATE_0), &state->scaler_state.scaler_id, BIT(DRM_ROTATE_0),
...@@ -6323,8 +6324,8 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc) ...@@ -6323,8 +6324,8 @@ static void intel_crtc_disable_noatomic(struct drm_crtc *crtc)
dev_priv->display.crtc_disable(crtc); dev_priv->display.crtc_disable(crtc);
DRM_DEBUG_KMS("[CRTC:%d] hw state adjusted, was enabled, now disabled\n", DRM_DEBUG_KMS("[CRTC:%d:%s] hw state adjusted, was enabled, now disabled\n",
crtc->base.id); crtc->base.id, crtc->name);
WARN_ON(drm_atomic_set_mode_for_crtc(crtc->state, NULL) < 0); WARN_ON(drm_atomic_set_mode_for_crtc(crtc->state, NULL) < 0);
crtc->state->active = false; crtc->state->active = false;
...@@ -11932,12 +11933,12 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, ...@@ -11932,12 +11933,12 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
struct drm_i915_private *dev_priv = to_i915(dev); struct drm_i915_private *dev_priv = to_i915(dev);
struct intel_plane_state *old_plane_state = struct intel_plane_state *old_plane_state =
to_intel_plane_state(plane->state); to_intel_plane_state(plane->state);
int idx = intel_crtc->base.base.id, ret;
bool mode_changed = needs_modeset(crtc_state); bool mode_changed = needs_modeset(crtc_state);
bool was_crtc_enabled = crtc->state->active; bool was_crtc_enabled = crtc->state->active;
bool is_crtc_enabled = crtc_state->active; bool is_crtc_enabled = crtc_state->active;
bool turn_off, turn_on, visible, was_visible; bool turn_off, turn_on, visible, was_visible;
struct drm_framebuffer *fb = plane_state->fb; struct drm_framebuffer *fb = plane_state->fb;
int ret;
if (crtc_state && INTEL_INFO(dev)->gen >= 9 && if (crtc_state && INTEL_INFO(dev)->gen >= 9 &&
plane->type != DRM_PLANE_TYPE_CURSOR) { plane->type != DRM_PLANE_TYPE_CURSOR) {
...@@ -11976,7 +11977,9 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, ...@@ -11976,7 +11977,9 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
turn_off = was_visible && (!visible || mode_changed); turn_off = was_visible && (!visible || mode_changed);
turn_on = visible && (!was_visible || mode_changed); turn_on = visible && (!was_visible || mode_changed);
DRM_DEBUG_ATOMIC("[CRTC:%i] has [PLANE:%i] with fb %i\n", idx, DRM_DEBUG_ATOMIC("[CRTC:%d:%s] has [PLANE:%i] with fb %i\n",
intel_crtc->base.base.id,
intel_crtc->base.name,
plane->base.id, fb ? fb->base.id : -1); plane->base.id, fb ? fb->base.id : -1);
DRM_DEBUG_ATOMIC("[PLANE:%i] visible %i -> %i, off %i, on %i, ms %i\n", DRM_DEBUG_ATOMIC("[PLANE:%i] visible %i -> %i, off %i, on %i, ms %i\n",
...@@ -12271,7 +12274,8 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc, ...@@ -12271,7 +12274,8 @@ static void intel_dump_pipe_config(struct intel_crtc *crtc,
struct intel_plane_state *state; struct intel_plane_state *state;
struct drm_framebuffer *fb; struct drm_framebuffer *fb;
DRM_DEBUG_KMS("[CRTC:%d]%s config %p for pipe %c\n", crtc->base.base.id, DRM_DEBUG_KMS("[CRTC:%d:%s]%s config %p for pipe %c\n",
crtc->base.base.id, crtc->base.name,
context, pipe_config, pipe_name(crtc->pipe)); context, pipe_config, pipe_name(crtc->pipe));
DRM_DEBUG_KMS("cpu_transcoder: %s\n", transcoder_name(pipe_config->cpu_transcoder)); DRM_DEBUG_KMS("cpu_transcoder: %s\n", transcoder_name(pipe_config->cpu_transcoder));
...@@ -13061,7 +13065,7 @@ verify_crtc_state(struct drm_crtc *crtc, ...@@ -13061,7 +13065,7 @@ verify_crtc_state(struct drm_crtc *crtc,
pipe_config->base.crtc = crtc; pipe_config->base.crtc = crtc;
pipe_config->base.state = old_state; pipe_config->base.state = old_state;
DRM_DEBUG_KMS("[CRTC:%d]\n", crtc->base.id); DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
active = dev_priv->display.get_pipe_config(intel_crtc, pipe_config); active = dev_priv->display.get_pipe_config(intel_crtc, pipe_config);
...@@ -13878,8 +13882,8 @@ void intel_crtc_restore_mode(struct drm_crtc *crtc) ...@@ -13878,8 +13882,8 @@ void intel_crtc_restore_mode(struct drm_crtc *crtc)
state = drm_atomic_state_alloc(dev); state = drm_atomic_state_alloc(dev);
if (!state) { if (!state) {
DRM_DEBUG_KMS("[CRTC:%d] crtc restore failed, out of memory", DRM_DEBUG_KMS("[CRTC:%d:%s] crtc restore failed, out of memory",
crtc->base.id); crtc->base.id, crtc->name);
return; return;
} }
...@@ -15743,8 +15747,8 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc) ...@@ -15743,8 +15747,8 @@ static void intel_sanitize_crtc(struct intel_crtc *crtc)
if (INTEL_INFO(dev)->gen < 4 && !intel_check_plane_mapping(crtc)) { if (INTEL_INFO(dev)->gen < 4 && !intel_check_plane_mapping(crtc)) {
bool plane; bool plane;
DRM_DEBUG_KMS("[CRTC:%d] wrong plane connection detected!\n", DRM_DEBUG_KMS("[CRTC:%d:%s] wrong plane connection detected!\n",
crtc->base.base.id); crtc->base.base.id, crtc->base.name);
/* Pipe has the wrong plane attached and the plane is active. /* Pipe has the wrong plane attached and the plane is active.
* Temporarily change the plane mapping and disable everything * Temporarily change the plane mapping and disable everything
...@@ -15928,8 +15932,8 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev) ...@@ -15928,8 +15932,8 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
readout_plane_state(crtc); readout_plane_state(crtc);
DRM_DEBUG_KMS("[CRTC:%d] hw state readout: %s\n", DRM_DEBUG_KMS("[CRTC:%d:%s] hw state readout: %s\n",
crtc->base.base.id, crtc->base.base.id, crtc->base.name,
crtc->active ? "enabled" : "disabled"); crtc->active ? "enabled" : "disabled");
} }
......
...@@ -208,8 +208,8 @@ intel_find_shared_dpll(struct intel_crtc *crtc, ...@@ -208,8 +208,8 @@ intel_find_shared_dpll(struct intel_crtc *crtc,
if (memcmp(&crtc_state->dpll_hw_state, if (memcmp(&crtc_state->dpll_hw_state,
&shared_dpll[i].hw_state, &shared_dpll[i].hw_state,
sizeof(crtc_state->dpll_hw_state)) == 0) { sizeof(crtc_state->dpll_hw_state)) == 0) {
DRM_DEBUG_KMS("CRTC:%d sharing existing %s (crtc mask 0x%08x, active %x)\n", DRM_DEBUG_KMS("[CRTC:%d:%s] sharing existing %s (crtc mask 0x%08x, active %x)\n",
crtc->base.base.id, pll->name, crtc->base.base.id, crtc->base.name, pll->name,
shared_dpll[i].crtc_mask, shared_dpll[i].crtc_mask,
pll->active_mask); pll->active_mask);
return pll; return pll;
...@@ -220,8 +220,8 @@ intel_find_shared_dpll(struct intel_crtc *crtc, ...@@ -220,8 +220,8 @@ intel_find_shared_dpll(struct intel_crtc *crtc,
for (i = range_min; i <= range_max; i++) { for (i = range_min; i <= range_max; i++) {
pll = &dev_priv->shared_dplls[i]; pll = &dev_priv->shared_dplls[i];
if (shared_dpll[i].crtc_mask == 0) { if (shared_dpll[i].crtc_mask == 0) {
DRM_DEBUG_KMS("CRTC:%d allocated %s\n", DRM_DEBUG_KMS("[CRTC:%d:%s] allocated %s\n",
crtc->base.base.id, pll->name); crtc->base.base.id, crtc->base.name, pll->name);
return pll; return pll;
} }
} }
...@@ -358,8 +358,8 @@ ibx_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state, ...@@ -358,8 +358,8 @@ ibx_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,
i = (enum intel_dpll_id) crtc->pipe; i = (enum intel_dpll_id) crtc->pipe;
pll = &dev_priv->shared_dplls[i]; pll = &dev_priv->shared_dplls[i];
DRM_DEBUG_KMS("CRTC:%d using pre-allocated %s\n", DRM_DEBUG_KMS("[CRTC:%d:%s] using pre-allocated %s\n",
crtc->base.base.id, pll->name); crtc->base.base.id, crtc->base.name, pll->name);
} else { } else {
pll = intel_find_shared_dpll(crtc, crtc_state, pll = intel_find_shared_dpll(crtc, crtc_state,
DPLL_ID_PCH_PLL_A, DPLL_ID_PCH_PLL_A,
...@@ -1613,8 +1613,8 @@ bxt_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state, ...@@ -1613,8 +1613,8 @@ bxt_get_dpll(struct intel_crtc *crtc, struct intel_crtc_state *crtc_state,
i = (enum intel_dpll_id) intel_dig_port->port; i = (enum intel_dpll_id) intel_dig_port->port;
pll = intel_get_shared_dpll_by_id(dev_priv, i); pll = intel_get_shared_dpll_by_id(dev_priv, i);
DRM_DEBUG_KMS("CRTC:%d using pre-allocated %s\n", DRM_DEBUG_KMS("[CRTC:%d:%s] using pre-allocated %s\n",
crtc->base.base.id, pll->name); crtc->base.base.id, crtc->base.name, pll->name);
intel_reference_shared_dpll(pll, crtc_state); intel_reference_shared_dpll(pll, crtc_state);
......
...@@ -490,10 +490,10 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, ...@@ -490,10 +490,10 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
} }
crtcs[i] = new_crtc; crtcs[i] = new_crtc;
DRM_DEBUG_KMS("connector %s on pipe %c [CRTC:%d]: %dx%d%s\n", DRM_DEBUG_KMS("connector %s on [CRTC:%d:%s]: %dx%d%s\n",
connector->name, connector->name,
pipe_name(to_intel_crtc(connector->state->crtc)->pipe),
connector->state->crtc->base.id, connector->state->crtc->base.id,
connector->state->crtc->name,
modes[i]->hdisplay, modes[i]->vdisplay, modes[i]->hdisplay, modes[i]->vdisplay,
modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" :""); modes[i]->flags & DRM_MODE_FLAG_INTERLACE ? "i" :"");
......
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