From: Jani Nikula <jani.nikula@linux.intel.com>
To: Nirmoy Das <nirmoy.das@intel.com>, intel-gfx@lists.freedesktop.org
Cc: Nirmoy Das <nirmoy.das@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Print return value on error
Date: Fri, 14 Oct 2022 18:38:49 +0300 [thread overview]
Message-ID: <87fsfqs9di.fsf@intel.com> (raw)
In-Reply-To: <20221014152525.7683-1-nirmoy.das@intel.com>
On Fri, 14 Oct 2022, Nirmoy Das <nirmoy.das@intel.com> wrote:
> Print returned error code for better debuggability.
>
> References: https://gitlab.freedesktop.org/drm/intel/-/issues/7211
> Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_fbdev.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 112aa0447a0d..015a854d9bec 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -175,7 +175,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
> }
>
> if (IS_ERR(obj)) {
> - drm_err(&dev_priv->drm, "failed to allocate framebuffer\n");
> + drm_err(&dev_priv->drm, "failed to allocate framebuffer(err = %pe)\n", obj);
Nitpick, space before (. With %pe, not sure if the "err =" part is
necessary either.
failed to allocate framebuffer (err = -ENOMEM)
vs.
failed to allocate framebuffer (-ENOMEM)
Ditto below.
BR,
Jani.
> return PTR_ERR(obj);
> }
>
> @@ -256,7 +256,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
>
> info = drm_fb_helper_alloc_fbi(helper);
> if (IS_ERR(info)) {
> - drm_err(&dev_priv->drm, "Failed to allocate fb_info\n");
> + drm_err(&dev_priv->drm, "Failed to allocate fb_info(err = %pe)\n", info);
> ret = PTR_ERR(info);
> goto out_unpin;
> }
> @@ -291,7 +291,7 @@ static int intelfb_create(struct drm_fb_helper *helper,
> vaddr = i915_vma_pin_iomap(vma);
> if (IS_ERR(vaddr)) {
> drm_err(&dev_priv->drm,
> - "Failed to remap framebuffer into virtual memory\n");
> + "Failed to remap framebuffer into virtual memory (err = %pe)\n", vaddr);
> ret = PTR_ERR(vaddr);
> goto out_unpin;
> }
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2022-10-14 15:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-14 15:25 [Intel-gfx] [PATCH] drm/i915: Print return value on error Nirmoy Das
2022-10-14 15:38 ` Jani Nikula [this message]
2022-10-14 15:41 ` Das, Nirmoy
2022-10-14 16:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
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=87fsfqs9di.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nirmoy.das@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.