Skip to content
Snippets Groups Projects
Commit 99a99539 authored by Anson Jacob's avatar Anson Jacob Committed by Solomon Chiu
Browse files

drm/amd/display: Fix UBSAN warning for not a valid value for type '_Bool'


[Why]
dc_cursor_position do not initialise position.translate_by_source when
crtc or plane->state->fb is NULL. UBSAN caught this error in
dce110_set_cursor_position, as the value was garbage.

[How]
Initialise dc_cursor_position structure elements to 0 in handle_cursor_update
before calling get_cursor_position.

Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Bug: drm/amd#1471


Reported-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarAnson Jacob <Anson.Jacob@amd.com>
Reviewed-by: default avatarAurabindo Jayamohanan Pillai <Aurabindo.Pillai@amd.com>
Acked-by: default avatarSolomon Chiu <solomon.chiu@amd.com>
parent 8a3e4b25
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment