UPSTREAM: virgl: Fix flush in virgl_encoder_inline_write.

The current code is buggy: if there are only 12 dwords left in cbuf,
we emit a zero data length command which will be rejected by virglrenderer.
Fix it by calling flush in this case.

Cc: [email protected]
Reviewed-by: Dave Airlie <[email protected]>
(cherry-picked from commit 04e278f79334c36f2afa315d3dcfcbec055a4d2a)

BUG=b:111521569

Change-Id: Ie952ece5e31ee94c5fb7e6ecb3e1de807a21763b
Reviewed-on: https://chromium-review.googlesource.com/1140734
Commit-Ready: Lepton Wu <[email protected]>
Tested-by: Lepton Wu <[email protected]>
Reviewed-by: Gurchetan Singh <[email protected]>
1 file changed