From: Matthew Brost <matthew.brost@intel.com>
To: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/3] drm/xe/guc: Drop redundant register read
Date: Tue, 20 Jan 2026 12:57:17 -0800 [thread overview]
Message-ID: <aW/sLcOou1z5YKzh@lstrano-desk.jf.intel.com> (raw)
In-Reply-To: <20260120185047.593-2-michal.wajdeczko@intel.com>
On Tue, Jan 20, 2026 at 07:50:45PM +0100, Michal Wajdeczko wrote:
> 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>
> ---
> drivers/gpu/drm/xe/xe_guc.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 44360437beeb..2a3b057fc828 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -1394,11 +1394,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;
>
> @@ -1430,21 +1430,20 @@ int xe_guc_mmio_send_recv(struct xe_guc *guc, const u32 *request,
>
> 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) {
> /*
> --
> 2.47.1
>
next prev parent reply other threads:[~2026-01-20 20:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-20 18:50 [PATCH 0/3] drm/xe/guc: Make MMIO communication more robust Michal Wajdeczko
2026-01-20 18:50 ` [PATCH 1/3] drm/xe/guc: Drop redundant register read Michal Wajdeczko
2026-01-20 20:57 ` Matthew Brost [this message]
2026-01-20 18:50 ` [PATCH 2/3] drm/xe/guc: Wait before retrying sending H2G Michal Wajdeczko
2026-01-20 21:02 ` Matthew Brost
2026-01-20 21:36 ` Michal Wajdeczko
2026-01-20 18:50 ` [PATCH 3/3] drm/xe/guc: Allow second H2G retry on FLR Michal Wajdeczko
2026-01-20 19:29 ` ✓ CI.KUnit: success for drm/xe/guc: Make MMIO communication more robust Patchwork
2026-01-20 20:04 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-21 2:42 ` ✗ Xe.CI.Full: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aW/sLcOou1z5YKzh@lstrano-desk.jf.intel.com \
--to=matthew.brost@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.wajdeczko@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox