diff options
author | Rob Clark <robdclark@chromium.org> | 2019-11-04 20:37:36 +0300 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2019-11-06 21:00:21 +0300 |
commit | 86de88cfeb7cf33c7bbd18360e041c7d4e651bba (patch) | |
tree | e68b05d9f67df3c30ca92c041ba7cdea649bbab6 /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | b330f3972f4f2a829d41fb9e9b552bec7d73a840 (diff) | |
download | linux-86de88cfeb7cf33c7bbd18360e041c7d4e651bba.tar.xz |
drm/atomic: fix self-refresh helpers crtc state dereference
drm_self_refresh_helper_update_avg_times() was incorrectly accessing the
new incoming state after drm_atomic_helper_commit_hw_done(). But this
state might have already been superceeded by an !nonblock atomic update
resulting in dereferencing an already free'd crtc_state.
TODO I *think* this will more or less do the right thing.. althought I'm
not 100% sure if, for example, we enter psr in a nonblock commit, and
then leave psr in a !nonblock commit that overtakes the completion of
the nonblock commit. Not sure if this sort of scenario can happen in
practice. But not crashing is better than crashing, so I guess we
should either take this patch or rever the self-refresh helpers until
Sean can figure out a better solution.
Fixes: d4da4e33341c ("drm: Measure Self Refresh Entry/Exit times to avoid thrashing")
Cc: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
[seanpaul fixed up some checkpatch warns]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191104173737.142558-1-robdclark@gmail.com
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions