diff options
author | Paul Wu <[email protected]> | 2021-04-16 13:33:26 +0800 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2021-05-10 18:06:44 -0400 |
commit | 5728d5e58dbe3aa7725873e2a29265b57cfaaa3f (patch) | |
tree | efd4c3001437965a6546f64480f1c3ab81590edf | |
parent | 05e62b6b6433e1159018eb5862e906a3db24dfcd (diff) |
drm/amd/display: Set stream_count to 0 when dc_resource_state_destruct.
[Why]
When hardware need to be reset, driver need to reset stream objects but
dc_resource_state_destruct function omit resetting stream_count. It will
lead page fault if some logic will touch stream object.
[How]
Set stream_count to 0 when dc_resource_state_destruct.
Signed-off-by: Paul Wu <[email protected]>
Reviewed-by: Aric Cyr <[email protected]>
Acked-by: Wayne Lin <[email protected]>
Tested-by: Daniel Wheeler <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index 9fb0930f977b..f2bc630a0871 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -2673,6 +2673,7 @@ void dc_resource_state_destruct(struct dc_state *context) dc_stream_release(context->streams[i]); context->streams[i] = NULL; } + context->stream_count = 0; } void dc_resource_state_copy_construct( |