Home | History | Annotate | Line # | Download | only in src
      1 /* -*- c-basic-offset: 4 -*- */
      2 
      3 #define DEBUG_VERB 2
      4 /*
      5  * Copyright  2002 David Dawes
      6  * Copyright  2006 Intel Corporation
      7  *
      8  * Permission is hereby granted, free of charge, to any person obtaining a
      9  * copy of this software and associated documentation files (the "Software"),
     10  * to deal in the Software without restriction, including without limitation
     11  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     12  * and/or sell copies of the Software, and to permit persons to whom the
     13  * Software is furnished to do so, subject to the following conditions:
     14  *
     15  * The above copyright notice and this permission notice shall be included in
     16  * all copies or substantial portions of the Software.
     17  *
     18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     19  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     20  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     21  * THE AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
     22  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
     23  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
     24  * SOFTWARE.
     25  *
     26  * Except as contained in this notice, the name of the author(s) shall
     27  * not be used in advertising or otherwise to promote the sale, use or other
     28  * dealings in this Software without prior written authorization from
     29  * the author(s).
     30  *
     31  * Authors: David Dawes <dawes (at) xfree86.org>
     32  *	    Eric Anholt <eric.anholt (at) intel.com>
     33  *
     34  */
     35 /*
     36  * Modified by Alan Hourihane <alanh (at) tungstengraphics.com>
     37  * to support extended BIOS modes for the Intel chipsets
     38  */
     39 
     40 #ifdef HAVE_CONFIG_H
     41 #include "config.h"
     42 #endif
     43 
     44 #include <stdio.h>
     45 #include <string.h>
     46 #include <assert.h>
     47 #include <math.h>
     48 
     49 #include "xf86.h"
     50 #include "xf86DDC.h"
     51 #include "X11/Xatom.h"
     52 #include "i830.h"
     53 #include "i830_display.h"
     54 #include "xf86Modes.h"
     55 #include <randrstr.h>
     56 
     57 DisplayModePtr
     58 i830_ddc_get_modes (xf86OutputPtr output)
     59 {
     60     I830OutputPrivatePtr    intel_output = output->driver_private;
     61     xf86MonPtr		    edid_mon;
     62     DisplayModePtr	    modes;
     63 
     64     edid_mon = xf86OutputGetEDID (output, intel_output->pDDCBus);
     65     xf86OutputSetEDID (output, edid_mon);
     66 
     67     modes = xf86OutputGetEDIDModes (output);
     68     return modes;
     69 }
     70