From: Keith Packard <keithp@keithp.com>
To: Dave Airlie <airlied@redhat.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
intel-gfx@lists.freedesktop.org,
Keith Packard <keithp@keithp.com>,
Ben Widawsky <ben@bwidawsk.net>
Subject: [PATCH] agp: iommu_gfx_mapped only available if CONFIG_INTEL_IOMMU is set
Date: Fri, 28 Oct 2011 10:56:29 -0700 [thread overview]
Message-ID: <1319824589-18082-1-git-send-email-keithp@keithp.com> (raw)
Kernels with no iommu support cannot ever need the Ironlake
work-around, so never enable it in that case.
Might be better to completely remove the work-around from the kernel
in this case?
Signed-off-by: Keith Packard <keithp@keithp.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
---
Here's a shorter patch which just elides the body of the needs_idle_maps functions
drivers/char/agp/intel-gtt.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 3a8d448..c92424c 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -1186,10 +1186,11 @@ static void gen6_cleanup(void)
/* Certain Gen5 chipsets require require idling the GPU before
* unmapping anything from the GTT when VT-d is enabled.
*/
-extern int intel_iommu_gfx_mapped;
static inline int needs_idle_maps(void)
{
+#ifdef CONFIG_INTEL_IOMMU
const unsigned short gpu_devid = intel_private.pcidev->device;
+ extern int intel_iommu_gfx_mapped;
/* Query intel_iommu to see if we need the workaround. Presumably that
* was loaded first.
@@ -1198,7 +1199,7 @@ static inline int needs_idle_maps(void)
gpu_devid == PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG) &&
intel_iommu_gfx_mapped)
return 1;
-
+#endif
return 0;
}
--
1.7.7
next reply other threads:[~2011-10-28 17:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-28 17:56 Keith Packard [this message]
2011-10-28 18:24 ` [Intel-gfx] " Ben Widawsky
2011-11-01 15:36 ` Dave Airlie
2011-11-01 18:29 ` [PATCH] drm/i915: iommu workaround related cleanups Ben Widawsky
2011-11-01 21:24 ` Ben Widawsky
-- strict thread matches above, loose matches on Subject: below --
2011-10-28 17:32 [PATCH] agp: iommu_gfx_mapped only available if CONFIG_INTEL_IOMMU is set Keith Packard
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=1319824589-18082-1-git-send-email-keithp@keithp.com \
--to=keithp@keithp.com \
--cc=airlied@redhat.com \
--cc=ben@bwidawsk.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®