diff options
author | Ville Syrjälä <[email protected]> | 2018-05-02 21:32:47 +0300 |
---|---|---|
committer | Sean Paul <[email protected]> | 2018-05-07 10:19:11 -0400 |
commit | b5cb2e5a1f64d882a155add7522247ab0523051e (patch) | |
tree | c128222dcf33bd4735e9e37931c48135f31dc812 | |
parent | f0b408eebc993310bea3f2daae286c40bd3f063b (diff) |
drm/atomic: Clean private obj old_state/new_state in drm_atomic_state_default_clear()
Clear the old_state and new_state pointers for private objects
in drm_atomic_state_default_clear(). We don't actually have
functions to get the new/old state for private objects so
getting access to the potentially stale pointers requires a
bit more manual labour than for other object types. But let's
clear the pointers for private objects as well, if only to
avoid future surprises when someone decides to add the functions
to get at them.
v2: Split private objs to a separate patch (Daniel)
Cc: <[email protected]> # v4.14+
Cc: Maarten Lankhorst <[email protected]>
Cc: Laurent Pinchart <[email protected]>
Cc: Abhay Kumar <[email protected]>
Fixes: a4370c777406 (drm/atomic: Make private objs proper objects)
Signed-off-by: Ville Syrjälä <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Maarten Lankhorst <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Signed-off-by: Sean Paul <[email protected]>
-rw-r--r-- | drivers/gpu/drm/drm_atomic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 4fa19ed7517a..c825c76edc1d 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -196,6 +196,8 @@ void drm_atomic_state_default_clear(struct drm_atomic_state *state) state->private_objs[i].state); state->private_objs[i].ptr = NULL; state->private_objs[i].state = NULL; + state->private_objs[i].old_state = NULL; + state->private_objs[i].new_state = NULL; } state->num_private_objs = 0; |