0502-drm-vc4-Allow-some-more-signals-to-be-packed-with-un.patch 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. The intent was to make sure people don't sneak in a small immediate or
  7. something to change the interpretation of the uniform update args, but
  8. these signals are just fine.
  9. Fixes a validation failure in the current X server on some Render
  10. operation.
  11. Signed-off-by: Eric Anholt <eric@anholt.net>
  12. (cherry picked from commit 313a61d30761217ce4383018de1cc0d5d503a376)
  13. ---
  14. drivers/gpu/drm/vc4/vc4_validate_shaders.c | 10 ++++++++--
  15. 1 file changed, 8 insertions(+), 2 deletions(-)
  16. --- a/drivers/gpu/drm/vc4/vc4_validate_shaders.c
  17. +++ b/drivers/gpu/drm/vc4/vc4_validate_shaders.c
  18. @@ -309,8 +309,14 @@ validate_uniform_address_write(struct vc
  19. * of uniforms on each side. However, this scheme is easy to
  20. * validate so it's all we allow for now.
  21. */
  22. -
  23. - if (QPU_GET_FIELD(inst, QPU_SIG) != QPU_SIG_NONE) {
  24. + switch (QPU_GET_FIELD(inst, QPU_SIG)) {
  25. + case QPU_SIG_NONE:
  26. + case QPU_SIG_SCOREBOARD_UNLOCK:
  27. + case QPU_SIG_COLOR_LOAD:
  28. + case QPU_SIG_LOAD_TMU0:
  29. + case QPU_SIG_LOAD_TMU1:
  30. + break;
  31. + default:
  32. DRM_ERROR("uniforms address change must be "
  33. "normal math\n");
  34. return false;