From: Dave Airlie <airlied@gmail.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com, ville.syrjala@linux.intel.com,
Dave Airlie <airlied@redhat.com>
Subject: [Intel-gfx] [PATCH 3/8] drm/i915/display: refactor out initial plane config for crtcs
Date: Thu, 7 Oct 2021 13:13:13 +1000 [thread overview]
Message-ID: <20211007031318.3088987-4-airlied@gmail.com> (raw)
In-Reply-To: <20211007031318.3088987-1-airlied@gmail.com>
From: Dave Airlie <airlied@redhat.com>
This just pulls this out into a function so it can be moved to
another file easier.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 44 +++++++++++---------
1 file changed, 25 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index b26e1989b8d8..cc1707453a94 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -11450,6 +11450,30 @@ int intel_modeset_init_noirq(struct drm_i915_private *i915)
return ret;
}
+static void
+intel_crtc_initial_plane_config(struct intel_crtc *crtc)
+{
+ struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+ struct intel_initial_plane_config plane_config = {};
+
+ /*
+ * Note that reserving the BIOS fb up front prevents us
+ * from stuffing other stolen allocations like the ring
+ * on top. This prevents some ugliness at boot time, and
+ * can even allow for smooth boot transitions if the BIOS
+ * fb is large enough for the active pipe configuration.
+ */
+ dev_priv->display->get_initial_plane_config(crtc, &plane_config);
+
+ /*
+ * If the fb is shared between multiple heads, we'll
+ * just get the first one.
+ */
+ intel_find_initial_plane_obj(crtc, &plane_config);
+
+ plane_config_fini(&plane_config);
+}
+
/* part #2: call after irq install, but before gem init */
int intel_modeset_init_nogem(struct drm_i915_private *i915)
{
@@ -11511,27 +11535,9 @@ int intel_modeset_init_nogem(struct drm_i915_private *i915)
drm_modeset_unlock_all(dev);
for_each_intel_crtc(dev, crtc) {
- struct intel_initial_plane_config plane_config = {};
-
if (!to_intel_crtc_state(crtc->base.state)->uapi.active)
continue;
-
- /*
- * Note that reserving the BIOS fb up front prevents us
- * from stuffing other stolen allocations like the ring
- * on top. This prevents some ugliness at boot time, and
- * can even allow for smooth boot transitions if the BIOS
- * fb is large enough for the active pipe configuration.
- */
- i915->display->get_initial_plane_config(crtc, &plane_config);
-
- /*
- * If the fb is shared between multiple heads, we'll
- * just get the first one.
- */
- intel_find_initial_plane_obj(crtc, &plane_config);
-
- plane_config_fini(&plane_config);
+ intel_crtc_initial_plane_config(crtc);
}
/*
--
2.25.4
next prev parent reply other threads:[~2021-10-07 3:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-07 3:13 [Intel-gfx] [RFC PATCH 0/8] drm/i915/display: refactor plane config + pin out Dave Airlie
2021-10-07 3:13 ` [Intel-gfx] [PATCH 1/8] drm/i915/display: move plane prepare/cleanup to intel_atomic_plane.c Dave Airlie
2021-10-07 3:13 ` [Intel-gfx] [PATCH 2/8] drm/i915/display: move intel_plane_uses_fence to inline Dave Airlie
2021-10-07 8:58 ` Jani Nikula
2021-10-07 3:13 ` Dave Airlie [this message]
2021-10-07 3:13 ` [Intel-gfx] [PATCH 4/8] drm/i915/display: refactor initial plane config to a separate file Dave Airlie
2021-10-07 10:48 ` Jani Nikula
2021-10-07 3:13 ` [Intel-gfx] [PATCH 5/8] drm/i915/display: move pin/unpin fb/plane code to a new file Dave Airlie
2021-10-07 3:13 ` [Intel-gfx] [PATCH 6/8] drm/i915/display: refactor fbdev pin/unpin out into functions Dave Airlie
2021-10-07 3:13 ` [Intel-gfx] [PATCH 7/8] drm/i915/display: move fbdev pin code into fb_pin Dave Airlie
2021-10-07 3:13 ` [Intel-gfx] [PATCH 8/8] drm/i915/display: drop unused parameter to dpt pin Dave Airlie
2021-10-07 3:36 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: refactor plane config + pin out Patchwork
2021-10-07 3:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-10-07 4:09 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-10-07 5:29 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-10-07 10:52 ` [Intel-gfx] [RFC PATCH 0/8] " Jani Nikula
2021-10-07 11:09 ` Ville Syrjälä
2021-10-12 4:18 ` Dave Airlie
-- strict thread matches above, loose matches on Subject: below --
2021-10-12 4:34 [Intel-gfx] [RFC PATCH 0/8] drm/i915/display: refactor plane config + pin out (v2) Dave Airlie
2021-10-12 4:34 ` [Intel-gfx] [PATCH 3/8] drm/i915/display: refactor out initial plane config for crtcs Dave Airlie
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=20211007031318.3088987-4-airlied@gmail.com \
--to=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox