.gitignore | 83 COPYING | 169 Makefile.am | 14 NEWS | 356 README | 2 configure.ac | 161 m4/dolt.m4 | 178 m4/shave.m4 | 73 man/Makefile.am | 41 man/intel.man | 257 shave-libtool.in | 69 shave.in | 76 src/.gitignore | 6 src/Makefile.am | 102 src/bios_reader/.gitignore | 3 src/bios_reader/Makefile.am | 16 src/bios_reader/bios_dumper.c | 104 src/bios_reader/bios_reader.c | 565 - src/bios_reader/swf_dumper.c | 110 src/ch7017/Makefile.am | 16 src/ch7017/ch7017.c | 330 src/ch7017/ch7017_module.c | 36 src/ch7017/ch7017_reg.h | 162 src/ch7xxx/Makefile.am | 17 src/ch7xxx/ch7xxx.c | 323 src/ch7xxx/ch7xxx.h | 31 src/ch7xxx/ch7xxx_module.c | 35 src/ch7xxx/ch7xxx_reg.h | 80 src/common.h | 240 src/drmmode_display.c | 613 - src/i2c_vid.h | 132 src/i810.h | 341 src/i810_accel.c | 617 - src/i810_common.h | 191 src/i810_cursor.c | 266 src/i810_dga.c | 282 src/i810_dri.c | 1541 ---- src/i810_dri.h | 131 src/i810_driver.c | 2430 ------ src/i810_hwmc.c | 419 - src/i810_io.c | 133 src/i810_memory.c | 428 - src/i810_reg.h | 3443 --------- src/i810_ring.h | 90 src/i810_video.c | 1424 --- src/i810_wmark.c | 313 src/i830.h | 985 -- src/i830_3d.c | 403 - src/i830_accel.c | 237 src/i830_batchbuffer.c | 241 src/i830_batchbuffer.h | 167 src/i830_bios.c | 401 - src/i830_bios.h | 632 - src/i830_common.h | 241 src/i830_crt.c | 557 - src/i830_cursor.c | 307 src/i830_debug.c | 2540 ------ src/i830_debug.h | 34 src/i830_display.c | 2367 ------ src/i830_display.h | 43 src/i830_dri.c | 443 - src/i830_dri.h | 61 src/i830_driver.c | 3222 -------- src/i830_dvo.c | 521 - src/i830_hdmi.c | 368 src/i830_hwmc.c | 177 src/i830_hwmc.h | 114 src/i830_i2c.c | 392 - src/i830_io.c | 35 src/i830_lvds.c | 1627 ---- src/i830_memory.c | 1721 ---- src/i830_modes.c | 69 src/i830_quirks.c | 430 - src/i830_reg.h | 100 src/i830_render.c | 1302 +-- src/i830_ring.h | 93 src/i830_sdvo.c | 2440 ------ src/i830_sdvo.h | 29 src/i830_sdvo_regs.h | 726 - src/i830_tv.c | 2042 ----- src/i830_uxa.c | 766 -- src/i830_video.c | 2945 ------- src/i830_video.h | 93 src/i915_3d.c | 147 src/i915_3d.h | 864 +- src/i915_hwmc.c | 884 -- src/i915_hwmc.h | 61 src/i915_reg.h | 185 src/i915_render.c | 1709 ++-- src/i915_video.c | 819 +- src/i965_hwmc.c | 292 src/i965_hwmc.h | 28 src/i965_reg.h | 241 src/i965_render.c | 3046 ++++---- src/i965_video.c | 1948 ++--- src/intel.h | 662 + src/intel_batchbuffer.c | 280 src/intel_batchbuffer.h | 210 src/intel_dri.c | 1083 ++ src/intel_driver.c | 1266 +++ src/intel_driver.h | 262 src/intel_hwmc.c | 260 src/intel_hwmc.h | 75 src/intel_memory.c | 299 src/intel_module.c | 475 + src/intel_transform.c | 92 src/intel_transform.h | 14 src/intel_uxa.c | 1133 +++ src/intel_video.c | 1769 ++++ src/intel_video.h | 87 src/ivch/Makefile.am | 16 src/ivch/ivch.c | 373 src/ivch/ivch_module.c | 64 src/ivch/ivch_reg.h | 291 src/legacy/Makefile.am | 18 src/legacy/README | 6 src/legacy/i810/Makefile.am | 35 src/legacy/i810/i810.h | 335 src/legacy/i810/i810_accel.c | 617 + src/legacy/i810/i810_common.h | 323 src/legacy/i810/i810_cursor.c | 266 src/legacy/i810/i810_dga.c | 258 src/legacy/i810/i810_dri.c | 1544 ++++ src/legacy/i810/i810_dri.h | 131 src/legacy/i810/i810_driver.c | 2117 +++++ src/legacy/i810/i810_hwmc.c | 419 + src/legacy/i810/i810_io.c | 133 src/legacy/i810/i810_memory.c | 428 + src/legacy/i810/i810_reg.h | 3194 ++++++++ src/legacy/i810/i810_ring.h | 90 src/legacy/i810/i810_video.c | 1423 +++ src/legacy/i810/i810_wmark.c | 313 src/legacy/i810/xvmc/I810XvMC.c | 4509 ++++++++++++ src/legacy/i810/xvmc/I810XvMC.h | 366 src/legacy/i810/xvmc/Makefile.am | 11 src/legacy/legacy.h | 7 src/legacy/ums/Makefile.am | 161 src/legacy/ums/brw_defines.h | 874 ++ src/legacy/ums/brw_structs.h | 1469 +++ src/legacy/ums/ch7017/Makefile.am | 10 src/legacy/ums/ch7017/ch7017.c | 324 src/legacy/ums/ch7017/ch7017_module.c | 36 src/legacy/ums/ch7017/ch7017_reg.h | 162 src/legacy/ums/ch7xxx/Makefile.am | 11 src/legacy/ums/ch7xxx/ch7xxx.c | 317 src/legacy/ums/ch7xxx/ch7xxx.h | 31 src/legacy/ums/ch7xxx/ch7xxx_module.c | 35 src/legacy/ums/ch7xxx/ch7xxx_reg.h | 80 src/legacy/ums/i965_hwmc.h | 25 src/legacy/ums/ivch/Makefile.am | 10 src/legacy/ums/ivch/ivch.c | 368 src/legacy/ums/ivch/ivch_module.c | 64 src/legacy/ums/ivch/ivch_reg.h | 291 src/legacy/ums/render_programs/exa_sf.g4a | 107 src/legacy/ums/render_programs/exa_sf.g4b | 15 src/legacy/ums/render_programs/exa_sf_mask.g4a | 107 src/legacy/ums/render_programs/exa_sf_mask.g4b | 15 src/legacy/ums/render_programs/exa_wm.g4i | 156 src/legacy/ums/render_programs/exa_wm_affine.g4i | 44 src/legacy/ums/render_programs/exa_wm_ca.g4a | 38 src/legacy/ums/render_programs/exa_wm_ca.g4b | 4 src/legacy/ums/render_programs/exa_wm_ca_srcalpha.g4a | 37 src/legacy/ums/render_programs/exa_wm_ca_srcalpha.g4b | 4 src/legacy/ums/render_programs/exa_wm_mask_affine.g4a | 41 src/legacy/ums/render_programs/exa_wm_mask_affine.g4b | 8 src/legacy/ums/render_programs/exa_wm_mask_projective.g4a | 53 src/legacy/ums/render_programs/exa_wm_mask_projective.g4b | 16 src/legacy/ums/render_programs/exa_wm_mask_sample_a.g4a | 48 src/legacy/ums/render_programs/exa_wm_mask_sample_a.g4b | 2 src/legacy/ums/render_programs/exa_wm_mask_sample_argb.g4a | 48 src/legacy/ums/render_programs/exa_wm_mask_sample_argb.g4b | 2 src/legacy/ums/render_programs/exa_wm_noca.g4a | 38 src/legacy/ums/render_programs/exa_wm_noca.g4b | 4 src/legacy/ums/render_programs/exa_wm_nomask.g4a | 143 src/legacy/ums/render_programs/exa_wm_projective.g4i | 51 src/legacy/ums/render_programs/exa_wm_src_affine.g4a | 45 src/legacy/ums/render_programs/exa_wm_src_affine.g4b | 8 src/legacy/ums/render_programs/exa_wm_src_projective.g4a | 49 src/legacy/ums/render_programs/exa_wm_src_projective.g4b | 16 src/legacy/ums/render_programs/exa_wm_src_sample_a.g4a | 47 src/legacy/ums/render_programs/exa_wm_src_sample_a.g4b | 2 src/legacy/ums/render_programs/exa_wm_src_sample_argb.g4a | 47 src/legacy/ums/render_programs/exa_wm_src_sample_argb.g4b | 2 src/legacy/ums/render_programs/exa_wm_src_sample_planar.g4a | 65 src/legacy/ums/render_programs/exa_wm_src_sample_planar.g4b | 4 src/legacy/ums/render_programs/exa_wm_write.g4a | 74 src/legacy/ums/render_programs/exa_wm_write.g4b | 18 src/legacy/ums/render_programs/exa_wm_xy.g4a | 52 src/legacy/ums/render_programs/exa_wm_xy.g4b | 4 src/legacy/ums/render_programs/exa_wm_yuv_rgb.g4a | 98 src/legacy/ums/render_programs/exa_wm_yuv_rgb.g4b | 12 src/legacy/ums/render_programs/packed_yuv_sf.g4a | 45 src/legacy/ums/render_programs/packed_yuv_sf.g4b | 17 src/legacy/ums/render_programs/packed_yuv_wm.g4a | 221 src/legacy/ums/render_programs/packed_yuv_wm.g4b | 79 src/legacy/ums/sil164/Makefile.am | 11 src/legacy/ums/sil164/sil164.c | 264 src/legacy/ums/sil164/sil164.h | 31 src/legacy/ums/sil164/sil164_module.c | 38 src/legacy/ums/sil164/sil164_reg.h | 60 src/legacy/ums/tfp410/Makefile.am | 11 src/legacy/ums/tfp410/tfp410.c | 286 src/legacy/ums/tfp410/tfp410.h | 33 src/legacy/ums/tfp410/tfp410_module.c | 38 src/legacy/ums/tfp410/tfp410_reg.h | 91 src/legacy/ums/ums.h | 1021 ++ src/legacy/ums/ums_accel.c | 284 src/legacy/ums/ums_batchbuffer.c | 204 src/legacy/ums/ums_batchbuffer.h | 160 src/legacy/ums/ums_bios.c | 406 + src/legacy/ums/ums_bios.h | 632 + src/legacy/ums/ums_common.h | 190 src/legacy/ums/ums_crt.c | 557 + src/legacy/ums/ums_cursor.c | 321 src/legacy/ums/ums_debug.c | 1903 +++++ src/legacy/ums/ums_debug.h | 33 src/legacy/ums/ums_display.c | 2428 ++++++ src/legacy/ums/ums_display.h | 42 src/legacy/ums/ums_dri.c | 1441 +++ src/legacy/ums/ums_dri.h | 63 src/legacy/ums/ums_driver.c | 3096 ++++++++ src/legacy/ums/ums_drmmode_display.c | 1364 +++ src/legacy/ums/ums_dvo.c | 521 + src/legacy/ums/ums_exa.c | 468 + src/legacy/ums/ums_hdmi.c | 368 src/legacy/ums/ums_hwmc.c | 159 src/legacy/ums/ums_hwmc.h | 113 src/legacy/ums/ums_i2c.c | 392 + src/legacy/ums/ums_i2c_vid.h | 132 src/legacy/ums/ums_i810_reg.h | 3444 +++++++++ src/legacy/ums/ums_i830_3d.c | 251 src/legacy/ums/ums_i830_common.h | 242 src/legacy/ums/ums_i830_reg.h | 747 + src/legacy/ums/ums_i830_render.c | 807 ++ src/legacy/ums/ums_i915_3d.c | 111 src/legacy/ums/ums_i915_3d.h | 435 + src/legacy/ums/ums_i915_hwmc.c | 890 ++ src/legacy/ums/ums_i915_reg.h | 873 ++ src/legacy/ums/ums_i915_render.c | 722 + src/legacy/ums/ums_i915_video.c | 417 + src/legacy/ums/ums_i965_hwmc.c | 320 src/legacy/ums/ums_i965_render.c | 1725 ++++ src/legacy/ums/ums_i965_video.c | 1180 +++ src/legacy/ums/ums_io.c | 131 src/legacy/ums/ums_lvds.c | 1513 ++++ src/legacy/ums/ums_memory.c | 1717 ++++ src/legacy/ums/ums_modes.c | 69 src/legacy/ums/ums_quirks.c | 424 + src/legacy/ums/ums_ring.h | 93 src/legacy/ums/ums_sdvo.c | 2443 ++++++ src/legacy/ums/ums_sdvo.h | 29 src/legacy/ums/ums_sdvo_regs.h | 726 + src/legacy/ums/ums_tv.c | 2042 +++++ src/legacy/ums/ums_video.c | 2970 +++++++ src/legacy/ums/ums_video.h | 93 src/legacy/ums/ums_xaa.c | 230 src/reg_dumper/.gitignore | 7 src/reg_dumper/Makefile.am | 62 src/reg_dumper/audio.c | 454 - src/reg_dumper/gtt.c | 118 src/reg_dumper/hotplug.c | 148 src/reg_dumper/idle.c | 227 src/reg_dumper/lid.c | 146 src/reg_dumper/main.c | 107 src/reg_dumper/reg_dumper.h | 87 src/reg_dumper/statuspage.c | 81 src/reg_dumper/stepping.c | 137 src/reg_dumper/util.c | 83 src/reg_dumper/xprintf.c | 60 src/sil164/Makefile.am | 17 src/sil164/sil164.c | 270 src/sil164/sil164.h | 31 src/sil164/sil164_module.c | 38 src/sil164/sil164_reg.h | 60 src/tfp410/Makefile.am | 17 src/tfp410/tfp410.c | 292 src/tfp410/tfp410.h | 33 src/tfp410/tfp410_module.c | 38 src/tfp410/tfp410_reg.h | 91 src/xvmc/.gitignore | 6 src/xvmc/I810XvMC.c | 4509 ------------ src/xvmc/I810XvMC.h | 366 src/xvmc/Makefile.am | 16 src/xvmc/dri2.c | 301 src/xvmc/dri2.h | 70 src/xvmc/i915_program.h | 146 src/xvmc/i915_structs.h | 1406 +-- src/xvmc/i915_xvmc.c | 3460 ++------- src/xvmc/i915_xvmc.h | 66 src/xvmc/i965_xvmc.c | 1185 +-- src/xvmc/i965_xvmc.h | 2 src/xvmc/intel_batchbuffer.c | 174 src/xvmc/intel_batchbuffer.h | 5 src/xvmc/intel_xvmc.c | 1306 +-- src/xvmc/intel_xvmc.h | 271 src/xvmc/intel_xvmc_dump.c | 211 src/xvmc/shader/mc/Makefile.am | 1 src/xvmc/shader/vld/Makefile.am | 6 src/xvmc/xvmc_vld.c | 1719 ++-- src/xvmc/xvmc_vld.h | 1 uxa/Makefile.am | 5 uxa/uxa-accel.c | 1977 ++--- uxa/uxa-glyphs.c | 1752 ++-- uxa/uxa-priv.h | 462 - uxa/uxa-render.c | 2718 ++++--- uxa/uxa-unaccel.c | 572 - uxa/uxa.c | 674 - uxa/uxa.h | 939 +- 308 files changed, 89007 insertions(+), 66680 deletions(-)
New commits: commit 352016d2da69bfc998a642132ab722940899ad2e Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Sat Jul 24 23:08:20 2010 +0100 legacy/ums: Don't use uninitialised methods for synchronisation Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29153 diff --git a/src/legacy/ums/ums_accel.c b/src/legacy/ums/ums_accel.c index 821593e..b663312 100644 --- a/src/legacy/ums/ums_accel.c +++ b/src/legacy/ums/ums_accel.c @@ -158,35 +158,7 @@ ums_I830Sync(ScrnInfoPtr pScrn) ums_I830EmitFlush(pScrn); ums_batch_flush(pScrn, TRUE); - - if (pI830->directRenderingType > DRI_NONE) { - struct drm_i915_irq_emit emit; - struct drm_i915_irq_wait wait; - int ret; - - /* Most of the uses of I830Sync while using GEM should actually be - * using set_domain on a specific buffer. We're not there yet, so fake - * it up using irq_emit/wait. It's still better than spinning on - * register reads for idle. - */ - emit.irq_seq = &wait.irq_seq; - ret = drmCommandWriteRead(pI830->drmSubFD, DRM_I830_IRQ_EMIT, &emit, - sizeof(emit)); - if (ret != 0) - FatalError("Failure to emit IRQ: %s\n", strerror(-ret)); - - do { - ret = drmCommandWrite(pI830->drmSubFD, DRM_I830_IRQ_WAIT, &wait, - sizeof(wait)); - } while (ret == -EINTR); - - if (ret != 0) - FatalError("Failure to wait for IRQ: %s\n", strerror(-ret)); - - ums_refresh_ring(pScrn); - } else { - ums_wait_ring_idle(pScrn); - } + ums_wait_ring_idle(pScrn); pI830->nextColorExpandBuf = 0; } commit e90446967b34013cf74bc9c6aa502261dddf1933 Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Thu Jul 15 11:31:32 2010 +0100 legacy/ums: #include <drm.h> diff --git a/src/legacy/ums/ums.h b/src/legacy/ums/ums.h index f831da3..76c0af8 100644 --- a/src/legacy/ums/ums.h +++ b/src/legacy/ums/ums.h @@ -66,7 +66,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "GL/glxint.h" #include "ums_dri.h" #endif -#include <drm/drm.h> +#include <drm.h> #include "intel_bufmgr.h" #include "i915_drm.h" commit 7865828182d094b0e9b3706dc4a6ea17e3b09ba7 Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Tue Jul 13 17:50:59 2010 +0100 legacy/ums/dri: Enable framebuffer mapping for dri diff --git a/src/legacy/ums/ums_dri.c b/src/legacy/ums/ums_dri.c index 2603883..30de483 100644 --- a/src/legacy/ums/ums_dri.c +++ b/src/legacy/ums/ums_dri.c @@ -67,6 +67,13 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "ums.h" +#if (DRIINFO_MAJOR_VERSION > 5 || \ + (DRIINFO_MAJOR_VERSION == 5 && DRIINFO_MINOR_VERSION >= 4)) +#define DRI_DRIVER_FRAMEBUFFER_MAP 1 +#else +#define DRI_DRIVER_FRAMEBUFFER_MAP 0 +#endif + extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig * configs, void **configprivs); commit 381a69364cd74e66554454567efb8b71ceb50819 Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Tue Jul 13 08:57:13 2010 +0100 legacy/ums/i965: we do not handle SourcePictures Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk> diff --git a/src/legacy/ums/ums_i965_render.c b/src/legacy/ums/ums_i965_render.c index caa5f07..b7e8322 100644 --- a/src/legacy/ums/ums_i965_render.c +++ b/src/legacy/ums/ums_i965_render.c @@ -186,11 +186,16 @@ static Bool i965_get_dest_format(PicturePtr pDstPicture, uint32_t *dst_format) static Bool i965_check_composite_texture(PicturePtr pPict, int unit) { - ScrnInfoPtr pScrn = xf86Screens[pPict->pDrawable->pScreen->myNum]; - int w = pPict->pDrawable->width; - int h = pPict->pDrawable->height; - int i; + ScrnInfoPtr pScrn; + int w, h, i; + + if (!pPict->pDrawable) + return FALSE; + pScrn = xf86Screens[pPict->pDrawable->pScreen->myNum]; + + w = pPict->pDrawable->width; + h = pPict->pDrawable->height; if ((w > 8192) || (h > 8192)) I830FALLBACK("Picture w/h too large (%dx%d)\n", w, h); @@ -240,7 +245,7 @@ ums_i965_check_composite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture I830FALLBACK("Component alpha not supported with source " "alpha and source value blending.\n"); } - } + } if (!i965_check_composite_texture(pSrcPicture, 0)) I830FALLBACK("Check Src picture texture\n"); commit cc6467a4fce031143a5be5500c25d8210bc4d29e Author: Christopher James Halse Rogers <christopher.halse.rog...@canonical.com> Date: Tue Jul 13 17:36:25 2010 +1000 legacy/ums: Fix build with DRI disabled diff --git a/configure.ac b/configure.ac index a9c82c7..2bdf83b 100644 --- a/configure.ac +++ b/configure.ac @@ -119,9 +119,12 @@ if test "x$DRI" != xno; then CFLAGS="$save_CFLAGS $DEBUGFLAGS" fi +dnl This could be removed by open-coding DRICreatePCIBusID for +dnl intel_kernel_mode_enabled +PKG_CHECK_MODULES(DRI, [xf86driproto glproto]) + AM_CONDITIONAL(DRI, test x$DRI = xyes) if test "$DRI" = yes; then - PKG_CHECK_MODULES(DRI, [xf86driproto glproto]) AC_DEFINE(BUILD_DRI,1,[Enable DRI driver support]) AC_DEFINE(BUILD_DRI_DEVEL,1,[Enable developmental DRI driver support]) fi diff --git a/src/legacy/ums/ums.h b/src/legacy/ums/ums.h index 9cbabe4..f831da3 100644 --- a/src/legacy/ums/ums.h +++ b/src/legacy/ums/ums.h @@ -66,6 +66,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "GL/glxint.h" #include "ums_dri.h" #endif +#include <drm/drm.h> #include "intel_bufmgr.h" #include "i915_drm.h" diff --git a/src/legacy/ums/ums_driver.c b/src/legacy/ums/ums_driver.c index 0bb6e21..6c8b9fc 100644 --- a/src/legacy/ums/ums_driver.c +++ b/src/legacy/ums/ums_driver.c @@ -2066,8 +2066,10 @@ ums_try_memory_allocation(ScrnInfoPtr pScrn) if (!ums_allocate_pwrctx(pScrn)) goto failed; +#if BUILD_DRI if (xf86dri && !ums_allocate_3d_memory(pScrn)) goto failed; +#endif xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%siled allocation successful.\n", tiled ? "T" : "Unt"); diff --git a/src/legacy/ums/ums_memory.c b/src/legacy/ums/ums_memory.c index fcf4595..2992fce 100644 --- a/src/legacy/ums/ums_memory.c +++ b/src/legacy/ums/ums_memory.c @@ -1174,6 +1174,24 @@ ums_allocate_2d_memory(ScrnInfoPtr pScrn) return TRUE; } +Bool +ums_allocate_pwrctx(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + + pI830->power_context = ums_allocate_memory(pScrn, "power context", + PWRCTX_SIZE, PITCH_NONE, + GTT_PAGE_SIZE, + NEED_LIFETIME_FIXED, + TILE_NONE); + if (!pI830->power_context) { + xf86DrvMsg(pScrn->scrnIndex, X_WARNING, + "Failed to allocate power context.\n"); + return FALSE; + } + return TRUE; +} + #ifdef BUILD_DRI static unsigned int myLog2(unsigned int n) @@ -1336,24 +1354,6 @@ ums_allocate_hwstatus(ScrnInfoPtr pScrn) } Bool -ums_allocate_pwrctx(ScrnInfoPtr pScrn) -{ - I830Ptr pI830 = I830PTR(pScrn); - - pI830->power_context = ums_allocate_memory(pScrn, "power context", - PWRCTX_SIZE, PITCH_NONE, - GTT_PAGE_SIZE, - NEED_LIFETIME_FIXED, - TILE_NONE); - if (!pI830->power_context) { - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, - "Failed to allocate power context.\n"); - return FALSE; - } - return TRUE; -} - -Bool ums_allocate_3d_memory(ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); commit 3c28c879e2f26265a50129d558b3aee261956f77 Author: Christopher James Halse Rogers <christopher.halse.rog...@canonical.com> Date: Tue Jul 13 17:15:00 2010 +1000 legacy/ums: Re-add missing HWS initialisation diff --git a/src/legacy/ums/ums_dri.c b/src/legacy/ums/ums_dri.c index cceac67..2603883 100644 --- a/src/legacy/ums/ums_dri.c +++ b/src/legacy/ums/ums_dri.c @@ -738,6 +738,24 @@ ums_I830SetParam(ScrnInfoPtr pScrn, int param, int value) return TRUE; } +Bool +ums_I830DRISetHWS(ScrnInfoPtr pScrn) +{ + I830Ptr pI830 = I830PTR(pScrn); + drmI830HWS hws; + + hws.addr = pI830->hw_status->offset; + + if (drmCommandWrite(pI830->drmSubFD, DRM_I830_HWS_PAGE_ADDR, + &hws, sizeof(drmI830HWS))) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "hw status page initialization Failed\n"); + return FALSE; + } + return TRUE; +} + + static void ums_I830InitTextureHeap(ScrnInfoPtr pScrn) { commit 8ea8567cb2d45c8b2f2ba8b8893a112c1068e753 Author: Christopher James Halse Rogers <christopher.halse.rog...@canonical.com> Date: Mon Jul 12 14:33:46 2010 +1000 ums: ChangeGC changed prototype in 1.8.99, not 1.7.98 diff --git a/src/legacy/ums/ums_video.c b/src/legacy/ums/ums_video.c index e8adf23..6623e8a 100644 --- a/src/legacy/ums/ums_video.c +++ b/src/legacy/ums/ums_video.c @@ -2184,7 +2184,7 @@ ums_clip_video_helper (ScrnInfoPtr pScrn, return ret; } -#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,7,99,0,0) +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,8,99,0,0) #define ChangeGC(gc, flags, val) ChangeGC(NullClient, gc, flags, val) #define SetVal(v, x) v.val = x #else commit b0f7f8744aea54086d86936031d14c47b92854da Author: Chris Wilson <ch...@chris-wilson.co.uk> Date: Sun Jun 20 19:18:04 2010 +0100 Reintegrate legacy UMS. As downstream still carries our old UMS driver in order to workaround the catastrophic incoherency issues that currently plague the earlier i8xx chipsets when trying to use GEM, it makes sense to integrate their work into the main repository so that their fixes are shared and available for all users. This combines the EXA code from 2.6 with the most recent updates through to 2.9 when the UMS code was removed and the distributions were forced to fork. diff --git a/configure.ac b/configure.ac index ad0a46b..a9c82c7 100644 --- a/configure.ac +++ b/configure.ac @@ -87,36 +87,43 @@ PKG_CHECK_MODULES(PCIACCESS, [pciaccess >= 0.10]) sdkdir=`$PKG_CONFIG --variable=sdkdir xorg-server` -save_CFLAGS="$CFLAGS" -CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" -CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" -AC_MSG_CHECKING([whether to include DRI support]) -if test x$DRI != xno; then - AC_CHECK_FILE([${sdkdir}/dri.h], - [have_dri_h="yes"], [have_dri_h="no"]) - AC_CHECK_FILE([${sdkdir}/sarea.h], - [have_sarea_h="yes"], [have_sarea_h="no"]) - AC_CHECK_FILE([${sdkdir}/dristruct.h], - [have_dristruct_h="yes"], [have_dristruct_h="no"]) +if test "x$DRI" != xno; then + save_CFLAGS="$CFLAGS" + CFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" + CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS $DRM_CFLAGS" + AC_CHECK_FILE([${sdkdir}/dri.h], + [have_dri_h="yes"], [have_dri_h="no"]) + AC_CHECK_FILE([${sdkdir}/sarea.h], + [have_sarea_h="yes"], [have_sarea_h="no"]) + AC_CHECK_FILE([${sdkdir}/dristruct.h], + [have_dristruct_h="yes"], [have_dristruct_h="no"]) + AC_MSG_CHECKING([whether to include DRI support]) + if test x$DRI = xauto; then + if test "$have_dri_h" = yes -a \ + "$have_sarea_h" = yes -a \ + "$have_dristruct_h" = yes; then + DRI="yes" + else + DRI="no" + fi + else + if test x$DRI = xyes; then + if test "$have_dri_h" != yes -o \ + "$have_sarea_h" != yes -o \ + "$have_dristruct_h" != yes; then + AC_MSG_ERROR([no]) + fi + fi + fi + AC_MSG_RESULT([$DRI]) + CFLAGS="$save_CFLAGS $DEBUGFLAGS" fi -AC_MSG_CHECKING([whether to include DRI support]) -if test x$DRI = xauto; then - if test "$have_dri_h" = yes -a \ - "$have_sarea_h" = yes -a \ - "$have_dristruct_h" = yes; then - DRI="yes" - else - DRI="no" - fi -fi -AC_MSG_RESULT([$DRI]) -CFLAGS="$save_CFLAGS $DEBUGFLAGS" AM_CONDITIONAL(DRI, test x$DRI = xyes) if test "$DRI" = yes; then PKG_CHECK_MODULES(DRI, [xf86driproto glproto]) - AC_DEFINE(XF86DRI,1,[Enable DRI driver support]) - AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support]) + AC_DEFINE(BUILD_DRI,1,[Enable DRI driver support]) + AC_DEFINE(BUILD_DRI_DEVEL,1,[Enable developmental DRI driver support]) fi if test "$XVMC" = yes; then @@ -153,6 +160,12 @@ AC_OUTPUT([ src/legacy/Makefile src/legacy/i810/Makefile src/legacy/i810/xvmc/Makefile + src/legacy/ums/Makefile + src/legacy/ums/ch7017/Makefile + src/legacy/ums/ch7xxx/Makefile + src/legacy/ums/ivch/Makefile + src/legacy/ums/sil164/Makefile + src/legacy/ums/tfp410/Makefile man/Makefile src/render_program/Makefile ]) diff --git a/src/Makefile.am b/src/Makefile.am index fbccf0b..1b0ae41 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -51,6 +51,8 @@ intel_drv_la_SOURCES = \ intel_uxa.c \ intel_video.c \ intel_video.h \ + intel_transform.c \ + intel_transform.h \ i830_3d.c \ i830_render.c \ i830_reg.h \ diff --git a/src/i830_render.c b/src/i830_render.c index 4bc582c..c6d85ed 100644 --- a/src/i830_render.c +++ b/src/i830_render.c @@ -244,7 +244,6 @@ static uint32_t i8xx_get_card_format(intel_screen_private *intel, static void i830_texture_setup(PicturePtr picture, PixmapPtr pixmap, int unit) { - ScrnInfoPtr scrn = xf86Screens[picture->pDrawable->pScreen->myNum]; intel_screen_private *intel = intel_get_screen_private(scrn); uint32_t format, tiling_bits, pitch, filter; diff --git a/src/intel.h b/src/intel.h index 5342dca..30e9199 100644 --- a/src/intel.h +++ b/src/intel.h @@ -61,13 +61,16 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include <pciaccess.h> #include "xf86drm.h" +#include "intel_bufmgr.h" +#include "i915_drm.h" + +#ifdef BUILD_DRI #include "sarea.h" #define _XF86DRI_SERVER_ #include "dri.h" #include "dri2.h" #include "GL/glxint.h" -#include "intel_bufmgr.h" -#include "i915_drm.h" +#endif #include "intel_driver.h" diff --git a/src/intel_batchbuffer.h b/src/intel_batchbuffer.h index bf9b279..02997ba 100644 --- a/src/intel_batchbuffer.h +++ b/src/intel_batchbuffer.h @@ -51,7 +51,7 @@ static inline int intel_vertex_space(intel_screen_private *intel) } static inline void -intel_batch_require_space(ScrnInfoPtr scrn, intel_screen_private *intel, GLuint sz) +intel_batch_require_space(ScrnInfoPtr scrn, intel_screen_private *intel, unsigned int sz) { assert(sz < intel->batch_bo->size - 8); if (intel_batch_space(intel) < sz) diff --git a/src/intel_driver.c b/src/intel_driver.c index 2ced844..04ca197 100644 --- a/src/intel_driver.c +++ b/src/intel_driver.c @@ -77,8 +77,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "legacy/legacy.h" #include <sys/ioctl.h> -#include "i915_drm.h" #include <xf86drmMode.h> +#include <i915_drm.h> +#include <dri.h> /* DRICreatePCIBusID() */ #define BIT(x) (1 << (x)) #define MAX(a,b) ((a) > (b) ? (a) : (b)) @@ -276,6 +277,7 @@ static void PreInitCleanup(ScrnInfoPtr scrn) I830FreeRec(scrn); } + /* * DRM mode setting Linux only at this point... later on we could * add a wrapper here. diff --git a/src/intel_driver.h b/src/intel_driver.h index c0b1c57..d5180d1 100644 --- a/src/intel_driver.h +++ b/src/intel_driver.h @@ -198,9 +198,9 @@ #define IS_845G(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_845_G) #define IS_I85X(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I855_GM || \ DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I854) -#define IS_I852(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I855_GM && (pI810->variant == I852_GM || pI810->variant == I852_GME)) +#define IS_I852(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I855_GM && (pI810->chipset.variant == I852_GM || pI810->chipset.variant == I852_GME)) #define IS_I854(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I854) -#define IS_I855(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I855_GM && (pI810->variant == I855_GM || pI810->variant == I855_GME)) +#define IS_I855(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I855_GM && (pI810->chipset.variant == I855_GM || pI810->chipset.variant == I855_GME)) #define IS_I865G(pI810) (DEVICE_ID(pI810->PciInfo) == PCI_CHIP_I865_G) #define IS_I8XX(pI810) (IS_I830(pI810) || IS_845G(pI810) || IS_I85X(pI810) || IS_I865G(pI810)) diff --git a/src/intel_module.c b/src/intel_module.c index 5e64989..5ec80ba 100644 --- a/src/intel_module.c +++ b/src/intel_module.c @@ -37,6 +37,10 @@ #include "intel_driver.h" #include "legacy/legacy.h" +#include <xf86drmMode.h> + +#include "unistd.h" + static const SymTabRec _intel_chipsets[] = { {PCI_CHIP_I810, "i810"}, {PCI_CHIP_I810_DC100, "i810-dc100"}, @@ -332,6 +336,21 @@ static Bool intel_driver_func(ScrnInfoPtr pScrn, } } +static Bool intel_has_kms(struct pci_device *dev) +{ + char busid[120]; + int ret; + + snprintf(busid, sizeof(busid), + "pci:%04x:%02x:%02x.%d", + dev->domain, dev->bus, dev->dev, dev->func); + ret = drmCheckModesettingSupported(busid); + if (ret && xf86LoadKernelModule("i915")) + ret = drmCheckModesettingSupported(busid); + + return ret == 0; +} + /* * intel_pci_probe -- * @@ -339,10 +358,10 @@ static Bool intel_driver_func(ScrnInfoPtr pScrn, * Setup the dispatch table for the rest of the driver functions. * */ -static Bool intel_pci_probe (DriverPtr driver, - int entity_num, - struct pci_device *device, - intptr_t match_data) +static Bool intel_pci_probe(DriverPtr driver, + int entity_num, + struct pci_device *device, + intptr_t match_data) { ScrnInfoPtr scrn = NULL; @@ -367,7 +386,10 @@ static Bool intel_pci_probe (DriverPtr driver, break; default: - intel_init_scrn(scrn); + if (intel_has_kms(device)) + intel_init_scrn(scrn); + else + lg_ums_init(scrn); break; } #endif diff --git a/src/intel_transform.c b/src/intel_transform.c new file mode 100644 index 0000000..db66ba8 --- /dev/null +++ b/src/intel_transform.c @@ -0,0 +1,92 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "xf86.h" + +#include "intel.h" +#include "intel_transform.h" + +#define xFixedToFloat(val) \ + ((float)xFixedToInt(val) + ((float)xFixedFrac(val) / 65536.0)) + +static Bool +_intel_transform_point(PictTransformPtr transform, + float x, float y, float result[3]) +{ + int j; + + for (j = 0; j < 3; j++) { + result[j] = (xFixedToFloat(transform->matrix[j][0]) * x + + xFixedToFloat(transform->matrix[j][1]) * y + + xFixedToFloat(transform->matrix[j][2])); + } + if (!result[2]) + return FALSE; + return TRUE; +} + +/** + * Returns the floating-point coordinates transformed by the given transform. + * + * transform may be null. + */ +Bool +intel_get_transformed_coordinates(int x, int y, PictTransformPtr transform, + float *x_out, float *y_out) +{ + if (transform == NULL) { + *x_out = x; + *y_out = y; + } else { + float result[3]; + + if (!_intel_transform_point(transform, + x, y, + result)) + return FALSE; + *x_out = result[0] / result[2]; + *y_out = result[1] / result[2]; + } + return TRUE; +} + +/** + * Returns the un-normalized floating-point coordinates transformed by the given transform. + * + * transform may be null. + */ +Bool +intel_get_transformed_coordinates_3d(int x, int y, PictTransformPtr transform, + float *x_out, float *y_out, float *w_out) +{ + if (transform == NULL) { + *x_out = x; + *y_out = y; + *w_out = 1; + } else { + float result[3]; + + if (!_intel_transform_point(transform, + x, y, + result)) + return FALSE; + *x_out = result[0]; + *y_out = result[1]; + *w_out = result[2]; + } + return TRUE; +} + +/** + * Returns whether the provided transform is affine. + * + * transform may be null. + */ +Bool intel_transform_is_affine(PictTransformPtr t) +{ + if (t == NULL) + return TRUE; + return t->matrix[2][0] == 0 && t->matrix[2][1] == 0; +} + diff --git a/src/intel_transform.h b/src/intel_transform.h new file mode 100644 index 0000000..bfc90d1 --- /dev/null +++ b/src/intel_transform.h @@ -0,0 +1,14 @@ +#ifndef INTEL_TRANSFORM_H +#define INTEL_TRANSFORM_H + +Bool +intel_get_transformed_coordinates(int x, int y, PictTransformPtr transform, + float *x_out, float *y_out); + +Bool +intel_get_transformed_coordinates_3d(int x, int y, PictTransformPtr transform, + float *x_out, float *y_out, float *w_out); + +Bool intel_transform_is_affine(PictTransformPtr t); + +#endif diff --git a/src/intel_uxa.c b/src/intel_uxa.c index b75fe55..fb6dac5 100644 --- a/src/intel_uxa.c +++ b/src/intel_uxa.c @@ -487,89 +487,6 @@ static void i830_done_composite(PixmapPtr dest) -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1ohtuz-0006nl...@alioth.debian.org