mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-11 15:04:49 -04:00
drm/atomic-helper: Change parameter name of drm_atomic_helper_commit_modeset_enables()
drm_atomic_helper_commit_modeset_enables() enables all outputs affected by a new commit. It takes the drm_atomic_state being committed as a parameter. However, that parameter name is called (and documented) as old_state, which is pretty confusing. Let's rename that variable as state. Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Link: https://lore.kernel.org/r/20250213-bridge-connector-v3-17-e71598f49c8f@kernel.org Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
@@ -1486,7 +1486,7 @@ static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
|
||||
/**
|
||||
* drm_atomic_helper_commit_modeset_enables - modeset commit to enable outputs
|
||||
* @dev: DRM device
|
||||
* @old_state: atomic state object with old state structures
|
||||
* @state: atomic state object being committed
|
||||
*
|
||||
* This function enables all the outputs with the new configuration which had to
|
||||
* be turned off for the update.
|
||||
@@ -1498,7 +1498,7 @@ static void drm_atomic_helper_commit_writebacks(struct drm_device *dev,
|
||||
* PM since planes updates then only happen when the CRTC is actually enabled.
|
||||
*/
|
||||
void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
struct drm_atomic_state *old_state)
|
||||
struct drm_atomic_state *state)
|
||||
{
|
||||
struct drm_crtc *crtc;
|
||||
struct drm_crtc_state *old_crtc_state;
|
||||
@@ -1507,7 +1507,7 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
struct drm_connector_state *new_conn_state;
|
||||
int i;
|
||||
|
||||
for_each_oldnew_crtc_in_state(old_state, crtc, old_crtc_state, new_crtc_state, i) {
|
||||
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) {
|
||||
const struct drm_crtc_helper_funcs *funcs;
|
||||
|
||||
/* Need to filter out CRTCs where only planes change. */
|
||||
@@ -1523,13 +1523,13 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
drm_dbg_atomic(dev, "enabling [CRTC:%d:%s]\n",
|
||||
crtc->base.id, crtc->name);
|
||||
if (funcs->atomic_enable)
|
||||
funcs->atomic_enable(crtc, old_state);
|
||||
funcs->atomic_enable(crtc, state);
|
||||
else if (funcs->commit)
|
||||
funcs->commit(crtc);
|
||||
}
|
||||
}
|
||||
|
||||
for_each_new_connector_in_state(old_state, connector, new_conn_state, i) {
|
||||
for_each_new_connector_in_state(state, connector, new_conn_state, i) {
|
||||
const struct drm_encoder_helper_funcs *funcs;
|
||||
struct drm_encoder *encoder;
|
||||
struct drm_bridge *bridge;
|
||||
@@ -1552,21 +1552,21 @@ void drm_atomic_helper_commit_modeset_enables(struct drm_device *dev,
|
||||
* it away), so we won't call enable hooks twice.
|
||||
*/
|
||||
bridge = drm_bridge_chain_get_first_bridge(encoder);
|
||||
drm_atomic_bridge_chain_pre_enable(bridge, old_state);
|
||||
drm_atomic_bridge_chain_pre_enable(bridge, state);
|
||||
|
||||
if (funcs) {
|
||||
if (funcs->atomic_enable)
|
||||
funcs->atomic_enable(encoder, old_state);
|
||||
funcs->atomic_enable(encoder, state);
|
||||
else if (funcs->enable)
|
||||
funcs->enable(encoder);
|
||||
else if (funcs->commit)
|
||||
funcs->commit(encoder);
|
||||
}
|
||||
|
||||
drm_atomic_bridge_chain_enable(bridge, old_state);
|
||||
drm_atomic_bridge_chain_enable(bridge, state);
|
||||
}
|
||||
|
||||
drm_atomic_helper_commit_writebacks(dev, old_state);
|
||||
drm_atomic_helper_commit_writebacks(dev, state);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_atomic_helper_commit_modeset_enables);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user