[RFC 03/12] drm/i915: Mark as legacy if KMS is disabled

Thierry Reding thierry.reding at gmail.com
Fri Feb 21 00:28:25 PST 2014


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 at gmail.com> wrote:
> > From: Thierry Reding <treding at 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 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140221/90250735/attachment.pgp>


More information about the dri-devel mailing list