Maxime Ripard
e05162c017
drm: Store new plane state in a variable for atomic_update and disable
In order to store the new plane state in a subsequent helper, let's move
the plane->state dereferences into a variable.
This was done using the following coccinelle script, plus some hand
changes for vmwgfx:
@ plane_atomic_func @
identifier helpers;
identifier func;
@@
(
static const struct drm_plane_helper_funcs helpers = {
...,
.atomic_disable = func,
...,
};
|
static const struct drm_plane_helper_funcs helpers = {
...,
.atomic_update = func,
...,
};
)
@ has_new_state_old_state @
identifier plane_atomic_func.func;
identifier plane;
identifier new_state;
symbol old_state;
@@
func(struct drm_plane *plane, struct drm_plane_state *old_state)
{
...
struct drm_plane_state *new_state = plane->state;
...
}
@ depends on !has_new_state_old_state @
identifier plane_atomic_func.func;
identifier plane;
symbol old_state;
@@
func(struct drm_plane *plane, struct drm_plane_state *old_state)
{
+ struct drm_plane_state *new_state = plane->state;
<+...
- plane->state
+ new_state
...+>
}
@ has_new_state_state @
identifier plane_atomic_func.func;
identifier plane;
identifier new_state;
symbol state;
@@
func(struct drm_plane *plane, struct drm_plane_state *state)
{
...
struct drm_plane_state *new_state = plane->state;
...
}
@ depends on !has_new_state_state @
identifier plane_atomic_func.func;
identifier plane;
symbol state;
@@
func(struct drm_plane *plane, struct drm_plane_state *state)
{
+ struct drm_plane_state *new_plane_state = plane->state;
<+...
- plane->state
+ new_plane_state
...+>
}
@ has_new_state_old_s @
identifier plane_atomic_func.func;
identifier plane;
identifier new_state;
symbol old_s;
@@
func(struct drm_plane *plane, struct drm_plane_state *old_s)
{
...
struct drm_plane_state *new_state = plane->state;
...
}
@ depends on !has_new_state_old_s @
identifier plane_atomic_func.func;
identifier plane;
symbol old_s;
@@
func(struct drm_plane *plane, struct drm_plane_state *old_s)
{
+ struct drm_plane_state *new_s = plane->state;
<+...
- plane->state
+ new_s
...+>
}
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://lore.kernel.org/r/20210219120032.260676-1-maxime@cerno.tech
2021-02-24 20:27:09 +01:00
..
2020-12-09 15:38:13 +01:00
2020-12-24 12:18:11 -08:00
2020-12-15 19:29:43 -08:00
2020-12-15 16:30:31 -08:00
2020-12-24 12:28:35 -08:00
2020-12-07 17:01:54 +02:00
2020-12-16 16:38:41 -08:00
2020-12-12 11:12:25 -07:00
2020-12-18 12:38:28 -08:00
2020-12-21 10:39:37 -08:00
2020-12-16 00:07:17 -08:00
2020-12-16 11:06:49 -08:00
2020-12-03 19:40:31 +00:00
2020-12-30 18:22:17 +01:00
2020-12-16 16:38:41 -08:00
2020-12-27 09:14:32 -08:00
2020-12-24 12:18:11 -08:00
2020-12-15 15:27:16 +01:00
2020-12-17 12:52:23 -08:00
2021-02-03 14:49:27 +01:00
2020-12-15 12:53:37 -08:00
2020-12-11 17:18:10 +09:00
2020-12-24 12:40:07 -08:00
2020-12-07 10:08:14 +01:00
2020-12-15 16:06:14 -08:00
2020-12-17 18:07:20 -08:00
2021-02-24 20:27:09 +01:00
2020-12-16 11:44:38 +01:00
2020-12-16 11:49:46 -08:00
2020-12-22 08:18:36 -08:00
2020-12-10 13:34:40 -06:00
2020-12-15 14:10:09 -08:00
2020-12-15 16:30:31 -08:00
2020-12-17 10:31:30 +01:00
2021-01-01 12:58:07 -08:00
2020-12-30 18:25:34 +01:00
2020-12-15 14:18:40 -08:00
2020-12-16 14:56:09 -07:00
2020-12-15 16:18:23 -08:00
2020-12-16 16:27:35 -08:00
2020-12-16 13:58:47 -08:00
2020-12-20 10:44:05 -08:00
2020-12-08 10:02:45 -07:00
2020-12-07 10:48:16 +01:00
2020-12-09 19:26:02 -06:00
2020-12-28 13:32:16 -08:00
2021-02-17 12:52:39 +01:00
2020-12-09 00:40:02 +01:00
2020-12-04 12:27:10 +01:00
2020-12-16 13:34:31 -08:00
2020-12-26 09:19:49 -08:00
2020-12-17 13:34:25 -08:00
2020-12-15 15:57:25 -08:00
2020-12-17 17:46:34 -08:00
2020-12-24 13:50:23 -08:00
2020-12-16 13:09:35 -08:00
2020-12-27 09:22:55 -08:00
2020-12-16 16:53:00 -08:00
2020-12-16 13:42:26 -08:00
2020-12-15 14:02:26 -08:00
2020-12-28 10:56:22 +05:30
2021-01-14 21:20:53 +01:00
2020-12-19 12:50:10 -08:00
2020-12-09 14:14:02 +00:00
2020-12-15 14:10:09 -08:00
2020-12-24 13:50:23 -08:00
2020-12-23 15:06:22 -08:00
2020-12-13 01:00:10 +01:00
2020-12-15 15:26:14 +01:00
2020-12-15 22:50:12 +11:00
2020-12-09 15:00:55 -08:00
2020-12-19 11:51:32 -08:00
2020-12-15 22:46:18 -08:00
2020-12-11 17:48:32 +00:00
2020-12-16 16:38:41 -08:00
2020-12-16 16:38:41 -08:00
2020-12-20 10:12:06 -08:00
2020-12-24 12:28:35 -08:00
2021-01-01 12:58:07 -08:00
2020-12-10 16:17:15 +01:00
2020-12-10 16:23:56 +01:00
2020-12-17 13:41:27 -08:00
2020-12-05 13:11:54 +05:30
2020-12-11 17:49:01 +00:00
2020-12-10 10:45:36 +01:00
2020-12-18 12:38:28 -08:00
2020-12-16 13:34:31 -08:00
2020-12-16 16:38:41 -08:00
2020-12-18 12:19:37 -08:00
2020-12-08 13:41:45 +01:00
2020-12-17 13:41:27 -08:00
2020-12-09 19:59:00 +01:00
2020-12-17 13:34:25 -08:00
2020-12-24 12:06:46 -08:00
2020-12-20 10:44:05 -08:00
2020-12-24 12:06:46 -08:00
2021-02-22 08:55:50 +01:00
2020-12-24 12:06:46 -08:00
2020-12-09 19:44:34 +01:00
2020-12-23 15:01:49 -08:00
2020-12-24 13:50:23 -08:00
2020-12-16 00:07:17 -08:00