diff mbox

drm/i915/renderstate: Sandybridge golden renderstate is b0rked

Message ID 20170807164842.26802-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Aug. 7, 2017, 4:48 p.m. UTC
In the null state batch, we try to load the CC_STATE_POINTERS, but pass
in a pointer to invalid state for the color-calc and depth-stencil
state. In the rendercopy batch this was imported from, the 1024 offset
used is known to be 64bytes of zeroes. Tweaking the
gen6_null_state_batch to point those two offset at known zeroes however
was not sufficient.

The effect of loading depth-stencil and color-calc causes the golden
renderstate batch to take 10s (yes, ten seconds) on my snb gt1 (i5-2500).

It would be nice if we could drop this incomplete "golden render state"
entirely.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_renderstate_gen6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Mika Kuoppala Aug. 8, 2017, 1:13 p.m. UTC | #1
Chris Wilson <chris@chris-wilson.co.uk> writes:

> In the null state batch, we try to load the CC_STATE_POINTERS, but pass
> in a pointer to invalid state for the color-calc and depth-stencil
> state. In the rendercopy batch this was imported from, the 1024 offset
> used is known to be 64bytes of zeroes. Tweaking the
> gen6_null_state_batch to point those two offset at known zeroes however
> was not sufficient.
>
> The effect of loading depth-stencil and color-calc causes the golden
> renderstate batch to take 10s (yes, ten seconds) on my snb gt1 (i5-2500).
>
> It would be nice if we could drop this incomplete "golden render state"
> entirely.
>

Agreed. But until then, lets do changes through igt/tools/null_state_gen.
Patch posted.
-Mika

> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_renderstate_gen6.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_renderstate_gen6.c b/drivers/gpu/drm/i915/intel_renderstate_gen6.c
> index 11c8e7b3dd7c..46cfc405ca30 100644
> --- a/drivers/gpu/drm/i915/intel_renderstate_gen6.c
> +++ b/drivers/gpu/drm/i915/intel_renderstate_gen6.c
> @@ -107,8 +107,8 @@ static const u32 gen6_null_state_batch[] = {
>  	0x00000000,
>  	0x780e0002,
>  	0x00000441,
> -	0x00000401,
> -	0x00000401,
> +	0x00000400,
> +	0x00000400,
>  	0x78021002,
>  	0x00000000,
>  	0x00000000,
> -- 
> 2.13.3
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_renderstate_gen6.c b/drivers/gpu/drm/i915/intel_renderstate_gen6.c
index 11c8e7b3dd7c..46cfc405ca30 100644
--- a/drivers/gpu/drm/i915/intel_renderstate_gen6.c
+++ b/drivers/gpu/drm/i915/intel_renderstate_gen6.c
@@ -107,8 +107,8 @@  static const u32 gen6_null_state_batch[] = {
 	0x00000000,
 	0x780e0002,
 	0x00000441,
-	0x00000401,
-	0x00000401,
+	0x00000400,
+	0x00000400,
 	0x78021002,
 	0x00000000,
 	0x00000000,