-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virgl: Fix flush in virgl_encoder_inline_write
:Release Notes: Fix buggy code which makes a zero data length command. :Detailed Notes: Original upstream's patch is the following git-commit-id. 04e278f79334c36f2afa315d3dcfcbec055a4d2a :Testing Performed: Build OK. :QA Notes: N/A :Issues Addressed: [CHNSDK-11405] Fix a virgl issue
- Loading branch information
1 parent
288cff4
commit dd1ed7f
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
meta-webos/recipes-graphics/mesa/mesa/0001-Preventing-a-zero-data-length-command-case.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From be27e07c6883b0aa23c39d375bf4da15e82869eb Mon Sep 17 00:00:00 2001 | ||
From: Junil Kim <[email protected]> | ||
Date: Tue, 30 Apr 2019 09:17:06 +0900 | ||
Subject: [PATCH] Preventing a zero data length command case | ||
|
||
--- | ||
src/gallium/drivers/virgl/virgl_encode.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/gallium/drivers/virgl/virgl_encode.c b/src/gallium/drivers/virgl/virgl_encode.c | ||
index cbe8d19..733da94 100644 | ||
--- a/src/gallium/drivers/virgl/virgl_encode.c | ||
+++ b/src/gallium/drivers/virgl/virgl_encode.c | ||
@@ -510,7 +510,7 @@ int virgl_encoder_inline_write(struct virgl_context *ctx, | ||
|
||
left_bytes = size; | ||
while (left_bytes) { | ||
- if (ctx->cbuf->cdw + 12 > VIRGL_MAX_CMDBUF_DWORDS) | ||
+ if (ctx->cbuf->cdw + 12 >= VIRGL_MAX_CMDBUF_DWORDS) | ||
ctx->base.flush(&ctx->base, NULL, 0); | ||
|
||
thispass = (VIRGL_MAX_CMDBUF_DWORDS - ctx->cbuf->cdw - 12) * 4; | ||
-- | ||
2.17.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters