From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: Yan Zhao <yan.y.zhao@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org,
linux-kernel@vger.kernel.org, zhi.a.wang@intel.com,
zhenyuw@linux.intel.com, kvm@vger.kernel.org
Subject: Re: [PATCH] drm/i915/gvt: Fix bug in getting msg length in AUX CH registers handler
Date: Tue, 1 Aug 2023 11:12:05 +0800 [thread overview]
Message-ID: <ZMh4BW8a+82Ijzye@debian-scheme> (raw)
In-Reply-To: <20230731112033.7275-1-yan.y.zhao@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
On 2023.07.31 19:20:33 +0800, Yan Zhao wrote:
> Msg length should be obtained from value written to AUX_CH_CTL register
> rather than from enum type of the register.
>
> Commit 0cad796a2269 ("drm/i915: Use REG_BIT() & co. for AUX CH registers")
> incorrectly calculates the msg_length from reg type and yields below
> warning in intel_gvt_i2c_handle_aux_ch_write():
> "i915 0000:00:02.0: drm_WARN_ON(msg_length != 4)".
>
> Fixes: 0cad796a2269 ("drm/i915: Use REG_BIT() & co. for AUX CH registers")
> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com>
> ---
Thanks for the fix!
Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
> drivers/gpu/drm/i915/gvt/edid.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/edid.c b/drivers/gpu/drm/i915/gvt/edid.c
> index 2a0438f12a14..af9afdb53c7f 100644
> --- a/drivers/gpu/drm/i915/gvt/edid.c
> +++ b/drivers/gpu/drm/i915/gvt/edid.c
> @@ -491,7 +491,7 @@ void intel_gvt_i2c_handle_aux_ch_write(struct intel_vgpu *vgpu,
> return;
> }
>
> - msg_length = REG_FIELD_GET(DP_AUX_CH_CTL_MESSAGE_SIZE_MASK, reg);
> + msg_length = REG_FIELD_GET(DP_AUX_CH_CTL_MESSAGE_SIZE_MASK, value);
>
> // check the msg in DATA register.
> msg = vgpu_vreg(vgpu, offset + 4);
> --
> 2.17.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
prev parent reply other threads:[~2023-08-01 3:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 11:20 [PATCH] drm/i915/gvt: Fix bug in getting msg length in AUX CH registers handler Yan Zhao
2023-08-01 3:12 ` Zhenyu Wang [this message]
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=ZMh4BW8a+82Ijzye@debian-scheme \
--to=zhenyuw@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yan.y.zhao@intel.com \
--cc=zhi.a.wang@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