Hi On Fri, Feb 21, 2014 at 8:55 AM, Thierry Reding <thierry.reding@xxxxxxxxx> wrote: > From: Thierry Reding <treding@xxxxxxxxxx> > > Non-legacy devices may not always support mode-setting functionality, so > create the primary minor conditionally. > > One setup where this happens is the Tegra K1, where the Tegra DRM driver > exposes the display engine via standard KMS IOCTLs, and nouveau drives > the Kepler-type GPU that has no display capabilities. > > Signed-off-by: Thierry Reding <treding@xxxxxxxxxx> > --- > drivers/gpu/drm/drm_stub.c | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c > index fd2f1758366d..839460b774c5 100644 > --- a/drivers/gpu/drm/drm_stub.c > +++ b/drivers/gpu/drm/drm_stub.c > @@ -564,9 +564,11 @@ struct drm_device *drm_dev_alloc(struct drm_driver *driver, > goto err_minors; > } > > - ret = drm_minor_alloc(dev, DRM_MINOR_PRIMARY); > - if (ret) > - goto err_minors; > + if (drm_core_check_feature(dev, DRIVER_MODESET)) { > + ret = drm_minor_alloc(dev, DRM_MINOR_PRIMARY); > + if (ret) > + goto err_minors; > + } There's a lot of code accessing dev->primary for debug messages (to print stuff like "error on card0: bla"). I just want to make sure you checked for all that. I tried renaming "->primary" to "->primary2" locally just to find these and I doubt this is safe for most drivers. I haven't looked for nouveau in particular, though. Anyhow, the patch is the right thing to do. Thanks David > > if (drm_ht_create(&dev->map_hash, 12)) > goto err_minors; > -- > 1.8.4.2 > _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel