From patchwork Fri May 7 09:12:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matthew Auld X-Patchwork-Id: 12244189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CEE5C433ED for ; Fri, 7 May 2021 09:12:50 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id A2F946144A for ; Fri, 7 May 2021 09:12:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2F946144A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E489A6EDFA; Fri, 7 May 2021 09:12:48 +0000 (UTC) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id 917C96EDFA for ; Fri, 7 May 2021 09:12:47 +0000 (UTC) IronPort-SDR: igiZIiGNpxtKr5jfMO3vxmawdmxs58bp/ZcCveT8BU+bwfs3tZP3Ua+QUYQ7GKdkCdEHvXyoy0 JRrJ+WidtbhA== X-IronPort-AV: E=McAfee;i="6200,9189,9976"; a="262629108" X-IronPort-AV: E=Sophos;i="5.82,280,1613462400"; d="scan'208";a="262629108" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2021 02:12:46 -0700 IronPort-SDR: hdctU7gnHzM8nS8x/Gf+qZ+ICIrWDK9H9PU8xgdb3du/E1xbkNBDcA0hwVInYlJe6kL+2nerAq EmgItrohfZzg== X-IronPort-AV: E=Sophos;i="5.82,280,1613462400"; d="scan'208";a="540279340" Received: from flydon-mobl2.ger.corp.intel.com (HELO mwauld-desk1.ger.corp.intel.com) ([10.252.20.229]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2021 02:12:45 -0700 From: Matthew Auld To: intel-gfx@lists.freedesktop.org Date: Fri, 7 May 2021 10:12:10 +0100 Message-Id: <20210507091210.371132-1-matthew.auld@intel.com> X-Mailer: git-send-email 2.26.3 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH] drm/i915/display: relax 2big checking around initial fb 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: Daniel Vetter , Chris Wilson Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" From: Chris Wilson The kernel prefers enabling fbc over the initial fb, since this leads to actual runtime power savings, so if the initial fb is deemed too big using some heuristic, then we simply skip allocating stolen for it. However if the kernel is not configured with fbcon then it should be possible to relax this, since unlike with fbcon the display server shouldn't preserve it when later replacing it, and so we should be able to re-use the stolen memory for fbc and friends. This patch is reported to fix some flicker seen during boot splash on some devices. Signed-off-by: Chris Wilson Signed-off-by: Matthew Auld Cc: Lee Shawn C Cc: Ville Syrjälä Cc: Daniel Vetter Reviewed-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index ec2d3fa60003..0ee1f0213fd9 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -1455,7 +1455,7 @@ initial_plane_vma(struct drm_i915_private *i915, * important and we should probably use that space with FBC or other * features. */ - if (size * 2 > i915->stolen_usable_size) + if (IS_ENABLED(FRAMEBUFFER_CONSOLE) && size * 2 > i915->stolen_usable_size) return NULL; obj = i915_gem_object_create_stolen_for_preallocated(i915, base, size);