[Intel-gfx] [PATCH v2 8/8] drm/i915: Add debug prints for encoder modeset hooks

Chris Wilson chris at chris-wilson.co.uk
Fri May 27 18:38:38 UTC 2016


On Fri, May 27, 2016 at 08:59:26PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
> 
> To get a better idea where exactly some error occurred during modeset,
> put in some debug prints to tell us when the variuous encoder hooks are
> getting called.
> 
> v2: i9xx ->enable hook slipped through, bring it to the fold

ftrace=function_graph ? (At least compare and contrast)

The macro has the advantage / disadvantage of always being compiled in.

> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_display.c | 58 +++++++++++++++++-------------------
>  1 file changed, 28 insertions(+), 30 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index e1e61e00880b..35a5623dfcde 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -4726,6 +4726,15 @@ static void intel_crtc_disable_planes(struct drm_crtc *crtc, unsigned plane_mask
>  	intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_ALL_MASK(pipe));
>  }
>  
> +#define intel_call_encoder_func(encoder, func) \
> +do { \
> +	if (!(encoder)->func) \
> +		break; \
> +	DRM_DEBUG_KMS("%s " #func " start\n", (encoder)->base.name); \

%pF would lookup the (encoder)->func name, then all the format strings
would be the same at least.

Is it too soon to ask for error codes from modesetting?...
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list