drm/i915: Simplify cursor register write sequence
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 27 Mar 2017 18:55:46 +0000 (21:55 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 10 May 2017 16:28:35 +0000 (19:28 +0300)
commite11ffddba1f363f9713442500f779693b0d7cc19
tree2df4b90914c900c3ee03d8576470c26ddcdb16d2
parentd9e1551ec1391dee9db8b1121007f616454e1ca7
drm/i915: Simplify cursor register write sequence

It looks like simply writing all the cursor register every single
time might be slightly faster than checking to see of each of
them need to be written. So if any other register apart from
CURPOS needs to be written let's just write all the registers.

CURPOS is left as a special case mainly for 845/865 where we have to
disable the cursor to change many of the cursor parameters. This
introduces a slight chance of the cursor flickering when things get
updated (since we're not currently doing the vblank evade for cursor
updates). If we write CURPOS alone then that obviously can't happen.
And let's follow the same pattern in the i9xx code just for symmetry.
I wasn't able to see a singificant performance difference between
this and just writing all the registers unconditionally.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170327185546.2977-16-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/intel_display.c