All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: intel-gfx@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
	ville.syrjala@linux.intel.com
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] drm: i915: reduce memory footprint when	debugging
Date: Mon, 01 Sep 2014 15:32:54 +0300	[thread overview]
Message-ID: <87k35nfrm1.fsf@intel.com> (raw)
In-Reply-To: <1409569921-29757-1-git-send-email-andriy.shevchenko@linux.intel.com>

On Mon, 01 Sep 2014, Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> There is no need to use hex_dump_to_buffer() since we have a kernel helper to
> dump up to 64 bytes just via printk(). In our case the actual size is 15 bytes.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 6db84bf..00b79f5 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3318,15 +3318,11 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
>  	struct drm_device *dev = dig_port->base.base.dev;
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  
> -	char dpcd_hex_dump[sizeof(intel_dp->dpcd) * 3];
> -
>  	if (intel_dp_dpcd_read_wake(&intel_dp->aux, 0x000, intel_dp->dpcd,
>  				    sizeof(intel_dp->dpcd)) < 0)
>  		return false; /* aux transfer failed */
>  
> -	hex_dump_to_buffer(intel_dp->dpcd, sizeof(intel_dp->dpcd),
> -			   32, 1, dpcd_hex_dump, sizeof(dpcd_hex_dump), false);
> -	DRM_DEBUG_KMS("DPCD: %s\n", dpcd_hex_dump);
> +	DRM_DEBUG_KMS("DPCD: %*ph\n", sizeof(intel_dp->dpcd), intel_dp->dpcd);
>  
>  	if (intel_dp->dpcd[DP_DPCD_REV] == 0)
>  		return false; /* DPCD not present */
> -- 
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center

      reply	other threads:[~2014-09-01 12:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-01 11:12 [PATCH] drm: i915: reduce memory footprint when debugging Andy Shevchenko
2014-09-01 12:32 ` Jani Nikula [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k35nfrm1.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@linux.ie \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.