freedreno/a6xx: fix issues with gallium HUD
authorRob Clark <robdclark@chromium.org>
Thu, 6 Jun 2019 16:45:25 +0000 (09:45 -0700)
committerRob Clark <robdclark@chromium.org>
Fri, 7 Jun 2019 19:07:29 +0000 (12:07 -0700)
In some cases the draw for the text wasn't working.  This seems to be
fixed by resyncing some of the "golded registers" from blob (initial
values were based on somewhat older blob version).

Perhaps good to have a bit of soak time on master, but would be good
to eventually land in 19.x stable branches.

Cc: mesa-stable@lists.freedesktop.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/gallium/drivers/freedreno/a6xx/fd6_emit.c

index 846cd4f141e3f895a8a3c61d7afc77979d41009f..a48fc11721f953e60268b37abe19a25865a9f1cb 100644 (file)
@@ -1155,14 +1155,14 @@ t7              opcode: CP_WAIT_FOR_IDLE (26) (1 dwords)
 
        WRITE(REG_A6XX_VPC_UNKNOWN_9600, 0);
        WRITE(REG_A6XX_GRAS_UNKNOWN_8600, 0x880);
-       WRITE(REG_A6XX_HLSQ_UNKNOWN_BE04, 0);
-       WRITE(REG_A6XX_SP_UNKNOWN_AE03, 0x00000410);
+       WRITE(REG_A6XX_HLSQ_UNKNOWN_BE04, 0x80000);
+       WRITE(REG_A6XX_SP_UNKNOWN_AE03, 0x1430);
        WRITE(REG_A6XX_SP_IBO_COUNT, 0);
        WRITE(REG_A6XX_SP_UNKNOWN_B182, 0);
        WRITE(REG_A6XX_HLSQ_UNKNOWN_BB11, 0);
        WRITE(REG_A6XX_UCHE_UNKNOWN_0E12, 0x3200000);
        WRITE(REG_A6XX_UCHE_CLIENT_PF, 4);
-       WRITE(REG_A6XX_RB_UNKNOWN_8E01, 0x0);
+       WRITE(REG_A6XX_RB_UNKNOWN_8E01, 0x1);
        WRITE(REG_A6XX_SP_UNKNOWN_AB00, 0x5);
        WRITE(REG_A6XX_VFD_UNKNOWN_A009, 0x00000001);
        WRITE(REG_A6XX_RB_UNKNOWN_8811, 0x00000010);
@@ -1173,7 +1173,7 @@ t7              opcode: CP_WAIT_FOR_IDLE (26) (1 dwords)
 
        WRITE(REG_A6XX_GRAS_UNKNOWN_8101, 0);
        WRITE(REG_A6XX_GRAS_SAMPLE_CNTL, 0);
-       WRITE(REG_A6XX_GRAS_UNKNOWN_8110, 0);
+       WRITE(REG_A6XX_GRAS_UNKNOWN_8110, 0x2);
 
        WRITE(REG_A6XX_RB_RENDER_CONTROL0, 0x401);
        WRITE(REG_A6XX_RB_RENDER_CONTROL1, 0);
@@ -1219,7 +1219,10 @@ t7              opcode: CP_WAIT_FOR_IDLE (26) (1 dwords)
        WRITE(REG_A6XX_PC_UNKNOWN_9E72, 0);
        WRITE(REG_A6XX_VPC_UNKNOWN_9108, 0x3);
        WRITE(REG_A6XX_SP_TP_UNKNOWN_B304, 0);
-       WRITE(REG_A6XX_SP_TP_UNKNOWN_B309, 0x000000a2);
+       /* NOTE blob seems to (mostly?) use 0xb2 for SP_TP_UNKNOWN_B309
+        * but this seems to kill texture gather offsets.
+        */
+       WRITE(REG_A6XX_SP_TP_UNKNOWN_B309, 0xa2);
        WRITE(REG_A6XX_RB_UNKNOWN_8804, 0);
        WRITE(REG_A6XX_GRAS_UNKNOWN_80A4, 0);
        WRITE(REG_A6XX_GRAS_UNKNOWN_80A5, 0);