From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Casey Bowman <casey.g.bowman@intel.com>
Cc: thomas.hellstrom@linux.intel.com,
intel-gfx@lists.freedesktop.org, lucas.demarchi@intel.com,
chris@chris-wilson.co.uk
Subject: Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/gt: Split intel-gtt functions by arch
Date: Wed, 30 Mar 2022 12:44:32 +0300 [thread overview]
Message-ID: <YkQmgGaJmWqaUnvq@intel.com> (raw)
In-Reply-To: <20220329233518.1008877-2-casey.g.bowman@intel.com>
On Tue, Mar 29, 2022 at 04:35:17PM -0700, Casey Bowman wrote:
> @@ -1208,11 +576,11 @@ static int ggtt_probe_hw(struct i915_ggtt *ggtt, struct intel_gt *gt)
> dma_resv_init(&ggtt->vm._resv);
>
> if (GRAPHICS_VER(i915) <= 5)
> - ret = i915_gmch_probe(ggtt);
> + ret = intel_gt_gmch_gen5_probe(ggtt);
s/gen5/gen2/ to conform to the standard "name things based
on the oldest thing" doctrine.
Also s/intel_gt_gmch/intel_ggtt/ for all of these might be
a good idea to actually convey what they do.
> else if (GRAPHICS_VER(i915) < 8)
> - ret = gen6_gmch_probe(ggtt);
> + ret = intel_gt_gmch_gen6_probe(ggtt);
> else
> - ret = gen8_gmch_probe(ggtt);
> + ret = intel_gt_gmch_gen8_probe(ggtt);
> if (ret) {
> dma_resv_fini(&ggtt->vm._resv);
> return ret;
<snip>
> +/*
> + * Certain Gen5 chipsets require idling the GPU before
> + * unmapping anything from the GTT when VT-d is enabled.
> + */
> +static bool needs_idle_maps(struct drm_i915_private *i915)
> +{
> + /*
> + * Query intel_iommu to see if we need the workaround. Presumably that
> + * was loaded first.
> + */
> + if (!intel_vtd_active(i915))
> + return false;
> +
> + if (GRAPHICS_VER(i915) == 5 && IS_MOBILE(i915))
> + return true;
> +
> + if (GRAPHICS_VER(i915) == 12)
> + return true; /* XXX DMAR fault reason 7 */
This gen12 part is still dead code. Should just nuke it most likely,
but someone should actually figure out where it came from, what it
was supposed to fix, and did it ever actually work.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-03-30 9:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 23:35 [Intel-gfx] [PATCH v2 0/2] Splitting intel-gtt calls for non-x86 platforms Casey Bowman
2022-03-29 23:35 ` [Intel-gfx] [PATCH v2 1/2] drm/i915/gt: Split intel-gtt functions by arch Casey Bowman
2022-03-30 9:44 ` Ville Syrjälä [this message]
2022-03-29 23:35 ` [Intel-gfx] [PATCH v2 2/2] drm/i915: Require INTEL_GTT to depend on X86 Casey Bowman
2022-03-29 23:39 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for Splitting intel-gtt calls for non-x86 platforms (rev2) 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=YkQmgGaJmWqaUnvq@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=casey.g.bowman@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=thomas.hellstrom@linux.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