From: Chris Wilson <chris@chris-wilson.co.uk>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm/i915: refuse to load on gen6+ without kms
Date: Mon, 26 Mar 2012 20:44:51 +0100 [thread overview]
Message-ID: <1332791100_103676@CP5-2952> (raw)
In-Reply-To: <1332790398-5837-1-git-send-email-daniel.vetter@ffwll.ch>
On Mon, 26 Mar 2012 21:33:18 +0200, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Spurred by an irc discussion, let's start to clear up which parts of
> our kms + ums/gem + ums/dri1 + vbios/dri1 kernel driver pieces
> userspace in the wild actually uses.
>
> The idea is that we introduce checks at entry-points (module load
> time, ioctls, ...) first and then reap any obviously dead code in a
> second step.
>
> As a first step refuse to load without kms on chips where userspace
> never supported ums. Now upstream hasn't supported ums on ilk, ever.
> But RHEL had the great idea to backport the kms support to their ums
> driver.
>
> Cc: Dave Airlie <airlied@gmail.com>
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/i915/i915_dma.c | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 64dfbb8..8567fdf 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -1955,9 +1955,17 @@ i915_mtrr_setup(struct drm_i915_private *dev_priv, unsigned long base,
> int i915_driver_load(struct drm_device *dev, unsigned long flags)
> {
> struct drm_i915_private *dev_priv;
> + struct intel_device_info *info;
> int ret = 0, mmio_bar;
> uint32_t agp_size;
>
> + info = (struct intel_device_info *) flags;
> +
> + /* Refuse to load on gen6+ without kms enabled. */
> + if (info->gen >= 6 && !drm_core_check_feature(dev, DRIVER_MODESET))
> + return -ENODEV;
The problem here is that this highlights that with the default
configuration we have no driver for our current hardware in the kernel.
You would also need to sneak
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index cc11488..ebc5135 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -139,6 +139,7 @@ config DRM_I915
config DRM_I915_KMS
bool "Enable modesetting on intel by default"
depends on DRM_I915
+ default y
help
Choose this option if you want kernel modesetting enabled by default,
and you have a new enough userspace to support this. Running old
past Linus first.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-03-26 19:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-26 19:33 [PATCH] drm/i915: refuse to load on gen6+ without kms Daniel Vetter
2012-03-26 19:44 ` Chris Wilson [this message]
2012-03-26 19:50 ` Daniel Vetter
2012-03-26 21:21 ` Chris Wilson
2012-03-26 20:06 ` Adam Jackson
2012-03-26 20:37 ` [PATCH] drm/i915: disallow gem init ioctl on ilk Daniel Vetter
2012-03-26 20:43 ` Adam Jackson
2012-03-31 10:05 ` Daniel Vetter
2012-03-26 21:16 ` Chris Wilson
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=1332791100_103676@CP5-2952 \
--to=chris@chris-wilson.co.uk \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.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;
as well as URLs for NNTP newsgroup(s).