Author: airlied
Update of /cvs/pkgs/rpms/xorg-x11-drv-i810/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7636
Modified Files:
intel-2.4.2-git-diffs.patch xorg-x11-drv-i810.spec
Removed Files:
i830-render-init-no-map.patch intel-2.4.2-fix-mode-typo.patch
Log Message:
- rebase to upstream for new libdrm interfaces
intel-2.4.2-git-diffs.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.1 -r 1.2 intel-2.4.2-git-diffs.patch
Index: intel-2.4.2-git-diffs.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-i810/devel/intel-2.4.2-git-diffs.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- intel-2.4.2-git-diffs.patch 28 Aug 2008 12:11:28 -0000 1.1
+++ intel-2.4.2-git-diffs.patch 1 Oct 2008 05:41:26 -0000 1.2
@@ -111,11 +111,68 @@
src/Makefile
src/xvmc/Makefile
src/bios_reader/Makefile
+diff --git a/man/intel.man b/man/intel.man
+index e9ae240..115b35a 100644
+--- a/man/intel.man
++++ b/man/intel.man
+@@ -25,7 +25,7 @@ the 830M and later.
+ .B intel
+ supports the i810, i810-DC100, i810e, i815, i830M, 845G, 852GM, 855GM,
+ 865G, 915G, 915GM, 945G, 945GM, 965G, 965Q, 946GZ, 965GM, 945GME,
+-G33, Q33, and Q35 chipsets.
++G33, Q33, Q35, G35, GM45, G45, Q45, G43 and G41 chipsets.
+
+ .SH CONFIGURATION DETAILS
+ Please refer to __xconfigfile__(__filemansuffix__) for general configuration
+@@ -41,10 +41,13 @@ than has been pre-allocated at boot time by the BIOS. This is
usually
+ achieved with an "agpgart" or "agp" kernel driver. Linux, FreeBSD,
OpenBSD,
+ NetBSD, and Solaris have such kernel drivers available.
+ .PP
+-By default, the i810 will use 8 megabytes
+-of system memory for graphics. For the 830M and later, the driver will
+-automatically size its memory allocation according to the features it will
+-support. Therefore, the
++By default, the i810/i815 will use 8 MB of system memory for graphics if AGP
++allocable memory is < 128 MB, 16 MB if < 192 MB or 24 MB if higher. Use the
++.B VideoRam
++option to change the default value.
++.PP
++For the 830M and later, the driver will automatically size its memory
++allocation according to the features it will support. Therefore, the
+ .B VideoRam
+ option, which in the past had been necessary to allow more than some small
+ amount of memory to be allocated, is now ignored.
+@@ -109,6 +112,12 @@ Default: 8-bits per RGB for 8-bit modes.
+ This option enables XvMC. The integer parameter specifies the number of
+ surfaces to use. Valid values are 6 and 7.
+ Default: XvMC is disabled.
++.TP
++.BI "VideoRam " integer
++This option specifies the amount of system memory to use for graphics, in KB.
++The default is 8192 if AGP allocable memory is < 128 MB, 16384 if < 192 MB,
++24576 if higher. DRI require at least a value of 16384. Higher values may give
++better 3D performance, at expense of available system memory.
+
+ .PP
+ The following driver
+@@ -213,6 +222,12 @@ information.
+ Enable XvMC driver. Current support MPEG2 MC on 915/945 and G33 series.
+ User should provide absolute path to libIntelXvMC.so in XvMCConfig file.
+ Default: Disabled.
++.TP
++.BI "Option \*qForceSDVODetect\*q \*q" boolean \*q
++Instead of depending on SDVO detect status bit to initialize SDVO outputs,
++this option trys to ignore that status bit and try to probe on all SDVO
++ports anyway. Try this if some output is not detected on your ADD2 card.
++Use of this option will slow down your startup time. Default: Disabled.
+
+ .SH OUTPUT CONFIGURATION
+ On 830M and better chipsets, the driver supports runtime configuration of
diff --git a/src/Makefile.am b/src/Makefile.am
-index 594416d..97feea4 100644
+index 594416d..8966bd6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
-@@ -30,13 +30,14 @@ SUBDIRS = xvmc bios_reader ch7017 ch7xxx ivch sil164 tfp410
$(REGDUMPER)
+@@ -30,15 +30,16 @@ SUBDIRS = xvmc bios_reader ch7017 ch7xxx ivch sil164 tfp410
$(REGDUMPER)
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
@@ -131,8 +188,11 @@
-intel_drv_la_LIBADD =
+intel_drv_la_LIBADD = -lm ../uxa/libuxa.la
if XSERVER_LIBPCIACCESS
- intel_drv_la_LIBADD += @PCIACCESS_LIBS@
+-intel_drv_la_LIBADD += @PCIACCESS_LIBS@
++intel_drv_la_LIBADD += @PCIACCESS_LIBS@ @DRM_LIBS@ -ldrm_intel
endif
+
+ XMODE_SRCS=\
@@ -93,6 +94,8 @@ intel_drv_la_SOURCES = \
i830_accel.c \
i830_bios.c \
@@ -194,21 +254,216 @@
+
endif
diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
-index dbcd150..9e05317 100644
+index dbcd150..29c3edb 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
-@@ -198,11 +198,22 @@ static void dump_lvds_data(void *data, unsigned char *base)
- if (i == panel_type)
- marker = '*';
- else
-- marker = ' ';
-+ continue;
+@@ -59,42 +59,66 @@ struct _fake_i830 *pI830 = &I830;
+
+ #define YESNO(val) ((val) ? "yes" : "no")
+
++struct bdb_block {
++ uint8_t id;
++ uint16_t size;
++ void *data;
++};
++
++struct bdb_header *bdb;
+ static int tv_present;
+ static int lvds_present;
+ static int panel_type;
+
+-static void *find_section(struct bdb_header *bdb, int section_id)
++static struct bdb_block *find_section(int section_id)
+ {
+- unsigned char *base = (unsigned char *)bdb;
+- int index = 0;
+- uint16_t total, current_size;
+- unsigned char current_id;
+-
+- /* skip to first section */
+- index += bdb->header_size;
+- total = bdb->bdb_size;
+-
+- /* walk the sections looking for section_id */
+- while (index < total) {
+- current_id = *(base + index);
+- index++;
+- current_size = *((uint16_t *)(base + index));
+- index += 2;
+- if (current_id == section_id)
+- return base + index;
+- index += current_size;
++ struct bdb_block *block;
++ unsigned char *base = (unsigned char *)bdb;
++ int index = 0;
++ uint16_t total, current_size;
++ unsigned char current_id;
++
++ /* skip to first section */
++ index += bdb->header_size;
++ total = bdb->bdb_size;
++
++ block = malloc(sizeof(*block));
++ if (!block) {
++ fprintf(stderr, "out of memory\n");
++ exit(-1);
++ }
++
++ /* walk the sections looking for section_id */
++ while (index < total) {
++ current_id = *(base + index);
++ index++;
++ current_size = *((uint16_t *)(base + index));
++ index += 2;
++ if (current_id == section_id) {
++ block->id = current_id;
++ block->size = current_size;
++ block->data = base + index;
++ return block;
+ }
++ index += current_size;
++ }
+
+- return NULL;
++ free(block);
++ return NULL;
+ }
+
+-static void dump_general_features(void *data)
++static void dump_general_features(void)
+ {
+- struct bdb_general_features *features = data;
++ struct bdb_general_features *features;
++ struct bdb_block *block;
++
++ block = find_section(BDB_GENERAL_FEATURES);
+
+- if (!data)
++ if (!block)
+ return;
+
++ features = block->data;
++
+ printf("General features block:\n");
+
+ printf("\tPanel fitting: ");
+@@ -133,16 +157,24 @@ static void dump_general_features(void *data)
+
+ tv_present = 1; /* should be based on whether TV DAC exists */
+ lvds_present = 1; /* should be based on IS_MOBILE() */
[...2807 lines suppressed...]
}
@@ -5902,7 +6753,7 @@
}
return TRUE;
-@@ -2047,3 +2088,118 @@ Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char
*name,
+@@ -2047,3 +2117,118 @@ Bool i830_allocate_xvmc_buffer(ScrnInfoPtr pScrn, const char
*name,
return TRUE;
}
#endif
@@ -6022,7 +6873,7 @@
+
+#endif
diff --git a/src/i830_quirks.c b/src/i830_quirks.c
-index a3ed044..038676e 100644
+index a3ed044..528b564 100644
--- a/src/i830_quirks.c
+++ b/src/i830_quirks.c
@@ -162,6 +162,15 @@ static void i830_dmi_dump(void)
@@ -6041,7 +6892,35 @@
* Some machines hose the display regs regardless of the ACPI DOS
* setting, so we need to reset modes at ACPI event time.
*/
-@@ -293,6 +302,8 @@ static i830_quirk i830_quirk_list[] = {
+@@ -220,6 +229,9 @@ static i830_quirk i830_quirk_list[] = {
+ { PCI_CHIP_I965_GM, 0xa0a0, SUBSYS_ANY, quirk_ignore_lvds },
+ { PCI_CHIP_I965_GM, 0x8086, 0x1999, quirk_ignore_lvds },
+
++ /* Cappuccino SlimPRO SP625F, bz #11368 */
++ { PCI_CHIP_I855_GM, 0x8086, 0x3582, quirk_ignore_lvds },
++
+ /* Apple Mac mini has no lvds, but macbook pro does */
+ { PCI_CHIP_I945_GM, 0x8086, 0x7270, quirk_mac_mini },
+
+@@ -269,6 +281,8 @@ static i830_quirk i830_quirk_list[] = {
+ /* Samsung Q45 has no TV output */
+ { PCI_CHIP_I965_GM, 0x144d, 0xc510, quirk_ignore_tv },
+
++ /* HP Compaq nx6110 has no TV output */
++ { PCI_CHIP_I915_GM, 0x103c, 0x099c, quirk_ignore_tv },
+ /* HP Compaq 6730s has no TV output */
+ { PCI_CHIP_GM45_GM, 0x103c, 0x30e8, quirk_ignore_tv },
+
+@@ -284,6 +298,8 @@ static i830_quirk i830_quirk_list[] = {
+ { PCI_CHIP_I855_GM, 0x1028, 0x014f, quirk_pipea_force },
+ /* Dell Inspiron 510m needs pipe A force quirk */
+ { PCI_CHIP_I855_GM, 0x1028, 0x0164, quirk_pipea_force },
++ /* Toshiba Satellite A30 needs pipe A force quirk */
++ { PCI_CHIP_I855_GM, 0x1179, 0xff00 , quirk_pipea_force },
+ /* Toshiba Protege R-205, S-209 needs pipe A force quirk */
+ { PCI_CHIP_I915_GM, 0x1179, 0x0001, quirk_pipea_force },
+ /* Intel 855GM hardware (See LP: #216490) */
+@@ -293,6 +309,8 @@ static i830_quirk i830_quirk_list[] = {
/* HP Pavilion ze4944ea needs pipe A force quirk (See LP: #242389) */
{ PCI_CHIP_I855_GM, 0x103c, 0x3084, quirk_pipea_force },
@@ -6133,19 +7012,41 @@
union intfloat tmp; \
tmp.f = (float)(x); \
diff --git a/src/i830_video.c b/src/i830_video.c
-index 486f670..5e6ebd7 100644
+index 486f670..316bc61 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
-@@ -2394,7 +2394,7 @@ I830PutImage(ScrnInfoPtr pScrn,
+@@ -2245,12 +2245,16 @@ I830PutImage(ScrnInfoPtr pScrn,
+ pI830->entityPrivate->XvInUse = i830_crtc_pipe (pPriv->current_crtc);;
+ }
+
+- /* Clamp dst width & height to 7x of src (overlay limit) */
+- if(drw_w > (src_w * 7))
+- drw_w = src_w * 7;
++ if (!pPriv->textured) {
++ /* If dst width and height are less than 1/8th the src size, the
++ * src/dst scale factor becomes larger than 8 and doesn't fit in
++ * the scale register. */
++ if(src_w >= (drw_w * 8))
++ drw_w = src_w/7;
+
+- if(drw_h > (src_h * 7))
+- drw_h = src_h * 7;
++ if(src_h >= (drw_h * 8))
++ drw_h = src_h/7;
++ }
+
+ /* Clip */
+ x1 = src_x;
+@@ -2394,7 +2398,7 @@ I830PutImage(ScrnInfoPtr pScrn,
/* fixup pointers */
#ifdef INTEL_XVMC
if (id == FOURCC_XVMC && IS_I915(pI830)) {
- pPriv->YBuf0offset = (uint32_t)buf;
-+ pPriv->YBuf0offset = (uint32_t)((uint64_t)buf);
++ pPriv->YBuf0offset = (uint32_t)((uintptr_t)buf);
pPriv->VBuf0offset = pPriv->YBuf0offset + (dstPitch2 * height);
pPriv->UBuf0offset = pPriv->VBuf0offset + (dstPitch * height / 2);
destId = FOURCC_YV12;
-@@ -2460,13 +2460,13 @@ I830PutImage(ScrnInfoPtr pScrn,
+@@ -2460,13 +2464,13 @@ I830PutImage(ScrnInfoPtr pScrn,
}
#ifdef I830_USE_EXA
@@ -6271,7 +7172,7 @@
if (!planar) {
diff --git a/src/i965_render.c b/src/i965_render.c
-index 8360be4..a4334c6 100644
+index 8360be4..7dee5f3 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1431,26 +1431,6 @@ i965_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int
maskY,
@@ -6316,7 +7217,7 @@
- render_state->card_state = (gen4_state_t *)
- (pI830->FbBase + render_state->card_state_offset);
+
-+ if (pI830->gen4_render_state_mem->bo) {
++ if (pI830->use_drm_mode) {
+ ret = dri_bo_map(pI830->gen4_render_state_mem->bo, 1);
+ if (ret) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
@@ -6335,7 +7236,7 @@
{
I830Ptr pI830 = I830PTR(pScrn);
-+ if (pI830->gen4_render_state_mem->bo) {
++ if (pI830->use_drm_mode) {
+ dri_bo_unmap(pI830->gen4_render_state_mem->bo);
+ dri_bo_unreference(pI830->gen4_render_state_mem->bo);
+ }
@@ -7719,10 +8620,10 @@
+}
diff --git a/uxa/uxa-glyphs.c b/uxa/uxa-glyphs.c
new file mode 100644
-index 0000000..364fcfb
+index 0000000..dc51856
--- /dev/null
+++ b/uxa/uxa-glyphs.c
-@@ -0,0 +1,880 @@
+@@ -0,0 +1,884 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
+ * Partly based on code Copyright © 2000 SuSE, Inc.
@@ -8393,6 +9294,10 @@
+
+ x = 0;
+ y = 0;
++ extents.x1 = 0;
++ extents.y1 = 0;
++ extents.x2 = 0;
++ extents.y2 = 0;
+ while (nlist--) {
+ x += list->xOff;
+ y += list->yOff;
@@ -8605,7 +9510,7 @@
+}
diff --git a/uxa/uxa-priv.h b/uxa/uxa-priv.h
new file mode 100644
-index 0000000..c50ab3a
+index 0000000..1353587
--- /dev/null
+++ b/uxa/uxa-priv.h
@@ -0,0 +1,443 @@
@@ -8766,8 +9671,8 @@
+ (PixmapWidthPaddingInfo[d].padRoundUp+1)))
+#endif
+
-+extern DevPrivateKey uxa_screen_key;
-+#define uxa_get_screen(s) ((uxa_screen_t *)dixLookupPrivate(&(s)->devPrivates,
uxa_screen_key))
++extern int uxa_screen_index;
++#define uxa_get_screen(s) ((uxa_screen_t *)dixLookupPrivate(&(s)->devPrivates,
&uxa_screen_index))
+
+/** Align an offset to an arbitrary alignment */
+#define UXA_ALIGN(offset, align) (((offset) + (align) - 1) - \
@@ -10451,7 +11356,7 @@
+}
diff --git a/uxa/uxa.c b/uxa/uxa.c
new file mode 100644
-index 0000000..aac3d68
+index 0000000..8658406
--- /dev/null
+++ b/uxa/uxa.c
@@ -0,0 +1,510 @@
@@ -10496,7 +11401,7 @@
+#include "dixfontstr.h"
+#include "uxa.h"
+
-+DevPrivateKey uxa_screen_key = &uxa_screen_key;
++int uxa_screen_index;
+
+/**
+ * uxa_get_drawable_pixmap() returns a backing pixmap for a given drawable.
@@ -10879,7 +11784,7 @@
+
+ uxa_screen->info = uxa_driver;
+
-+ dixSetPrivate(&screen->devPrivates, uxa_screen_key, uxa_screen);
++ dixSetPrivate(&screen->devPrivates, &uxa_screen_index, uxa_screen);
+
+// exaDDXDriverInit(screen);
+
Index: xorg-x11-drv-i810.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-i810/devel/xorg-x11-drv-i810.spec,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- xorg-x11-drv-i810.spec 11 Sep 2008 13:35:18 -0000 1.109
+++ xorg-x11-drv-i810.spec 1 Oct 2008 05:41:26 -0000 1.110
@@ -6,7 +6,7 @@
Summary: Xorg X11 Intel video driver(s)
Name: xorg-x11-drv-i810
Version: 2.4.2
-Release: 8%{?dist}
+Release: 9%{?dist}
URL:
http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -24,9 +24,6 @@
Patch3: intel-2.1.1-fix-xv-reset.patch
#Patch4: intel-fix-flip.patch
Patch5: intel-fix-irq.patch
-# fd.o bug 17341
-Patch6: i830-render-init-no-map.patch
-Patch8: intel-2.4.2-fix-mode-typo.patch
ExclusiveArch: %{ix86} x86_64 ia64
@@ -34,7 +31,7 @@
BuildRequires: xorg-x11-server-devel >= 1.4.99.1
BuildRequires: libXvMC-devel
BuildRequires: mesa-libGL-devel >= 6.5-9
-BuildRequires: libdrm-devel >= 2.0-1
+BuildRequires: libdrm-devel >= 2.4.0-0.21
BuildRequires: kernel-headers
Requires: hwdata
@@ -60,8 +57,6 @@
%patch3 -p1 -b .xvfix
#patch4 -p1 -b .fixflip
%patch5 -p1 -b .irqfix
-%patch6 -p1 -b .exafix
-%patch8 -p1 -b .modename
%build
@@ -104,6 +99,9 @@
%{_libdir}/libIntelXvMC.so
%changelog
+* Wed Oct 01 2008 Dave Airlie <airlied(a)redhat.com> 2.4.2-9
+- rebase to upstream for new libdrm interfaces
+
* Thu Sep 11 2008 Soren Sandmann <sandmann(a)redhat.com> 2.4.2-8
- Remove the fb size hack, since there is a fix in the server now.
--- i830-render-init-no-map.patch DELETED ---
--- intel-2.4.2-fix-mode-typo.patch DELETED ---