drm/i915: Re-enable the command parser when using PPGTT
Subsystems (2)
PATCH 1/2 drm/i915: Re-enable the command parser when using PPGTT
From: Brad Volkin <[email protected]>
In commit
commit 896ab1a5d54269b463a24194c2e4a369103b46d8
Author: Daniel Vetter <[email protected]> Date: Wed Aug 6 15:04:51 2014 +0200
drm/i915: Fix up checks for aliasing ppgtt
it looks like we accidentally inverted the check that the command parser should only run when the driver enables some form of PPGTT.
Testcase: igt/gem_exec_parse
---
At this point all platforms that use the command parser should have at least aliasing PPGTT enabled I believe, so if you confirm then feel free to delete the comment about VLV and make this check stricter - maybe WARN_ON - when applying the patch.
drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_cmd_parser.c +1 -1
@@ -850,7 +850,7 @@ bool i915_needs_cmd_parser(struct intel_engine_cs *ring)* disabled. That will cause all of the parser's PPGTT checks to * fail. For now, disable parsing when PPGTT is off. */ -if (USES_PPGTT (ring->dev)) +if (!USES_PPGTT (ring->dev))return false;return (i915.enable_cmd_parser ==1 );
Signature · 1 line
1.8.3.2
PATCH 2/2 drm/i915: Log a message when rejecting LRM to OACONTROL
From: Brad Volkin <[email protected]>
The other paths in the command parser that reject a batch all log a message indicating the reason. We simply missed this one.
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_cmd_parser.c +3 -1
@@ -886,8 +886,10 @@ static bool check_cmd(const struct intel_engine_cs *ring,* OACONTROL writes to only MI_LOAD_REGISTER_IMM commands. */ if (reg_addr ==OACONTROL ) { -if (desc->cmd.value ==MI_LOAD_REGISTER_MEM ) +if (desc->cmd.value ==MI_LOAD_REGISTER_MEM ) { +DRM_DEBUG_DRIVER ("CMD: Rejected LRM to OACONTROL\n" );return false; + }if (desc->cmd.value ==MI_LOAD_REGISTER_IMM (1 )) *oacontrol_set = (cmd[2 ] !=0 );
Signature · 1 line
1.8.3.2
Re: [PATCH 2/2] drm/i915: Log a message when rejecting LRM to OACONTROL
Quoted 6 lines · On Thu, Sep 18, 2014 at 04:26:27PM -0700, [email protected] wrote:
From: Brad Volkin <[email protected]>
The other paths in the command parser that reject a batch all log a message indicating the reason. We simply missed this one.
Signed-off-by Brad Volkin <[email protected]>
Both patches merged to dinq, thanks.
-Daniel
Quoted 27 lines
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/gpu/drm/i915/i915_cmd_parser.c +3
-1@@ -886,8 +886,10 @@ static bool check_cmd(const struct intel_engine_cs *ring,* OACONTROL writes to only MI_LOAD_REGISTER_IMM commands. */ if (reg_addr ==OACONTROL ) { -if (desc->cmd.value ==MI_LOAD_REGISTER_MEM ) +if (desc->cmd.value ==MI_LOAD_REGISTER_MEM ) { +DRM_DEBUG_DRIVER ("CMD: Rejected LRM to OACONTROL\n" );return false; + }if (desc->cmd.value ==MI_LOAD_REGISTER_IMM (1 )) *oacontrol_set = (cmd[2 ] !=0 );Signature · 6 lines
1.8.3.2 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 8 lines · On Thu, Sep 18, 2014 at 04:26:26PM -0700, [email protected] wrote:
From: Brad Volkin <[email protected]>
In commit
commit
896ab1a5d54269b463a24194c2e4a369103b46d8Author: Daniel Vetter <[email protected]> Date: Wed Aug 6 15:04:51 2014 +0200
Quoted 8 lines
drm/i915: Fix up checks for aliasing ppgtt
it looks like we accidentally inverted the check that the command parser should only run when the driver enables some form of PPGTT.
Testcase: igt/gem_exec_parse
Cc Daniel Vetter <[email protected]>Signed-off-by Brad Volkin <[email protected]>
Ouch, thanks for spotting&fixing this.
Quoted 6 lines
---
At this point all platforms that use the command parser should have at least aliasing PPGTT enabled I believe, so if you confirm then feel free to delete the comment about VLV and make this check stricter - maybe
WARN_ON- when applying the patch.
Yeah, vlv now has ppgtt enabled (full ppgtt now even), except for some early pre-prod stuff where it's broken. So dropped the comment.
Unfortunately our QA still has a bunch of these vlv around, so we can't add a WARN_ON without totally upsetting them :( But I guess we should do that once we enable the cmd parser for real and tell them to get new machines.
-Daniel
Quoted 20 lines
drivers/gpu/drm/i915/i915_cmd_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/i915_cmd_parser.c +1
-1@@ -850,7 +850,7 @@ bool i915_needs_cmd_parser(struct intel_engine_cs *ring)* disabled. That will cause all of the parser's PPGTT checks to * fail. For now, disable parsing when PPGTT is off. */ -if (USES_PPGTT (ring->dev)) +if (!USES_PPGTT (ring->dev))return false;return (i915.enable_cmd_parser ==1 );Signature · 1 line
1.8.3.2
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch