All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 08/13] drm/i915: Stop updating plane->fb/crtc
Date: Fri, 25 May 2018 21:50:40 +0300	[thread overview]
Message-ID: <20180525185045.29689-9-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20180525185045.29689-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We want to get rid of plane->fb/crtc on atomic drivers. Stop setting
them.

v2: Fix up the comment in intel_crtc_active() and
    nuke the rest of the stale comments (Daniel)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> #v1
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_atomic_plane.c | 12 ------------
 drivers/gpu/drm/i915/intel_display.c      |  7 +++----
 2 files changed, 3 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_atomic_plane.c b/drivers/gpu/drm/i915/intel_atomic_plane.c
index 6d068786eb41..e8bf4cc499e1 100644
--- a/drivers/gpu/drm/i915/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/intel_atomic_plane.c
@@ -120,12 +120,6 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
 		&crtc_state->base.adjusted_mode;
 	int ret;
 
-	/*
-	 * Both crtc and plane->crtc could be NULL if we're updating a
-	 * property while the plane is disabled.  We don't actually have
-	 * anything driver-specific we need to test in that case, so
-	 * just return success.
-	 */
 	if (!intel_state->base.crtc && !old_plane_state->base.crtc)
 		return 0;
 
@@ -209,12 +203,6 @@ static int intel_plane_atomic_check(struct drm_plane *plane,
 	const struct drm_crtc_state *old_crtc_state;
 	struct drm_crtc_state *new_crtc_state;
 
-	/*
-	 * Both crtc and plane->crtc could be NULL if we're updating a
-	 * property while the plane is disabled.  We don't actually have
-	 * anything driver-specific we need to test in that case, so
-	 * just return success.
-	 */
 	if (!crtc)
 		return 0;
 
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 90a6ff00c79d..8e7e87e4e11f 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1022,7 +1022,7 @@ bool intel_crtc_active(struct intel_crtc *crtc)
 	 * We can ditch the adjusted_mode.crtc_clock check as soon
 	 * as Haswell has gained clock readout/fastboot support.
 	 *
-	 * We can ditch the crtc->primary->fb check as soon as we can
+	 * We can ditch the crtc->primary->state->fb check as soon as we can
 	 * properly reconstruct framebuffers.
 	 *
 	 * FIXME: The intel_crtc->active here should be switched to
@@ -2879,9 +2879,8 @@ intel_find_initial_plane_obj(struct intel_crtc *intel_crtc,
 	if (i915_gem_object_is_tiled(obj))
 		dev_priv->preserve_bios_swizzle = true;
 
-	drm_framebuffer_get(fb);
-	primary->fb = primary->state->fb = fb;
-	primary->crtc = primary->state->crtc = &intel_crtc->base;
+	plane_state->fb = fb;
+	plane_state->crtc = &intel_crtc->base;
 
 	intel_set_plane_visible(to_intel_crtc_state(crtc_state),
 				to_intel_plane_state(plane_state),
-- 
2.16.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2018-05-25 18:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-25 18:50 [PATCH v2 00/13] drm: Eliminate plane->fb/crtc usage for atomic drivers Ville Syrjala
2018-05-25 18:50 ` [PATCH v2 01/13] drm/vmwgfx: Stop using plane->fb in vmw_kms_atomic_check_modeset() Ville Syrjala
2018-05-25 18:50 ` [PATCH v2 02/13] drm/vmwgfx: Stop using plane->fb in vmw_kms_helper_dirty() Ville Syrjala
2018-05-30 20:08   ` Ville Syrjälä
2018-06-04 18:13     ` Sinclair Yeh
2018-06-11 17:58       ` Ville Syrjälä
2018-05-25 18:50 ` [PATCH v2 03/13] drm/vmwgfx: Stop using plane->fb in vmw_kms_update_implicit_fb() Ville Syrjala
2018-05-25 18:50 ` [PATCH v2 04/13] drm/vmwgfx: Stop updating plane->fb Ville Syrjala
2018-05-25 18:50 ` [PATCH v2 05/13] drm/vmwgfx: Stop using plane->fb in atomic_enable() Ville Syrjala
2018-05-25 18:50 ` [PATCH v2 06/13] drm/vmwgfx: Stop messing about with plane->fb/old_fb/crtc Ville Syrjala
2018-05-25 18:50 ` [PATCH v2 07/13] drm/amdgpu/dc: Stop updating plane->fb Ville Syrjala
2018-05-25 18:50 ` Ville Syrjala [this message]
2018-05-25 18:50 ` [PATCH v2 09/13] drm/exynos: Stop updating plane->crtc Ville Syrjala
     [not found] ` <20180525185045.29689-1-ville.syrjala-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-05-25 18:50   ` [PATCH v2 10/13] drm/msm: Stop updating plane->fb/crtc Ville Syrjala
2018-05-25 18:50 ` [PATCH v2 11/13] drm/virtio: Stop updating plane->crtc Ville Syrjala
2018-05-25 18:50 ` Ville Syrjala
2018-05-25 18:50 ` [PATCH v2 12/13] drm/vc4: Stop updating plane->fb/crtc Ville Syrjala
2018-05-30 19:31   ` Eric Anholt
2018-05-25 18:50 ` [PATCH v2 13/13] drm: Stop updating plane->crtc/fb/old_fb on atomic drivers Ville Syrjala
2018-05-25 19:12 ` ✗ Fi.CI.CHECKPATCH: warning for drm: Eliminate plane->fb/crtc usage for atomic drivers (rev6) Patchwork
2018-05-25 19:29 ` ✓ Fi.CI.BAT: success " Patchwork
2018-05-26  6:02 ` ✓ Fi.CI.IGT: " Patchwork
2018-05-30 17:41 ` [PATCH v2 00/13] drm: Eliminate plane->fb/crtc usage for atomic drivers Sinclair Yeh

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=20180525185045.29689-9-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.