]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Add plane alpha blending support, v2.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 15 Aug 2018 10:34:05 +0000 (12:34 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 2 Oct 2018 10:48:16 +0000 (12:48 +0200)
commit1b626c2a934454e4e1c3cfe3eb1678cb9a782cc4
tree667d23143f64cbff74e12284a1a3e681e1ca5692
parentfaee0b6939f6612bb98535675dabcc804e1b3859
drm/i915: Add plane alpha blending support, v2.

Add plane alpha blending support with the different blend modes.
This has been tested on a icl to show the correct results,
on earlier platforms small rounding errors cause issues. But this
already happens case with fully transparant or fully opaque RGB8888
fb's.

The recommended HW workaround is to disable alpha blending when the
plane alpha is 0 (transparant, hide plane) or 0xff (opaque, disable blending).
This is easy to implement on any platform, so just do that.

The tests for userspace are also available, and pass on gen11.

Changes since v1:
- Change mistaken < 0xff0 to 0xff00.
- Only set PLANE_KEYMSK_ALPHA_ENABLE when plane alpha < 0xff00, ignore blend mode.
- Rework disabling FBC when per pixel alpha is used.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
[mlankhorst: Change MISSING_CASE default to explicit alpha disable (mattrope)]
Link: https://patchwork.freedesktop.org/patch/msgid/20180815103405.22679-1-maarten.lankhorst@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_fbc.c
drivers/gpu/drm/i915/intel_sprite.c