dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [RFC 03/12] drm/i915: Mark as legacy if KMS is disabled
Date: Fri, 21 Feb 2014 09:28:25 +0100	[thread overview]
Message-ID: <20140221082824.GH22574@ulmo.nvidia.com> (raw)
In-Reply-To: <CAKb7Uvh-zpbdDyK2A1Q0+6+ZX9nh-9BaGBmSxzZUiUx6yg1aNw@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1657 bytes --]

On Fri, Feb 21, 2014 at 03:17:28AM -0500, Ilia Mirkin wrote:
> On Fri, Feb 21, 2014 at 2:55 AM, Thierry Reding
> <thierry.reding@gmail.com> wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > When kernel mode-setting is disabled, mark the driver as legacy to pick
> > up the special semantics required for userspace mode-setting.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > index 2d05d7ce4c29..ea916e117f01 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.c
> > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > @@ -985,13 +985,19 @@ static int __init i915_init(void)
> >  #if defined(CONFIG_DRM_I915_KMS)
> >         if (i915.modeset != 0)
> >                 driver.driver_features |= DRIVER_MODESET;
> > +       else
> > +               driver.driver_features |= DRIVER_LEGACY;
> >  #endif
> >         if (i915.modeset == 1)
> >                 driver.driver_features |= DRIVER_MODESET;
> > +       else
> > +               driver.driver_features |= DRIVER_LEGACY;
> 
> If i915.modeset == -1 (which seems like a legal value as per the hunk
> below, and I'm guessing the default), it'll end up with both MODESET
> and LEGACY. Is that a legal combination?

I don't see a reason why the combination would be illegal, but it
doesn't make a lot of sense either. So I think the above hunk should be
turned into this instead:

+	if (i915.modeset == 0)
+		driver.driver_features |= DRIVER_LEGACY;

Thierry

[-- Attachment #1.2: Type: application/pgp-signature, Size: 836 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2014-02-21  8:28 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21  7:55 [RFC 00/12] Support render-node only drivers Thierry Reding
2014-02-21  7:55 ` [RFC 01/12] drm: Rename DRM_MINOR_LEGACY to DRM_MINOR_PRIMARY Thierry Reding
2014-02-21  7:55 ` [RFC 02/12] drm: Introduce DRIVER_LEGACY feature Thierry Reding
2014-02-21  7:55 ` [RFC 03/12] drm/i915: Mark as legacy if KMS is disabled Thierry Reding
2014-02-21  8:17   ` Ilia Mirkin
2014-02-21  8:28     ` Thierry Reding [this message]
2014-02-21  7:55 ` [RFC 04/12] drm: Separate DRIVER_MODESET and DRIVER_LEGACY Thierry Reding
2014-02-21  7:55 ` [RFC 05/12] drm: Create primary minor only if mode-setting is supported Thierry Reding
2014-02-24 10:39   ` David Herrmann
2014-02-25 15:36     ` Thierry Reding
2014-02-21  7:55 ` [RFC 06/12] drm: Remove gratuituous blank line Thierry Reding
2014-02-21  7:55 ` [RFC 07/12] drm: Use drm_core_check_feature() where possible Thierry Reding
2014-02-21  7:55 ` [RFC 08/12] drm/exynos: Remove dead code Thierry Reding
2014-02-21  7:55 ` [RFC 09/12] drm/gma500: " Thierry Reding
2014-03-11 17:07   ` Patrik Jakobsson
2014-02-21  7:55 ` [RFC 10/12] drm/i810: " Thierry Reding
2014-02-21  7:55 ` [RFC 11/12] drm/i915: " Thierry Reding
2014-03-04  8:58   ` Daniel Vetter
2014-02-21  7:55 ` [RFC 12/12] drm/qxl: " Thierry Reding
2014-02-24 10:43 ` [RFC 00/12] Support render-node only drivers David Herrmann
2014-03-04  8:58 ` Daniel Vetter

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=20140221082824.GH22574@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=imirkin@alum.mit.edu \
    /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