commit xorg-x11-driver-video for openSUSE:Factory
Hello community, here is the log from the commit of package xorg-x11-driver-video for openSUSE:Factory checked in at Fri Aug 21 17:40:07 CEST 2009. -------- --- xorg-x11-driver-video/xorg-x11-driver-video.changes 2009-08-17 22:09:35.000000000 +0200 +++ xorg-x11-driver-video/xorg-x11-driver-video.changes 2009-08-20 11:29:25.000000000 +0200 @@ -1,0 +2,21 @@ +Thu Aug 20 06:07:05 CEST 2009 - sndirsch@suse.de + +- xf86-video-chips 1.2.2 + * Remove useless loader symbol lists. + * Remove xorgconfig & xorgcfg from See Also list in man page + * chips: update for resources/RAC API removal + * chips: change to using ABI version check + * Fix PCI card probe and chipset detection. + +------------------------------------------------------------------- +Tue Aug 18 19:00:39 CEST 2009 - sndirsch@suse.de + +- xf86-video-intel-brightness-addon.patch + * This is an addon patch for previous backlight patches to fix + some minor issues (get_properties was not implemented, + BACKLIGHT property doesn't fit name standardization, some + quirks possible with DPMS, backlight not necessarily powered + off). Note that this is pretty much untested, so it isn't + applied for the Moblin yet. + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- xf86-video-chips-1.2.1.tar.bz2 New: ---- xf86-video-chips-1.2.2.tar.bz2 xf86-video-intel-brightness-addon.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ xorg-x11-driver-video.spec ++++++ --- /var/tmp/diff_new_pack.F3BslF/_old 2009-08-21 17:39:19.000000000 +0200 +++ /var/tmp/diff_new_pack.F3BslF/_new 2009-08-21 17:39:19.000000000 +0200 @@ -23,7 +23,7 @@ BuildRequires: Mesa-devel libdrm-devel pkgconfig xorg-x11-proto-devel xorg-x11-server-sdk Url: http://xorg.freedesktop.org/ Version: 7.4 -Release: 78 +Release: 79 License: MIT License (or similar) BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: System/X11/Servers/XF86_4 @@ -38,7 +38,7 @@ Source0: xf86-video-apm-1.2.2.tar.bz2 Source1: xf86-video-ark-0.7.1.tar.bz2 Source2: xf86-video-ast-0.89.9.tar.bz2 -Source4: xf86-video-chips-1.2.1.tar.bz2 +Source4: xf86-video-chips-1.2.2.tar.bz2 Source5: xf86-video-cirrus-1.2.1.tar.bz2 Source7: xf86-video-dummy-0.3.2.tar.bz2 Source8: xf86-video-fbdev-0.4.1.tar.bz2 @@ -108,6 +108,7 @@ Patch115: moblin-uxa-Fix-segfault-on-source-only-picture-usage.patch Patch116: xf86-video-intel-Add-BACKLIGHT-property-support-in-KMS-case.patch Patch117: xf86-video-intel-Add-new-backlight-driver-samsung.patch +Patch118: xf86-video-intel-brightness-addon.patch Patch130: xf86-video-intel-buildfix.diff %description @@ -189,6 +190,9 @@ %patch115 -p1 %patch116 -p1 %patch117 -p1 +%if !%{moblin} +%patch118 -p1 +%endif %patch130 -p0 popd ++++++ xf86-video-chips-1.2.1.tar.bz2 -> xf86-video-chips-1.2.2.tar.bz2 ++++++ ++++ 58127 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-chips-1.2.1/config.h.in new/xf86-video-chips-1.2.2/config.h.in --- old/xf86-video-chips-1.2.1/config.h.in 2008-12-22 05:26:01.000000000 +0100 +++ new/xf86-video-chips-1.2.2/config.h.in 2009-08-19 19:43:07.000000000 +0200 @@ -41,6 +41,10 @@ /* Have 4bpp support */ #undef HAVE_XF4BPP +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-chips-1.2.1/configure.ac new/xf86-video-chips-1.2.2/configure.ac --- old/xf86-video-chips-1.2.1/configure.ac 2008-12-22 05:25:45.000000000 +0100 +++ new/xf86-video-chips-1.2.2/configure.ac 2009-08-19 19:42:37.000000000 +0200 @@ -22,7 +22,7 @@ AC_PREREQ(2.57) AC_INIT([xf86-video-chips], - 1.2.1, + 1.2.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xf86-video-chips) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-chips-1.2.1/man/chips.man new/xf86-video-chips-1.2.2/man/chips.man --- old/xf86-video-chips-1.2.1/man/chips.man 2008-03-10 02:32:29.000000000 +0100 +++ new/xf86-video-chips-1.2.2/man/chips.man 2009-05-27 23:31:03.000000000 +0200 @@ -217,7 +217,7 @@ if a panel is connected. Default: value probed by BIOS. .SH "SEE ALSO" -__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__) +__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__) .PP You are also recommended to read the README.chips file that comes with all __xservername__ distributions, which discusses the diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-chips-1.2.1/src/ct_driver.c new/xf86-video-chips-1.2.2/src/ct_driver.c --- old/xf86-video-chips-1.2.1/src/ct_driver.c 2008-12-22 05:25:35.000000000 +0100 +++ new/xf86-video-chips-1.2.2/src/ct_driver.c 2009-08-19 19:42:24.000000000 +0200 @@ -85,9 +85,14 @@ /* Drivers that need to access the PCI config space directly need this */ #include "xf86Pci.h" +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6 /* Standard resources are defined here */ #include "xf86Resources.h" +/* Needed by Resources Access Control (RAC) */ +#include "xf86RAC.h" +#endif + /* All drivers using the vgahw module need this */ #include "vgaHW.h" @@ -115,9 +120,6 @@ #include "xf4bpp.h" #endif -/* Needed by Resources Access Control (RAC) */ -#include "xf86RAC.h" - /* int10 */ #include "xf86int10.h" #include "vbe.h" @@ -480,14 +482,14 @@ { PCI_VENDOR_CHIPSTECH, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) } static const struct pci_id_match chips_device_match[] = { - CHIPS_DEVICE_MATCH(PCI_CHIP_65545, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_65548, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_65550, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_65554, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_65555, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_68554, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_69000, 0), - CHIPS_DEVICE_MATCH(PCI_CHIP_69030, 0), + CHIPS_DEVICE_MATCH(PCI_CHIP_65545, CHIPS_CT65545), + CHIPS_DEVICE_MATCH(PCI_CHIP_65548, CHIPS_CT65548), + CHIPS_DEVICE_MATCH(PCI_CHIP_65550, CHIPS_CT65550), + CHIPS_DEVICE_MATCH(PCI_CHIP_65554, CHIPS_CT65554), + CHIPS_DEVICE_MATCH(PCI_CHIP_65555, CHIPS_CT65555), + CHIPS_DEVICE_MATCH(PCI_CHIP_68554, CHIPS_CT68554), + CHIPS_DEVICE_MATCH(PCI_CHIP_69000, CHIPS_CT69000), + CHIPS_DEVICE_MATCH(PCI_CHIP_69030, CHIPS_CT69030), { 0, 0, 0 }, }; #endif @@ -691,97 +693,6 @@ { -1, NULL, OPTV_NONE, {0}, FALSE } }; -/* - * List of symbols from other modules that this module references. This - * list is used to tell the loader that it is OK for symbols here to be - * unresolved providing that it hasn't been told that they haven't been - * told that they are essential via a call to xf86LoaderReqSymbols() or - * xf86LoaderReqSymLists(). The purpose is this is to avoid warnings about - * unresolved symbols that are not required. - */ - -static const char *vgahwSymbols[] = { - "vgaHWAllocDefaultRegs", - "vgaHWFreeHWRec", - "vgaHWGetHWRec", - "vgaHWGetIOBase", - "vgaHWGetIndex", - "vgaHWHBlankKGA", - "vgaHWInit", - "vgaHWLock", - "vgaHWMapMem", - "vgaHWProtect", - "vgaHWRestore", - "vgaHWSave", - "vgaHWUnlock", - "vgaHWVBlankKGA", - "vgaHWddc1SetSpeedWeak", - NULL -}; - -#ifdef XFree86LOADER -static const char *miscfbSymbols[] = { -#ifdef HAVE_XF1BPP - "xf1bppScreenInit", -#endif -#ifdef HAVE_XF4BPP - "xf4bppScreenInit", -#endif - "cfb8_16ScreenInit", - NULL -}; -#endif - -static const char *fbSymbols[] = { - "fbScreenInit", - "fbPictureInit", - NULL -}; - -static const char *xaaSymbols[] = { - "XAACreateInfoRec", - "XAADestroyInfoRec", - "XAAInit", - "XAAInitDualFramebufferOverlay", - "XAAStippleScanlineFuncMSBFirst", - NULL -}; - -static const char *ramdacSymbols[] = { - "xf86CreateCursorInfoRec", - "xf86DestroyCursorInfoRec", - "xf86InitCursor", - NULL -}; - -static const char *ddcSymbols[] = { - "xf86DoEDID_DDC1", - "xf86DoEDID_DDC2", - "xf86PrintEDID", - "xf86SetDDCproperties", - NULL -}; - -static const char *i2cSymbols[] = { - "xf86CreateI2CBusRec", - "xf86I2CBusInit", - "xf86I2CFindBus", - "xf86I2CProbeAddress", - NULL -}; - -static const char *shadowSymbols[] = { - "ShadowFBInit", - NULL -}; - -static const char *vbeSymbols[] = { - "VBEInit", - "vbeDoEDID", - "vbeFree", - NULL -}; - #ifdef XFree86LOADER static MODULESETUPPROTO(chipsSetup); @@ -813,7 +724,7 @@ if (!setupDone) { setupDone = TRUE; - xf86AddDriver(&CHIPS, module, 0); + xf86AddDriver(&CHIPS, module, HaveDriverFuncs); /* * Modules that this driver always requires can be loaded here @@ -821,14 +732,6 @@ */ /* - * Tell the loader about symbols from other modules that this module - * might refer to. - */ - LoaderRefSymLists(vgahwSymbols, miscfbSymbols, fbSymbols, xaaSymbols, - ramdacSymbols, ddcSymbols, i2cSymbols, - shadowSymbols, vbeSymbols, NULL); - - /* * The return value must be non-NULL on success even though there * is no TearDownProc. */ @@ -900,7 +803,6 @@ intptr_t match_data) { ScrnInfoPtr pScrn = NULL; - EntityInfoPtr pEnt; CHIPSPtr cPtr; /* Allocate a ScrnInfoRec and claim the slot */ @@ -921,12 +823,16 @@ pScrn->FreeScreen = CHIPSFreeScreen; pScrn->ValidMode = CHIPSValidMode; + if (!CHIPSGetRec(pScrn)) { + return FALSE; + } + cPtr = CHIPSPTR(pScrn); + cPtr->Chipset = match_data; /* * For cards that can do dual head per entity, mark the entity * as sharable. */ - pEnt = xf86GetEntityInfo(entity_num); - if (pEnt->chipset == CHIPS_CT69030) { + if (match_data == CHIPS_CT69030) { CHIPSEntPtr cPtrEnt = NULL; DevUnion *pPriv; @@ -1182,7 +1088,6 @@ /* The vgahw module should be loaded here when needed */ if (!xf86LoadSubModule(pScrn, "vgahw")) return FALSE; - xf86LoaderReqSymLists(vgahwSymbols, NULL); /* Allocate the ChipsRec driverPrivate */ if (!CHIPSGetRec(pScrn)) { @@ -1201,8 +1106,14 @@ /* This is the general case */ for (i = 0; i<pScrn->numEntities; i++) { cPtr->pEnt = xf86GetEntityInfo(pScrn->entityList[i]); +#ifndef XSERVER_LIBPCIACCESS if (cPtr->pEnt->resources) return FALSE; - cPtr->Chipset = cPtr->pEnt->chipset; +#endif + /* If we are using libpciaccess this is already set in CHIPSPciProbe. + * If we are using something else we need to set it here. + */ + if (!cPtr->Chipset) + cPtr->Chipset = cPtr->pEnt->chipset; pScrn->chipset = (char *)xf86TokenToString(CHIPSChipsets, cPtr->pEnt->chipset); if ((cPtr->Chipset == CHIPS_CT64200) || @@ -1225,7 +1136,6 @@ #if 0 if (xf86LoadSubModule(pScrn, "int10")) { xf86Int10InfoPtr pInt; - xf86LoaderReqSymLists(int10Symbols, NULL); #if 1 xf86DrvMsg(pScrn->scrnIndex,X_INFO,"initializing int10\n"); pInt = xf86InitInt10(cPtr->pEnt->index); @@ -1235,7 +1145,6 @@ #endif if (xf86LoadSubModule(pScrn, "vbe")) { - xf86LoaderReqSymLists(vbeSymbols, NULL); cPtr->pVbe = VBEInit(NULL,cPtr->pEnt->index); } @@ -1407,7 +1316,6 @@ CHIPSFreeRec(pScrn); return FALSE; } - xf86LoaderReqSymbols("xf1bppScreenInit", NULL); break; #endif #ifdef HAVE_XF4BPP @@ -1418,7 +1326,6 @@ CHIPSFreeRec(pScrn); return FALSE; } - xf86LoaderReqSymbols("xf4bppScreenInit", NULL); break; #endif case 16: @@ -1429,7 +1336,6 @@ CHIPSFreeRec(pScrn); return FALSE; } - xf86LoaderReqSymbols("cfb8_16bppScreenInit", NULL); break; } default: @@ -1439,7 +1345,6 @@ CHIPSFreeRec(pScrn); return FALSE; } - xf86LoaderReqSymLists(fbSymbols, NULL); break; } @@ -1450,7 +1355,6 @@ CHIPSFreeRec(pScrn); return FALSE; } - xf86LoaderReqSymLists(xaaSymbols, NULL); } if (cPtr->Flags & ChipsShadowFB) { @@ -1460,7 +1364,6 @@ CHIPSFreeRec(pScrn); return FALSE; } - xf86LoaderReqSymLists(shadowSymbols, NULL); } if (cPtr->Accel.UseHWCursor) { @@ -1470,14 +1373,16 @@ CHIPSFreeRec(pScrn); return FALSE; } - xf86LoaderReqSymLists(ramdacSymbols, NULL); } +#ifndef XSERVER_LIBPCIACCESS if (cPtr->Flags & ChipsLinearSupport) xf86SetOperatingState(resVgaMem, cPtr->pEnt->index, ResDisableOpr); if (cPtr->MMIOBaseVGA) xf86SetOperatingState(resVgaIo, cPtr->pEnt->index, ResDisableOpr); +#endif + vbeFree(cPtr->pVbe); cPtr->pVbe = NULL; return TRUE; @@ -1502,7 +1407,9 @@ CHIPSPanelSizePtr Size = &cPtr->PanelSize; CHIPSMemClockPtr MemClk = &cPtr->MemClock; CHIPSClockPtr SaveClk = &(cPtr->SavedReg.Clock); +#ifndef XSERVER_LIBPCIACCESS resRange linearRes[] = { {ResExcMemBlock|ResBios|ResBus,0,0},_END }; +#endif /* Set pScrn->monitor */ pScrn->monitor = pScrn->confScreen->monitor; @@ -1651,8 +1558,10 @@ cPtr->FbAddress = PCI_REGION_BASE(cPtr->PciInfo, 0, REGION_MEM) & 0xff800000; from = X_PROBED; +#ifndef XSERVER_LIBPCIACCESS if (xf86RegisterResources(cPtr->pEnt->index,NULL,ResNone)) cPtr->Flags &= ~ChipsLinearSupport; +#endif } else { if (cPtr->pEnt->device->MemBase) { cPtr->FbAddress = cPtr->pEnt->device->MemBase; @@ -1664,12 +1573,14 @@ (0x80 & (cPtr->readXR(cPtr, 0x05)))) << 16; from = X_PROBED; } +#ifndef XSERVER_LIBPCIACCESS linearRes[0].rBegin = cPtr->FbAddress; linearRes[0].rEnd = cPtr->FbAddress + 0x800000; if (xf86RegisterResources(cPtr->pEnt->index,linearRes,ResNone)) { cPtr->Flags &= ~ChipsLinearSupport; from = X_PROBED; } +#endif } } if (cPtr->Flags & ChipsLinearSupport) { @@ -2029,8 +1940,6 @@ Bool ddc_done = FALSE; xf86MonPtr pMon; - xf86LoaderReqSymLists(ddcSymbols, NULL); - if (cPtr->pVbe) { if ((pMon = xf86PrintEDID(vbeDoEDID(cPtr->pVbe, pVbeModule))) != NULL) { @@ -2041,8 +1950,6 @@ if (!ddc_done) if (xf86LoadSubModule(pScrn, "i2c")) { - xf86LoaderReqSymLists(i2cSymbols,NULL); - if (chips_i2cInit(pScrn)) { if ((pMon = xf86PrintEDID(xf86DoEDID_DDC2(pScrn->scrnIndex, cPtr->I2C))) != NULL) @@ -2561,7 +2468,9 @@ CHIPSClockPtr SaveClk = &(cPtr->SavedReg.Clock); Bool useLinear = FALSE; char *s; +#ifndef XSERVER_LIBPCIACCESS resRange linearRes[] = { {ResExcMemBlock|ResBios|ResBus,0,0},_END }; +#endif /* Set pScrn->monitor */ pScrn->monitor = pScrn->confScreen->monitor; @@ -2757,12 +2666,14 @@ cPtr->FbAddress |= ((mask & (cPtr->readXR(cPtr, 0x08))) << 16); from = X_PROBED; } +#ifndef XSERVER_LIBPCIACCESS linearRes[0].rBegin = cPtr->FbAddress; linearRes[0].rEnd = cPtr->FbAddress + 0x800000; if (xf86RegisterResources(cPtr->pEnt->index,linearRes,ResNone)) { useLinear = FALSE; from = X_PROBED; } +#endif } if (useLinear) { @@ -2873,6 +2784,7 @@ ErrorF("DR[%X] = %X\n",i,cPtr->Regs32[i]); #endif } +#ifndef XSERVER_LIBPCIACCESS linearRes[0].type = ResExcIoSparse | ResBios | ResBus; linearRes[0].rBase = cPtr->Regs32[0]; linearRes[0].rMask = 0x83FC; @@ -2890,6 +2802,7 @@ "Disabling HWCursor\n"); } } +#endif } cPtr->ClockMulFactor = ((pScrn->bitsPerPixel >= 8) ? bytesPerPixel : 1); @@ -3003,7 +2916,6 @@ } if (xf86LoadSubModule(pScrn, "ddc")) { - xf86LoaderReqSymLists(ddcSymbols, NULL); if (cPtr->pVbe) xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(cPtr->pVbe, NULL))); } @@ -3022,7 +2934,9 @@ CHIPSClockPtr SaveClk = &(cPtr->SavedReg.Clock); Bool useLinear = FALSE; char *s; +#ifndef XSERVER_LIBPCIACCESS resRange linearRes[] = { {ResExcMemBlock|ResBios|ResBus,0,0},_END }; +#endif /* Set pScrn->monitor */ pScrn->monitor = pScrn->confScreen->monitor; @@ -3218,9 +3132,12 @@ } if (cPtr->pEnt->location.type == BUS_PCI) { cPtr->FbAddress = PCI_REGION_BASE(cPtr->PciInfo, 0, REGION_MEM) & 0xff800000; - if (xf86RegisterResources(cPtr->pEnt->index,NULL,ResNone)) - useLinear = FALSE; +#ifndef XSERVER_LIBPCIACCESS + if (xf86RegisterResources(cPtr->pEnt->index,NULL,ResNone)) { + useLinear = FALSE; from = X_PROBED; + } +#endif } else { if (cPtr->pEnt->device->MemBase) { cPtr->FbAddress = cPtr->pEnt->device->MemBase; @@ -3244,12 +3161,14 @@ } from = X_PROBED; } +#ifndef XSERVER_LIBPCIACCESS linearRes[0].rBegin = cPtr->FbAddress; linearRes[0].rEnd = cPtr->FbAddress + 0x800000; if (xf86RegisterResources(cPtr->pEnt->index,linearRes,ResNone)) { useLinear = FALSE; from = X_PROBED; } +#endif } } @@ -3549,6 +3468,7 @@ ErrorF("DR[%X] = %X\n",i,cPtr->Regs32[i]); #endif } +#ifndef XSERVER_LIBPCIACCESS linearRes[0].type = ResExcIoSparse | ResBios | ResBus; linearRes[0].rBase = cPtr->Regs32[0]; linearRes[0].rMask = 0x83FC; @@ -3566,6 +3486,7 @@ "Disabling HWCursor\n"); } } +#endif } /* sync reset ignored on this chipset */ @@ -3776,7 +3697,6 @@ "Memory clock option not supported for this chipset\n"); if (xf86LoadSubModule(pScrn, "ddc")) { - xf86LoaderReqSymLists(ddcSymbols, NULL); if (cPtr->pVbe) xf86SetDDCproperties(pScrn,xf86PrintEDID(vbeDoEDID(cPtr->pVbe, NULL))); } @@ -4483,12 +4403,14 @@ return FALSE; } +#ifndef XSERVER_LIBPCIACCESS racflag = RAC_COLORMAP; if (cAcl->UseHWCursor) racflag |= RAC_CURSOR; racflag |= (RAC_FB | RAC_VIEWPORT); /* XXX Check if I/O and Mem flags need to be the same. */ pScrn->racIoFlags = pScrn->racMemFlags = racflag; +#endif #ifdef ENABLE_SILKEN_MOUSE xf86SetSilkenMouse(pScreen); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-chips-1.2.1/src/ct_shadow.c new/xf86-video-chips-1.2.2/src/ct_shadow.c --- old/xf86-video-chips-1.2.1/src/ct_shadow.c 2008-08-14 07:23:39.000000000 +0200 +++ new/xf86-video-chips-1.2.2/src/ct_shadow.c 2009-08-19 19:42:24.000000000 +0200 @@ -5,7 +5,6 @@ #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Resources.h" #include "xf86PciInfo.h" #include "xf86Pci.h" #include "shadowfb.h" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-chips-1.2.1/src/ct_video.c new/xf86-video-chips-1.2.2/src/ct_video.c --- old/xf86-video-chips-1.2.1/src/ct_video.c 2008-08-14 07:23:39.000000000 +0200 +++ new/xf86-video-chips-1.2.2/src/ct_video.c 2009-08-19 19:42:24.000000000 +0200 @@ -5,7 +5,6 @@ #include "xf86.h" #include "xf86_OSproc.h" -#include "xf86Resources.h" #include "compiler.h" #include "xf86PciInfo.h" #include "xf86Pci.h" ++++++ xf86-video-intel-brightness-addon.patch ++++++
From a26f7fda5dc68dc7c54de8a2a734900344f65317 Mon Sep 17 00:00:00 2001 From: Matthias Hopf
Date: Tue, 18 Aug 2009 18:01:08 +0200 Subject: [PATCH] Also write to bl_power when setting brightness.
Switches backlight on/off on controllers that support this api. --- src/drmmode_display.c | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 4fb20d9..f41b978 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -109,6 +109,12 @@ static char *backlight_interfaces[] = { /* Enough for 10 digits of backlight + '\n' + '\0' */ #define BACKLIGHT_VALUE_LEN 12 +/* Constants from include/linux/fb.h */ +enum { + FB_BLANK_UNBLANK = 0, + FB_BLANK_POWERDOWN = 4 +}; + static void drmmode_backlight_set(xf86OutputPtr output, int level) { @@ -121,22 +127,37 @@ drmmode_backlight_set(xf86OutputPtr output, int level) if (! drmmode_output->backlight_iface || level < 0) return; - len = snprintf(val, BACKLIGHT_VALUE_LEN, "%d\n", level); sprintf(path, "%s/%s/brightness", BACKLIGHT_CLASS, drmmode_output->backlight_iface); + len = snprintf(val, BACKLIGHT_VALUE_LEN, "%d\n", level); fd = open(path, O_RDWR); if (fd == -1) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "failed to open %s for backlight " "control: %s\n", path, strerror(errno)); return; } - ret = write(fd, val, len); if (ret == -1) { xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "write to %s for backlight " "control failed: %s\n", path, strerror(errno)); } + close(fd); + sprintf(path, "%s/%s/bl_power", + BACKLIGHT_CLASS, drmmode_output->backlight_iface); + len = snprintf(val, BACKLIGHT_VALUE_LEN, "%d\n", + level > 0 ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN); + fd = open(path, O_RDWR); + if (fd == -1) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "failed to open %s for backlight " + "control: %s\n", path, strerror(errno)); + return; + } + ret = write(fd, val, len); + if (ret == -1) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "write to %s for backlight " + "control failed: %s\n", path, strerror(errno)); + } close(fd); } -- 1.6.0.2
From 1b7ff8fee1a28e38b006c2e6b83f25e2d37c6dcb Mon Sep 17 00:00:00 2001 From: Matthias Hopf
Date: Tue, 18 Aug 2009 18:05:45 +0200 Subject: [PATCH] Don't ignore backlight level change to the same level.
If set externally to a different level, this would result in a no-op. OTOH if the display is switched off (DPMS) you do not want the change to take place immediately, but rather to be saved and set later when the display is active again. --- src/drmmode_display.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index f41b978..64b28ef 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1096,10 +1096,9 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property, if (val < 0 || val > drmmode_output->backlight_max) return FALSE; - if (val != drmmode_output->backlight_active_level) { + if (drmmode_output->dpms_mode == DPMSModeOn) drmmode_backlight_set(output, val); - drmmode_output->backlight_active_level = val; - } + drmmode_output->backlight_active_level = val; return TRUE; } -- 1.6.0.2
From c394eabe88ddb1179adf7f56c3fdb642e3722c3d Mon Sep 17 00:00:00 2001 From: Matthias Hopf
Date: Tue, 18 Aug 2009 18:34:45 +0200 Subject: [PATCH] Add get_property support.
So far only BACKLIGHT is changed. --- src/drmmode_display.c | 36 ++++++++++++++++++++++++++++++++---- 1 files changed, 32 insertions(+), 4 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 64b28ef..ab73b4f 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1048,10 +1048,7 @@ drmmode_output_create_resources(xf86OutputPtr output) if (drmmode_output->backlight_iface) { INT32 data, backlight_range[2]; /* Set up the backlight property, which takes effect immediately - * and accepts values only within the backlight_range. - * - * FIXME: there is no get_property yet. - */ + * and accepts values only within the backlight_range. */ backlight_atom = MakeAtom(BACKLIGHT_NAME, sizeof(BACKLIGHT_NAME) - 1, TRUE); @@ -1143,10 +1140,41 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property, return TRUE; } +static Bool +drmmode_output_get_property(xf86OutputPtr output, Atom property) +{ + drmmode_output_private_ptr drmmode_output = output->driver_private; + int err; + + if (property == backlight_atom) { + INT32 val; + + if (! drmmode_output->backlight_iface) + return FALSE; + + val = drmmode_backlight_get(output); + if (val < 0) + return FALSE; + err = RRChangeOutputProperty(output->randr_output, backlight_atom, + XA_INTEGER, 32, PropModeReplace, 1, &val, + FALSE, TRUE); + if (err != 0) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, + "RRChangeOutputProperty error, %d\n", err); + return FALSE; + } + + return TRUE; + } + + return TRUE; +} + static const xf86OutputFuncsRec drmmode_output_funcs = { .create_resources = drmmode_output_create_resources, #ifdef RANDR_12_INTERFACE .set_property = drmmode_output_set_property, + .get_property = drmmode_output_get_property, #endif .dpms = drmmode_output_dpms, #if 0 -- 1.6.0.2
From 3fb5acbdb976e0a3bf60cd86a993f8377c76c8f2 Mon Sep 17 00:00:00 2001 From: Matthias Hopf
Date: Tue, 18 Aug 2009 18:44:38 +0200 Subject: [PATCH] Use "Backlight" as backlight brightness property.
BACKLIGHT is now deprecated, though still usable. --- src/drmmode_display.c | 29 ++++++++++++++++++++++------- 1 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index ab73b4f..7522f1c 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -957,8 +957,9 @@ drmmode_property_ignore(drmModePropertyPtr prop) return FALSE; } -#define BACKLIGHT_NAME "BACKLIGHT" -static Atom backlight_atom; +#define BACKLIGHT_NAME "Backlight" +#define BACKLIGHT_DEPRECATED_NAME "BACKLIGHT" +static Atom backlight_atom, backlight_deprecated_atom; static void drmmode_output_create_resources(xf86OutputPtr output) @@ -1049,8 +1050,9 @@ drmmode_output_create_resources(xf86OutputPtr output) INT32 data, backlight_range[2]; /* Set up the backlight property, which takes effect immediately * and accepts values only within the backlight_range. */ - backlight_atom = MakeAtom(BACKLIGHT_NAME, sizeof(BACKLIGHT_NAME) - 1, - TRUE); + backlight_atom = MakeAtom(BACKLIGHT_NAME, sizeof(BACKLIGHT_NAME) - 1, TRUE); + backlight_deprecated_atom = MakeAtom(BACKLIGHT_DEPRECATED_NAME, + sizeof(BACKLIGHT_DEPRECATED_NAME) - 1, TRUE); backlight_range[0] = 0; backlight_range[1] = drmmode_output->backlight_max; @@ -1060,6 +1062,12 @@ drmmode_output_create_resources(xf86OutputPtr output) xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRConfigureOutputProperty error, %d\n", err); } + err = RRConfigureOutputProperty(output->randr_output, backlight_deprecated_atom, + FALSE, TRUE, FALSE, 2, backlight_range); + if (err != 0) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, + "RRConfigureOutputProperty error, %d\n", err); + } /* Set the current value of the backlight property */ data = drmmode_output->backlight_active_level; err = RRChangeOutputProperty(output->randr_output, backlight_atom, @@ -1069,6 +1077,13 @@ drmmode_output_create_resources(xf86OutputPtr output) xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); } + err = RRChangeOutputProperty(output->randr_output, backlight_deprecated_atom, + XA_INTEGER, 32, PropModeReplace, 1, &data, + FALSE, TRUE); + if (err != 0) { + xf86DrvMsg(output->scrn->scrnIndex, X_ERROR, + "RRChangeOutputProperty error, %d\n", err); + } } } @@ -1080,7 +1095,7 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property, drmmode_ptr drmmode = drmmode_output->drmmode; int i; - if (property == backlight_atom) { + if (property == backlight_atom || property == backlight_deprecated_atom) { INT32 val; if (value->type != XA_INTEGER || value->format != 32 || @@ -1146,7 +1161,7 @@ drmmode_output_get_property(xf86OutputPtr output, Atom property) drmmode_output_private_ptr drmmode_output = output->driver_private; int err; - if (property == backlight_atom) { + if (property == backlight_atom || property == backlight_deprecated_atom) { INT32 val; if (! drmmode_output->backlight_iface) @@ -1155,7 +1170,7 @@ drmmode_output_get_property(xf86OutputPtr output, Atom property) val = drmmode_backlight_get(output); if (val < 0) return FALSE; - err = RRChangeOutputProperty(output->randr_output, backlight_atom, + err = RRChangeOutputProperty(output->randr_output, property, XA_INTEGER, 32, PropModeReplace, 1, &val, FALSE, TRUE); if (err != 0) { -- 1.6.0.2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de