]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: Unset cursor if out-of-bounds upon mode change (v4)
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 9 Jul 2010 07:45:04 +0000 (08:45 +0100)
committerPaul Gortmaker <paul.gortmaker@windriver.com>
Sun, 17 Apr 2011 20:15:33 +0000 (16:15 -0400)
commitb549001b9fd18185a05c345a4804c5e24518ce26
treebe7d61b0c5e3233e263b677bc38f83bc4711fd41
parent560b011ec7e83125dca7f8051d8df19b0e4aee4b
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
registers docs).

Fixes:

  Bug 24748 - [965G] Graphics crashes when resolution is changed with KMS
              enabled
  https://bugs.freedesktop.org/show_bug.cgi?id=24748

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 <chris@chris-wilson.co.uk>
Reported-by: Christian Eggers <ceggers@gmx.de>
Cc: Christopher James Halse Rogers <chalserogers@gmail.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h