drm/i915: Fix sprite destination colorkeying on SKL+
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 29 May 2018 18:28:00 +0000 (21:28 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 8 Jun 2018 18:20:21 +0000 (21:20 +0300)
commit672b3c4bc3d157078c00146c2d20bdd3aeec38e6
treeeaf2796c55ccfdc724fb7219d3e6ddf485f8f8fb
parent51e645b6652c997a68cbadf70e62a7b0c49e63a2
drm/i915: Fix sprite destination colorkeying on SKL+

On SKL+ the dst colorkey must be configured on the lower
plane that contains the colorkey. This is in contrast to
most earlier platforms where the dst colorkey is configured
on the plane above.

The hardware will peform dst keying only between two immediately
adjacent (in zorder) planes. Plane 2 will be keyed against plane 1,
plane 3 againts plane 2, and so on. There is no way to key arbitrary
planes against plane 1. Thus offering dst color keying on plane 3+
is pointless. In fact it can be harmful since enabling dst keying on
more than one plane on the same pipe leads to only the top-most of
the planes performing the keying. For any plane lower in zorder the
dst key enable is simply ignored.

v2: s/plane 0/plane 1/ etc. since the hw plane names start from 1
    Don't break dst colorkey on pre-SKL sprites (hunk ended in the
    wrong patch)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180529182804.8571-1-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com> #v1
drivers/gpu/drm/i915/intel_sprite.c