From: Zhi Wang <zhiwang@kernel.org>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
intel-gvt-dev@lists.freedesktop.org, rodrigo.vivi@intel.com,
ville.syrjala@linux.intel.com,
Zhenyu Wang <zhenyuw@linux.intel.com>,
Zhi Wang <zhi.wang.linux@gmail.com>
Subject: Re: [PATCH v2 4/6] drm/i915/gvt: do not use implict dev_priv in DSPSURF_TO_PIPE()
Date: Mon, 10 Jun 2024 13:58:21 +0300 [thread overview]
Message-ID: <20240610135821.00000861.zhiwang@kernel.org> (raw)
In-Reply-To: <2ff78ebd0dc84178f5feacee7ef2a6cb4132b9ae.1717773890.git.jani.nikula@intel.com>
On Fri, 7 Jun 2024 18:25:38 +0300
Jani Nikula <jani.nikula@intel.com> wrote:
> Do not rely on having dev_priv local variable, pass it to the macro.
>
> Cc: Zhenyu Wang <zhenyuw@linux.intel.com>
> Cc: Zhi Wang <zhi.wang.linux@gmail.com>
> Cc: intel-gvt-dev@lists.freedesktop.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/gvt/handlers.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/handlers.c
> b/drivers/gpu/drm/i915/gvt/handlers.c index
> f79dd6cfc75b..0f09344d3c20 100644 ---
> a/drivers/gpu/drm/i915/gvt/handlers.c +++
> b/drivers/gpu/drm/i915/gvt/handlers.c @@ -1009,14 +1009,14 @@ static
> int south_chicken2_mmio_write(struct intel_vgpu *vgpu, return 0;
> }
>
> -#define DSPSURF_TO_PIPE(offset) \
> +#define DSPSURF_TO_PIPE(dev_priv, offset) \
> calc_index(offset, DSPSURF(dev_priv, PIPE_A),
> DSPSURF(dev_priv, PIPE_B), DSPSURF(dev_priv, PIPE_C))
> static int pri_surf_mmio_write(struct intel_vgpu *vgpu, unsigned int
> offset, void *p_data, unsigned int bytes)
> {
> struct drm_i915_private *dev_priv = vgpu->gvt->gt->i915;
> - u32 pipe = DSPSURF_TO_PIPE(offset);
> + u32 pipe = DSPSURF_TO_PIPE(dev_priv, offset);
> int event = SKL_FLIP_EVENT(pipe, PLANE_PRIMARY);
>
> write_vreg(vgpu, offset, p_data, bytes);
Reviewed-by: Zhi Wang <zhiwang@kernel.org>
next prev parent reply other threads:[~2024-06-10 10:58 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 15:25 [PATCH v2 0/6] drm/i915: gvt register macro cleanups, unused macro removals Jani Nikula
2024-06-07 15:25 ` [PATCH v2 1/6] drm/i915/gvt: remove the unused end parameter from calc_index() Jani Nikula
2024-06-07 15:52 ` Zhi Wang
2024-06-07 15:25 ` [PATCH v2 2/6] drm/i915/gvt: use proper i915_reg_t for calc_index() parameters Jani Nikula
2024-06-10 10:56 ` Zhi Wang
2024-06-07 15:25 ` [PATCH v2 3/6] drm/i915/gvt: rename range variable to stride Jani Nikula
2024-06-10 10:57 ` Zhi Wang
2024-06-07 15:25 ` [PATCH v2 4/6] drm/i915/gvt: do not use implict dev_priv in DSPSURF_TO_PIPE() Jani Nikula
2024-06-10 10:58 ` Zhi Wang [this message]
2024-06-07 15:25 ` [PATCH v2 5/6] drm/i915: relocate some DSPCNTR reg bit definitions Jani Nikula
2024-06-10 19:31 ` Rodrigo Vivi
2024-06-07 15:25 ` [PATCH v2 6/6] drm/i915: remove unused pipe/plane B register macros Jani Nikula
2024-06-10 19:32 ` Rodrigo Vivi
2024-06-07 17:36 ` ✗ Fi.CI.SPARSE: warning for drm/i915: gvt register macro cleanups, unused macro removals (rev2) Patchwork
2024-06-07 17:47 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-06-13 11:51 ` ✓ Fi.CI.BAT: success for drm/i915: gvt register macro cleanups, unused macro removals (rev3) Patchwork
2024-06-14 3:40 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-06-14 8:20 ` [PATCH v2 0/6] drm/i915: gvt register macro cleanups, unused macro removals Jani Nikula
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=20240610135821.00000861.zhiwang@kernel.org \
--to=zhiwang@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-gvt-dev@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=ville.syrjala@linux.intel.com \
--cc=zhenyuw@linux.intel.com \
--cc=zhi.wang.linux@gmail.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