rpms/xorg-x11-drv-openchrome/F-9 openchrome-0.2.902-CX700_Xv_on_LCD.patch, NONE, 1.1 openchrome-0.2.902-panel.patch, NONE, 1.1 xorg-x11-drv-openchrome.spec, 1.23, 1.24
Xavier Bachelot (xavierb)
fedora-extras-commits at redhat.com
Mon May 26 22:31:33 UTC 2008
- Previous message: rpms/R-tkWidgets/devel .cvsignore, 1.2, 1.3 R-tkWidgets.spec, 1.2, 1.3 sources, 1.2, 1.3
- Next message: rpms/R-tkWidgets/F-9 .cvsignore, 1.2, 1.3 R-tkWidgets.spec, 1.2, 1.3 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: xavierb
Update of /cvs/pkgs/rpms/xorg-x11-drv-openchrome/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv32089
Modified Files:
xorg-x11-drv-openchrome.spec
Added Files:
openchrome-0.2.902-CX700_Xv_on_LCD.patch
openchrome-0.2.902-panel.patch
Log Message:
- Add patch to fix Xv on LCD for CX700.
- New panel and hardware cursor code from randr branch.
openchrome-0.2.902-CX700_Xv_on_LCD.patch:
--- NEW FILE openchrome-0.2.902-CX700_Xv_on_LCD.patch ---
Index: src/via_swov.c
===================================================================
--- src/via_swov.c (revision 536)
+++ src/via_swov.c (revision 568)
@@ -1728,5 +1728,7 @@
* Enable video on secondary
*/
- if ((pVia->Chipset == VIA_P4M900 || pVia->Chipset == VIA_VM800)
+ if ((pVia->Chipset == VIA_P4M900 ||
+ pVia->Chipset == VIA_VM800 ||
+ pVia->Chipset == VIA_CX700)
&& pVia->pBIOSInfo->PanelActive) {
/* V1_ON_SND_DISPLAY */
openchrome-0.2.902-panel.patch:
--- NEW FILE openchrome-0.2.902-panel.patch ---
Index: src/via_panel.c
===================================================================
--- src/via_panel.c (revision 0)
+++ src/via_panel.c (revision 0)
@@ -0,0 +1,456 @@
+/*
+ * Copyright 2007 The Openchrome Project [openchrome.org]
+ * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
+ * Copyright 1998-2007 VIA Technologies, Inc. All Rights Reserved.
+ * Copyright 2001-2007 S3 Graphics, Inc. All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sub license,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * Core panel functions.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "via.h"
+#include "via_driver.h"
+#include "via_vgahw.h"
+#include "via_id.h"
+#include "via_timing.h"
+
+static ViaPanelModeRec ViaPanelNativeModes[] = {
+ {640, 480},
+ {800, 600},
+ {1024, 768},
+ {1280, 768},
+ {1280, 1024},
+ {1400, 1050},
+ {1600, 1200},
+ {1280, 800},
+ {800, 480},
+ {1366, 768},
+ {1360, 768},
+ {1920, 1080},
+ {1920, 1200},
+ {1024, 600},
+ {1440, 900},
+ {1280, 720}
+};
+
+static int
+ViaPanelLookUpModeIndex(int width, int height)
+{
+ int i, index = VIA_PANEL_INVALID;
+ int length = sizeof(ViaPanelNativeModes) / sizeof(ViaPanelModeRec);
+
+ for (i = 0; i < length; i++) {
+ if (ViaPanelNativeModes[i].Width == width
+ && ViaPanelNativeModes[i].Height == height) {
+ index = i;
+ break;
+ }
+ }
+ return index;
+}
+
+/*
+ * Sets the panel dimensions from the configuration
+ * using name with format "9999x9999".
+ */
+void
+ViaPanelGetNativeModeFromOption(ScrnInfoPtr pScrn, char *name)
+{
+ VIAPtr pVia = VIAPTR(pScrn);
+ VIABIOSInfoPtr pBIOSInfo = pVia->pBIOSInfo;
+ ViaPanelInfoPtr panel = pBIOSInfo->Panel;
+ CARD8 index;
+ CARD8 length;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "ViaPanelGetNativeModeFromOption\n"));
+
+ panel->NativeModeIndex = VIA_PANEL_INVALID;
+ if (strlen(name) < 10) {
+ length = sizeof(ViaPanelNativeModes) / sizeof(ViaPanelModeRec);
+ char aux[10];
+
+ for (index = 0; index < length; index++) {
+ sprintf(aux, "%dx%d", ViaPanelNativeModes[index].Width,
+ ViaPanelNativeModes[index].Height);
+ if (!xf86NameCmp(name, aux)) {
+ panel->NativeModeIndex = index;
+ panel->NativeMode->Width = ViaPanelNativeModes[index].Width;
+ panel->NativeMode->Height = ViaPanelNativeModes[index].Height;
+ break;
+ }
+ }
+ } else {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "%s is not a valid panel size.\n", name);
+ }
+}
+
+/*
+ * Gets the native panel resolution from scratch pad registers.
+ */
+void
+ViaPanelGetNativeModeFromScratchPad(ScrnInfoPtr pScrn)
+{
+ VIAPtr pVia = VIAPTR(pScrn);
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+ CARD8 index;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "ViaPanelGetNativeModeFromScratchPad\n"));
+
+ index = hwp->readCrtc(hwp, 0x3F) & 0x0F;
+
+ ViaPanelInfoPtr panel = pVia->pBIOSInfo->Panel;
+
+ panel->NativeModeIndex = index;
+ panel->NativeMode->Width = ViaPanelNativeModes[index].Width;
+ panel->NativeMode->Height = ViaPanelNativeModes[index].Height;
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Native Panel Resolution is %dx%d\n",
+ panel->NativeMode->Width, panel->NativeMode->Height);
+}
+
+void
+ViaPanelScaleDisable(ScrnInfoPtr pScrn)
+{
+ VIAPtr pVia = VIAPTR(pScrn);
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+
+ ViaCrtcMask(hwp, 0x79, 0x00, 0x01);
+ if (pVia->Chipset != VIA_CLE266 && pVia->Chipset != VIA_KM400)
+ ViaCrtcMask(hwp, 0xA2, 0x00, 0xC8);
+}
+
+void
+ViaPanelScale(ScrnInfoPtr pScrn, int resWidth, int resHeight,
+ int panelWidth, int panelHeight)
+{
+ VIAPtr pVia = VIAPTR(pScrn);
+ vgaHWPtr hwp = VGAHWPTR(pScrn);
+ int horScalingFactor = 0;
+ int verScalingFactor = 0;
+ CARD8 cra2 = 0;
+ CARD8 cr77 = 0;
+ CARD8 cr78 = 0;
+ CARD8 cr79 = 0;
+ CARD8 cr9f = 0;
+ Bool scaling = FALSE;
+
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "ViaPanelScale: %d,%d -> %d,%d\n",
+ resWidth, resHeight, panelWidth, panelHeight));
+
+ if (resWidth < panelWidth) {
+ /* FIXME: It is different for chipset < K8M800 */
+ horScalingFactor = ((resWidth - 1) * 4096) / (panelWidth - 1);
+
+ /* Horizontal scaling enabled */
+ cra2 = 0xC0;
+ cr9f = horScalingFactor & 0x0003; /* HSCaleFactor[1:0] at CR9F[1:0] */
+ cr77 = (horScalingFactor & 0x03FC) >> 2; /* HSCaleFactor[9:2] at CR77[7:0] */
+ cr79 = (horScalingFactor & 0x0C00) >> 10; /* HSCaleFactor[11:10] at CR79[5:4] */
+ cr79 <<= 4;
+ scaling = TRUE;
+ }
+
+ if (resHeight < panelHeight) {
+ verScalingFactor = ((resHeight - 1) * 2048) / (panelHeight - 1);
+
+ /* Vertical scaling enabled */
+ cra2 |= 0x08;
+ cr79 |= ((verScalingFactor & 0x0001) << 3); /* VSCaleFactor[0] at CR79[3] */
+ cr78 |= (verScalingFactor & 0x01FE) >> 1; /* VSCaleFactor[8:1] at CR78[7:0] */
+ cr79 |= ((verScalingFactor & 0x0600) >> 9) << 6; /* VSCaleFactor[10:9] at CR79[7:6] */
+ scaling = TRUE;
+ }
+
+ if (scaling) {
+ DEBUG(xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Scaling factor: horizontal %d (0x%x), vertical %d (0x%x)\n",
[...4667 lines suppressed...]
+ float hSyncRnd = RED_BLANK_RQD ? rbHSync : froundf( gtf, ( hSyncPer / 100.0f * totalPixels / cellGranRnd ) ) * cellGranRnd ;
+
+ /* RESULTS Hor Front Porch: */
+ float hFrontPorch ;
+ if (gtf)
+ hFrontPorch = ( hBlank / 2.0f ) - hSyncRnd ;
+ else
+ hFrontPorch = hBlank - hBackPorch - hSyncRnd ;
+
+#if DEBUG
+ fprintf( stderr, "hFrontPorch:\t\t%f\n", hFrontPorch ) ;
+ fprintf( stderr, "totalActivePixels:\t\t%f\n", totalActivePixels ) ;
+ fprintf( stderr, "vFieldRateRqd:\t\t\t%f\n", vFieldRateRqd ) ;
+ fprintf( stderr, "minVSyncBP:\t\t\t%f\n", minVSyncBP ) ;
+ fprintf( stderr, "vLinesRnd:\t\t\t%f\n", vLinesRnd ) ;
+ fprintf( stderr, "minVPorchRnd:\t\t\t%f\n", minVPorchRnd ) ;
+ fprintf( stderr, "interlace:\t\t\t%f\n", interlace ) ;
+ fprintf( stderr, "vSyncBP:\t\t\t%f\n", vSyncBP ) ;
+ fprintf( stderr, "hSyncPer:\t\t\t%f\n", hSyncPer ) ;
+ fprintf( stderr, "totalPixels:\t\t\t%f\n", totalPixels ) ;
+ fprintf( stderr, "cellGranRnd:\t\t\t%f\n", cellGranRnd ) ;
+ fprintf( stderr, "hPeriod:\t\t\t%f\n", hPeriod ) ;
+ fprintf( stderr, "vFieldRate:\t\t\t%f\n", vFieldRate ) ;
+ fprintf( stderr, "hPeriodEst:\t\t\t%f\n", hPeriodEst ) ;
+ fprintf( stderr, "totalVLines:\t\t\t%f\n", totalVLines ) ;
+ fprintf( stderr, "vFieldRateEst:\t\t\t%f\n", vFieldRateEst ) ;
+ fprintf( stderr, "vFieldRateRqd:\t\t\t%f\n", vFieldRateRqd ) ;
+ fprintf( stderr, "idealDutyCicle:\t\t\t%f\n", idealDutyCicle ) ;
+ fprintf( stderr, "actHFreq:\t\t\t%f\n", actHFreq ) ;
+ fprintf( stderr, "hblank:\t\t\t\t%f\n", hBlank ) ;
+ fprintf( stderr, "actPixelFreq:\t\t\t%f\n", actPixelFreq ) ;
+#endif
+
+ if ( mode ) {
+ if ( mode->name == NULL ) mode->name = malloc(MODE_NAME_LENGTH);
+ if ( mode->name ) {
+ char c = 0 ;
+ if (RED_BLANK_RQD) c = 'r' ;
+ if (INT_RQD) c = 'i' ;
+
+ sprintf(mode->name, "%dx%d@%d%c", width, height, (int)refresh, c ) ;
+ mode->Clock = actPixelFreq * 1000.0f ;
+ mode->VRefresh = actFrameRat ;
+
+ mode->HDisplay = width ;
+ mode->HSyncStart = width + hFrontPorch ;
+ mode->HSyncEnd = width + ( hFrontPorch + hSyncRnd ) ;
+ mode->HTotal = totalPixels ;
+
+ mode->VDisplay = height ;
+ mode->VSyncStart = height + vFrontPorch ;
+ mode->VSyncEnd = height + ( vFrontPorch + vSyncRnd ) ;
+ mode->VTotal = INT_RQD ? totalVLines * 2 : totalVLines ;
+ mode->Flags = 0 ;
+
+ if (RED_BLANK_RQD) {
+ mode->Flags |= V_PHSYNC ;
+ mode->Flags |= V_NVSYNC ;
+ } else {
+ mode->Flags |= V_NHSYNC ;
+ mode->Flags |= V_PVSYNC ;
+ }
+
+ if (!(mode->Flags & V_PHSYNC)) mode->Flags |= V_NHSYNC ;
+ if (!(mode->Flags & V_NHSYNC)) mode->Flags |= V_PHSYNC ;
+ if (!(mode->Flags & V_PVSYNC)) mode->Flags |= V_NVSYNC ;
+ if (!(mode->Flags & V_NVSYNC)) mode->Flags |= V_PVSYNC ;
+
+ if (INT_RQD) mode->Flags |= V_INTERLACE ;
+ } else {
+ ret |= TIMING_ERR_BAD_ALLOC ;
+ }
+
+ }
+ return ret ;
+}
+
+int viaTimingCvt(DisplayModePtr mode, int width, int height, float refresh, Bool interlaced, Bool reducedBlanking) {
+ return timingGenerateMode( mode, FALSE, width, height, refresh, interlaced, reducedBlanking ) ;
+}
+
+int viaTimingGtf(DisplayModePtr mode, int width, int height, float refresh, Bool interlaced) {
+ return timingGenerateMode( mode, TRUE, width, height, refresh, interlaced, FALSE ) ;
+}
Index: src/Makefile.am
===================================================================
--- src/Makefile.am (revision 569)
+++ src/Makefile.am (working copy)
@@ -43,23 +43,29 @@
via_ch7xxx.c \
via_ch7xxx.h \
via_cursor.c \
+ via_crtc.c \
via_dga.c \
+ via_display.c \
via_dmabuffer.h \
via_driver.c \
via_driver.h \
via_i2c.c \
via_id.c \
via_id.h \
+ via_lvds.c \
via_memcpy.c \
via_memcpy.h \
via_memory.c \
via_mode.c \
via_mode.h \
+ via_panel.c \
via_priv.h \
via_regs.h \
via_shadow.c \
via_swov.c \
via_swov.h \
+ via_timing.c \
+ via_timing.h \
via_vbe.c \
via_vgahw.c \
via_vgahw.h \
Index: src/via_dga.c
===================================================================
--- src/via_dga.c (revision 569)
+++ src/via_dga.c (working copy)
@@ -247,8 +247,8 @@
pScrn->depth = pVia->DGAOldDepth;
pScrn->SwitchMode(index, pScrn->currentMode, 0);
- if (pVia->hwcursor)
- VIAShowCursor(pScrn);
+ if (pVia->cursor->isHWCursorEnabled)
+ viaCursorShow(pScrn);
pVia->DGAactive = FALSE;
}
@@ -260,8 +260,8 @@
pMode->bitsPerPixel, pMode->depth);
#endif
- if (pVia->hwcursor)
- VIAHideCursor(pScrn);
+ if (pVia->cursor->isHWCursorEnabled)
+ viaCursorHide(pScrn);
if (!pVia->DGAactive) { /* save the old parameters */
pVia->DGAOldDisplayWidth = pScrn->displayWidth;
Index: src/via_timing.h
===================================================================
--- src/via_timing.h (revision 0)
+++ src/via_timing.h (revision 0)
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2007-2008 Gabriel Mansi.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ */
+
+#ifndef _TIMING_H_
+#define _TIMING_H_
+
+#include "xf86.h"
+
+/* Aspect ratio not CVT standard */
+#define TIMING_CVT_WARN_ASPECT_RATIO 1 << 0
+
+/* Error allocating memory */
+#define TIMING_ERR_BAD_ALLOC 1 << 1
+
+/* Refresh rate not CVT standard */
+#define TIMING_CVT_WARN_REFRESH_RATE 1 << 2
+
+/* Refresh rate not valid for reducing blanking */
+#define TIMING_CVT_WARN_REFRESH_RATE_NOT_RB 1 << 3
+
+/**
+ * Geneartes a CVT modeline
+ * mode must not be null, if mode->name is null a new char* will be allocated.
+ *
+ */
+int viaTimingCvt(DisplayModePtr mode, int width, int height, float refresh, Bool interlaced, Bool reducedBlanking);
+
+int viaTimingGtf(DisplayModePtr mode, int width, int height, float refresh, Bool interlaced) ;
+
+#endif /*_TIMING_H_*/
Index: xorg-x11-drv-openchrome.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-openchrome/F-9/xorg-x11-drv-openchrome.spec,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- xorg-x11-drv-openchrome.spec 25 May 2008 21:32:00 -0000 1.23
+++ xorg-x11-drv-openchrome.spec 26 May 2008 22:30:44 -0000 1.24
@@ -9,7 +9,7 @@
Summary: Xorg X11 openchrome video driver
Name: xorg-x11-drv-openchrome
Version: 0.2.902
-Release: 4%{?dist}
+Release: 5%{?dist}
URL: http://www.openchrome.org
License: MIT
Group: User Interface/X Hardware Support
@@ -22,6 +22,8 @@
Patch2: openchrome-0.2.902-report_version.patch
Patch3: openchrome-0.2.902-chipset_revision.patch
Patch4: openchrome-0.2.902-unbreak_ActiveDevice.patch
+Patch5: openchrome-0.2.902-CX700_Xv_on_LCD.patch
+Patch6: openchrome-0.2.902-panel.patch
ExclusiveArch: %{ix86} x86_64
@@ -62,8 +64,11 @@
%patch2 -p0 -b .version
%patch3 -p0 -b .chiprev
%patch4 -p0 -b .activedevice
+%patch5 -p0 -b .cx700_xv_lcd
+%patch6 -p0 -b .panel
%build
+autoreconf
%configure --disable-static --enable-dri
make
@@ -109,6 +114,10 @@
%changelog
+* Mon May 26 2008 Xavier Bachelot <xavier AT bachelot DOT org> - 0.2.902-5
+- Add patch to fix Xv on LCD for CX700.
+- New panel and hardware cursor code from randr branch.
+
* Sun May 25 2008 Xavier Bachelot <xavier AT bachelot DOT org> - 0.2.902-4
- Unbreak ActiveDevice option.
- Previous message: rpms/R-tkWidgets/devel .cvsignore, 1.2, 1.3 R-tkWidgets.spec, 1.2, 1.3 sources, 1.2, 1.3
- Next message: rpms/R-tkWidgets/F-9 .cvsignore, 1.2, 1.3 R-tkWidgets.spec, 1.2, 1.3 sources, 1.2, 1.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list