~ubuntu-branches/debian/jessie/xserver-xorg-video-intel/jessie

« back to all changes in this revision

Viewing changes to src/intel_display.c

  • Committer: Package Import Robot
  • Author(s): Cyril Brulebois
  • Date: 2012-06-12 20:30:51 UTC
  • mfrom: (26.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20120612203051-mex5136iqfafp06b
Tags: 2:2.19.0-3
* Add patch to avoid X segfaults with Driver-less Device sections in
  xorg.conf (Closes: #677206):
  - 0003-Avoid-calling-xf86nameCompare-with-a-NULL-pointer.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1699
1699
        struct intel_crtc *intel_crtc = crtc->driver_private;
1700
1700
        return intel_crtc->pipe;
1701
1701
}
 
1702
 
 
1703
Bool intel_crtc_on(xf86CrtcPtr crtc)
 
1704
{
 
1705
        struct intel_crtc *intel_crtc = crtc->driver_private;
 
1706
        drmModeCrtcPtr drm_crtc;
 
1707
        Bool ret;
 
1708
 
 
1709
        if (!crtc->enabled)
 
1710
                return FALSE;
 
1711
 
 
1712
        /* Kernel manages CRTC status based on output config */
 
1713
        drm_crtc = drmModeGetCrtc(intel_crtc->mode->fd, crtc_id(intel_crtc));
 
1714
        if (drm_crtc == NULL)
 
1715
                return FALSE;
 
1716
 
 
1717
        ret = (drm_crtc->mode_valid &&
 
1718
               intel_crtc->mode->fb_id == drm_crtc->buffer_id);
 
1719
        free(drm_crtc);
 
1720
 
 
1721
        return ret;
 
1722
}