summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm
diff options
context:
space:
mode:
authorMaxime Ripard <maxime@cerno.tech>2020-11-02 16:38:34 +0300
committerMaxime Ripard <maxime@cerno.tech>2020-11-03 14:20:09 +0300
commitd74252bb8f0e38194e7457f7b4e5a8a33514bc24 (patch)
tree86b7456df926d93c1232f3497d07b13805e62168 /drivers/gpu/drm/omapdrm
parent3fd9886815af458ab88fc4518a9f5137beb0097e (diff)
downloadlinux-d74252bb8f0e38194e7457f7b4e5a8a33514bc24.tar.xz
drm: Use the state pointer directly in atomic_check
Now that atomic_check takes the global atomic state as a parameter, we don't need to go through the pointer in the CRTC state. This was done using the following coccinelle script: @ crtc_atomic_func @ identifier helpers; identifier func; @@ static struct drm_crtc_helper_funcs helpers = { ..., .atomic_check = func, ..., }; @@ identifier crtc_atomic_func.func; identifier crtc, state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); ... when != crtc_state - crtc_state->state + state ... } @@ struct drm_crtc_state *crtc_state; identifier crtc_atomic_func.func; identifier crtc, state; @@ func(struct drm_crtc *crtc, struct drm_atomic_state *state) { ... - crtc_state->state + state ... } Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201102133834.1176740-3-maxime@cerno.tech
Diffstat (limited to 'drivers/gpu/drm/omapdrm')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_crtc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index d7442aa55f89..49621b2e1ab5 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -583,7 +583,7 @@ static int omap_crtc_atomic_check(struct drm_crtc *crtc,
return -EINVAL;
}
- pri_state = drm_atomic_get_new_plane_state(crtc_state->state,
+ pri_state = drm_atomic_get_new_plane_state(state,
crtc->primary);
if (pri_state) {
struct omap_crtc_state *omap_crtc_state =