drm/i915: Unset cursor if out-of-bounds upon mode change (v4)
commit cda4b7d3a5b1dcbc0d8e7bad52134347798e9047 upstream.
The docs warn that to position the cursor such that no part of it is
visible on the pipe is an undefined operation. Avoid such circumstances
upon changing the mode, or at any other time, by unsetting the cursor if
it moves out of bounds.
"For normal high resolution display modes, the cursor must have at least a
single pixel positioned over the active screen.” (p143, p148 of the hardware
Bug 24748 - [965G] Graphics crashes when resolution is changed with KMS
v2: Only update the cursor registers if they change.
v3: Fix the unsigned comparision of x,y against width,height.
v4: Always set CUR.BASE or else the cursor may become corrupt.
Signed-off-by: Chris Wilson <email@example.com>
Reported-by: Christian Eggers <firstname.lastname@example.org>
Cc: Christopher James Halse Rogers <email@example.com>
Signed-off-by: Eric Anholt <firstname.lastname@example.org>
Signed-off-by: Greg Kroah-Hartman <email@example.com>
2 files changed