diff options
| author | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2026-01-27 22:37:24 +0300 |
|---|---|---|
| committer | Michal Wajdeczko <michal.wajdeczko@intel.com> | 2026-02-03 00:35:44 +0300 |
| commit | 09b45fd9d330e52a5b31d1abc0db4a22b16d340a (patch) | |
| tree | 6cca79986e26fefc1303791e30ab74be785236d2 | |
| parent | 943c4d0637cff358f7be8e71694475538e7b1ce3 (diff) | |
| download | linux-09b45fd9d330e52a5b31d1abc0db4a22b16d340a.tar.xz | |
drm/xe/guc: Drop redundant register read
The xe_mmio_wait32() already returns the last value of the register
for which we were waiting, there is no need read it again.
Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260127193727.601-5-michal.wajdeczko@intel.com
| -rw-r--r-- | drivers/gpu/drm/xe/xe_guc.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c index c0eeaf08479d..2ae5a78b52ed 100644 --- a/drivers/gpu/drm/xe/xe_guc.c +++ b/drivers/gpu/drm/xe/xe_guc.c @@ -1405,11 +1405,11 @@ int xe_guc_mmio_send_recv(struct xe_guc *guc, const u32 *request, struct xe_device *xe = guc_to_xe(guc); struct xe_gt *gt = guc_to_gt(guc); struct xe_mmio *mmio = >->mmio; - u32 header, reply; struct xe_reg reply_reg = xe_gt_is_media_type(gt) ? MED_VF_SW_FLAG(0) : VF_SW_FLAG(0); const u32 LAST_INDEX = VF_SW_FLAG_COUNT - 1; bool lost = false; + u32 header; int ret; int i; @@ -1441,21 +1441,20 @@ retry: ret = xe_mmio_wait32(mmio, reply_reg, GUC_HXG_MSG_0_ORIGIN, FIELD_PREP(GUC_HXG_MSG_0_ORIGIN, GUC_HXG_ORIGIN_GUC), - 50000, &reply, false); + 50000, &header, false); if (ret) { /* scratch registers might be cleared during FLR, try once more */ - if (!reply && !lost) { + if (!header && !lost) { xe_gt_dbg(gt, "GuC mmio request %#x: lost, trying again\n", request[0]); lost = true; goto retry; } timeout: xe_gt_err(gt, "GuC mmio request %#x: no reply %#x\n", - request[0], reply); + request[0], header); return ret; } - header = xe_mmio_read32(mmio, reply_reg); if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) == GUC_HXG_TYPE_NO_RESPONSE_BUSY) { /* |
