brcm2708: update linux 4.4 patches to latest version
[openwrt/openwrt.git] / target / linux / brcm2708 / patches-4.4 / 0502-drm-vc4-Allow-some-more-signals-to-be-packed-with-un.patch
1 From 5c0d836a77af123123d7a4144d5069c2d675a23d Mon Sep 17 00:00:00 2001
2 From: Eric Anholt <eric@anholt.net>
3 Date: Tue, 30 Aug 2016 13:57:38 -0700
4 Subject: [PATCH] drm/vc4: Allow some more signals to be packed with uniform
5 resets.
6
7 The intent was to make sure people don't sneak in a small immediate or
8 something to change the interpretation of the uniform update args, but
9 these signals are just fine.
10
11 Fixes a validation failure in the current X server on some Render
12 operation.
13
14 Signed-off-by: Eric Anholt <eric@anholt.net>
15 (cherry picked from commit 313a61d30761217ce4383018de1cc0d5d503a376)
16 ---
17 drivers/gpu/drm/vc4/vc4_validate_shaders.c | 10 ++++++++--
18 1 file changed, 8 insertions(+), 2 deletions(-)
19
20 --- a/drivers/gpu/drm/vc4/vc4_validate_shaders.c
21 +++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c
22 @@ -309,8 +309,14 @@ validate_uniform_address_write(struct vc
23 * of uniforms on each side. However, this scheme is easy to
24 * validate so it's all we allow for now.
25 */
26 -
27 - if (QPU_GET_FIELD(inst, QPU_SIG) != QPU_SIG_NONE) {
28 + switch (QPU_GET_FIELD(inst, QPU_SIG)) {
29 + case QPU_SIG_NONE:
30 + case QPU_SIG_SCOREBOARD_UNLOCK:
31 + case QPU_SIG_COLOR_LOAD:
32 + case QPU_SIG_LOAD_TMU0:
33 + case QPU_SIG_LOAD_TMU1:
34 + break;
35 + default:
36 DRM_ERROR("uniforms address change must be "
37 "normal math\n");
38 return false;