From patchwork Fri Oct 14 15:46:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nirmoy Das X-Patchwork-Id: 13007159 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B211AC4332F for ; Fri, 14 Oct 2022 15:47:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A88C510EB25; Fri, 14 Oct 2022 15:47:10 +0000 (UTC) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id F394410E08E for ; Fri, 14 Oct 2022 15:47:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665762424; x=1697298424; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=tiHaOM2qetKLbRtZUcwTK4iHytYL32CVIaUNBsRWsIo=; b=Ad1fwypft8mwOyR+vNDKOo9+rP0j1RpIGC2jekOYqHAtTYHiAO6MpJDr 4CGHRVkQehJNTv8obH24S+wc8IK+f/+eIpv8p9jMhCNQssuKSpHMdobcd bRWjEMjYisJKxWtex2xGH3OEloXCo/I1D34D6zKKS8q46pgcfcdKnLw8l yQGZvtlqn+w6XGaxnoy4laWBdvmKZ7N1Xtp9n4C+EV33qnUNlrwftlIXt rePPeccP6lFWNEvvCIgksn/RNFz8Ulc65agqoOWjLeuHSBoqsFStLp84x Fbs8flYdiI+73qiwu/xv7Q31j977NKOMKPRwHqvZ8P363RQ2jA5H94fYc w==; X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="285131699" X-IronPort-AV: E=Sophos;i="5.95,184,1661842800"; d="scan'208";a="285131699" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 08:47:04 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10500"; a="658623078" X-IronPort-AV: E=Sophos;i="5.95,184,1661842800"; d="scan'208";a="658623078" Received: from nirmoyda-desk.igk.intel.com ([10.102.13.19]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Oct 2022 08:47:02 -0700 From: Nirmoy Das To: intel-gfx@lists.freedesktop.org Date: Fri, 14 Oct 2022 17:46:55 +0200 Message-Id: <20221014154655.14075-1-nirmoy.das@intel.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Organization: Intel Deutschland GmbH, Registered Address: Am Campeon 10, 85579 Neubiberg, Germany, Commercial Register: Amtsgericht Muenchen HRB 186928 Subject: [Intel-gfx] [PATCH v2] drm/i915: Print return value on error X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nirmoy Das Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Print returned error code for better debuggability. References: https://gitlab.freedesktop.org/drm/intel/-/issues/7211 Signed-off-by: Nirmoy Das Reviewed-by: Andrzej Hajda --- 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..ab385d18ddcc 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 (%pe)\n", obj); 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 (%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 (%pe)\n", vaddr); ret = PTR_ERR(vaddr); goto out_unpin; }