From patchwork Wed May 4 11:48:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 12837766 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 6B6E9C433F5 for ; Wed, 4 May 2022 11:48:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 94DCE10ECE4; Wed, 4 May 2022 11:48:26 +0000 (UTC) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id 62A7210FB7A for ; Wed, 4 May 2022 11:48:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651664905; x=1683200905; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=l9/0WAoNWQJaLhj53g9BOOPCmVCWMLyfHe79ogzvhHI=; b=THuEvAAF4KdqMelBbOBCkEtMQ7u1CCZSVJVqg2eNBaO8FDA/YrmauaL+ 76wiiiBAU8tO9cq66goH/npwAIyCutTenvv6DuQeaiPMlpNa8BwbD+9EL zRDVjtPZ8a1a+xV6NjcfGrA5YX574nO1S1kw4EW2pRECfttc5QcvWvjul WK1AFqd0rp4kTggURfEdIP+DBOApGXWjqKJicpNkWW9CSvpvh1RestPR+ poE+R4hXy+nfbqEwaUV9wCFqTsB3sl525WPRNjGuxUBaNUJc1mXeQYMg2 1esg/M8RaO8966tY9LcrMgHabb7GL3bugtqTYgdwn0CtUcH7KLl2IpnKO w==; X-IronPort-AV: E=McAfee;i="6400,9594,10336"; a="292932060" X-IronPort-AV: E=Sophos;i="5.91,197,1647327600"; d="scan'208";a="292932060" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2022 04:48:19 -0700 X-IronPort-AV: E=Sophos;i="5.91,197,1647327600"; d="scan'208";a="584695263" Received: from lab-ah.igk.intel.com ([10.91.215.196]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 May 2022 04:48:18 -0700 From: Andrzej Hajda To: intel-gfx@lists.freedesktop.org Date: Wed, 4 May 2022 13:48:07 +0200 Message-Id: <20220504114808.1578304-1-andrzej.hajda@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 Subject: [Intel-gfx] [PATCH 1/2] drm/i915/fbdev: print error in case drm_fb_helper_initial_config fails 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On some configurations drm_fb_helper_initial_config sometimes fails. Logging error value should help debugging such issues. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/i915/display/intel_fbdev.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c index 221336178991f0..557c7f15ac22a9 100644 --- a/drivers/gpu/drm/i915/display/intel_fbdev.c +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c @@ -539,11 +539,16 @@ int intel_fbdev_init(struct drm_device *dev) static void intel_fbdev_initial_config(void *data, async_cookie_t cookie) { struct intel_fbdev *ifbdev = data; + int ret; /* Due to peculiar init order wrt to hpd handling this is separate. */ - if (drm_fb_helper_initial_config(&ifbdev->helper, - ifbdev->preferred_bpp)) - intel_fbdev_unregister(to_i915(ifbdev->helper.dev)); + ret = drm_fb_helper_initial_config(&ifbdev->helper, + ifbdev->preferred_bpp); + if (!ret) + return; + drm_err(ifbdev->helper.dev, "failed to set initial configuration: %pe\n", + ERR_PTR(ret)); + intel_fbdev_unregister(to_i915(ifbdev->helper.dev)); } void intel_fbdev_initial_config_async(struct drm_device *dev)