Subversion Repositories Kolibri OS

Rev

Rev 3243 | Rev 3260 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3243 Rev 3255
Line 47... Line 47...
47
 
47
 
Line 48... Line 48...
48
int init_display_kms(struct drm_device *dev);
48
int init_display_kms(struct drm_device *dev);
Line -... Line 49...
-
 
49
 
-
 
50
struct drm_device *main_device;
49
 
51
 
50
struct drm_device *main_device;
52
struct drm_file *drm_file_handlers[256];
51
 
53
 
52
static int i915_modeset __read_mostly = 1;
54
static int i915_modeset __read_mostly = 1;
Line 479... Line 481...
479
    return err;
481
    return err;
480
}
482
}
Line 481... Line 483...
481
 
483
 
482
int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent)
484
int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent)
483
{
-
 
484
    struct drm_device *dev;
485
{
-
 
486
    static struct drm_driver driver;
-
 
487
    static struct drm_device drm_dev;
-
 
488
    static struct drm_file   drm_file;
-
 
489
 
-
 
490
    struct drm_device *dev;
Line 485... Line 491...
485
    static struct drm_driver driver;
491
    struct drm_file   *priv;
Line 486... Line 492...
486
 
492
 
487
    int ret;
493
    int ret;
-
 
494
 
488
 
495
    dev  = &drm_dev;
Line 489... Line 496...
489
    dev = kzalloc(sizeof(*dev), 0);
496
    priv = &drm_file;
490
    if (!dev)
497
 
491
        return -ENOMEM;
498
    drm_file_handlers[0] = priv;
Line 512... Line 519...
512
 
519
 
513
    spin_lock_init(&dev->count_lock);
520
    spin_lock_init(&dev->count_lock);
514
    mutex_init(&dev->struct_mutex);
521
    mutex_init(&dev->struct_mutex);
Line -... Line 522...
-
 
522
    mutex_init(&dev->ctxlist_mutex);
-
 
523
 
-
 
524
    INIT_LIST_HEAD(&priv->lhead);
-
 
525
    INIT_LIST_HEAD(&priv->fbs);
-
 
526
    INIT_LIST_HEAD(&priv->event_list);
-
 
527
    init_waitqueue_head(&priv->event_wait);
-
 
528
    priv->event_space = 4096; /* set aside 4k for event buffer */
-
 
529
 
-
 
530
    idr_init(&priv->object_idr);
515
    mutex_init(&dev->ctxlist_mutex);
531
    spin_lock_init(&priv->table_lock);
Line 516... Line 532...
516
 
532
 
Line 517... Line 533...
517
    dev->driver = &driver;
533
    dev->driver = &driver;
Line 527... Line 543...
527
        goto err_g4;
543
        goto err_g4;
Line 528... Line 544...
528
 
544
 
Line 529... Line 545...
529
    return 0;
545
    return 0;
530
 
-
 
531
err_g4:
546
 
532
//    drm_put_minor(&dev->primary);
547
err_g4:
533
//err_g3:
548
//err_g3:
534
//    if (drm_core_check_feature(dev, DRIVER_MODESET))
549
//    if (drm_core_check_feature(dev, DRIVER_MODESET))
535
//        drm_put_minor(&dev->control);
550
//        drm_put_minor(&dev->control);
536
//err_g2:
551
//err_g2:
537
//    pci_disable_device(pdev);
-
 
Line 538... Line 552...
538
//err_g1:
552
//    pci_disable_device(pdev);
539
    free(dev);
553
//err_g1:
Line 540... Line 554...
540
 
554