intel_stub: Claim to support I915_PARAM_HAS_CONTEXT_ISOLATION.

Submitted by Kenneth Graunke on July 26, 2018, 11:13 p.m.

Details

Message ID 20180726231340.6070-1-kenneth@whitecape.org
State New
Headers show
Series "intel_stub: Claim to support I915_PARAM_HAS_CONTEXT_ISOLATION." ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Kenneth Graunke July 26, 2018, 11:13 p.m.
Modern kernels support I915_PARAM_HAS_CONTEXT_ISOLATION, which allows
us to whack certain context registers with impunity.  One of those is
INSTPM/CS_DEBUG_MODE2, which controls whether Constant Buffer 0 is
relative to dynamic state base address, or a general GPU address.
If it's relative (the default), we can only push 3 ranges of UBOs.
If it's absolute, we can push 4.  So this affects our shader output.

Follow the behavior of modern kernels and allow us to push all 4 ranges.
---
 intel_stub.c | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/intel_stub.c b/intel_stub.c
index a3316b1..8b8db64 100644
--- a/intel_stub.c
+++ b/intel_stub.c
@@ -262,6 +262,7 @@  ioctl(int fd, unsigned long request, ...)
                         case I915_PARAM_HAS_RELAXED_DELTA:
                         case I915_PARAM_HAS_WAIT_TIMEOUT:
                         case I915_PARAM_HAS_EXEC_NO_RELOC:
+                        case I915_PARAM_HAS_CONTEXT_ISOLATION:
                                 *getparam->value = 1;
                                 break;
                         case I915_PARAM_CHIPSET_ID:

Comments

This fixes the problem I was seeing where intel_run and run produced
different results.  Thanks!

Tested-by: Ian Romanick <ian.d.romanick@intel.com>

On 07/26/2018 04:13 PM, Kenneth Graunke wrote:
> Modern kernels support I915_PARAM_HAS_CONTEXT_ISOLATION, which allows
> us to whack certain context registers with impunity.  One of those is
> INSTPM/CS_DEBUG_MODE2, which controls whether Constant Buffer 0 is
> relative to dynamic state base address, or a general GPU address.
> If it's relative (the default), we can only push 3 ranges of UBOs.
> If it's absolute, we can push 4.  So this affects our shader output.
> 
> Follow the behavior of modern kernels and allow us to push all 4 ranges.
> ---
>  intel_stub.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/intel_stub.c b/intel_stub.c
> index a3316b1..8b8db64 100644
> --- a/intel_stub.c
> +++ b/intel_stub.c
> @@ -262,6 +262,7 @@ ioctl(int fd, unsigned long request, ...)
>                          case I915_PARAM_HAS_RELAXED_DELTA:
>                          case I915_PARAM_HAS_WAIT_TIMEOUT:
>                          case I915_PARAM_HAS_EXEC_NO_RELOC:
> +                        case I915_PARAM_HAS_CONTEXT_ISOLATION:
>                                  *getparam->value = 1;
>                                  break;
>                          case I915_PARAM_CHIPSET_ID:
>