]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-5.1/drm-i915-fix-per-pixel-alpha-with-ccs.patch
move all the pending queues back to their "real" places
[thirdparty/kernel/stable-queue.git] / queue-5.1 / drm-i915-fix-per-pixel-alpha-with-ccs.patch
CommitLineData
1085140b
GKH
1From 77ce94dbe586c1a6a26cf021c08109c9ce71b3e0 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com>
3Date: Mon, 3 Jun 2019 17:25:00 +0300
4Subject: drm/i915: Fix per-pixel alpha with CCS
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9From: Ville Syrjälä <ville.syrjala@linux.intel.com>
10
11commit 77ce94dbe586c1a6a26cf021c08109c9ce71b3e0 upstream.
12
13We forgot to set .has_alpha=true for the A+CCS formats when the code
14started to consult .has_alpha. This manifests as A+CCS being treated
15as X+CCS which means no per-pixel alpha blending. Fix the format
16list appropriately.
17
18Cc: stable@vger.kernel.org
19Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
20Cc: Matt Roper <matthew.d.roper@intel.com>
21Cc: Heinrich Fink <heinrich.fink@daqri.com>
22Reported-by: Heinrich Fink <heinrich.fink@daqri.com>
23Tested-by: Heinrich Fink <heinrich.fink@daqri.com>
24Fixes: b20815255693 ("drm/i915: Add plane alpha blending support, v2.")
25Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
26Link: https://patchwork.freedesktop.org/patch/msgid/20190603142500.25680-1-ville.syrjala@linux.intel.com
27Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
28(cherry picked from commit 38f300410f3e15b6fec76c8d8baed7111b5ea4e4)
29Signed-off-by: Jani Nikula <jani.nikula@intel.com>
30Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
31
32---
33 drivers/gpu/drm/i915/intel_display.c | 12 ++++++++----
34 1 file changed, 8 insertions(+), 4 deletions(-)
35
36--- a/drivers/gpu/drm/i915/intel_display.c
37+++ b/drivers/gpu/drm/i915/intel_display.c
38@@ -2444,10 +2444,14 @@ static unsigned int intel_fb_modifier_to
39 * main surface.
40 */
41 static const struct drm_format_info ccs_formats[] = {
42- { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
43- { .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
44- { .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
45- { .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
46+ { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 2,
47+ .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
48+ { .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 2,
49+ .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, },
50+ { .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 2,
51+ .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, .has_alpha = true, },
52+ { .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 2,
53+ .cpp = { 4, 1, }, .hsub = 8, .vsub = 16, .has_alpha = true, },
54 };
55
56 static const struct drm_format_info *