~ubuntu-branches/ubuntu/utopic/xserver-xorg-video-intel/utopic

« back to all changes in this revision

Viewing changes to src/intel_module.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-09-12 07:43:59 UTC
  • mfrom: (1.4.22)
  • Revision ID: package-import@ubuntu.com-20120912074359-i3h8ol6hoghbemoq
Tags: 2:2.20.7-0ubuntu1
Merge from unreleased debian git.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
#include "legacy/legacy.h"
48
48
#include "sna/sna_module.h"
49
49
 
 
50
#ifdef XSERVER_PLATFORM_BUS
 
51
#include <xf86platformBus.h>
 
52
#endif
 
53
 
50
54
static const struct intel_device_info intel_generic_info = {
51
55
        .gen = -1,
52
56
};
525
529
        }
526
530
}
527
531
 
 
532
#ifdef XSERVER_PLATFORM_BUS
 
533
static Bool
 
534
intel_platform_probe(DriverPtr driver,
 
535
                     int entity_num, int flags,
 
536
                     struct xf86_platform_device *dev,
 
537
                     intptr_t match_data)
 
538
{
 
539
        ScrnInfoPtr scrn = NULL;
 
540
        char *path = xf86_get_platform_device_attrib(dev, ODEV_ATTRIB_PATH);
 
541
        unsigned scrn_flags = 0;
 
542
 
 
543
        if (!dev->pdev)
 
544
                return FALSE;
 
545
 
 
546
        /* Allow ourselves to act as a slaved output if not primary */
 
547
        if (flags & PLATFORM_PROBE_GPU_SCREEN) {
 
548
                flags &= ~PLATFORM_PROBE_GPU_SCREEN;
 
549
                scrn_flags |= XF86_ALLOCATE_GPU_SCREEN;
 
550
        }
 
551
 
 
552
        /* if we get any flags we don't understand fail to probe for now */
 
553
        if (flags)
 
554
                return FALSE;
 
555
 
 
556
        scrn = xf86AllocateScreen(driver, scrn_flags);
 
557
        if (scrn == NULL)
 
558
                return FALSE;
 
559
 
 
560
        xf86DrvMsg(scrn->scrnIndex, X_INFO,
 
561
                   "using device path '%s'\n", path ? path : "Default device");
 
562
 
 
563
        if (xf86IsEntitySharable(entity_num))
 
564
                xf86SetEntityShared(entity_num);
 
565
        xf86AddEntityToScreen(scrn, entity_num);
 
566
 
 
567
        scrn->driverVersion = INTEL_VERSION;
 
568
        scrn->driverName = INTEL_DRIVER_NAME;
 
569
        scrn->name = INTEL_NAME;
 
570
        scrn->driverPrivate = (void *)(match_data | 1);
 
571
        scrn->Probe = NULL;
 
572
 
 
573
        switch (get_accel_method()) {
 
574
#if USE_SNA
 
575
        case SNA: return sna_init_scrn(scrn, entity_num);
 
576
#endif
 
577
#if USE_UXA
 
578
        case UXA: return intel_init_scrn(scrn);
 
579
#endif
 
580
        default: return FALSE;
 
581
        }
 
582
}
 
583
#endif
 
584
 
528
585
#ifdef XFree86LOADER
529
586
 
530
587
static MODULESETUPPROTO(intel_setup);
569
626
        0,
570
627
        intel_driver_func,
571
628
        intel_device_match,
572
 
        intel_pci_probe
 
629
        intel_pci_probe,
 
630
#ifdef XSERVER_PLATFORM_BUS
 
631
        intel_platform_probe
 
632
#endif
573
633
};
574
634
 
575
635
static pointer intel_setup(pointer module,