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 09122F459EB for ; Fri, 10 Apr 2026 15:05:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 57CAF10E987; Fri, 10 Apr 2026 15:05:36 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="S77eX6Hm"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4B8D410E979; Fri, 10 Apr 2026 15:05:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1775833533; x=1807369533; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WYLqyRKspXU7koAGrI1XsfSlzZIJzpYpSap5c/OboqQ=; b=S77eX6HmIv4E7RRjnZyW3W1qOjh75ZzcHtKSavscKCMjqiM7MhdXhgt8 6QjDZ/68Fv1ng/foI0OanFYY0Ho+oRNGnyGYIj4v0Qhi6WhDCx7ehAg/Q z8qWtcbxs532zoEMtqOF4+SQd7LcBXNYyBvzS1Yyabn9ZlI/OScBk46vL GnmOSCF2phWxLZmMAa7TlduCKaPHolH7jtT6ios6Aocq/GYadga775Qt8 GhKkG2h90CZgquOlJ0jpeSsfcCduAHe2CnupH9qTR55JOrfDEDWNGCfTy rn5Txf+3jW/5QoZLoUxNk9kZVJhRqvSDmG8v8jd414R9T1lst0M0JcE9/ w==; X-CSE-ConnectionGUID: fTay6+NrQJ2sWaGpj8iCgg== X-CSE-MsgGUID: hrMtE16xRnmx9EODlLin4Q== X-IronPort-AV: E=McAfee;i="6800,10657,11755"; a="76743769" X-IronPort-AV: E=Sophos;i="6.23,171,1770624000"; d="scan'208";a="76743769" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2026 08:05:30 -0700 X-CSE-ConnectionGUID: n6hpzBVQRUymcCVjkvVw6A== X-CSE-MsgGUID: lkJ3TilLQTSDkCjAOviOWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.23,171,1770624000"; d="scan'208";a="224802736" Received: from zzombora-mobl1 (HELO localhost) ([10.245.244.89]) by fmviesa010-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Apr 2026 08:05:29 -0700 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Cc: intel-xe@lists.freedesktop.org Subject: [PATCH 10/10] drm/i915: Reject BIOS FB rotation in common code Date: Fri, 10 Apr 2026 18:04:49 +0300 Message-ID: <20260410150449.9699-11-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260410150449.9699-1-ville.syrjala@linux.intel.com> References: <20260410150449.9699-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs Bertel Jungin Aukio 5, 02600 Espoo, Finland Content-Transfer-Encoding: 8bit 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" From: Ville Syrjälä Reject 90/270 degree rotated BIOS framebuffers in common code. Currently skl_get_initial_plane_config() already rejects these, but we may want to implement the missing parts there so that skl_get_initial_plane_config() could be reused for general plane state verification purposes. 90/270 degree rotated framebuffers require two completely separate GGTT mappings (0 degree for the CPU, 270 degree for the display engine), and the rest of the BIOS FB takeover code is not prepared for that. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_initial_plane.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_initial_plane.c b/drivers/gpu/drm/i915/display/intel_initial_plane.c index e3d1b2d1669c..0e5cd45f01cc 100644 --- a/drivers/gpu/drm/i915/display/intel_initial_plane.c +++ b/drivers/gpu/drm/i915/display/intel_initial_plane.c @@ -3,6 +3,7 @@ #include +#include #include #include @@ -101,6 +102,15 @@ intel_alloc_initial_plane_obj(struct intel_display *display, return NULL; } + /* + * Would need to preserve the 270 degree rotated + * GGTT mapping used by the display hardware. + */ + if (drm_rotation_90_or_270(plane_config->rotation)) { + drm_dbg_kms(display->drm, "90/270 degree rotation not supported for initial FB\n"); + return NULL; + } + return display->parent->initial_plane->alloc_obj(display->drm, plane_config); } -- 2.52.0