drm/etnaviv: update hardware headers from rnndb
Subsystems (2)
Christian Gmeiner
reviewerPATCH 1/2 drm/etnaviv: update hardware headers from rnndb
Update the state HI and common header from rnndb commit a04283591a8a (rnndb: update MMU exception causes).
--- drivers/gpu/drm/etnaviv/state.xml.h | 37 +- drivers/gpu/drm/etnaviv/state_3d.xml.h | 1849 ++++++++++++++++++++++- drivers/gpu/drm/etnaviv/state_blt.xml.h | 277 +++- drivers/gpu/drm/etnaviv/state_hi.xml.h | 25 +- 4 files changed, 2150 insertions(+), 38 deletions(-)
drivers/gpu/drm/etnaviv/state.xml.h +24 -13
@@ -8,17 +8,17 @@ This file was generated by the rules-ng-ng headergen tool in this git repository git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: -- state.xml ( 26087 bytes, from 2017-12-18 16:51:59) -- common.xml ( 35468 bytes, from 2018-01-22 13:48:54) -- common_3d.xml ( 14615 bytes, from 2017-12-18 16:51:59) -- state_hi.xml ( 30232 bytes, from 2018-02-15 15:48:01) -- copyright.xml ( 1597 bytes, from 2016-12-08 16:37:56) -- state_2d.xml ( 51552 bytes, from 2016-12-08 16:37:56) -- state_3d.xml ( 79992 bytes, from 2017-12-18 16:51:59) -- state_blt.xml ( 13405 bytes, from 2017-12-18 16:51:59) -- state_vg.xml ( 5975 bytes, from 2016-12-08 16:37:56) - -Copyright (C) 2012-2017 by the following authors: +- state.xml ( 26666 bytes, from 2019-08-13 11:26:49) +- common.xml ( 35468 bytes, from 2018-02-10 13:09:26) +- common_3d.xml ( 14322 bytes, from 2019-08-20 20:31:50) +- state_hi.xml ( 30396 bytes, from 2019-08-20 20:34:03) +- copyright.xml ( 1597 bytes, from 2018-02-10 13:09:26) +- state_2d.xml ( 51552 bytes, from 2018-02-10 13:09:26) +- state_3d.xml ( 83505 bytes, from 2019-09-06 09:32:54) +- state_blt.xml ( 14252 bytes, from 2019-08-13 20:00:42) +- state_vg.xml ( 5975 bytes, from 2018-02-10 13:09:26) + +Copyright (C) 2012-2019 by the following authors: - Wladimir J. van der Laan <[email protected]> - Christian Gmeiner <[email protected]> - Lucas Stach <[email protected]>
@@ -55,6 +55,8 @@ DEALINGS IN THE SOFTWARE.#define FE_DATA_TYPE_UNSIGNED_SHORT 0x00000003#define FE_DATA_TYPE_INT 0x00000004#define FE_DATA_TYPE_UNSIGNED_INT 0x00000005 +#define FE_DATA_TYPE_INT_2_10_10_10_REV 0x00000006 +#define FE_DATA_TYPE_UNSIGNED_INT_2_10_10_10_REV 0x00000007#define FE_DATA_TYPE_FLOAT 0x00000008#define FE_DATA_TYPE_HALF_FLOAT 0x00000009#define FE_DATA_TYPE_FIXED 0x0000000b
@@ -89,6 +91,7 @@ DEALINGS IN THE SOFTWARE.#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE__MASK 0x0000c000#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE__SHIFT 14#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_OFF 0x00000000 +#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_SIGN_EXTEND 0x00004000#define VIVS_FE_VERTEX_ELEMENT_CONFIG_NORMALIZE_ON 0x00008000#define VIVS_FE_VERTEX_ELEMENT_CONFIG_START__MASK 0x00ff0000#define VIVS_FE_VERTEX_ELEMENT_CONFIG_START__SHIFT 16
@@ -209,7 +212,15 @@ DEALINGS IN THE SOFTWARE.#define VIVS_FE_GENERIC_ATTRIB_SCALE (i0) (0x00000780 + 0x4*(i0)) -#define VIVS_FE_HALTI5_UNK007C4 0x000007c4 +#define VIVS_FE_HALTI5_ID_CONFIG 0x000007c4 +#define VIVS_FE_HALTI5_ID_CONFIG_VERTEX_ID_ENABLE 0x00000001 +#define VIVS_FE_HALTI5_ID_CONFIG_INSTANCE_ID_ENABLE 0x00000002 +#define VIVS_FE_HALTI5_ID_CONFIG_VERTEX_ID_REG__MASK 0x0000ff00 +#define VIVS_FE_HALTI5_ID_CONFIG_VERTEX_ID_REG__SHIFT 8 +#define VIVS_FE_HALTI5_ID_CONFIG_VERTEX_ID_REG (x) (((x) << VIVS_FE_HALTI5_ID_CONFIG_VERTEX_ID_REG__SHIFT) & VIVS_FE_HALTI5_ID_CONFIG_VERTEX_ID_REG__MASK) +#define VIVS_FE_HALTI5_ID_CONFIG_INSTANCE_ID_REG__MASK 0x00ff0000 +#define VIVS_FE_HALTI5_ID_CONFIG_INSTANCE_ID_REG__SHIFT 16 +#define VIVS_FE_HALTI5_ID_CONFIG_INSTANCE_ID_REG (x) (((x) << VIVS_FE_HALTI5_ID_CONFIG_INSTANCE_ID_REG__SHIFT) & VIVS_FE_HALTI5_ID_CONFIG_INSTANCE_ID_REG__MASK)#define VIVS_FE_HALTI5_UNK007D0 (i0) (0x000007d0 + 0x4*(i0))#define VIVS_FE_HALTI5_UNK007D0__ESIZE 0x00000004
@@ -451,7 +462,7 @@ DEALINGS IN THE SOFTWARE.#define VIVS_NFE_VERTEX_STREAMS_CONTROL (i0) (0x00014640 + 0x4*(i0)) -#define VIVS_NFE_VERTEX_STREAMS_UNK14680 (i0) (0x00014680 + 0x4*(i0)) +#define VIVS_NFE_VERTEX_STREAMS_VERTEX_DIVISOR (i0) (0x00014680 + 0x4*(i0))#define VIVS_NFE_VERTEX_STREAMS_ROBUSTNESS_UNK146C0 (i0) (0x000146c0 + 0x4*(i0))
drivers/gpu/drm/etnaviv/state_3d.xml.h +1847 -2
1,862 lines not on this page · raw message
drivers/gpu/drm/etnaviv/state_blt.xml.h +265 -12
291 lines not on this page · raw message
drivers/gpu/drm/etnaviv/state_hi.xml.h +14 -11
@@ -8,17 +8,17 @@ This file was generated by the rules-ng-ng headergen tool in this git repository git clone git://0x04.net/rules-ng-ng The rules-ng-ng source files this header was generated from are: -- state.xml ( 26087 bytes, from 2017-12-18 16:51:59) -- common.xml ( 35468 bytes, from 2018-01-22 13:48:54) -- common_3d.xml ( 14615 bytes, from 2017-12-18 16:51:59) -- state_hi.xml ( 30232 bytes, from 2018-02-15 15:48:01) -- copyright.xml ( 1597 bytes, from 2016-12-08 16:37:56) -- state_2d.xml ( 51552 bytes, from 2016-12-08 16:37:56) -- state_3d.xml ( 79992 bytes, from 2017-12-18 16:51:59) -- state_blt.xml ( 13405 bytes, from 2017-12-18 16:51:59) -- state_vg.xml ( 5975 bytes, from 2016-12-08 16:37:56) - -Copyright (C) 2012-2018 by the following authors: +- state.xml ( 26666 bytes, from 2019-08-13 11:26:49) +- common.xml ( 35468 bytes, from 2018-02-10 13:09:26) +- common_3d.xml ( 14322 bytes, from 2019-08-20 20:31:50) +- state_hi.xml ( 30396 bytes, from 2019-08-20 20:34:03) +- copyright.xml ( 1597 bytes, from 2018-02-10 13:09:26) +- state_2d.xml ( 51552 bytes, from 2018-02-10 13:09:26) +- state_3d.xml ( 83505 bytes, from 2019-09-06 09:32:54) +- state_blt.xml ( 14252 bytes, from 2019-08-13 20:00:42) +- state_vg.xml ( 5975 bytes, from 2018-02-10 13:09:26) + +Copyright (C) 2012-2019 by the following authors: - Wladimir J. van der Laan <[email protected]> - Christian Gmeiner <[email protected]> - Lucas Stach <[email protected]>
@@ -48,6 +48,9 @@ DEALINGS IN THE SOFTWARE.#define MMU_EXCEPTION_SLAVE_NOT_PRESENT 0x00000001#define MMU_EXCEPTION_PAGE_NOT_PRESENT 0x00000002#define MMU_EXCEPTION_WRITE_VIOLATION 0x00000003 +#define MMU_EXCEPTION_OUT_OF_BOUND 0x00000004 +#define MMU_EXCEPTION_READ_SECURITY_VIOLATION 0x00000005 +#define MMU_EXCEPTION_WRITE_SECURITY_VIOLATION 0x00000006#define VIVS_HI 0x00000000#define VIVS_HI_CLOCK_CONTROL 0x00000000
Signature · 6 lines
2.21.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Christian Gmeiner
reviewerPATCH 2/2 drm/etnaviv: print MMU exception cause
Might be useful when debugging MMU exceptions.
--- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +26 -0
@@ -1364,10 +1364,36 @@ static void dump_mmu_fault(struct etnaviv_gpu *gpu)for (i =0 ; i <4 ; i++) {u32 address_reg; +const char *error;if (!(status & (VIVS_MMUv2_STATUS_EXCEPTION0__MASK << (i *4 ))))continue ; +switch (status) { +case MMU_EXCEPTION_SLAVE_NOT_PRESENT : + error ="slave not present" ; +break ; +case MMU_EXCEPTION_PAGE_NOT_PRESENT : + error ="page not present" ; +break ; +case MMU_EXCEPTION_WRITE_VIOLATION : + error ="write violation" ; +break ; +case MMU_EXCEPTION_OUT_OF_BOUND : + error ="out of bound" ; +break ; +case MMU_EXCEPTION_READ_SECURITY_VIOLATION : + error ="read security violation" ; +break ; +case MMU_EXCEPTION_WRITE_SECURITY_VIOLATION : + error ="write security violation" ; +break ; +default : + error ="unknown state" ; +break ; + } +dev_err_ratelimited (gpu->dev,"MMU %d %s\n" , i, error); +if (gpu->sec_mode ==ETNA_SEC_NONE ) address_reg =VIVS_MMUv2_EXCEPTION_ADDR (i);else
Signature · 6 lines
2.21.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lucas Stach
maintainerRe: [PATCH 2/2] drm/etnaviv: print MMU exception cause
Quoted 37 lines · Christian Gmeiner
Might be useful when debugging MMU exceptions.
Signed-off-by Christian Gmeiner <[email protected]>--- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)drivers/gpu/drm/etnaviv/etnaviv_gpu.c +14
-0@@ -1364,10 +1364,36 @@ static void dump_mmu_fault(struct etnaviv_gpu *gpu)for (i =0 ; i <4 ; i++) {u32 address_reg; +const char *error;if (!(status & (VIVS_MMUv2_STATUS_EXCEPTION0__MASK << (i *4 ))))continue ; +switch (status) { +case MMU_EXCEPTION_SLAVE_NOT_PRESENT : + error ="slave not present" ; +break ; +case MMU_EXCEPTION_PAGE_NOT_PRESENT : + error ="page not present" ; +break ; +case MMU_EXCEPTION_WRITE_VIOLATION : + error ="write violation" ; +break ; +case MMU_EXCEPTION_OUT_OF_BOUND : + error ="out of bound" ; +break ;
drivers/gpu/drm/etnaviv/etnaviv_gpu.c static void dump_mmu_fault(struct etnaviv_gpu · line 1396
Quoted 10 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +10
-0+case MMU_EXCEPTION_READ_SECURITY_VIOLATION : + error ="read security violation" ; +break ; +case MMU_EXCEPTION_WRITE_SECURITY_VIOLATION : + error ="write security violation" ; +break ; +default : + error ="unknown state" ; +break ; + }
As the exception status is a nice contiguous set of bits, I think this could be simplified into a static array of strings. The error message could then just use the bit position to index into the array.
Regards,
Lucas
drivers/gpu/drm/etnaviv/etnaviv_gpu.c static void dump_mmu_fault(struct etnaviv_gpu *gpu) · line 1399
Quoted 5 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +2
-0+dev_err_ratelimited (gpu->dev,"MMU %d %s\n" , i, error); +if (gpu->sec_mode ==ETNA_SEC_NONE )drivers/gpu/drm/etnaviv/etnaviv_gpu.c +0
-0address_reg =VIVS_MMUv2_EXCEPTION_ADDR (i); else
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Christian Gmeiner
reviewerRe: [PATCH 2/2] drm/etnaviv: print MMU exception cause
Am Fr., 6. Sept. 2019 um 12:55 Uhr schrieb Lucas Stach <[email protected]>:
Quoted 45 lines · Christian Gmeiner
Quoted 43 lines
Might be useful when debugging MMU exceptions.
Signed-off-by Christian Gmeiner <[email protected]>--- drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+)drivers/gpu/drm/etnaviv/etnaviv_gpu.c +20
-0@@ -1364,10 +1364,36 @@ static void dump_mmu_fault(struct etnaviv_gpu *gpu)for (i =0 ; i <4 ; i++) {u32 address_reg; +const char *error;if (!(status & (VIVS_MMUv2_STATUS_EXCEPTION0__MASK << (i *4 ))))continue ; +switch (status) { +case MMU_EXCEPTION_SLAVE_NOT_PRESENT : + error ="slave not present" ; +break ; +case MMU_EXCEPTION_PAGE_NOT_PRESENT : + error ="page not present" ; +break ; +case MMU_EXCEPTION_WRITE_VIOLATION : + error ="write violation" ; +break ; +case MMU_EXCEPTION_OUT_OF_BOUND : + error ="out of bound" ; +break ; +case MMU_EXCEPTION_READ_SECURITY_VIOLATION : + error ="read security violation" ; +break ; +case MMU_EXCEPTION_WRITE_SECURITY_VIOLATION : + error ="write security violation" ; +break ;
Quoted 9 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c static void dump_mmu_fault(struct etnaviv_gpu *gpu) · line 1394
Quoted 4 lines
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +4
-0+default : + error ="unknown state" ; +break ; + }As the exception status is a nice contiguous set of bits, I think this could be simplified into a static array of strings. The error message could then just use the bit position to index into the array.
I like the idea .. will be done in V2. Thanks for your quick review!
Signature · 9 lines
greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lucas Stach
maintainerQuoted 7 lines · Christian Gmeiner
Update the state HI and common header from rnndb commit
a04283591a8a(rnndb: update MMU exception causes).Signed-off-by Christian Gmeiner <[email protected]>--- drivers/gpu/drm/etnaviv/state.xml.h | 37 +- drivers/gpu/drm/etnaviv/state_3d.xml.h | 1849 ++++++++++++++++++++++-
I'm not a fan of pulling in the complete state_3d header. Only a very limited subset of those states are used in the kernel and the rest of this massive state set is pure noise from a kernel PoV.
Regards,
Lucas
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Christian Gmeiner
reviewerAm Fr., 6. Sept. 2019 um 12:11 Uhr schrieb Lucas Stach <[email protected]>:
Quoted 14 lines · Christian Gmeiner
Quoted 7 lines
Update the state HI and common header from rnndb commit
a04283591a8a(rnndb: update MMU exception causes).Signed-off-by Christian Gmeiner <[email protected]>--- drivers/gpu/drm/etnaviv/state.xml.h | 37 +- drivers/gpu/drm/etnaviv/state_3d.xml.h | 1849 ++++++++++++++++++++++-I'm not a fan of pulling in the complete
state_3dheader. Only a very limited subset of those states are used in the kernel and the rest of this massive state set is pure noise from a kernel PoV.
What if I just update state_hi.xml.h and leave the others untouched? Would that work for you?
Signature · 9 lines
greets -- Christian Gmeiner, MSc https://christian-gmeiner.info/privacypolicy _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Lucas Stach
maintainerQuoted 10 lines · Christian Gmeiner
Am Fr., 6. Sept. 2019 um 12:11 Uhr schrieb Lucas Stach <[email protected]>:
Quoted 9 lines · Christian Gmeiner
Quoted 7 lines
Update the state HI and common header from rnndb commit
a04283591a8a(rnndb: update MMU exception causes).Signed-off-by Christian Gmeiner <[email protected]>--- drivers/gpu/drm/etnaviv/state.xml.h | 37 +- drivers/gpu/drm/etnaviv/state_3d.xml.h | 1849 ++++++++++++++++++++++-
Quoted 7 lines
Quoted 4 lines
I'm not a fan of pulling in the complete
state_3dheader. Only a very limited subset of those states are used in the kernel and the rest of this massive state set is pure noise from a kernel PoV.What if I just update
state_hi.xml.hand leave the others untouched? Would that work for you?
I don't really care about the other HW headers, as the signal/noise ratio is generally much better than the 3D states.
So both updating all header except the state_3d or just updating state_hi works for me. That's up to your preference. :) I just want to avoid pulling in all the state_3d noise.
Regards,
Lucas
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel