]>
Commit | Line | Data |
---|---|---|
1085140b GKH |
1 | From 77ce94dbe586c1a6a26cf021c08109c9ce71b3e0 Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= <ville.syrjala@linux.intel.com> | |
3 | Date: Mon, 3 Jun 2019 17:25:00 +0300 | |
4 | Subject: drm/i915: Fix per-pixel alpha with CCS | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | From: Ville Syrjälä <ville.syrjala@linux.intel.com> | |
10 | ||
11 | commit 77ce94dbe586c1a6a26cf021c08109c9ce71b3e0 upstream. | |
12 | ||
13 | We forgot to set .has_alpha=true for the A+CCS formats when the code | |
14 | started to consult .has_alpha. This manifests as A+CCS being treated | |
15 | as X+CCS which means no per-pixel alpha blending. Fix the format | |
16 | list appropriately. | |
17 | ||
18 | Cc: stable@vger.kernel.org | |
19 | Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | |
20 | Cc: Matt Roper <matthew.d.roper@intel.com> | |
21 | Cc: Heinrich Fink <heinrich.fink@daqri.com> | |
22 | Reported-by: Heinrich Fink <heinrich.fink@daqri.com> | |
23 | Tested-by: Heinrich Fink <heinrich.fink@daqri.com> | |
24 | Fixes: b20815255693 ("drm/i915: Add plane alpha blending support, v2.") | |
25 | Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> | |
26 | Link: https://patchwork.freedesktop.org/patch/msgid/20190603142500.25680-1-ville.syrjala@linux.intel.com | |
27 | Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | |
28 | (cherry picked from commit 38f300410f3e15b6fec76c8d8baed7111b5ea4e4) | |
29 | Signed-off-by: Jani Nikula <jani.nikula@intel.com> | |
30 | Signed-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 * |