turnip: Get indirect_draw_wfm_quirk from fd_dev_info

At some point we might want to change this to minimum fw version, but
for now it can be a bool.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11790>
This commit is contained in:
Rob Clark 2021-07-08 09:25:20 -07:00 committed by Marge Bot
parent 06000f42ed
commit 64af60cfb3
3 changed files with 16 additions and 9 deletions

View file

@ -73,6 +73,18 @@ struct fd_dev_info {
*/
bool storage_16bit;
/* The latest known a630_sqe.fw fails to wait for WFI before
* reading the indirect buffer when using CP_DRAW_INDIRECT_MULTI,
* so we have to fall back to CP_WAIT_FOR_ME except for a650
* which has a fixed firmware.
*
* TODO: There may be newer a630_sqe.fw released in the future
* which fixes this, if so we should detect it and avoid this
* workaround. Once we have uapi to query fw version, we can
* replace this with minimum fw version.
*/
bool indirect_draw_wfm_quirk;
struct {
uint32_t RB_UNKNOWN_8E04_blit;
uint32_t PC_UNKNOWN_9805;

View file

@ -176,6 +176,7 @@ a6xx_gen1 = dict(
fibers_per_sp = 128 * 16,
reg_size_vec4 = 96,
ccu_cntl_gmem_unk2 = True,
indirect_draw_wfm_quirk = True,
)
# a640, a680:
@ -184,6 +185,7 @@ a6xx_gen2 = dict(
reg_size_vec4 = 96,
supports_multiview_mask = True,
has_z24uint_s8uint = True,
indirect_draw_wfm_quirk = True,
)
# a650:

View file

@ -3960,14 +3960,7 @@ tu_CmdDrawIndirect(VkCommandBuffer commandBuffer,
tu6_emit_empty_vs_params(cmd);
/* The latest known a630_sqe.fw fails to wait for WFI before reading the
* indirect buffer when using CP_DRAW_INDIRECT_MULTI, so we have to fall
* back to CP_WAIT_FOR_ME except for a650 which has a fixed firmware.
*
* TODO: There may be newer a630_sqe.fw released in the future which fixes
* this, if so we should detect it and avoid this workaround.
*/
if (cmd->device->physical_device->gpu_id != 650)
if (cmd->device->physical_device->info->a6xx.indirect_draw_wfm_quirk)
draw_wfm(cmd);
tu6_draw_common(cmd, cs, false, 0);
@ -3994,7 +3987,7 @@ tu_CmdDrawIndexedIndirect(VkCommandBuffer commandBuffer,
tu6_emit_empty_vs_params(cmd);
if (cmd->device->physical_device->gpu_id != 650)
if (cmd->device->physical_device->info->a6xx.indirect_draw_wfm_quirk)
draw_wfm(cmd);
tu6_draw_common(cmd, cs, true, 0);