Skip to content

Commit 812062e

Browse files
BrajeshGuptaMTCoster
authored andcommitted
drm/imagination: Wait for FW trace update command completion
Possibility of no FW trace available after update in the fw_trace_mask due to asynchronous mode of command consumption in the FW. To ensure FW trace is available after update, wait for FW trace log update command completion from the FW. Fixes: cc1aeed ("drm/imagination: Implement firmware infrastructure and META FW support") Signed-off-by: Brajesh Gupta <brajesh.gupta@imgtec.com> Reviewed-by: Matt Coster <matt.coster@imgtec.com> Link: https://patch.msgid.link/20260108040936.129769-1-brajesh.gupta@imgtec.com Signed-off-by: Matt Coster <matt.coster@imgtec.com>
1 parent b91a565 commit 812062e

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

drivers/gpu/drm/imagination/pvr_fw_trace.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_mask)
137137
struct rogue_fwif_kccb_cmd cmd;
138138
int idx;
139139
int err;
140+
int slot;
140141

141142
if (group_mask)
142143
fw_trace->tracebuf_ctrl->log_type = ROGUE_FWIF_LOG_TYPE_TRACE | group_mask;
@@ -154,8 +155,13 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_mask)
154155
cmd.cmd_type = ROGUE_FWIF_KCCB_CMD_LOGTYPE_UPDATE;
155156
cmd.kccb_flags = 0;
156157

157-
err = pvr_kccb_send_cmd(pvr_dev, &cmd, NULL);
158+
err = pvr_kccb_send_cmd(pvr_dev, &cmd, &slot);
159+
if (err)
160+
goto err_drm_dev_exit;
161+
162+
err = pvr_kccb_wait_for_completion(pvr_dev, slot, HZ, NULL);
158163

164+
err_drm_dev_exit:
159165
drm_dev_exit(idx);
160166

161167
err_up_read:

0 commit comments

Comments
 (0)