From: linux@treblig.org
To: dmitry.baryshkov@linaro.org, ville.syrjala@linux.intel.com,
jfalempe@redhat.com, tomi.valkeinen@ideasonboard.com,
maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
"Dr. David Alan Gilbert" <linux@treblig.org>
Subject: [PATCH v2 1/3] drm: Remove unused drm_atomic_helper_commit_planes_on_crtc
Date: Tue, 29 Oct 2024 23:47:03 +0000 [thread overview]
Message-ID: <20241029234706.285087-2-linux@treblig.org> (raw)
In-Reply-To: <20241029234706.285087-1-linux@treblig.org>
From: "Dr. David Alan Gilbert" <linux@treblig.org>
The last use of drm_atomic_helper_commit_planes_on_crtc() was removed
in 2018 by
commit 6c246b81f938 ("drm/i915: Replace call to commit_planes_on_crtc with
internal update, v2.")
Remove it.
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/drm_atomic_helper.c | 72 -----------------------------
include/drm/drm_atomic_helper.h | 1 -
2 files changed, 73 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 43cdf39019a4..dd8f7d6f5a36 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -2705,8 +2705,6 @@ static bool plane_crtc_active(const struct drm_plane_state *state)
* crtcs need to be updated though.
*
* Note that this function does all plane updates across all CRTCs in one step.
- * If the hardware can't support this approach look at
- * drm_atomic_helper_commit_planes_on_crtc() instead.
*
* Plane parameters can be updated by applications while the associated CRTC is
* disabled. The DRM/KMS core will store the parameters in the plane state,
@@ -2833,76 +2831,6 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
}
EXPORT_SYMBOL(drm_atomic_helper_commit_planes);
-/**
- * drm_atomic_helper_commit_planes_on_crtc - commit plane state for a CRTC
- * @old_crtc_state: atomic state object with the old CRTC state
- *
- * This function commits the new plane state using the plane and atomic helper
- * functions for planes on the specific CRTC. It assumes that the atomic state
- * has already been pushed into the relevant object state pointers, since this
- * step can no longer fail.
- *
- * This function is useful when plane updates should be done CRTC-by-CRTC
- * instead of one global step like drm_atomic_helper_commit_planes() does.
- *
- * This function can only be savely used when planes are not allowed to move
- * between different CRTCs because this function doesn't handle inter-CRTC
- * dependencies. Callers need to ensure that either no such dependencies exist,
- * resolve them through ordering of commit calls or through some other means.
- */
-void
-drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_state)
-{
- const struct drm_crtc_helper_funcs *crtc_funcs;
- struct drm_crtc *crtc = old_crtc_state->crtc;
- struct drm_atomic_state *old_state = old_crtc_state->state;
- struct drm_crtc_state *new_crtc_state =
- drm_atomic_get_new_crtc_state(old_state, crtc);
- struct drm_plane *plane;
- unsigned int plane_mask;
-
- plane_mask = old_crtc_state->plane_mask;
- plane_mask |= new_crtc_state->plane_mask;
-
- crtc_funcs = crtc->helper_private;
- if (crtc_funcs && crtc_funcs->atomic_begin)
- crtc_funcs->atomic_begin(crtc, old_state);
-
- drm_for_each_plane_mask(plane, crtc->dev, plane_mask) {
- struct drm_plane_state *old_plane_state =
- drm_atomic_get_old_plane_state(old_state, plane);
- struct drm_plane_state *new_plane_state =
- drm_atomic_get_new_plane_state(old_state, plane);
- const struct drm_plane_helper_funcs *plane_funcs;
- bool disabling;
-
- plane_funcs = plane->helper_private;
-
- if (!old_plane_state || !plane_funcs)
- continue;
-
- WARN_ON(new_plane_state->crtc &&
- new_plane_state->crtc != crtc);
-
- disabling = drm_atomic_plane_disabling(old_plane_state, new_plane_state);
-
- if (disabling && plane_funcs->atomic_disable) {
- plane_funcs->atomic_disable(plane, old_state);
- } else if (new_plane_state->crtc || disabling) {
- plane_funcs->atomic_update(plane, old_state);
-
- if (!disabling && plane_funcs->atomic_enable) {
- if (drm_atomic_plane_enabling(old_plane_state, new_plane_state))
- plane_funcs->atomic_enable(plane, old_state);
- }
- }
- }
-
- if (crtc_funcs && crtc_funcs->atomic_flush)
- crtc_funcs->atomic_flush(crtc, old_state);
-}
-EXPORT_SYMBOL(drm_atomic_helper_commit_planes_on_crtc);
-
/**
* drm_atomic_helper_disable_planes_on_crtc - helper to disable CRTC's planes
* @old_crtc_state: atomic state object with the old CRTC state
diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
index 9aa0a05aa072..6ad50c531fc0 100644
--- a/include/drm/drm_atomic_helper.h
+++ b/include/drm/drm_atomic_helper.h
@@ -107,7 +107,6 @@ void drm_atomic_helper_commit_planes(struct drm_device *dev,
uint32_t flags);
void drm_atomic_helper_cleanup_planes(struct drm_device *dev,
struct drm_atomic_state *old_state);
-void drm_atomic_helper_commit_planes_on_crtc(struct drm_crtc_state *old_crtc_state);
void
drm_atomic_helper_disable_planes_on_crtc(struct drm_crtc_state *old_crtc_state,
bool atomic);
--
2.47.0
next prev parent reply other threads:[~2024-10-29 23:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-29 23:47 [PATCH v2 0/3] DRM deadcode linux
2024-10-29 23:47 ` linux [this message]
2024-10-29 23:47 ` [PATCH v2 2/3] drm/sysfs: Remove unused drm_class_device_(un)register linux
2024-10-29 23:47 ` [PATCH v2 3/3] Revert "drm/client: Add drm_client_modeset_check()" linux
2024-10-31 21:47 ` Dmitry Baryshkov
2025-01-31 12:56 ` Dr. David Alan Gilbert
2025-03-03 16:58 ` Dr. David Alan Gilbert
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=20241029234706.285087-2-linux@treblig.org \
--to=linux@treblig.org \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jfalempe@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
--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 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.