summaryrefslogtreecommitdiff
path: root/hw/xfree86/ddc
AgeCommit message (Collapse)AuthorFilesLines
2012-03-27Introduce a consistent coding styleKeith Packard6-933/+1005
This is strictly the application of the script 'x-indent-all.sh' from util/modular. Compared to the patch that Daniel posted in January, I've added a few indent flags: -bap -psl -T PrivatePtr -T pmWait -T _XFUNCPROTOBEGIN -T _XFUNCPROTOEND -T _X_EXPORT The typedefs were needed to make the output of sdksyms.sh match the previous output, otherwise, the code is formatted badly enough that sdksyms.sh generates incorrect output. The generated code was compared with the previous version and found to be essentially identical -- "assert" line numbers and BUILD_TIME were the only differences found. The comparison was done with this script: dir1=$1 dir2=$2 for dir in $dir1 $dir2; do (cd $dir && find . -name '*.o' | while read file; do dir=`dirname $file` base=`basename $file .o` dump=$dir/$base.dump objdump -d $file > $dump done) done find $dir1 -name '*.dump' | while read dump; do otherdump=`echo $dump | sed "s;$dir1;$dir2;"` diff -u $dump $otherdump done Signed-off-by: Keith Packard <keithp@keithp.com> Acked-by: Daniel Stone <daniel@fooishbar.org> Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit 9838b7032ea9792bec21af424c53c07078636d21)
2012-01-06xfree86: Remove the pretense of EDID v2 supportAdam Jackson1-43/+4
We don't do anything with EDID v2 blocks besides publish them on the root window. Worse, the check deleted by this patch would attempt to take a checksum of arbitrary memory if the rawData array isn't 256+ bytes long (and, for the monitors mentioned, it probably is only 128). Reviewed-by: Mark Kettenis <kettenis@openbsd.org> Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-11-23Remove redundant redeclarations of functions in the same header fileAlan Coopersmith1-5/+0
Exposed by recent addition of -Wredundant-decls to default CWARNFLAGS Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-04-24hw/xfree86/ddc: remove duplicated includeNicolas Kaiser1-1/+0
Remove duplicated include. Signed-off-by: Nicolas Kaiser <nikai@nikai.net> Reviewed-by: Matthieu Herrb <matthieu.herrb@laas.fr>
2010-12-20xfree86: Convert some xf86BlockSIGIO to OsBlockSignalsAdam Jackson1-7/+4
The DDC1 and int10 code are blocking SIGIO to get some assurance that their usleep() calls take as long as they expect. That's a good start but you really want to be blocking more than just SIGIO, SIGALRM too at minimum. At this point, except for SIGIO handler setup itself, BlockSIGIO really means "block input events". Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18ddc: Don't probe for DDC/CI or EEPROMAdam Jackson1-4/+0
For whatever reason, some (broken) monitors will crash if you do this. We're not actually using this information for anything, so let's just not do it. Originally reported as http://bugzilla.redhat.com/620333 Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-08-20edid: Adjust rounding of max_clockChris Wilson1-1/+1
A simple hack to accommodate various EDID who have detailed modes that exceed the EDID's max pixel clock. The pixel clock is only defined in units of 10MHz and often appears as the maximum pixel code of the detailed modes, rounded to the nearest 10MHz. Adjusting the max_clock to include an extra 5MHz prevents the parser from rejecting the detailed modes. The kernel uses the same fuzz and by including it in X we can use the same modes in X as for the console. Fixes: Bug 23833 - X uses different refresh rate to that set by kernel module https://bugs.freedesktop.org/show_bug.cgi?id=23833 In the future, we will want to try harder to keep the KMS modes but at the same time we need to apply the restrictions as specified by the user's configuration, and need to fill in modes for fullscreen games on fixed-mode panels. Reported-and-tested-by: Fabio Pedretti <fabio.ped@libero.it> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Alex Deucher <alexdeucher@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-08-01ddc: Fix memory leak in GetEDID_DDC1Matt Turner1-2/+5
Mark argument to DDC_checksum as const too. Signed-off-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10Remove unnecessary parentheses around return values in functionsMikhail Gusarov2-9/+9
This patch was generated by the following Perl code: perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org> Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-13Replace X-allocation functions with their C89 counterpartsMikhail Gusarov3-15/+15
The only remaining X-functions used in server are XNF*, the rest is converted to plain alloc/calloc/realloc/free/strdup. X* functions are still exported from server and x* macros are still defined in header file, so both ABI and API are not affected by this change. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-29EDID: CEA extension supportMa Ling4-224/+562
Reviewed-by: Adam Jackson <ajax@redhat.com>
2009-08-28EDID: Vendor detailed blocks aren't worth X_WARNING aboutAdam Jackson1-1/+1
2009-08-28EDID: Print 1152x864 in established timings, not x870Adam Jackson1-1/+1
The spec says x870, but we actually use x864 because that's a real DMT mode and x870 isn't. This might or might not be wrong, but we should at least tell the truth.
2009-07-17displayid: Implement mode decoding.Adam Jackson1-0/+11
2009-07-17ddc: s/xf86DDCMonitorSet/xf86EdidMonitorSet/Adam Jackson2-2/+5
Since we need a second path for DisplayID.
2009-07-17ddc: Refactor root window property codeAdam Jackson1-23/+20
2009-07-17ddc: Don't try to publish a root window property for DisplayIDAdam Jackson1-1/+4
2009-07-17ddc: Skeleton for xf86DoDisplayID()Adam Jackson1-1/+59
2009-07-17ddc: mv xf86DDC.c ddc.cAdam Jackson2-1/+1
2009-07-17ddc: Give DisplayID a place to hang its hatAdam Jackson1-1/+8
2009-07-17ddc: Yet more code motionAdam Jackson4-153/+122
2009-07-17ddc: Code motion to eliminate forward declsAdam Jackson1-83/+67
2009-07-17ddc: Update a comment.Adam Jackson1-4/+4
2009-06-29EDID: Fix timing class names to match the specAdam Jackson1-3/+3
2009-06-16EDID: Carp about 1.4 monitors with no preferred refresh rateAdam Jackson1-2/+6
You would think, having finally tightened down the spec, that monitor vendors would bother to implement what the spec actually mandates. You would be wrong.
2009-05-22EDID: Add modes from Established Timings III descriptor to mode poolAdam Jackson2-1/+2
EDID 1.4, section 3.10.3.9
2009-05-21EDID: Be more cautious about finding vendor blocks.Adam Jackson1-2/+4
Many old monitors zero-fill the detailed descriptors, so check for that to avoid a useless warning like: (WW) RADEON(0): Unknown vendor-specific block 0
2009-05-14Update several of my and/or Red Hat's licenses to standard form.Adam Jackson2-20/+22
2009-02-27DDC: Redo extended device probe slightly.Adam Jackson1-1/+6
We'll now only mention the E-EDID segment register if the device is actually E-EDID-capable. While we're here, check for DDC/CI and standard EEPROM support too.
2009-01-07Include Xmd.h from edid.hRĂ©mi Cardona1-0/+2
2008-12-07Use libtool convenience libraries and better "symbol" table.Paulo Cesar Pereira de Andrade1-2/+2
All .a libraries were converted to .la, and instead of linking the Xorg binary with a mix of .a and .la, and adding some libraries more then once in the command line, etc, now it generates a single libxorg.la from all the required convenience libraries, and links with a dummy xorg.c (that should usually be the file with the main function...). This removes the requirement of some things like libosandcommon and libinit, that existed to circumvent problems when linking multiple .a and .la in the final Xorg binary. The "symbol table" is now generated dynamically, by a shell script, with an embedded gawk parser that parses cpp output. The new file sdksyms.sh is generated by hand by analyzing all Makefile.am's and making it create a sdksyms.c file, that includes all sdk headers that will add symbols for the Xorg binary. Module headers aren't read, and a in 2 files it was required to add a "<hash>ifndef XorgLoader" around declarations shared between the Xorg binary and libextmod. A few other changes were added to other sdk headers, like preventing multiple inclusion, or including other headers to satisfy dependencies. This should be a lot more portable, and better (hopefully properly) using libtool to generate convenience libraries.
2008-12-05Make sure _X_EXPORT is defined in edid.hAlan Coopersmith1-0/+4
Fixes build error in xf86-video-intel utilities
2008-12-03Rework symbol visibility for easier maintenancePaulo Cesar Pereira de Andrade6-19/+19
Save in a few special cases, _X_EXPORT should not be used in C source files. Instead, it should be used in headers, and the proper C source include that header. Some special cases are symbols that need to be shared between modules, but not expected to be used by external drivers, and symbols that are accessible via LoaderSymbol/dlopen. This patch also adds conditionally some new sdk header files, depending on extensions enabled. These files were added to match pattern for other extensions/modules, that is, have the headers "deciding" symbol visibility in the sdk. These headers are: o Xext/panoramiXsrv.h, Xext/panoramiX.h o fbpict.h (unconditionally) o vidmodeproc.h o mioverlay.h (unconditionally, used only by xaa) o xfixes.h (unconditionally, symbols required by dri2) LoaderSymbol and similar functions now don't have different prototypes, in loaderProcs.h and xf86Module.h, so that both headers can be included, without the need of defining IN_LOADER. xf86NewInputDevice() device prototype readded to xf86Xinput.h, but not exported (and with a comment about it).
2008-11-29Export symbols defined in the sdk.Paulo Cesar Pereira de Andrade1-1/+1
This is the biggest "visibility" patch. Instead of doing a "export" symbol on demand, export everything in the sdk, so that if some module fails due to an unresolved symbol, it is because it is using a symbol not in the sdk. Most exported symbols shouldn't really be made visible, neither advertised in the sdk, as they are only used by a single shared object. Symbols in the sdk (or referenced in sdk macros), but not defined anywhere include: XkbBuildCoreState() XkbInitialMap XkbXIUnsupported XkbCheckActionVMods() XkbSendCompatNotify() XkbDDXFakePointerButton() XkbDDXApplyConfig() _XkbStrCaseCmp() _XkbErrMessages[] _XkbErrCode _XkbErrLocation _XkbErrData XkbAccessXDetailText() XkbNKNDetailMaskText() XkbLookupGroupAndLevel() XkbInitAtoms() XkbGetOrderedDrawables() XkbFreeOrderedDrawables() XkbConvertXkbComponents() XkbWriteXKBSemantics() XkbWriteXKBLayout() XkbWriteXKBKeymap() XkbWriteXKBFile() XkbWriteCFile() XkbWriteXKMFile() XkbWriteToServer() XkbMergeFile() XkmFindTOCEntry() XkmReadFileSection() XkmReadFileSectionName() InitExtInput() xf86CheckButton() xf86SwitchCoreDevice() RamDacSetGamma() RamDacRestoreDACValues() xf86Bpp xf86ConfigPix24 xf86MouseCflags[] xf86SupportedMouseTypes[] xf86NumMouseTypes xf86ChangeBusIndex() xf86EntityEnter() xf86EntityLeave() xf86WrapperInit() xf86RingBell() xf86findOptionBoolean() xf86debugListOptions() LoadSubModuleLocal() LoaderSymbolLocal() getInt10Rec() xf86CurrentScreen xf86ReallocatePciResources() xf86NewSerialNumber() xf86RandRSetInitialMode() fbCompositeSolidMask_nx1xn fbCompositeSolidMask_nx8888x0565C fbCompositeSolidMask_nx8888x8888C fbCompositeSolidMask_nx8x0565 fbCompositeSolidMask_nx8x0888 fbCompositeSolidMask_nx8x8888 fbCompositeSrc_0565x0565 fbCompositeSrc_8888x0565 fbCompositeSrc_8888x0888 fbCompositeSrc_8888x8888 fbCompositeSrcAdd_1000x1000 fbCompositeSrcAdd_8000x8000 fbCompositeSrcAdd_8888x8888 fbGeneration fbIn fbOver fbOver24 fbOverlayGeneration fbRasterizeEdges fbRestoreAreas fbSaveAreas composeFunctions VBEBuildVbeModeList() VBECalcVbeModeIndex() TIramdac3030CalculateMNPForClock() shadowBufPtr shadowFindBuf() miRRGetScreenInfo() RRSetScreenConfig() RRModePruneUnused() PixmanImageFromPicture() extern int miPointerGetMotionEvents() miClipPicture() miRasterizeTriangle() fbPush1toN() fbInitializeBackingStore() ddxBeforeReset() SetupSprite() InitSprite() DGADeliverEvent() SPECIAL CASES o defined as _X_INTERNAL xf86NewInputDevice() o defined as static fbGCPrivateKey fbOverlayScreenPrivateKey fbScreenPrivateKey fbWinPrivateKey o defined in libXfont.so, but declared in xorg/dixfont.h GetGlyphs() QueryGlyphExtents() QueryTextExtents() ParseGlyphCachingMode() InitGlyphCaching() SetGlyphCachingMode()
2008-11-28Make visible symbols required by xorg modules.Paulo Cesar Pereira de Andrade1-3/+3
This patch exports all symbols required by the compilable (in a x86 linux computer) xorg/driver/* modules. Still missing symbols worth mentioning are: sunleo miFindMaxBand no longer available intel (uxa/uxa-accel.c) fbShmPutImage no longer available (and should have been static) mga MGAGetClientPointer (should come from matrox's libhal) This is not a definitive "visibility" patch, as all it does is to export missing symbols, but the modules that current don't compile, may require more symbols once fixed, and third party drivers should also require more symbols exported. A "definitive" patch should export symbols defined in the sdk.
2008-11-27Export symbols required by the vesa and fbdev drivers.Paulo Cesar Pereira de Andrade3-3/+3
This is a minimal set of patches, to have an usable X Server when compiling it with symbols hidden by default.
2008-11-13Add missing newline when printing edid infoAlex Deucher1-1/+1
2008-11-03Add xf86MonitorIsHDMI() helper.Adam Jackson2-2/+56
2008-10-14EDID: Catch even more cases of encoding aspect as size.Adam Jackson1-3/+7
Very cute, Samsung, not only do you claim to be 16cm by 9cm in the global size record, you also claim to be 160mm by 90mm in the detailed timings. Grrr.
2008-10-10Revert "Don't leak EDID_block"Adam Jackson1-1/+0
This reverts commit 05cdef18ca668ffc86b71033f71cfbd262cdd994. http://lists.freedesktop.org/archives/xorg/2008-October/039305.html
2008-10-10EDID: Catch monitors that encode aspect ratio for physical size.Adam Jackson1-0/+41
This is not legal in either EDID 1.3 or 1.4, but hey, when did a little thing like legality stop anyone.
2008-10-10Don't leak EDID_blockZhenyu Wang1-0/+1
2008-09-19Revert accidental edid changes from previous commit.Adam Jackson1-86/+0
2008-09-19Update to SGI FreeB 2.0.Adam Jackson1-0/+86
Under the terms of version 1.1, "once Covered Code has been published under a particular version of the License, Recipient may, for the duration of the License, continue to use it under the terms of that version, or choose to use such Covered Code under the terms of any subsequent version published by SGI." FreeB 2.0 license refers to "dates of first publication". They are here taken to be 1991-2000, as noted in the original license text: ** Original Code. The Original Code is: OpenGL Sample Implementation, ** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, ** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. ** Copyright in any portions created by third parties is as indicated ** elsewhere herein. All Rights Reserved. Official FreeB 2.0 text: http://oss.sgi.com/projects/FreeB/SGIFreeSWLicB.2.0.pdf As always, this code has not been tested for conformance with the OpenGL specification. OpenGL conformance testing is available from http://khronos.org/ and is required for use of the OpenGL logo in product advertising and promotion.
2008-08-25EDID: Publish the whole block on the root window if we've got it.Adam Jackson1-3/+8
2008-07-29Cosmetic fix to EDID decoding.Xavier Bestel1-1/+2
2008-07-01Declare xf86InterpretEEDID() properly.Adam Jackson1-0/+4
2008-06-30Hexdump the whole EDID block if extensions present.Adam Jackson1-11/+17
2008-06-30Actually fetch all blocks of EEDID if asked to.Adam Jackson4-18/+35
2008-05-27xfree86: fix offset error in EDID parsing. #15964Peter Hutterer1-8/+8
X.Org Bug 15964 <http://bugs.freedesktop.org/show_bug.cgi?id=15964>