On Fri, Mar 20, 2020 at 04:36:30PM +0200, Jani Nikula wrote: > Convert all the DRM_* logging macros to the struct drm_device based > macros to provide device specific logging. > > No functional changes. > > Generated using the following semantic patch, originally written by > Wambui Karuga <wambui.karugax@xxxxxxxxx>, with manual fixups on top: > > @@ > identifier fn, T; > @@ > > fn(...,struct drm_i915_private *T,...) { > <+... > ( > -DRM_INFO( > +drm_info(&T->drm, > ...) > | > -DRM_NOTE( > +drm_notice(&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, > ...) > ) > ...+> > } > > @@ > identifier fn, T; > @@ > > fn(...) { > ... > struct drm_i915_private *T = ...; > <+... > ( > -DRM_INFO( > +drm_info(&T->drm, > ...) > | > -DRM_NOTE( > +drm_notice(&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, > ...) > ) > ...+> > } > > Cc: Wambui Karuga <wambui.karugax@xxxxxxxxx> > Signed-off-by: Jani Nikula <jani.nikula@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_dsi.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dsi.c b/drivers/gpu/drm/i915/display/intel_dsi.c > index a2a937109a5a..afa4e6817e8c 100644 > --- a/drivers/gpu/drm/i915/display/intel_dsi.c > +++ b/drivers/gpu/drm/i915/display/intel_dsi.c > @@ -31,20 +31,21 @@ int intel_dsi_tlpx_ns(const struct intel_dsi *intel_dsi) > > int intel_dsi_get_modes(struct drm_connector *connector) > { > + struct drm_i915_private *i915 = to_i915(connector->dev); > struct intel_connector *intel_connector = to_intel_connector(connector); > struct drm_display_mode *mode; > > - DRM_DEBUG_KMS("\n"); > + drm_dbg_kms(&i915->drm, "\n"); > > if (!intel_connector->panel.fixed_mode) { > - DRM_DEBUG_KMS("no fixed mode\n"); > + drm_dbg_kms(&i915->drm, "no fixed mode\n"); > return 0; > } > > mode = drm_mode_duplicate(connector->dev, > intel_connector->panel.fixed_mode); > if (!mode) { > - DRM_DEBUG_KMS("drm_mode_duplicate failed\n"); > + drm_dbg_kms(&i915->drm, "drm_mode_duplicate failed\n"); > return 0; > } > > @@ -60,7 +61,7 @@ enum drm_mode_status intel_dsi_mode_valid(struct drm_connector *connector, > const struct drm_display_mode *fixed_mode = intel_connector->panel.fixed_mode; > int max_dotclk = to_i915(connector->dev)->max_dotclk_freq; > > - DRM_DEBUG_KMS("\n"); > + drm_dbg_kms(&dev_priv->drm, "\n"); Real old school drm printing, just to trace the function call :-) Reviewed-by: Daniel Vetter <daniel.vetter@xxxxxxxx> > > if (mode->flags & DRM_MODE_FLAG_DBLSCAN) > return MODE_NO_DBLESCAN; > -- > 2.20.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx