Mesa (master): lima: fix PP stream terminator size

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Jan 5 08:49:42 UTC 2020


Module: Mesa
Branch: master
Commit: c5ae64ebc716267f752fc530028791363148f25c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5ae64ebc716267f752fc530028791363148f25c

Author: Vasily Khoruzhick <anarsoul at gmail.com>
Date:   Wed Oct 16 19:20:25 2019 -0700

lima: fix PP stream terminator size

PP stream terminator size seems to be 4 words, it worked with full PP
stream because we align stream beginning to 32 bytes and BO is
initialized with zeroes. But with partial PP stream it sometimes break
if for new PP stream we reuse BO that has non-zero value at this place.

Reviewed-by: Qiang Yu <yuq825 at gmail.com>
Signed-off-by: Vasily Khoruzhick <anarsoul at gmail.com>

---

 src/gallium/drivers/lima/lima_draw.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/lima/lima_draw.c b/src/gallium/drivers/lima/lima_draw.c
index 72cd3f6cb35..5690aba3e3a 100644
--- a/src/gallium/drivers/lima/lima_draw.c
+++ b/src/gallium/drivers/lima/lima_draw.c
@@ -425,7 +425,7 @@ lima_get_pp_stream_size(int num_pp, int tiled_w, int tiled_h, uint32_t *off)
     *    extra size should be added to the preceeding stream
     * 2. alignment: each stream address should be 0x20 aligned
     */
-   int delta = tiled_w * tiled_h / num_pp * 16 + 8;
+   int delta = tiled_w * tiled_h / num_pp * 16 + 16;
    int remain = tiled_w * tiled_h % num_pp;
    int offset = 0;
 
@@ -519,6 +519,8 @@ lima_generate_pp_stream(struct lima_context *ctx, int off_x, int off_y,
    for (i = 0; i < num_pp; i++) {
       stream[i][si[i]++] = 0;
       stream[i][si[i]++] = 0xBC000000;
+      stream[i][si[i]++] = 0;
+      stream[i][si[i]++] = 0;
 
       lima_dump_command_stream_print(
          stream[i], si[i] * 4, false, "pp plb stream %d at va %x\n",




More information about the mesa-commit mailing list