On Fri, 12 May 2023, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxxx> wrote: > On Fri, May 12, 2023 at 02:04:44PM +0300, Jani Nikula wrote: >> Add i915 parameter to I915_STATE_WARN() and use device based logging. >> >> Done using cocci + hand edited where there was no i915 local variable >> ready. >> >> Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> > > with a bit of trust in coccinelle + compiler (for dev_priv vs i915 checks): That was too much trust, as verify_connector_state() had crtc->base.dev but it's possible the crtc is NULL. Caught by CI, hooray. >> @@ -64,6 +65,7 @@ static void >> verify_connector_state(struct intel_atomic_state *state, >> struct intel_crtc *crtc) >> { >> + struct drm_i915_private *i915 = to_i915(crtc->base.dev); crtc can be NULL here. v2 in-reply to v1. BR, Jani. >> struct drm_connector *connector; >> struct drm_connector_state *new_conn_state; >> int i; >> @@ -80,7 +82,7 @@ verify_connector_state(struct intel_atomic_state *state, >> >> intel_connector_verify_state(crtc_state, new_conn_state); >> >> - I915_STATE_WARN(new_conn_state->best_encoder != encoder, >> + I915_STATE_WARN(i915, new_conn_state->best_encoder != encoder, >> "connector's atomic encoder doesn't match legacy encoder\n"); >> } >> } -- Jani Nikula, Intel Open Source Graphics Center