drm/i915: Add more registers to the whitelist for mesa
Subsystems (2)
PATCH 1/1 drm/i915: Add more registers to the whitelist for mesa
From: Brad Volkin <[email protected]>
These are additional registers needed for performance monitoring and ARB_draw_indirect extensions in mesa.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76719
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 9 +++++++++ drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++ 2 files changed, 17 insertions(+)
drivers/gpu/drm/i915/i915_cmd_parser.c +9 -0
@@ -408,10 +408,19 @@ static const u32 gen7_render_regs[] = {REG64 (PS_INVOCATION_COUNT ),REG64 (PS_DEPTH_COUNT ),OACONTROL ,/* Only allowed for LRI and SRM. See below. */ +GEN7_3DPRIM_START_VERTEX , +GEN7_3DPRIM_VERTEX_COUNT , +GEN7_3DPRIM_INSTANCE_COUNT , +GEN7_3DPRIM_START_INSTANCE , +GEN7_3DPRIM_BASE_VERTEX ,REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (0 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (1 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (2 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (3 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (0 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (1 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (2 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (3 )),GEN7_SO_WRITE_OFFSET (0 ),GEN7_SO_WRITE_OFFSET (1 ), GEN7_SO_WRITE_OFFSET(2),
drivers/gpu/drm/i915/i915_reg.h +8 -0
@@ -427,6 +427,14 @@/* There are the 4 64-bit counter registers, one for each stream output */ #define GEN7_SO_NUM_PRIMS_WRITTEN (n) (0x5200 + (n) * 8) +#define GEN7_SO_PRIM_STORAGE_NEEDED (n) (0x5240 + (n) * 8) + +#define GEN7_3DPRIM_START_VERTEX 0x2430 +#define GEN7_3DPRIM_VERTEX_COUNT 0x2434 +#define GEN7_3DPRIM_INSTANCE_COUNT 0x2438 +#define GEN7_3DPRIM_START_INSTANCE 0x243C +#define GEN7_3DPRIM_BASE_VERTEX 0x2440 +#define OACONTROL 0x2360#define _GEN7_PIPEA_DE_LOAD_SL 0x70068
Signature · 1 line
1.8.3.2
Quoted 8 lines · On Tue, Apr 08, 2014 at 02:18:58PM -0700, [email protected] wrote:
From: Brad Volkin <[email protected]>
These are additional registers needed for performance monitoring and
ARB_draw_indirectextensions in mesa.Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76719
Cc Kenneth Graunke <[email protected]>Signed-off-by Brad Volkin <[email protected]>
Queued for -next, thanks for the patch. Ken, can you pls take a look to make sure that this is indeed what mesa wants? I've read around in the mesa code and Brad's patch looks sane, but I definitely lack experience in this area.
Thanks, Daniel
Quoted 55 lines
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 9 +++++++++ drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++ 2 files changed, 17 insertions(+)drivers/gpu/drm/i915/i915_cmd_parser.c +9
-0@@ -408,10 +408,19 @@ static const u32 gen7_render_regs[] = {REG64 (PS_INVOCATION_COUNT ),REG64 (PS_DEPTH_COUNT ),OACONTROL ,/* Only allowed for LRI and SRM. See below. */ +GEN7_3DPRIM_START_VERTEX , +GEN7_3DPRIM_VERTEX_COUNT , +GEN7_3DPRIM_INSTANCE_COUNT , +GEN7_3DPRIM_START_INSTANCE , +GEN7_3DPRIM_BASE_VERTEX ,REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (0 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (1 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (2 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (3 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (0 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (1 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (2 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (3 )),GEN7_SO_WRITE_OFFSET (0 ),GEN7_SO_WRITE_OFFSET (1 ), GEN7_SO_WRITE_OFFSET(2),drivers/gpu/drm/i915/i915_reg.h +8
-0@@ -427,6 +427,14 @@/* There are the 4 64-bit counter registers, one for each stream output */ #define GEN7_SO_NUM_PRIMS_WRITTEN (n) (0x5200 + (n) * 8) +#define GEN7_SO_PRIM_STORAGE_NEEDED (n) (0x5240 + (n) * 8) + +#define GEN7_3DPRIM_START_VERTEX 0x2430 +#define GEN7_3DPRIM_VERTEX_COUNT 0x2434 +#define GEN7_3DPRIM_INSTANCE_COUNT 0x2438 +#define GEN7_3DPRIM_START_INSTANCE 0x243C +#define GEN7_3DPRIM_BASE_VERTEX 0x2440 +#define OACONTROL 0x2360#define _GEN7_PIPEA_DE_LOAD_SL 0x70068Signature · 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 4 lines · On 04/08/2014 02:18 PM, [email protected] wrote:
From: Brad Volkin <[email protected]>
These are additional registers needed for performance monitoring and
ARB_draw_indirectextensions in mesa.
Whoops...I totally missed this. Thanks!
Quoted 13 lines
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76719
Cc Kenneth Graunke <[email protected]>Signed-off-by Brad Volkin <[email protected]>--- drivers/gpu/drm/i915/i915_cmd_parser.c | 9 +++++++++ drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++ 2 files changed, 17 insertions(+)drivers/gpu/drm/i915/i915_cmd_parser.c +0
-0
drivers/gpu/drm/i915/i915_cmd_parser.c static const u32 gen7_render_regs[] = { · line 410
Quoted 3 lines
drivers/gpu/drm/i915/i915_cmd_parser.c +0
-0@@ -408,10 +408,19 @@ static const u32 gen7_render_regs[] = {REG64 (PS_INVOCATION_COUNT ),REG64 (PS_DEPTH_COUNT ), OACONTROL, /* Only allowed for LRI and SRM. See below. */
It would be great to add:
GEN7_3DPRIM_END_OFFSET,
which is the other ARB_draw_indirect register. I have no idea why we don't use it - sure seems like we should...
drivers/gpu/drm/i915/i915_cmd_parser.c static const u32 gen7_render_regs[] = { · line 423
Quoted 13 lines
drivers/gpu/drm/i915/i915_cmd_parser.c +9
-0+GEN7_3DPRIM_START_VERTEX , +GEN7_3DPRIM_VERTEX_COUNT , +GEN7_3DPRIM_INSTANCE_COUNT , +GEN7_3DPRIM_START_INSTANCE , +GEN7_3DPRIM_BASE_VERTEX ,REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (0 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (1 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (2 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (3 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (0 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (1 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (2 )), + REG64(GEN7_SO_PRIM_STORAGE_NEEDED(3)),
FWIW, I don't think we actually need to write these...we just read them.
Though, there's not much harm in it.
drivers/gpu/drm/i915/i915_reg.h line 431
Quoted 13 lines
drivers/gpu/drm/i915/i915_cmd_parser.c +0
-0GEN7_SO_WRITE_OFFSET (0 ),GEN7_SO_WRITE_OFFSET (1 ), GEN7_SO_WRITE_OFFSET(2),drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -427,6 +427,14 @@/* There are the 4 64-bit counter registers, one for each stream output */ #define GEN7_SO_NUM_PRIMS_WRITTEN (n) (0x5200 + (n) * 8) +#define GEN7_SO_PRIM_STORAGE_NEEDED (n) (0x5240 + (n) * 8) +
#define GEN7_3DPRIM_END_OFFSET 0x2420
drivers/gpu/drm/i915/i915_reg.h line 440
Quoted 9 lines
drivers/gpu/drm/i915/i915_reg.h +6
-0+#define GEN7_3DPRIM_START_VERTEX 0x2430 +#define GEN7_3DPRIM_VERTEX_COUNT 0x2434 +#define GEN7_3DPRIM_INSTANCE_COUNT 0x2438 +#define GEN7_3DPRIM_START_INSTANCE 0x243C +#define GEN7_3DPRIM_BASE_VERTEX 0x2440 +#define OACONTROL 0x2360#define _GEN7_PIPEA_DE_LOAD_SL 0x70068
With END_OFFSET added, this would get a:
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 73 lines · Kenneth Graunke
Quoted 4 lines · On 04/08/2014 02:18 PM, [email protected] wrote:
From: Brad Volkin <[email protected]>
These are additional registers needed for performance monitoring and
ARB_draw_indirectextensions in mesa.Whoops...I totally missed this. Thanks!
Quoted 13 lines
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76719
Cc Kenneth Graunke <[email protected]>Signed-off-by Brad Volkin <[email protected]>--- drivers/gpu/drm/i915/i915_cmd_parser.c | 9 +++++++++ drivers/gpu/drm/i915/i915_reg.h | 8 ++++++++ 2 files changed, 17 insertions(+)drivers/gpu/drm/i915/i915_cmd_parser.c +0
-0drivers/gpu/drm/i915/i915_cmd_parser.c static const u32 gen7_render_regs[] = { · line 410
Quoted 3 lines
drivers/gpu/drm/i915/i915_cmd_parser.c +0
-0@@ -408,10 +408,19 @@ static const u32 gen7_render_regs[] = {REG64 (PS_INVOCATION_COUNT ),REG64 (PS_DEPTH_COUNT ), OACONTROL, /* Only allowed for LRI and SRM. See below. */It would be great to add:
GEN7_3DPRIM_END_OFFSET,which is the other
ARB_draw_indirectregister. I have no idea why we don't use it - sure seems like we should...drivers/gpu/drm/i915/i915_cmd_parser.c static const u32 gen7_render_regs[] = { · line 423
Quoted 13 lines
drivers/gpu/drm/i915/i915_cmd_parser.c +9
-0+GEN7_3DPRIM_START_VERTEX , +GEN7_3DPRIM_VERTEX_COUNT , +GEN7_3DPRIM_INSTANCE_COUNT , +GEN7_3DPRIM_START_INSTANCE , +GEN7_3DPRIM_BASE_VERTEX ,REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (0 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (1 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (2 )),REG64 (GEN7_SO_NUM_PRIMS_WRITTEN (3 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (0 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (1 )), +REG64 (GEN7_SO_PRIM_STORAGE_NEEDED (2 )), + REG64(GEN7_SO_PRIM_STORAGE_NEEDED(3)),FWIW, I don't think we actually need to write these...we just read them.
Though, there's not much harm in it.drivers/gpu/drm/i915/i915_reg.h line 431
Quoted 13 lines
drivers/gpu/drm/i915/i915_cmd_parser.c +0
-0GEN7_SO_WRITE_OFFSET (0 ),GEN7_SO_WRITE_OFFSET (1 ), GEN7_SO_WRITE_OFFSET(2),drivers/gpu/drm/i915/i915_reg.h +2
-0@@ -427,6 +427,14 @@/* There are the 4 64-bit counter registers, one for each stream output */ #define GEN7_SO_NUM_PRIMS_WRITTEN (n) (0x5200 + (n) * 8) +#define GEN7_SO_PRIM_STORAGE_NEEDED (n) (0x5240 + (n) * 8) +#define
GEN7_3DPRIM_END_OFFSET0x2420Quoted 8 lines
drivers/gpu/drm/i915/i915_reg.h +6
-0+#define GEN7_3DPRIM_START_VERTEX 0x2430 +#define GEN7_3DPRIM_VERTEX_COUNT 0x2434 +#define GEN7_3DPRIM_INSTANCE_COUNT 0x2438 +#define GEN7_3DPRIM_START_INSTANCE 0x243C +#define GEN7_3DPRIM_BASE_VERTEX 0x2440 +#define OACONTROL 0x2360
Quoted 4 lines
drivers/gpu/drm/i915/i915_reg.h line 440
Quoted 1 line
drivers/gpu/drm/i915/i915_reg.h +0
-0#define _GEN7_PIPEA_DE_LOAD_SL 0x70068With
END_OFFSETadded, this would get a:Reviewed-by Kenneth Graunke <[email protected]>
Brad I've already pulled this in for my rebasing tree to unblock mesa testing. Feel free to either supply a fixup for me to squash in or a replacement patch, I can handle either.
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
PATCH 1/1 SQUASH: drm/i915: One more register for mesa
From: Brad Volkin <[email protected]>
Originally left out because it wasn't used. But it may be needed and doesn't pose any risk, so add to the whitelist.
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_cmd_parser.c +1 -0
@@ -408,6 +408,7 @@ static const u32 gen7_render_regs[] = {REG64 (PS_INVOCATION_COUNT ),REG64 (PS_DEPTH_COUNT ),OACONTROL ,/* Only allowed for LRI and SRM. See below. */ +GEN7_3DPRIM_END_OFFSET ,GEN7_3DPRIM_START_VERTEX ,GEN7_3DPRIM_VERTEX_COUNT , GEN7_3DPRIM_INSTANCE_COUNT,
drivers/gpu/drm/i915/i915_reg.h +1 -0
@@ -430,6 +430,7 @@#define GEN7_SO_PRIM_STORAGE_NEEDED (n) (0x5240 + (n) * 8) +#define GEN7_3DPRIM_END_OFFSET 0x2420#define GEN7_3DPRIM_START_VERTEX 0x2430#define GEN7_3DPRIM_VERTEX_COUNT 0x2434#define GEN7_3DPRIM_INSTANCE_COUNT 0x2438
Signature · 1 line
1.8.3.2
Re: [PATCH] SQUASH: drm/i915: One more register for mesa
Quoted 6 lines · On Wed, Apr 09, 2014 at 10:12:54AM -0700, [email protected] wrote:
From: Brad Volkin <[email protected]>
Originally left out because it wasn't used. But it may be needed and doesn't pose any risk, so add to the whitelist.
Signed-off-by Brad Volkin <[email protected]>
Fixup squashed in, thanks.
-Daniel
Quoted 36 lines
--- drivers/gpu/drm/i915/i915_cmd_parser.c | 1 + drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 2 insertions(+)drivers/gpu/drm/i915/i915_cmd_parser.c +1
-0@@ -408,6 +408,7 @@ static const u32 gen7_render_regs[] = {REG64 (PS_INVOCATION_COUNT ),REG64 (PS_DEPTH_COUNT ),OACONTROL ,/* Only allowed for LRI and SRM. See below. */ +GEN7_3DPRIM_END_OFFSET ,GEN7_3DPRIM_START_VERTEX ,GEN7_3DPRIM_VERTEX_COUNT , GEN7_3DPRIM_INSTANCE_COUNT,drivers/gpu/drm/i915/i915_reg.h +1
-0@@ -430,6 +430,7 @@#define GEN7_SO_PRIM_STORAGE_NEEDED (n) (0x5240 + (n) * 8) +#define GEN7_3DPRIM_END_OFFSET 0x2420#define GEN7_3DPRIM_START_VERTEX 0x2430#define GEN7_3DPRIM_VERTEX_COUNT 0x2434#define GEN7_3DPRIM_INSTANCE_COUNT 0x2438Signature · 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