xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |2 +- src/drmmode_display.c | 17 - src/nouveau_copy.c|2 ++ src/nouveau_exa.c |1 + src/nv_accel_common.c |1 + src/nv_driver.c |4 src/nv_type.h |1 + src/nvc0_accel.c |6 ++ 8 files changed, 32 insertions(+), 2 deletions(-) New commits: commit a7c190e0c230ed2d5e047ed6aba12d71a4866950 Author: Lyude Date: Fri Apr 21 14:41:17 2017 -0400 Bump version to 1.0.15 Signed-off-by: Lyude diff --git a/configure.ac b/configure.ac index e494300..0b01d3e 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], -[1.0.14], +[1.0.15], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit 3047e99a641d2b8720371aae292750206f5e91fc Author: Ben Skeggs Date: Thu Apr 20 15:57:33 2017 +1000 fix null pointer deref when building against >=libdrm 2.4.78 A new pointer got added to drmEventContext. As a result of us both: - Setting drmEventContext.version to "latest" AND - Not zeroing the struct We end up thwarting libdrm's compatibility checks, resulting in libdrm choosing to call through an invalid pointer. Fix this by zeroing the struct. Signed-off-by: Ben Skeggs diff --git a/src/drmmode_display.c b/src/drmmode_display.c index ae29d9a..2b71c9c 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1433,7 +1433,7 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp) unsigned int crtcs_needed = 0; int crtcshift; - drmmode = xnfalloc(sizeof *drmmode); + drmmode = xnfcalloc(sizeof(*drmmode), 1); drmmode->fd = fd; drmmode->fb_id = 0; commit e9418e434311336e905b70553a5ed740838d90ad Author: Mariusz Bialonczyk Date: Wed Mar 29 22:07:50 2017 +0200 Do not register hotplug without RandR When using Xinerama, RandR is automatically disabled, and calling RR routines will trigger an assert() because the RR keys/resources are not set, leading to an Xserver abort. Hotplug makes little sense without RandR, so no need to install a udev monitor if RandR is not available. Ported from xf86-video-intel commit 1a489142c8e6a4828348cc9afbd0f430d3b1e2d8, original work by: Chris Wilson Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98383 Signed-off-by: Mariusz Bialonczyk Acked-by: Ilia Mirkin diff --git a/src/drmmode_display.c b/src/drmmode_display.c index dd9fa27..ae29d9a 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1556,6 +1556,15 @@ drmmode_udev_notify(int fd, int notify, void *data) } #endif +static bool has_randr(void) +{ +#if HAS_DIXREGISTERPRIVATEKEY + return dixPrivateKeyRegistered(rrPrivKey); +#else + return *rrPrivKey; +#endif +} + static void drmmode_uevent_init(ScrnInfoPtr scrn) { @@ -1564,6 +1573,12 @@ drmmode_uevent_init(ScrnInfoPtr scrn) struct udev *u; struct udev_monitor *mon; + /* RandR will be disabled if Xinerama is active, and so generating +* RR hotplug events is then forbidden. +*/ + if (!has_randr()) + return; + u = udev_new(); if (!u) return; commit e472b47d15634a864c8c981ed588d882aceaf26b Author: Ilia Mirkin Date: Tue Mar 21 21:25:33 2017 -0400 Add Pascal family support, identical to Maxwell Signed-off-by: Ilia Mirkin Tested-by: Lyude diff --git a/src/nouveau_copy.c b/src/nouveau_copy.c index 7118a7a..7fbcc87 100644 --- a/src/nouveau_copy.c +++ b/src/nouveau_copy.c @@ -42,6 +42,7 @@ nouveau_copy_init(ScreenPtr pScreen) int engine; Bool (*init)(NVPtr); } methods[] = { + { 0xc1b5, 0, nouveau_copya0b5_init }, { 0xc0b5, 0, nouveau_copya0b5_init }, { 0xb0b5, 0, nouveau_copya0b5_init }, { 0xa0b5, 0, nouveau_copya0b5_init }, @@ -84,6 +85,7 @@ nouveau_copy_init(ScreenPtr pScreen) break; case NV_KEPLER: case NV_MAXWELL: + case NV_PASCAL: ret = nouveau_object_new(&pNv->dev->object, 0, NOUVEAU_FIFO_CHANNEL_CLASS, &(struct nve0_fifo) { diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index 0f02b99..55df6f8 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -515,6 +515,7 @@ nouveau_exa_init(ScreenPtr pScreen) case NV_FERMI: case NV_KEPLER: case NV_MAXWELL: + case NV_PASCAL: exa->CheckComposite = NVC0EXACheckComposite; exa->PrepareComposite = NVC0EXAPrepareComposite; exa->Composite= NVC0EXAComposite; diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c index 5d12dd8..5561708 100644 --- a/src/
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
.gitignore |2 Makefile.am| 15 autogen.sh |4 configure.ac | 49 ++ man/nouveau.man| 38 + src/Makefile.am| 82 +++ src/compat-api.h |9 src/drmmode_display.c | 577 +-- src/hwdefs/gm107_texture.xml.h | 365 + src/hwdefs/nvc0_3d.xml.h | 867 - src/nouveau_copy.c | 140 ++ src/nouveau_copy.h | 18 src/nouveau_copy85b5.c | 104 src/nouveau_copy90b5.c | 100 src/nouveau_copya0b5.c | 97 src/nouveau_dri2.c | 641 ++ src/nouveau_exa.c | 54 +- src/nouveau_local.h|2 src/nouveau_present.c | 302 ++ src/nouveau_present.h | 19 src/nouveau_sync.c | 117 + src/nouveau_sync.h | 34 + src/nouveau_wfb.c |6 src/nouveau_xv.c | 166 ++- src/nv04_exa.c |5 src/nv10_exa.c | 22 - src/nv30_exa.c | 20 src/nv40_exa.c |8 src/nv50_accel.c | 265 +--- src/nv50_accel.h |1 src/nv50_exa.c | 115 + src/nv50_xv.c |5 src/nv_accel_common.c | 186 +--- src/nv_const.h |4 src/nv_dma.c | 139 -- src/nv_driver.c| 444 ++-- src/nv_proto.h | 35 - src/nv_type.h | 53 +- src/nvc0_accel.c | 172 ++-- src/nvc0_accel.h | 59 ++ src/nvc0_exa.c | 231 +++--- src/nvc0_shader.h | 444 src/nvc0_xv.c | 115 +++-- src/nve0_shader.h | 440 src/shader/.gitignore |1 src/shader/Makefile| 57 ++ src/shader/exac8nv110.fp | 47 ++ src/shader/exac8nv110.fpc | 38 + src/shader/exac8nvc0.fp| 41 + src/shader/exac8nvc0.fpc | 22 + src/shader/exac8nve0.fp| 42 + src/shader/exac8nve0.fpc | 28 + src/shader/exac8nvf0.fp| 42 + src/shader/exac8nvf0.fpc | 28 + src/shader/exacanv110.fp | 47 ++ src/shader/exacanv110.fpc | 38 + src/shader/exacanvc0.fp| 41 + src/shader/exacanvc0.fpc | 25 + src/shader/exacanve0.fp| 42 + src/shader/exacanve0.fpc | 28 + src/shader/exacanvf0.fp| 42 + src/shader/exacanvf0.fpc | 28 + src/shader/exacmnv110.fp | 47 ++ src/shader/exacmnv110.fpc | 38 + src/shader/exacmnvc0.fp| 41 + src/shader/exacmnvc0.fpc | 25 + src/shader/exacmnve0.fp| 42 + src/shader/exacmnve0.fpc | 28 + src/shader/exacmnvf0.fp| 42 + src/shader/exacmnvf0.fpc | 28 + src/shader/exas8nv110.fp | 42 + src/shader/exas8nv110.fpc | 28 + src/shader/exas8nvc0.fp| 37 + src/shader/exas8nvc0.fpc | 14 src/shader/exas8nve0.fp| 38 + src/shader/exas8nve0.fpc | 20 src/shader/exas8nvf0.fp| 38 + src/shader/exas8nvf0.fpc | 20 src/shader/exasanv110.fp | 47 ++ src/shader/exasanv110.fpc | 38 + src/shader/exasanvc0.fp| 41 + src/shader/exasanvc0.fpc | 25 + src/shader/exasanve0.fp| 42 + src/shader/exasanve0.fpc | 28 + src/shader/exasanvf0.fp| 42 + src/shader/exasanvf0.fpc | 28 + src/shader/exascnv110.fp | 38 + src/shader/exascnv110.fpc | 20 src/shader/exascnvc0.fp| 34 + src/shader/exascnvc0.fpc | 11 src/shader/exascnve0.fp| 35 + src/shader/exascnve0.fpc | 14 src/shader/exascnvf0.fp| 35 + src/shader/exascnvf0.fpc | 14 src/shader/videonv110.fp | 54 ++ src/shader/videonv110.fpc | 52 ++ src/shader/videonvc0.fp| 47 ++ src/shader/videonvc0.fpc | 37 + src/shader/videonve0.fp| 50 ++ src/shader/videonve0.fpc | 44 ++ src/shader/videonvf0.fp| 47 ++ src/shader/videonvf0.fpc | 38 + src/shader/xfrm2nv110.vp | 82 +++ src/shader/xfrm2nv110.vpc | 102 src/shader/xfrm2nvc0.vp| 63 ++ src/shader/xfrm2nvc0.vpc | 69 +++ src/shader/xfrm2nve0.vp| 63 ++ src/shader/xfrm2nve0.vpc | 70 +++ src/shader/xfrm2nvf0.vp| 82 +++ src/shader/xfrm2nvf0.vpc | 90 110 files changed, 6678 insertions(+), 2540 deletions(-) New commits: commit b71de83b7fae0abeb311251e6144294d319062cf Author: Lyude Date: Tue Mar 7 18:44:43 2017 -0500 Bump version to 1.0.14 Signed-off-by: L
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |2 src/drmmode_display.c | 57 ++ src/nouveau_dri2.c| 18 +++ src/nouveau_exa.c |5 src/nv30_exa.c| 272 +- src/nv_accel_common.c | 13 ++ src/nv_driver.c | 11 +- 7 files changed, 233 insertions(+), 145 deletions(-) New commits: commit 6771424d79e541d2fa7253a582db3dc9108fd97d Author: Maarten Lankhorst Date: Wed Mar 27 09:50:03 2013 +0100 bump to 1.0.7 Signed-off-by: Maarten Lankhorst diff --git a/configure.ac b/configure.ac index 7535bfe..137de9c 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], -[1.0.6], +[1.0.7], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit 84998320162a74a0861b7be1fcc230e50f08424a Author: Maarten Lankhorst Date: Mon Mar 25 13:55:37 2013 +0100 Clean up some errors on closing. If forced close happens, all ioctl's will fail. Some of the handlers also need to be unregistered before the module is unloaded entirely. diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 9eca60f..6033a6d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -627,6 +627,9 @@ drmmode_output_detect(xf86OutputPtr output) drmmode_output->mode_output = drmModeGetConnector(drmmode->fd, drmmode_output->output_id); + if (!drmmode_output->mode_output) + return XF86OutputStatusDisconnected; + switch (drmmode_output->mode_output->connection) { case DRM_MODE_CONNECTED: status = XF86OutputStatusConnected; @@ -663,6 +666,9 @@ drmmode_output_get_modes(xf86OutputPtr output) drmModePropertyPtr props; xf86MonPtr ddc_mon = NULL; + if (!koutput) + return NULL; + /* look for an EDID property */ for (i = 0; i < koutput->count_props; i++) { props = drmModeGetProperty(drmmode->fd, koutput->props[i]); @@ -927,6 +933,9 @@ drmmode_output_get_property(xf86OutputPtr output, Atom property) drmModeGetConnector(drmmode->fd, drmmode_output->output_id); } + if (!drmmode_output->mode_output) + return FALSE; + for (i = 0; i < drmmode_output->num_props; i++) { drmmode_prop_ptr p = &drmmode_output->props[i]; if (p->atoms[0] != property) @@ -1437,6 +1446,7 @@ drmmode_uevent_fini(ScrnInfoPtr scrn) if (drmmode->uevent_monitor) { struct udev *u = udev_monitor_get_udev(drmmode->uevent_monitor); + RemoveGeneralSocket(udev_monitor_get_fd(drmmode->uevent_monitor)); udev_monitor_unref(drmmode->uevent_monitor); udev_unref(u); } @@ -1524,6 +1534,12 @@ void drmmode_screen_fini(ScreenPtr pScreen) { ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); + drmmode_ptr drmmode = drmmode_from_scrn(scrn); drmmode_uevent_fini(scrn); + + /* Register a wakeup handler to get informed on DRM events */ + RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA, +drmmode_wakeup_handler, scrn); + RemoveGeneralSocket(drmmode->fd); } diff --git a/src/nv_driver.c b/src/nv_driver.c index 9f62fe2..2b74fc6 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -432,8 +432,8 @@ NVLeaveVT(VT_FUNC_ARGS_DECL) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "NVLeaveVT is called.\n"); ret = drmDropMaster(pNv->dev->fd); - if (ret) - ErrorF("Error dropping master: %d\n", ret); + if (ret && errno != EIO && errno != ENODEV) + ErrorF("Error dropping master: %i(%m)\n", -errno); } static void @@ -624,8 +624,9 @@ NVCloseDRM(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); - nouveau_device_del(&pNv->dev); drmFree(pNv->drm_device_name); + nouveau_client_del(&pNv->client); + nouveau_device_del(&pNv->dev); } static Bool commit a80785f79268ed3701fc69cbd9194ad12822c82c Author: Dave Airlie Date: Mon Feb 11 09:56:25 2013 +1000 nouveau: fix build against old servers (part 2) Should fix next bit of https://bugs.freedesktop.org/show_bug.cgi?id=60369 Signed-off-by: Dave Airlie diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 71c9ff9..9eca60f 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -346,9 +346,12 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, drmmode_ConvertToKMode(crtc->scrn, &kmode, mode); fb_id = drmmode->fb_id; +#ifdef NOUVEAU_PIXMAP_SHARING if (crtc->randr_crtc->scanout_pixmap) x = y = 0; - else if (drmmode_crtc->rotate_fb_id) { + else +#endif + if (drmmode_crtc->rotate_fb_id) { fb_id = drmmode_crtc->rotate_fb_id; x =
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |2 +- src/drmmode_display.c |9 ++--- src/nv_driver.c |3 ++- src/nvc0_shader.h |4 ++-- src/nve0_shader.h |4 ++-- 5 files changed, 13 insertions(+), 9 deletions(-) New commits: commit 8f934fad5d4934936b3265f272ca81e73c60d7dc Author: Dave Airlie Date: Mon Jan 7 14:13:10 2013 +1000 bump to 1.0.6 Signed-off-by: Dave Airlie diff --git a/configure.ac b/configure.ac index 3428be1..7535bfe 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], -[1.0.5], +[1.0.6], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit 00834273e22f7234a3755269100ea3f10b521e35 Author: Dave Airlie Date: Mon Jan 7 14:04:40 2013 +1000 nouveau: fix dirty redisplay damage handling This processes the damage in the correct order. Signed-off-by: Dave Airlie diff --git a/src/nv_driver.c b/src/nv_driver.c index de09f53..f14c847 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -454,9 +454,10 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty) PixmapRegionInit(&pixregion, dirty->slave_dst->master_pixmap); + DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion); PixmapSyncDirtyHelper(dirty, &pixregion); - DamageRegionAppend(&dirty->slave_dst->drawable, &pixregion); + DamageRegionProcessPending(&dirty->slave_dst->drawable); RegionUninit(&pixregion); } commit 389b8a8dd91a48dee524eac96e60813c507f1a82 Author: Ben Skeggs Date: Mon Jan 7 14:05:06 2013 +1000 bump to 1.0.5 Signed-off-by: Ben Skeggs diff --git a/configure.ac b/configure.ac index ff9c337..3428be1 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], -[1.0.4], +[1.0.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit efe9c57af6ff4c12936e49ac3e188c54b8b2d5bd Author: Ben Skeggs Date: Mon Jan 7 11:35:56 2013 +1000 nvc0-/exa: fix typo which caused breakage in rendercheck tmcoords test Signed-off-by: Ben Skeggs diff --git a/src/nvc0_shader.h b/src/nvc0_shader.h index 4d1679e..41bc065 100644 --- a/src/nvc0_shader.h +++ b/src/nvc0_shader.h @@ -73,8 +73,8 @@ NVC0VP_Transform2[] = { 0x58004000, 0x10011c40, 0x58004001, - 0x00109c40, - 0x30044001, + 0xc0109c40, + 0x30044000, 0xf010dc40, 0x30064000, 0x20111c40, diff --git a/src/nve0_shader.h b/src/nve0_shader.h index 4705075..5d8e9dd 100644 --- a/src/nve0_shader.h +++ b/src/nve0_shader.h @@ -67,8 +67,8 @@ NVE0VP_Transform2[] = { 0x58004000, 0x10011c40, 0x58004001, - 0x00109c40, - 0x30044001, + 0xc0109c40, + 0x30044000, 0xf010dc40, 0x30064000, 0x20111c40, commit 5cd86445272818ec2f598f4685a5d7f24e403d07 Author: Marcin Slusarz Date: Sun Nov 25 22:59:49 2012 +0100 add some missing newlines in error messages Signed-off-by: Ben Skeggs diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 8ec69f5..429e9cc 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -357,7 +357,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, if (ret) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, - "failed to set mode: %s", strerror(-ret)); + "failed to set mode: %s\n", strerror(-ret)); return FALSE; } @@ -532,7 +532,7 @@ drmmode_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, size, red, green, blue); if (ret != 0) { xf86DrvMsg(crtc->scrn->scrnIndex, X_ERROR, - "failed to set gamma: %s", strerror(-ret)); + "failed to set gamma: %s\n", strerror(-ret)); } } commit 3b33a0b426b8915f302247dcd40c64fb1a6dcdd2 Author: Emil Velikov Date: Sun Nov 4 18:06:18 2012 + kms: Let the server know if we got more than 1 EDID block Verbatim copy from xf86-video-radeon commit 809cacb Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32341 Signed-off-by: Emil Velikov Signed-off-by: Ben Skeggs diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 803785d..8ec69f5 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -640,9 +640,12 @@ drmmode_output_get_modes(xf86OutputPtr output) drmModeFreeProperty(props); } - if (drmmode_output->edid_blob) + if (drmmode_output->edid_blob) { ddc_mon = xf86InterpretEDID(output->scrn->scrnIndex, drmmode_output->edid_blob->data); + if (ddc_mon && drmmode_output->edid_blo
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |2 src/nouveau_dri2.c |5 - src/nv_driver.c| 198 - src/nv_type.h |2 4 files changed, 126 insertions(+), 81 deletions(-) New commits: commit 018ab2d4634f3c8923038337ce9600973e2f0002 Author: Ben Skeggs Date: Fri Nov 9 12:16:00 2012 +1000 bump version to 1.0.4 Signed-off-by: Ben Skeggs diff --git a/configure.ac b/configure.ac index e2fdb20..ff9c337 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], -[1.0.3], +[1.0.4], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit 0d32d964dbba3864af0946aa8894cef858eb1319 Author: Dave Airlie Date: Wed Nov 7 14:49:03 2012 +1000 nouveau: drop unused nv private members. these are no longer needed. Signed-off-by: Dave Airlie diff --git a/src/nv_type.h b/src/nv_type.h index d882e7c..ed21c6d 100644 --- a/src/nv_type.h +++ b/src/nv_type.h @@ -69,9 +69,7 @@ typedef struct _NVRec { CARD32 currentRop; -DRIInfoPtr pDRIInfo; drmVersionPtr pLibDRMVersion; -drmVersionPtr pKernelDRMVersion; void *drmmode; /* for KMS */ commit b1a630b48210d6a3c44994fce1b73273000ace5c Author: Dave Airlie Date: Wed Nov 7 14:45:14 2012 +1000 nouveau: drop DRI1 device open interface. this is a DRI1 left over, the driver is meant to open the device itself now. this old interface did crazy stuff like drmAddMap. Reviewed-by: Ben Skeggs Signed-off-by: Dave Airlie diff --git a/src/nv_driver.c b/src/nv_driver.c index ea4a018..de09f53 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -680,39 +680,69 @@ nouveau_setup_capabilities(ScrnInfoPtr pScrn) #endif } +static Bool NVOpenDRMMaster(ScrnInfoPtr pScrn) +{ + NVPtr pNv = NVPTR(pScrn); + struct pci_device *dev = pNv->PciInfo; + char *busid; + drmSetVersion sv; + int err; + int ret; + +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0) + XNFasprintf(&busid, "pci:%04x:%02x:%02x.%d", + dev->domain, dev->bus, dev->dev, dev->func); +#else + busid = XNFprintf("pci:%04x:%02x:%02x.%d", + dev->domain, dev->bus, dev->dev, dev->func); +#endif + + ret = nouveau_device_open(busid, &pNv->dev); + if (ret) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "[drm] Failed to open DRM device for %s: %d\n", + busid, ret); + free(busid); + return FALSE; + } + free(busid); + + sv.drm_di_major = 1; + sv.drm_di_minor = 1; + sv.drm_dd_major = -1; + sv.drm_dd_minor = -1; + err = drmSetInterfaceVersion(pNv->dev->fd, &sv); + if (err != 0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "[drm] failed to set drm interface version.\n"); + nouveau_device_del(&pNv->dev); + return FALSE; + } + return TRUE; +} + static Bool NVPreInitDRM(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); - char *bus_id; int ret; if (!NVDRIGetVersion(pScrn)) return FALSE; /* Load the kernel module, and open the DRM */ - bus_id = DRICreatePCIBusID(pNv->PciInfo); - ret = DRIOpenDRMMaster(pScrn, SAREA_MAX, bus_id, "nouveau"); - free(bus_id); + ret = NVOpenDRMMaster(pScrn); if (!ret) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] error opening the drm\n"); return FALSE; } - /* Initialise libdrm_nouveau */ - ret = nouveau_device_wrap(DRIMasterFD(pScrn), 1, &pNv->dev); - if (ret) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, - "[drm] error creating device\n"); - return FALSE; - } - ret = nouveau_client_new(pNv->dev, &pNv->client); if (ret) return FALSE; - pNv->drm_device_name = drmGetDeviceNameFromFd(DRIMasterFD(pScrn)); + pNv->drm_device_name = drmGetDeviceNameFromFd(pNv->dev->fd); return TRUE; } commit 27a1a0616304e9b9f0ae842899b7d614f1026578 Author: Emil Velikov Date: Fri Nov 2 03:57:42 2012 + nouveau: NVPlatformProbe, handle shareable entities During NVPciProbe, xf86ConfigPciEntity() implicitly calls checks and sets the entity as shared Here we are only allocating the screen, thus need to explicitly call the functions ZaphodHead and Xinerama should finally work Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56347 Reported-By: Vladimir Chebotarev Reported-By: Damian Nowak Tested-By: Damian Nowak Signed-off-by: Emil Velikov Signed-off-by: Ben
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |2 - src/nouveau_dri2.c | 57 ++--- src/nouveau_exa.c | 15 + src/nv40_exa.c |6 ++--- src/nv50_exa.c |6 ++--- src/nv_driver.c|1 src/nv_include.h |3 -- src/nv_shadow.c|7 ++ src/nv_type.h |2 - src/nvc0_exa.c | 40 + 10 files changed, 84 insertions(+), 55 deletions(-) New commits: commit 8c3e1623b0be15f8cc590d893bfd19be87bd079a Author: Maarten Lankhorst Date: Wed Oct 24 11:19:04 2012 +0200 bump version to 1.0.3 diff --git a/configure.ac b/configure.ac index 4861608..e2fdb20 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], -[1.0.2], +[1.0.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit 6644a3a724a11150eba0c0082c8d4fe167b1755e Author: Maarten Lankhorst Date: Tue Oct 23 20:17:29 2012 +0200 exa: remove exaMarkSync from download/upload screen They're noops on nouveau since sync markers are unused and download/upload are always synchronous anyway from exa's POV. Signed-off-by: Maarten Lankhorst diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index b0d63a1..8191aeb 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -321,20 +321,17 @@ nouveau_exa_upload_to_screen(PixmapPtr pdpix, int x, int y, int w, int h, if (pNv->Architecture < NV_ARCH_50) { if (NV04EXAUploadIFC(pScrn, src, src_pitch, pdpix, x, y, w, h, cpp)) { - exaMarkSync(pdpix->drawable.pScreen); return TRUE; } } else if (pNv->Architecture < NV_ARCH_C0) { if (NV50EXAUploadSIFC(src, src_pitch, pdpix, x, y, w, h, cpp)) { - exaMarkSync(pdpix->drawable.pScreen); return TRUE; } } else { if (NVC0EXAUploadSIFC(src, src_pitch, pdpix, x, y, w, h, cpp)) { - exaMarkSync(pdpix->drawable.pScreen); return TRUE; } } @@ -372,7 +369,6 @@ nouveau_exa_upload_to_screen(PixmapPtr pdpix, int x, int y, int w, int h, y += lines; } - exaMarkSync(pdpix->drawable.pScreen); return TRUE; /* fallback to memcpy-based transfer */ @@ -386,8 +382,6 @@ memcpy: return FALSE; dst = (char *)bo->map + (y * dst_pitch) + (x * cpp); ret = NVAccelMemcpyRect(dst, src, h, dst_pitch, src_pitch, w*cpp); - if (ret) - exaMarkSync(pdpix->drawable.pScreen); return ret; } commit 2a757b7dffa85c30879653a1e52e33b8f4fa8806 Author: Maarten Lankhorst Date: Tue Oct 23 17:04:37 2012 +0200 exa: fix comparison in download_from_screen Presumably a copy/paste error from upload_to_screen. Signed-off-by: Maarten Lankhorst diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index 136b68f..b0d63a1 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -269,7 +269,7 @@ nouveau_exa_download_from_screen(PixmapPtr pspix, int x, int y, int w, int h, goto memcpy; nouveau_bo_wait(tmp, NOUVEAU_BO_RD, pNv->client); - if (src_pitch == tmp_pitch) { + if (dst_pitch == tmp_pitch) { memcpy(dst, tmp->map + tmp_offset, dst_pitch * lines); dst += dst_pitch * lines; } else { commit 72230cd5a7846f7a26f929262a745dc0bdc34a3d Author: Maarten Lankhorst Date: Tue Oct 23 10:37:27 2012 +0200 exa: fix up download_from/upload_to screen Add a missing return TRUE to download_from_screen. Add a missing exaMarkSync to memcpy in upload_to_screen. Add a really loud warning to both if memcpy to/from tiled is done. Signed-off-by: Maarten Lankhorst diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index 13d7e1f..136b68f 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -285,9 +285,14 @@ nouveau_exa_download_from_screen(PixmapPtr pspix, int x, int y, int w, int h, h -= lines; y += lines; } + return TRUE; memcpy: bo = nouveau_pixmap_bo(pspix); + if (nv50_style_tiled_pixmap(pspix)) + ErrorF("%s:%d - falling back to memcpy ignores tiling\n", + __func__, __LINE__); + if (nouveau_bo_map(bo, NOUVEAU_BO_RD, pNv->client)) return FALSE; src = (char *)bo->map + (y * src_pitch) + (x * cpp); @@ -373,10 +378,1
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |2 src/Makefile.am | 48 +++-- src/compat-api.h | 55 ++ src/drmmode_display.c |6 src/nouveau_dri2.c| 157 + src/nouveau_exa.c | 149 + src/nouveau_local.h |1 src/nouveau_xv.c |5 src/nv04_accel.h | 10 + src/nv04_exa.c| 15 - src/nv10_exa.c|4 src/nv30_exa.c|6 src/nv30_xv_tex.c |2 src/nv40_exa.c| 438 +- src/nv40_xv_tex.c |2 src/nv50_accel.c | 23 ++ src/nv50_accel.h | 13 - src/nv50_exa.c| 62 ++- src/nv_accel_common.c |4 src/nv_const.h|2 src/nv_dma.c | 38 src/nv_driver.c | 223 ++--- src/nv_include.h |6 src/nv_proto.h| 11 + src/nv_type.h | 19 +- src/nvc0_accel.c | 80 - src/nvc0_accel.h | 29 +-- src/nvc0_exa.c| 62 ++- src/nvc0_xv.c |4 src/nve0_shader.h | 66 ++- 30 files changed, 1069 insertions(+), 473 deletions(-) New commits: commit 20f3830ddf868c0d1a46c18fa381585c076bfb8d Author: Maarten Lankhorst Date: Wed Sep 12 13:42:43 2012 +0200 bump version to 1.0.2 diff --git a/configure.ac b/configure.ac index af126fb..4861608 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], -[1.0.1], +[1.0.2], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit 239f39977ebb64c9d545c6f3c905de3c0ad840d0 Author: Dave Airlie Date: Thu Jul 19 13:46:44 2012 +1000 nouveau: enable provider/capabilities this adds the provider object for nouveau and enables the capabilities on it. Signed-off-by: Dave Airlie diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 62838fa..803785d 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1199,6 +1199,10 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp) for (i = 0; i < drmmode->mode_res->count_connectors; i++) drmmode_output_init(pScrn, drmmode, i); +#ifdef NOUVEAU_PIXMAP_SHARING + xf86ProviderSetup(pScrn, NULL, "nouveau"); +#endif + xf86InitialConfiguration(pScrn, TRUE); return TRUE; diff --git a/src/nv_driver.c b/src/nv_driver.c index a02cef3..271f641 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -643,6 +643,25 @@ NVDRIGetVersion(ScrnInfoPtr pScrn) return TRUE; } +static void +nouveau_setup_capabilities(ScrnInfoPtr pScrn) +{ +#ifdef NOUVEAU_PIXMAP_SHARING + NVPtr pNv = NVPTR(pScrn); + uint64_t value; + int ret; + + pScrn->capabilities = 0; + ret = drmGetCap(pNv->dev->fd, DRM_CAP_PRIME, &value); + if (ret == 0) { + if (value & DRM_PRIME_CAP_EXPORT) + pScrn->capabilities |= RR_Capability_SourceOutput; + if (value & DRM_PRIME_CAP_IMPORT) + pScrn->capabilities |= RR_Capability_SourceOffload; + } +#endif +} + static Bool NVPreInitDRM(ScrnInfoPtr pScrn) { @@ -751,6 +770,8 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) NVPreInitFail("\n"); dev = pNv->dev; + nouveau_setup_capabilities(pScrn); + pScrn->chipset = malloc(sizeof(char) * 25); sprintf(pScrn->chipset, "NVIDIA NV%02x", dev->chipset); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Chipset: \"%s\"\n", pScrn->chipset); commit 28abba276e36fd0176f416996d44297ddf13f5cd Author: Dave Airlie Date: Thu Jul 19 13:46:12 2012 +1000 nouveau/dri2: add support for DRI2 offload This adds the nouveau interfaces for DRI2 offload, this allows nouveau to act as an offload slave. Signed-off-by: Dave Airlie diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 62333b1..71cff26 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -21,34 +21,40 @@ nouveau_dri2_buffer(DRI2BufferPtr buf) return (struct nouveau_dri2_buffer *)buf; } +static PixmapPtr get_drawable_pixmap(DrawablePtr drawable) +{ + if (drawable->type == DRAWABLE_PIXMAP) + return (PixmapPtr)drawable; + else + return (*drawable->pScreen->GetWindowPixmap)((WindowPtr)drawable); +} + DRI2BufferPtr -nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, +nouveau_dri2_create_buffer2(ScreenPtr pScreen, DrawablePtr pDraw, unsigned int attachment, unsigned int format) { - ScreenPtr pScreen = pDraw->pScreen; NVPtr pNv = NVPTR(xf86ScreenToScrn(pScreen)); struct nouveau_dri2_buffer *nvbuf; struct nouveau_pixmap *nvpix; - PixmapPtr ppix; + PixmapPtr ppix = NULL; nvbuf = calloc(1, sizeof(*nvbuf)); if (!nvbuf) return NULL; if (attachment ==
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac|2 man/nouveau.man | 15 src/Makefile.am |5 src/compat-api.h| 41 src/drmmode_display.c | 166 src/hwdefs/nv01_2d.xml.h| 1416 ++ src/hwdefs/nv10_3d.xml.h| 1637 +++ src/hwdefs/nv30-40_3d.xml.h | 2052 + src/hwdefs/nv50_2d.xml.h| 434 ++ src/hwdefs/nv50_3d.xml.h| 2127 ++ src/hwdefs/nv50_defs.xml.h | 155 src/hwdefs/nv50_texture.h | 166 src/hwdefs/nv_3ddefs.xml.h | 93 src/hwdefs/nv_m2mf.xml.h| 174 src/hwdefs/nv_object.xml.h | 301 + src/hwdefs/nvc0_3d.xml.h| 1867 + src/hwdefs/nvc0_m2mf.xml.h | 178 src/nouveau_class.h | 9084 src/nouveau_dri2.c | 329 + src/nouveau_exa.c | 373 - src/nouveau_local.h | 172 src/nouveau_wfb.c |4 src/nouveau_xv.c| 217 - src/nv04_accel.h| 83 src/nv04_exa.c | 541 +- src/nv04_xv_blit.c | 272 - src/nv10_exa.c | 887 +--- src/nv30_exa.c | 1067 ++--- src/nv30_shaders.c | 350 - src/nv30_shaders.h | 72 src/nv30_xv_tex.c | 351 - src/nv40_exa.c | 1065 +++-- src/nv40_xv_tex.c | 336 - src/nv50_accel.c| 687 +-- src/nv50_accel.h| 78 src/nv50_defs.xml.h | 144 src/nv50_exa.c | 916 ++-- src/nv50_texture.h | 166 src/nv50_xv.c | 389 - src/nv_3ddefs.xml.h | 93 src/nv_accel_common.c | 642 +-- src/nv_const.h |2 src/nv_dma.c| 81 src/nv_dma.h|4 src/nv_driver.c | 95 src/nv_include.h| 17 src/nv_object.xml.h | 246 - src/nv_proto.h | 27 src/nv_shadow.c |3 src/nv_type.h | 57 src/nvc0_3d.xml.h | 1093 - src/nvc0_accel.c| 849 src/nvc0_accel.h| 130 src/nvc0_exa.c | 1178 ++--- src/nvc0_m2mf.xml.h | 138 src/nvc0_shader.h | 444 ++ src/nvc0_xv.c | 431 -- src/nve0_shader.h | 460 ++ src/vl_hwmc.c | 43 59 files changed, 17264 insertions(+), 17181 deletions(-) New commits: commit ace77b6b1304826f4004bde23809b55d476b0615 Author: Ben Skeggs Date: Tue May 29 21:21:57 2012 +1000 disable fermi accel on 0.0.16 interface Kepler accel support broke some assumption made by the older kernel interface, and Fermi shares the same code. It can't work (without some annoying hacks anyway) with the 0.0.16 kernel anymore. diff --git a/src/nv_dma.c b/src/nv_dma.c index 3b75ca9..1757f4d 100644 --- a/src/nv_dma.c +++ b/src/nv_dma.c @@ -36,6 +36,12 @@ NVInitDma(ScrnInfoPtr pScrn) int size, ret; void *data; + if (pNv->dev->drm_version < 0x0100 && pNv->dev->chipset >= 0xc0) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, + "Fermi acceleration not supported on old kernel\n"); + return FALSE; + } + if (pNv->Architecture < NV_ARCH_C0) { data = &nv04_data; size = sizeof(nv04_data); commit 7041e30ab8beb627bbf569367961a658e79c2bdc Author: Dave Airlie Date: Wed May 23 14:18:24 2012 +0100 vl_hwmc: add missing compat include. Reported-by: tallica on irc. Signed-off-by: Dave Airlie diff --git a/src/vl_hwmc.c b/src/vl_hwmc.c index 32eb258..ecad0b4 100644 --- a/src/vl_hwmc.c +++ b/src/vl_hwmc.c @@ -9,6 +9,8 @@ #include #include +#include "compat-api.h" + #define FOURCC_RGB 0x003 #define XVIMAGE_RGB \ { \ commit 2abf8467cfb7a7648ce73ba5bcbbc62219d65d6d Author: Dave Airlie Date: Wed May 23 11:29:05 2012 +0100 nouveau: add compat-api.h to makefile. Signed-off-by: Dave Airlie diff --git a/src/Makefile.am b/src/Makefile.am index 0bdd780..6aeb486 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -60,6 +60,7 @@ nouveau_drv_la_SOURCES = \ nvc0_exa.c \ nvc0_xv.c \ drmmode_display.c \ +compat-api.h \ vl_hwmc.c \ vl_hwmc.h commit 1d861ad716861c57b2b81531d21840d7c8de024b Author: Dave Airlie Date: Wed May 23 11:15:06 2012 +0100 nouveau: convert two more xf86Screens access to macros for some reason the script missed these two, just fix them manually. Signed-off-by: Dave Airlie diff --git a/src/nv50_exa.c b/src/nv50_exa.c index cd99e10..1212eb6 100644 --- a/src/nv50_exa.c +++ b/src/nv50_exa.c @@ -27,7 +27,7 @@ #include "nv50_accel.h" #define NV50EX
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
src/nv50_exa.c |2 +- src/nvc0_exa.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) New commits: commit 8378443bd3b26b57ef2ae424a700e01ead813d33 Author: Ben Skeggs Date: Thu Mar 24 02:13:12 2011 +1000 nv50-nvc0/exa: fix bug causing surface state to not be reemitted after flush Signed-off-by: Ben Skeggs diff --git a/src/nv50_exa.c b/src/nv50_exa.c index 85baa68..b6094ae 100644 --- a/src/nv50_exa.c +++ b/src/nv50_exa.c @@ -363,7 +363,7 @@ NV50EXAStateSIFCResubmit(struct nouveau_channel *chan) if (MARK_RING(pNv->chan, 32, 2)) return; - if (NV50EXAAcquireSurface2D(pNv->pdpix, 0)) + if (!NV50EXAAcquireSurface2D(pNv->pdpix, 0)) MARK_UNDO(pNv->chan); } diff --git a/src/nvc0_exa.c b/src/nvc0_exa.c index 85cb5d2..9833275 100644 --- a/src/nvc0_exa.c +++ b/src/nvc0_exa.c @@ -541,7 +541,7 @@ NVC0EXAStateSIFCResubmit(struct nouveau_channel *chan) if (MARK_RING(pNv->chan, 32, 2)) return; - if (NVC0EXAAcquireSurface2D(pNv->pdpix, 0)) + if (!NVC0EXAAcquireSurface2D(pNv->pdpix, 0)) MARK_UNDO(pNv->chan); } -- 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/e1q9igg-0002ae...@alioth.debian.org
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac | 15 man/nouveau.man |3 src/Makefile.am |3 src/drmmode_display.c | 42 - src/nouveau_class.h | 975 src/nouveau_dri2.c| 20 src/nouveau_exa.c | 50 +- src/nouveau_local.h |3 src/nouveau_wfb.c |5 src/nouveau_xv.c | 59 +- src/nv04_exa.c|8 src/nv04_xv_blit.c|2 src/nv10_exa.c|1 src/nv30_exa.c|1 src/nv30_shaders.c|1 src/nv30_xv_tex.c |1 src/nv40_exa.c|1 src/nv40_xv_tex.c |1 src/nv50_accel.c | 41 - src/nv50_accel.h | 12 src/nv50_defs.xml.h | 144 + src/nv50_exa.c|5 src/nv50_xv.c | 141 + src/nv_3ddefs.xml.h | 93 +++ src/nv_accel_common.c | 91 ++- src/nv_const.h|2 src/nv_dma.c | 21 src/nv_driver.c | 38 + src/nv_include.h |2 src/nv_object.xml.h | 246 ++ src/nv_proto.h| 37 + src/nvc0_3d.xml.h | 1093 + src/nvc0_accel.c | 731 ++ src/nvc0_accel.h | 83 +++ src/nvc0_exa.c| 1204 ++ src/nvc0_m2mf.xml.h | 138 + src/nvc0_xv.c | 427 + 37 files changed, 4629 insertions(+), deletions(-) New commits: commit 92db2bc192a074d4b7fc3e9c16e9aa62a8deaeb6 Author: Christoph Bumiller Date: Thu Mar 3 22:17:23 2011 +0100 nvc0/accel: allow nvc1,nvc3,nvc4 in 3D engine init and use 9097 diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c index aef8305..c37b30c 100644 --- a/src/nvc0_accel.c +++ b/src/nvc0_accel.c @@ -92,6 +92,9 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn) switch (pNv->dev->chipset) { case 0xc0: + case 0xc1: + case 0xc3: + case 0xc4: tclClass = 0x9097; break; default: commit ace98a492353e6de712f4f717e6d3f562e3591f0 Author: Ben Skeggs Date: Tue Mar 1 13:54:38 2011 +1000 dri2: return an error rather than crashing if we can't allocate a buffer Signed-off-by: Ben Skeggs diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index d5afa8a..1a68ed3 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -29,6 +29,7 @@ nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, ScreenPtr pScreen = pDraw->pScreen; NVPtr pNv = NVPTR(xf86Screens[pScreen->myNum]); struct nouveau_dri2_buffer *nvbuf; + struct nouveau_pixmap *nvpix; PixmapPtr ppix; nvbuf = calloc(1, sizeof(*nvbuf)); @@ -70,7 +71,14 @@ nouveau_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment, nvbuf->base.flags = 0; nvbuf->ppix = ppix; - nouveau_bo_handle_get(nouveau_pixmap(ppix)->bo, &nvbuf->base.name); + nvpix = nouveau_pixmap(ppix); + if (!nvpix || !nvpix->bo || + nouveau_bo_handle_get(nvpix->bo, &nvbuf->base.name)) { + pScreen->DestroyPixmap(nvbuf->ppix); + free(nvbuf); + return NULL; + } + return &nvbuf->base; } commit bc5dec2ca7ca7edc340a99bd73946e228117dfd8 Author: Ben Skeggs Date: Thu Feb 24 15:15:00 2011 +1000 dri2: disable page flipping if any crtc is rotated Signed-off-by: Ben Skeggs diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 45add0f..d5afa8a 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -134,7 +134,16 @@ static Bool can_exchange(DrawablePtr draw, PixmapPtr dst_pix, PixmapPtr src_pix) { ScrnInfoPtr scrn = xf86Screens[draw->pScreen->myNum]; + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); NVPtr pNv = NVPTR(scrn); + int i; + + for (i = 0; i < xf86_config->num_crtc; i++) { + xf86CrtcPtr crtc = xf86_config->crtc[i]; + if (crtc->enabled && crtc->rotatedData) + return FALSE; + + } return (!nouveau_exa_pixmap_is_onscreen(dst_pix) || (DRI2CanFlip(draw) && pNv->has_pageflip)) && commit c123618470b5ff32c6377a4cae0f148d4a518a5d Author: Francesco Marella Date: Thu Feb 17 03:48:16 2011 +0100 Fix gcc 4.6.0 set but unused variable warnings Signed-off-by: Francesco Marella Signed-off-by: Ben Skeggs diff --git a/src/drmmode_display.c b/src/drmmode_display.c index d14dd80..43a2672 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -1158,7 +1158,6 @@ static const xf86CrtcConfigFuncsRec drmmode_xf86crtc_config_funcs = { Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp) { - xf86CrtcConfigPtr xf86_config; drmmode_ptr drmmode; int i; @@ -1167,7 +1166,6 @@ Bool drmmode_pre_init(ScrnInfoPtr pScrn, int fd, int cpp) drmmode->fb_id = 0; xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs); - xf86_
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |2 man/nouveau.man | 18 +++ src/drmmode_display.c | 265 +--- src/nouveau_class.h |2 src/nouveau_dri2.c| 298 +- src/nouveau_exa.c | 52 +--- src/nouveau_local.h | 11 + src/nouveau_wfb.c |2 src/nouveau_xv.c | 17 -- src/nv04_exa.c| 35 + src/nv04_xv_blit.c| 11 - src/nv30_xv_tex.c | 19 --- src/nv40_xv_tex.c | 19 --- src/nv50_accel.c | 33 + src/nv50_xv.c | 32 - src/nv_accel_common.c | 95 +++ src/nv_const.h|8 + src/nv_dma.c |3 src/nv_driver.c | 107 +++-- src/nv_include.h |2 src/nv_proto.h| 14 +- src/nv_type.h |8 + 22 files changed, 806 insertions(+), 247 deletions(-) New commits: commit 8bb8231236a6b877895663aeaa9cef731d67fe68 Author: Ben Skeggs Date: Tue Nov 30 15:27:36 2010 +1000 dri2: fix certain clients blocking forever when sync-to-vblank unavailable Signed-off-by: Ben Skeggs diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 969c6f3..2dd6da4 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -322,8 +322,10 @@ nouveau_dri2_schedule_wait(ClientPtr client, DrawablePtr draw, CARD64 current_msc; int ret; - if (!can_sync_to_vblank(draw)) + if (!can_sync_to_vblank(draw)) { + DRI2WaitMSCComplete(client, draw, target_msc, 0, 0); return TRUE; + } /* Initialize a vblank structure */ s = malloc(sizeof(*s)); commit f29afe65b67c9b89ceba421d9b3aee590f7ded20 Author: Ben Skeggs Date: Mon Nov 29 09:23:35 2010 +1000 dri2: don't return failure from get_msc if sync-to-vblank isn't available Signed-off-by: Ben Skeggs diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 48e134e..969c6f3 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -363,8 +363,11 @@ nouveau_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc) { int ret; - if (!can_sync_to_vblank(draw)) - return FALSE; + if (!can_sync_to_vblank(draw)) { + *ust = 0; + *msc = 0; + return TRUE; + } /* Get current sequence */ ret = nouveau_wait_vblank(draw, DRM_VBLANK_RELATIVE, 0, msc, ust, NULL); commit 4b1d26578116f4d1745dd92a7c99413972a2bedf Author: Francisco Jerez Date: Thu Nov 25 21:33:46 2010 +0100 dri2: Don't return failure from schedule_wait if sync-to-vblank is unavailable. Reported-by: Ben Skeggs Signed-off-by: Francisco Jerez diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 204ab32..48e134e 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -323,7 +323,7 @@ nouveau_dri2_schedule_wait(ClientPtr client, DrawablePtr draw, int ret; if (!can_sync_to_vblank(draw)) - return FALSE; + return TRUE; /* Initialize a vblank structure */ s = malloc(sizeof(*s)); commit 1143e7a97dce1b741376e178b73b8b766e03849a Author: Jesse Adkins Date: Tue Oct 26 16:05:32 2010 -0700 Purge cvs tags. Signed-off-by: Jesse Adkins Signed-off-by: Francisco Jerez diff --git a/src/nv_const.h b/src/nv_const.h index f80d125..01ffc2c 100644 --- a/src/nv_const.h +++ b/src/nv_const.h @@ -1,5 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_const.h,v 1.6 2001/12/07 00:09:55 mvojkovi Exp $ */ - #ifndef __NV_CONST_H__ #define __NV_CONST_H__ diff --git a/src/nv_include.h b/src/nv_include.h index ce89596..48f0b21 100644 --- a/src/nv_include.h +++ b/src/nv_include.h @@ -1,5 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/nv/nv_include.h,v 1.9 2000/10/06 12:31:03 eich Exp $ */ - #ifndef __NV_INCLUDE_H__ #define __NV_INCLUDE_H__ commit 22020457f43eceaf26532ecb50e46d743f4a691f Author: Francisco Jerez Date: Tue Oct 26 00:24:06 2010 +0200 dri2: Fix throttling on occluded drawables. Signed-off-by: Francisco Jerez diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 65e7340..204ab32 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -239,6 +239,13 @@ nouveau_dri2_finish_swap(DrawablePtr draw, unsigned int frame, DamageRegionProcessPending(draw); } else { type = DRI2_BLIT_COMPLETE; + + /* Reference the front buffer to let throttling work +* on occluded drawables. */ + WAIT_RING(chan, 1); + OUT_RELOC(chan, dst_bo, 0, + NOUVEAU_BO_VRAM | NOUVEAU_BO_RD, 0, 0); + REGION_TRANSLATE(0, ®, -draw->x, -draw->y); nouveau_dri2_copy_region(draw, ®, s->dst, s->src); } commit 9737a812aacbc544b93eeaa031cf1c2e8adbd661 Author: Ben Skeggs Date: Mon Oct 25 10:37:08 2010 +1000 kms:
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
src/drmmode_display.c | 20 src/nouveau_class.h | 1169 ++ src/nouveau_dri2.c| 12 src/nouveau_exa.c | 49 -- src/nouveau_xv.c | 21 src/nv04_exa.c|4 src/nv30_exa.c|2 src/nv40_exa.c|2 src/nv50_accel.c |8 src/nv50_exa.c| 22 src/nv50_xv.c | 20 src/nv_driver.c | 42 - src/nv_type.h |1 13 files changed, 1190 insertions(+), 182 deletions(-) New commits: commit 390f1c86d9583f4ceabd407ee47410073c2a1b55 Author: Ben Skeggs Date: Fri Aug 20 09:48:32 2010 +1000 nv50/xv: support UYVY Signed-off-by: Ben Skeggs diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c index 4437aa6..b531f10 100644 --- a/src/nouveau_xv.c +++ b/src/nouveau_xv.c @@ -1983,7 +1983,8 @@ NV50TexturedImages[] = { XVIMAGE_YV12, XVIMAGE_I420, - XVIMAGE_YUY2 + XVIMAGE_YUY2, + XVIMAGE_UYVY }; static XF86VideoAdaptorPtr diff --git a/src/nv50_xv.c b/src/nv50_xv.c index 2e0f080..b9349a2 100644 --- a/src/nv50_xv.c +++ b/src/nv50_xv.c @@ -147,11 +147,19 @@ nv50_xv_state_emit(PixmapPtr ppix, int id, struct nouveau_bo *src, OUT_RING (chan, 0x0300); OUT_RING (chan, 0x); } else { + if (id == FOURCC_UYVY) { + OUT_RING (chan, NV50TIC_0_0_MAPA_C1 | NV50TIC_0_0_TYPEA_UNORM | +NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM | +NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | +NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | +NV50TIC_0_0_FMT_8_8); + } else { OUT_RING (chan, NV50TIC_0_0_MAPA_C0 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_ZERO | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8); + } if (OUT_RELOCl(chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD) || OUT_RELOC (chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_HIGH | NOUVEAU_BO_OR, mode, mode)) { @@ -163,11 +171,19 @@ nv50_xv_state_emit(PixmapPtr ppix, int id, struct nouveau_bo *src, OUT_RING (chan, (1 << NV50TIC_0_5_DEPTH_SHIFT) | src_h); OUT_RING (chan, 0x0300); OUT_RING (chan, 0x); + if (id == FOURCC_UYVY) { + OUT_RING (chan, NV50TIC_0_0_MAPA_C2 | NV50TIC_0_0_TYPEA_UNORM | +NV50TIC_0_0_MAPB_C0 | NV50TIC_0_0_TYPEB_UNORM | +NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | +NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | +NV50TIC_0_0_FMT_8_8_8_8); + } else { OUT_RING (chan, NV50TIC_0_0_MAPA_C3 | NV50TIC_0_0_TYPEA_UNORM | NV50TIC_0_0_MAPB_C1 | NV50TIC_0_0_TYPEB_UNORM | NV50TIC_0_0_MAPG_ZERO | NV50TIC_0_0_TYPEG_UNORM | NV50TIC_0_0_MAPR_ZERO | NV50TIC_0_0_TYPER_UNORM | NV50TIC_0_0_FMT_8_8_8_8); + } if (OUT_RELOCl(chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD) || OUT_RELOC (chan, src, packed_y, NOUVEAU_BO_VRAM | NOUVEAU_BO_RD | NOUVEAU_BO_HIGH | NOUVEAU_BO_OR, mode, mode)) { commit 00d390952c912d4e9fc2c962caaeb90bf563d5b1 Author: Maarten Maathuis Date: Fri Aug 13 22:24:26 2010 +0200 nv50/xv: Fix the uncommon codepath to use width/height variable. - The common codepath should be the correct one, because that is triggered often, while the other is rare. - This isn't neccesarily a problem, but let's be on the safe side. Signed-off-by: Maarten Maathuis diff --git a/src/nv50_xv.c b/src/nv50_xv.c index 9be8156..2e0f080 100644 --- a/src/nv50_xv.c +++ b/src/nv50_xv.c @@ -331,7 +331,7 @@ nv50_xv_image_put(ScrnInfoPtr pScrn, if (AVAIL_RING(chan) < 64) { if (!nv50_xv_state_emit(ppix, id, src, packed_y, uv, - src_w, src_h)) + width, height)) return BadAlloc; } commit f5b486dd237679aec1987985f9ecffc6a4fd3105 Author: Maarten Maathuis Date: Fri Aug 13 22:16:51 2010 +0200 nv50/xv: We have 18 relocs, not 16, adjust MARK_RING. Signed-off-by: Maarten Maathuis diff --git a/src/nv50_xv.c b/src/nv50_xv.c index 255fa51..9be8156 100644 --- a/src/nv50_xv.c +++ b/src/nv50_xv.c @@ -70,7 +70,7 @@ nv50_xv_state_emit(PixmapPtr ppix, int id, struct nouveau_bo *src, const unsigned tcb_flags = NOUVEAU_BO_RDWR | NOUVEAU_BO_VRAM; uint32_t mode = 0xd0005000 | (src->tile_mode << 22); - if (MARK_RING(chan, 256, 16)) +
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
Makefile.am |2 README.NV1 | 42 configure.ac| 49 man/nouveau.man | 27 src/Makefile.am | 40 src/drmmode_display.c | 850 ++-- src/nouveau_bios.h | 224 - src/nouveau_calc.c | 612 --- src/nouveau_class.h | 9024 src/nouveau_connector.h | 65 src/nouveau_crtc.h | 91 src/nouveau_dri2.c | 223 - src/nouveau_exa.c | 440 -- src/nouveau_hw.c| 1018 - src/nouveau_hw.h| 337 - src/nouveau_local.h | 26 src/nouveau_modeset.h | 31 src/nouveau_ms.h| 156 src/nouveau_output.h| 69 src/nouveau_wfb.c | 54 src/nouveau_xv.c| 192 - src/nv04_exa.c | 96 src/nv04_xv_blit.c | 59 src/nv04_xv_ovl.c | 30 src/nv10_exa.c | 1398 +++ src/nv10_xv_ovl.c | 32 src/nv30_exa.c | 102 src/nv30_shaders.c | 27 src/nv30_shaders.h |4 src/nv30_xv_tex.c | 98 src/nv40_exa.c | 78 src/nv40_xv_tex.c | 83 src/nv50_accel.c| 268 - src/nv50_connector.c| 123 src/nv50_crtc.c | 559 -- src/nv50_cursor.c | 77 src/nv50_dac.c | 225 - src/nv50_display.c | 150 src/nv50_exa.c | 388 +- src/nv50_output.c | 236 - src/nv50_randr.c| 882 src/nv50_randr.h| 41 src/nv50_sor.c | 216 - src/nv50_texture.h | 90 src/nv50_xv.c | 221 - src/nv50reg.h | 449 -- src/nv_accel_common.c | 48 src/nv_bios.c | 4814 - src/nv_const.h | 18 src/nv_crtc.c | 1174 -- src/nv_cursor.c | 211 - src/nv_dac.c| 403 -- src/nv_dma.c| 37 src/nv_dma.h| 10 src/nv_dri.c| 376 -- src/nv_dri.h| 28 src/nv_dripriv.h| 21 src/nv_driver.c | 1683 +--- src/nv_hw.c | 362 - src/nv_i2c.c| 158 src/nv_include.h| 17 src/nv_local.h | 83 src/nv_output.c | 1293 -- src/nv_pcicompat.h | 52 src/nv_proto.h | 136 src/nv_setup.c | 711 --- src/nv_shadow.c |9 src/nv_type.h | 276 - src/nvreg.h | 503 -- 69 files changed, 11969 insertions(+), 19958 deletions(-) New commits: commit 4b8f1a082069a17555d4142003213cf83d4e5464 Author: Lubomir Rintel Date: Mon May 10 09:25:55 2010 +0200 Handle startup without monitor attached more gracefully Refuse to configure a screen which has no valid modes. Otherwise X server would crash attempting to dereference to modes list later on. Signed-off-by: Ben Skeggs diff --git a/src/nv_driver.c b/src/nv_driver.c index 795859f..f60b6d9 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -794,6 +794,10 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) pScrn->depth); } + /* No usable mode */ + if (!pScrn->modes) + return FALSE; + /* Set the current mode to the first in the list */ pScrn->currentMode = pScrn->modes; commit ac8f8d14a82ae8ba5b41fa88903edcad67f339c2 Author: Maarten Maathuis Date: Fri May 7 20:51:43 2010 +0200 wfb: use 28 bits instead of 32 bits for multiply_factor optimisation - Avoiding division in a hot code path is noticable even on an otherwise idle computer, but it's subject to rounding errors. If anyone knows a corner case and has better ideas, don't hesitate to contact me. For the moment this should make the problem less likely to trigger. Signed-off-by: Maarten Maathuis diff --git a/src/nouveau_wfb.c b/src/nouveau_wfb.c index adee492..7575672 100644 --- a/src/nouveau_wfb.c +++ b/src/nouveau_wfb.c @@ -79,7 +79,7 @@ nouveau_wfb_rd_tiled(const void *ptr, int size) { offset -= wfb->base; - y = (offset * wfb->multiply_factor) >> 32; + y = (offset * wfb->multiply_factor) >> 36; x = offset - y * wfb->pitch; offset = (x >> TP) + ((y >> TH) * wfb->horiz_tiles); @@ -111,7 +111,7 @@ nouveau_wfb_wr_tiled(void *ptr, FbBits value, int size) { offset -= wfb->base; - y = (offset * wfb->multiply_factor) >> 32; + y = (offset * wfb->multiply_factor) >> 36; x = offset - y * wfb->pitch; offset = (x >> TP) + ((y >> TH) * wfb->horiz_tiles); @@ -175,7 +175,8 @@ nouveau_wfb_setup_wrap(ReadMemoryProcPtr *pRead, WriteMemoryProcPtr *pWrite, wfb->pitch = 0; } else { wfb->pitch = ppix->devKind; - wfb->multiply_factor = (0x / wfb->pitch) + 1; + /* 8192x8192x4 is 28 bits max, 64 - 28 == 36. */ + wfb->multiply_factor = (((1ULL << 36) - 1) / wfb->pitch) + 1;
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
src/Makefile.am |2 src/drmmode_display.c | 158 +++--- src/nouveau_bios.h|2 src/nouveau_dri2.c|3 src/nouveau_exa.c | 183 +-- src/nouveau_hw.c | 72 +-- src/nouveau_hw.h |4 src/nouveau_local.h | 12 -- src/nouveau_ms.h | 156 ++ src/nouveau_wfb.c | 193 ++ src/nouveau_xv.c | 23 ++--- src/nv30_exa.c|5 - src/nv30_xv_tex.c |6 - src/nv40_exa.c|5 - src/nv40_xv_tex.c |6 - src/nv50_exa.c|6 - src/nv50_randr.c |4 src/nv50_xv.c | 10 +- src/nv_bios.c | 124 --- src/nv_const.h|2 src/nv_crtc.c | 99 ++--- src/nv_cursor.c | 22 ++-- src/nv_dri.c |2 src/nv_driver.c | 229 ++ src/nv_output.c | 124 ++- src/nv_proto.h| 16 ++- src/nv_setup.c| 64 ++--- src/nv_type.h | 113 +--- 28 files changed, 978 insertions(+), 667 deletions(-) New commits: commit c0bf670ac6b58cff60a01ab6b174ece6b1b7d892 Author: Ben Skeggs Date: Thu Jun 25 07:26:54 2009 +1000 wfb: fix stupid thinko + more safety diff --git a/src/nouveau_wfb.c b/src/nouveau_wfb.c index 7c60ed1..ae5f3af 100644 --- a/src/nouveau_wfb.c +++ b/src/nouveau_wfb.c @@ -125,7 +125,7 @@ void nouveau_wfb_setup_wrap(ReadMemoryProcPtr *pRead, WriteMemoryProcPtr *pWrite, DrawablePtr pDraw) { - struct nouveau_pixmap *nvpix; + struct nouveau_pixmap *nvpix = NULL; struct wfb_pixmap *wfb; PixmapPtr ppix = NULL; int wrap, have_tiled = 0; @@ -175,7 +175,6 @@ nouveau_wfb_setup_wrap(ReadMemoryProcPtr *pRead, WriteMemoryProcPtr *pWrite, void nouveau_wfb_finish_wrap(DrawablePtr pDraw) { - struct wfb_pixmap *wfb = &wfb_pixmap[0]; PixmapPtr ppix; int i; @@ -184,11 +183,11 @@ nouveau_wfb_finish_wrap(DrawablePtr pDraw) return; for (i = 0; i < 6; i++) { - if (wfb->ppix != ppix) - continue; - - wfb->ppix = NULL; - break; + if (wfb_pixmap[i].ppix == ppix) { + wfb_pixmap[i].ppix = NULL; + wfb_pixmap[i].base = ~0UL; + break; + } } } commit a12cb5c8c0a85a601188178c5fc0d84a13abd87e Author: Ben Skeggs Date: Thu Jun 18 14:28:25 2009 +1000 bios: oops diff --git a/src/nv_bios.c b/src/nv_bios.c index b307fc6..5578928 100644 --- a/src/nv_bios.c +++ b/src/nv_bios.c @@ -197,13 +197,15 @@ struct methods { static struct methods nv04_methods[] = { { "PROM", load_vbios_prom, false }, { "PRAMIN", load_vbios_pramin, true }, - { "PCI ROM", load_vbios_pci, true } + { "PCI ROM", load_vbios_pci, true }, + { } }; static struct methods nv50_methods[] = { { "PRAMIN", load_vbios_pramin, true }, { "PROM", load_vbios_prom, false }, - { "PCI ROM", load_vbios_pci, true } + { "PCI ROM", load_vbios_pci, true }, + { } }; static bool NVShadowVBIOS(ScrnInfoPtr pScrn, uint8_t *data) commit e66867e4cf9f0bc8a1971664ccc3d5c56b08b2fb Author: Ben Skeggs Date: Tue Jun 16 10:28:00 2009 +1000 bios: use image from PRAMIN in preference to PROM on NV50 There's at least one known case (rh#492658) where the DCB table present in the VBIOS image from PROM is not suitable for use. It contained all 16 entries filled, each entry valid in itself, but contradicting other entries. The VBIOS image in PRAMIN however, still has all 16 entries filled, but the first few entries now match what is present on the hardware, and the rest are set as type 0xf, which we ignore. diff --git a/src/nv_bios.c b/src/nv_bios.c index 865b22d..b307fc6 100644 --- a/src/nv_bios.c +++ b/src/nv_bios.c @@ -187,42 +187,62 @@ static void load_vbios_pci(NVPtr pNv, uint8_t *data) #endif } +struct methods { + const char desc[8]; + void (*loadbios)(NVPtr, uint8_t *); + const bool rw; + int score; +}; + +static struct methods nv04_methods[] = { + { "PROM", load_vbios_prom, false }, + { "PRAMIN", load_vbios_pramin, true }, + { "PCI ROM", load_vbios_pci, true } +}; + +static struct methods nv50_methods[] = { + { "PRAMIN", load_vbios_pramin, true }, + { "PROM", load_vbios_prom, false }, + { "PCI ROM", load_vbios_pci, true } +}; + static bool NVShadowVBIOS(ScrnInfoPtr pScrn, uint8_t *data) { NVPtr pNv = NVPTR(pScrn); - struct methods { - const char desc[8]; - void (*loadbios)(NVPtr, uint8_t *); - const bool rw; -
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |9 src/Makefile.am |5 src/drmmode_display.c | 925 +-- src/drmmode_display.h | 67 - src/nouveau_bios.h| 76 - src/nouveau_calc.c| 612 ++ src/nouveau_crtc.h|1 src/nouveau_dri2.c| 213 +++ src/nouveau_exa.c | 326 - src/nouveau_hw.c | 970 src/nouveau_hw.h | 335 + src/nouveau_local.h | 26 src/nouveau_xv.c | 212 --- src/nv04_exa.c| 20 src/nv04_xv_blit.c|6 src/nv10_exa.c| 10 src/nv10_xv_ovl.c |6 src/nv30_exa.c|8 src/nv30_xv_tex.c | 15 src/nv40_exa.c| 22 src/nv40_xv_tex.c |4 src/nv50_connector.c | 20 src/nv50_crtc.c | 23 src/nv50_dac.c|4 src/nv50_display.c|1 src/nv50_exa.c| 32 src/nv50_output.c | 153 +- src/nv50_randr.c | 70 - src/nv50_sor.c| 97 - src/nv50_xv.c | 21 src/nv50reg.h | 13 src/nv_bios.c | 3004 +++--- src/nv_const.h|6 src/nv_crtc.c | 1093 -- src/nv_cursor.c | 473 +-- src/nv_dac.c | 17 src/nv_dma.c | 11 src/nv_dri.c | 141 -- src/nv_driver.c | 492 src/nv_hw.c | 947 --- src/nv_i2c.c | 37 src/nv_include.h |4 src/nv_output.c | 815 + src/nv_proto.h| 80 - src/nv_setup.c| 92 - src/nv_shadow.c | 50 src/nv_type.h | 181 +-- src/nvreg.h | 539 48 files changed, 6524 insertions(+), 5760 deletions(-) New commits: commit 9656762ba186e91dd2b3b7f3f9427ba520982f9d Author: Ben Skeggs Date: Thu May 14 10:26:44 2009 +1000 nv50: fix multiple-display hangs when encoders swap crtcs diff --git a/src/nouveau_crtc.h b/src/nouveau_crtc.h index d86dc90..45d0eee 100644 --- a/src/nouveau_crtc.h +++ b/src/nouveau_crtc.h @@ -32,6 +32,7 @@ typedef struct nouveauCrtc { char *name; uint8_t index; Bool active; + Bool blanked; /* Scanout area. */ struct nouveau_bo * front_buffer; diff --git a/src/nv50_crtc.c b/src/nv50_crtc.c index 64dc85f..3502dd7 100644 --- a/src/nv50_crtc.c +++ b/src/nv50_crtc.c @@ -308,6 +308,8 @@ NV50CrtcBlank(nouveauCrtcPtr crtc, Bool blanked) NV50CrtcCommand(crtc, NV84_CRTC0_BLANK_UNK1, NV84_CRTC0_BLANK_UNK1_UNBLANK); NV50CrtcCommand(crtc, NV50_CRTC0_BLANK_CTRL, NV50_CRTC0_BLANK_CTRL_UNBLANK); } + + crtc->blanked = blanked; } static void diff --git a/src/nv50_randr.c b/src/nv50_randr.c index 3459f05..a261a3b 100644 --- a/src/nv50_randr.c +++ b/src/nv50_randr.c @@ -67,17 +67,35 @@ nv50_crtc_mode_fixup(xf86CrtcPtr crtc, DisplayModePtr mode, static void nv50_crtc_prepare(xf86CrtcPtr crtc) { - ScrnInfoPtr pScrn = crtc->scrn; NV50CrtcPrivatePtr nv_crtc = crtc->driver_private; - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "nv50_crtc_prepare is called for %s.\n", nv_crtc->crtc->index ? "CRTC1" : "CRTC0"); - + ScrnInfoPtr pScrn = crtc->scrn; NVPtr pNv = NVPTR(pScrn); + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); + nouveauOutputPtr output; + int i; + + /* Rewire internal stucts to match randr-1.2... yet again.. */ + for (i = 0; i < xf86_config->num_output; i++) { + xf86OutputPtr output = xf86_config->output[i]; + NV50OutputPrivatePtr nv50_output = output->driver_private; + nouveauOutputPtr nv_output = nv50_output->output; + + if (output->crtc) { + NV50CrtcPrivatePtr nv50_crtc = + output->crtc->driver_private; + nv_output->crtc = nv50_crtc->crtc; + } else { + nv_output->crtc = NULL; + } + } + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, + "nv50_crtc_prepare is called for %s.\n", + nv_crtc->crtc->index ? "CRTC1" : "CRTC0"); nv_crtc->crtc->active = TRUE; nv_crtc->crtc->modeset_lock = TRUE; - nouveauOutputPtr output; - /* Detach any unused outputs. */ for (output = pNv->output; output != NULL; output = output->next) { if (!output->crtc) @@ -171,7 +189,8 @@ nv50_crtc_show_cursor(xf86CrtcPtr crtc) NV50CrtcPrivatePtr nv_crtc = crtc->driver_private; //xf86DrvMsg(pScrn->scrnIndex, X_INFO, "nv50_crtc_show_cursor is called for %s.\n", nv_crtc->crtc->index ? "CRTC1" : "CRTC0"); - nv_crtc->crtc->ShowCursor(nv_crtc->crtc, FALSE); + if (!nv_crtc->crtc->blanked) + nv_crtc->crtc->ShowCursor(nv_crtc->crtc, FALSE); } static void commit d70eed91b2909ba0b20415ab1d5a099fb6b39b08 Author: Stuart Bennett Date: Tue May
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac |4 src/Makefile.am| 15 src/drmmode_display.c |4 src/nouveau_bios.h | 11 src/nouveau_bo.c | 163 - src/nouveau_bo.h | 51 src/nouveau_channel.c | 136 - src/nouveau_channel.h | 37 src/nouveau_class.h| 6231 - src/nouveau_device.c | 137 - src/nouveau_device.h | 29 src/nouveau_dma.c | 200 - src/nouveau_dma.h | 158 - src/nouveau_drmif.h| 185 - src/nouveau_exa.c | 509 src/nouveau_grobj.c| 107 src/nouveau_grobj.h| 41 src/nouveau_local.h| 101 src/nouveau_notifier.c | 140 - src/nouveau_notifier.h | 43 src/nouveau_xv.c | 70 src/nv04_exa.c | 354 ++ src/nv04_xv_blit.c |2 src/nv10_exa.c | 62 src/nv30_exa.c | 44 src/nv30_shaders.c |5 src/nv30_xv_tex.c |7 src/nv40_exa.c | 42 src/nv40_xv_tex.c |3 src/nv50_accel.c | 76 src/nv50_connector.c |3 src/nv50_crtc.c| 39 src/nv50_exa.c | 134 - src/nv50_randr.c |2 src/nv50_xv.c | 109 src/nv_accel_common.c | 58 src/nv_bios.c | 550 ++-- src/nv_crtc.c | 101 src/nv_cursor.c| 29 src/nv_dac.c |4 src/nv_dma.c | 51 src/nv_dri.c | 10 src/nv_driver.c| 209 + src/nv_exa.c | 968 --- src/nv_hw.c| 33 src/nv_include.h |9 src/nv_output.c|2 src/nv_proto.h | 33 src/nv_setup.c |4 src/nv_shadow.c|2 src/nv_type.h | 21 src/nvreg.h| 10 52 files changed, 1953 insertions(+), 9395 deletions(-) New commits: commit 4dfd0b1b21415c48c4b6e0e8d335f3fc70922d27 Author: Ben Skeggs Date: Wed Feb 4 15:35:53 2009 +1000 oops diff --git a/src/nv_driver.c b/src/nv_driver.c index c6a4441..303e42f 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -1584,22 +1584,24 @@ NVMapMemSW(ScrnInfoPtr pScrn) CLUTOffset[0] = Cursor1Offset + (64 * 1024); CLUTOffset[1] = CLUTOffset[0] + (4 * 1024); - ret = nouveau_bo_fake(&dev, NOUVEAU_BO_VRAM | NOUVEAU_BO_PIN, - 0, pNv->VRAMSize - (1<<20), pNv->VRAMMap, + ret = nouveau_bo_fake(&dev, 0, NOUVEAU_BO_VRAM | NOUVEAU_BO_PIN, + pNv->VRAMSize - (1<<20), pNv->VRAMMap, &pNv->FB); if (ret) return FALSE; pNv->GART = NULL; - ret = nouveau_bo_fake(&dev, NOUVEAU_BO_VRAM | NOUVEAU_BO_PIN, - Cursor0Offset, 64*1024, - pNv->VRAMMap + Cursor0Offset, &pNv->Cursor); + ret = nouveau_bo_fake(&dev, Cursor0Offset, + NOUVEAU_BO_VRAM | NOUVEAU_BO_PIN, + 64*1024, pNv->VRAMMap + Cursor0Offset, + &pNv->Cursor); if (ret) return FALSE; - ret = nouveau_bo_fake(&dev, NOUVEAU_BO_VRAM | NOUVEAU_BO_PIN, - Cursor1Offset, 64*1024, - pNv->VRAMMap + Cursor1Offset, &pNv->Cursor2); + ret = nouveau_bo_fake(&dev, Cursor1Offset, + NOUVEAU_BO_VRAM | NOUVEAU_BO_PIN, + 64*1024, pNv->VRAMMap + Cursor1Offset, + &pNv->Cursor2); if (ret) return FALSE; @@ -1607,10 +1609,11 @@ NVMapMemSW(ScrnInfoPtr pScrn) for(i = 0; i < 2; i++) { nouveauCrtcPtr crtc = pNv->crtc[i]; - ret = nouveau_bo_fake(&dev, NOUVEAU_BO_VRAM | - NOUVEAU_BO_PIN, CLUTOffset[i], - 0x1000, pNv->VRAMMap + - CLUTOffset[i], &crtc->lut); + ret = nouveau_bo_fake(&dev, CLUTOffset[i], + NOUVEAU_BO_VRAM | + NOUVEAU_BO_PIN, 0x1000, + pNv->VRAMMap + CLUTOffset[i], + &crtc->lut); if (ret) return FALSE; commit e02813aab0376271ee777a2b8dafc9381f96311a Author: Ben Skeggs Date: Wed Feb 4 14:50:35 2009 +1000 link against libdrm_nouveau (installed with libdrm) diff --git a/configure.ac b/configure.ac index 8588e05..efcb046 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,10 @@ XORG_DRIVER_CHECK_EXT(XV, videoproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) # Checks for pkg-config packages +PKG_CHECK_MODULES(LIBDRM_NOUVEAU, libdrm_nouveau) +AC_SUBST(LIBDRM_NOUVEAU_CFLAGS) +AC_SUBST(LIBDRM_NOUVEAU_LIBS) + PKG_CHECK_MODULES(XORG, [xorg-server
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
src/nouveau_channel.c |7 src/nouveau_xv.c | 13 src/nv30_exa.c| 29 + src/nv30_shaders.c| 126 ++- src/nv30_shaders.h|2 src/nv30_xv_tex.c | 11 src/nv40_exa.c| 32 + src/nv40_xv_tex.c | 11 src/nv_accel_common.c | 29 + src/nv_bios.c | 869 +- src/nv_crtc.c | 526 +- src/nv_driver.c | 264 ++- src/nv_hw.c | 314 +- src/nv_output.c | 115 ++ src/nv_proto.h| 26 - src/nv_setup.c| 124 +++ src/nv_type.h |5 src/nvreg.h | 219 18 files changed, 1326 insertions(+), 1396 deletions(-) New commits: commit cea05e14f94dcb842adbfcec515e17e9f5655089 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Sun Oct 26 03:51:36 2008 + randr12: make colour-map setting less complex diff --git a/src/nv_crtc.c b/src/nv_crtc.c index c069b57..59db4be 100644 --- a/src/nv_crtc.c +++ b/src/nv_crtc.c @@ -1060,48 +1060,47 @@ static void nv_crtc_unlock(xf86CrtcPtr crtc) { } +#define DEPTH_SHIFT(val, w) ((val << (8 - w)) | (val >> ((w << 1) - 8))) + static void nv_crtc_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue, int size) { struct nouveau_crtc *nv_crtc = to_nouveau_crtc(crtc); - ScrnInfoPtr pScrn = crtc->scrn; - NVPtr pNv = NVPTR(pScrn); - NVCrtcRegPtr regp = &pNv->ModeReg.crtc_reg[nv_crtc->head]; - int i, j; + NVPtr pNv = NVPTR(crtc->scrn); + struct rgb { uint8_t r, g, b; } __attribute__((packed)) *rgbs; + int i; - switch (pScrn->depth) { + rgbs = (struct rgb *)pNv->ModeReg.crtc_reg[nv_crtc->head].DAC; + + switch (crtc->scrn->depth) { case 15: /* R5G5B5 */ - /* We've got 5 bit (32 values) colors and 256 registers for each color */ - for (i = 0; i < 32; i++) - for (j = 0; j < 8; j++) { - regp->DAC[(i*8 + j) * 3 + 0] = red[i] >> 8; - regp->DAC[(i*8 + j) * 3 + 1] = green[i] >> 8; - regp->DAC[(i*8 + j) * 3 + 2] = blue[i] >> 8; - } + /* spread 5 bits per colour (32 colours) over 256 (per colour) registers */ + for (i = 0; i < 32; i++) { + rgbs[DEPTH_SHIFT(i, 5)].r = red[i] >> 8; + rgbs[DEPTH_SHIFT(i, 5)].g = green[i] >> 8; + rgbs[DEPTH_SHIFT(i, 5)].b = blue[i] >> 8; + } break; case 16: /* R5G6B5 */ - /* First deal with the 5 bit colors */ - for (i = 0; i < 32; i++) - for (j = 0; j < 8; j++) { - regp->DAC[(i*8 + j) * 3 + 0] = red[i] >> 8; - regp->DAC[(i*8 + j) * 3 + 2] = blue[i] >> 8; + for (i = 0; i < 64; i++) { + /* set 64 regs for green's 6 bits of colour */ + rgbs[DEPTH_SHIFT(i, 6)].g = green[i] >> 8; + if (i < 32) { + rgbs[DEPTH_SHIFT(i, 5)].r = red[i] >> 8; + rgbs[DEPTH_SHIFT(i, 5)].b = blue[i] >> 8; } - /* Now deal with the 6 bit color */ - for (i = 0; i < 64; i++) - for (j = 0; j < 4; j++) - regp->DAC[(i*4 + j) * 3 + 1] = green[i] >> 8; + } break; default: /* R8G8B8 */ for (i = 0; i < 256; i++) { - regp->DAC[i * 3] = red[i] >> 8; - regp->DAC[(i * 3) + 1] = green[i] >> 8; - regp->DAC[(i * 3) + 2] = blue[i] >> 8; + rgbs[i].r = red[i] >> 8; + rgbs[i].g = green[i] >> 8; + rgbs[i].b = blue[i] >> 8; } - break; } nv_crtc_load_state_palette(crtc, &pNv->ModeReg); commit 0e4b01a5e06d8b5323c010ce89723369f17b10b2 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Sat Oct 25 02:11:37 2008 +0100 randr12: convenience functions for vga crtc state access diff --git a/src/nv_crtc.c b/src/nv_crtc.c index 10ee1d6..c069b57 100644 --- a/src/nv_crtc.c +++ b/src/nv_crtc.c @@ -70,6 +70,19 @@ static void NVCrtcWriteRAMDAC(xf86CrtcPtr crtc, uint32_t reg, uint32_t val) NVWriteRAMDAC(pNv, nv_crtc->head, reg, val); } +static void crtc_rd_cio_state(xf86CrtcPtr crtc, NVCrtcRegPtr crtcstate, int index) +{ + crtcstate->CRTC[index] = NVReadVgaCrtc(NVPTR(crtc->scrn), + to_nouveau_crtc(crtc)->head, + index); +}
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
src/Makefile.am |7 src/drmmode_display.c | 183 src/nouveau_bo.c |2 src/nouveau_bo.h |1 src/nouveau_class.h | 465 +++--- src/nouveau_local.h | 92 +++--- src/nouveau_output.h |1 src/nouveau_xv.c | 221 +++--- src/nv04_xv_blit.c| 69 ++-- src/nv10_exa.c| 541 ++- src/nv30_exa.c| 452 +++--- src/nv30_shaders.c| 64 ++-- src/nv30_xv_tex.c | 153 +- src/nv40_exa.c| 423 ++-- src/nv40_xv_tex.c | 157 +- src/nv50_accel.c | 342 ++ src/nv50_accel.h | 52 +++ src/nv50_dac.c|1 src/nv50_exa.c| 752 -- src/nv50_output.c |2 src/nv50_randr.c | 36 -- src/nv50_sor.c| 10 src/nv50_texture.h| 124 src/nv50_xv.c | 262 + src/nv_accel_common.c | 301 ++-- src/nv_bios.c | 37 ++ src/nv_dma.c | 25 - src/nv_dri.c |2 src/nv_driver.c |2 src/nv_exa.c | 437 + src/nv_output.c |8 src/nv_proto.h| 14 src/nv_type.h |2 src/vl_hwmc.c | 148 + src/vl_hwmc.h | 11 35 files changed, 3714 insertions(+), 1685 deletions(-) New commits: commit 89d786435267af58bcecaff206a09b035e666df5 Author: Ben Skeggs <[EMAIL PROTECTED]> Date: Tue Jul 29 23:38:45 2008 +1000 nv50: fix mystery typo diff --git a/src/nv_accel_common.c b/src/nv_accel_common.c index 9b0a2ab..4e82c4e 100644 --- a/src/nv_accel_common.c +++ b/src/nv_accel_common.c @@ -466,7 +466,7 @@ NVAccelInit2D_NV50(ScrnInfoPtr pScrn) if (nouveau_grobj_alloc(chan, Nv2D, 0x502d, &pNv->Nv2D)) return FALSE; } - eng2d = pNv->Nv3D; + eng2d = pNv->Nv2D; BEGIN_RING(chan, eng2d, 0x180, 3); OUT_RING (chan, pNv->notify0->handle); commit c0b67f3f3490e826c86eedb32bbcf327592aaaf5 Author: Ben Skeggs <[EMAIL PROTECTED]> Date: Tue Jul 29 01:26:20 2008 +1000 remove use of implicit variables from pushbuf macros This matches the gallium winsys now. At some point the ddx will get updates so the "common" code is once again in sync to make it easier to do mm changes to both the ddx and dri simultaneously. But, I want to get this part out of the way first as the changes might take a bit of work - and I don't want to have to deal with merge conflicts everywhere if someone changes the accel code before I'm done :) diff --git a/src/nouveau_local.h b/src/nouveau_local.h index 76e0d30..54d62e5 100644 --- a/src/nouveau_local.h +++ b/src/nouveau_local.h @@ -64,95 +64,95 @@ struct nouveau_pixmap { #define NOUVEAU_DMA_TIMEOUT 2000 /* Push buffer access macros */ -#define BEGIN_RING(obj,mthd,size) do { \ - BEGIN_RING_CH(pNv->chan, pNv->obj, (mthd), (size));\ +#define BEGIN_RING(chan,obj,mthd,size) do { \ + BEGIN_RING_CH((chan), (obj), (mthd), (size)); \ } while(0) -#define OUT_RING(data) do { \ - OUT_RING_CH(pNv->chan, (data));\ +#define OUT_RING(chan,data) do { \ + OUT_RING_CH((chan), (data)); \ } while(0) -#define OUT_RINGp(src,size) do { \ - OUT_RINGp_CH(pNv->chan, (src), (size));\ +#define OUT_RINGp(chan,src,size) do { \ + OUT_RINGp_CH((chan), (src), (size)); \ } while(0) -#define OUT_RINGf(data) do { \ +#define OUT_RINGf(chan,data) do { \ union { float v; uint32_t u; } c; \ c.v = (data); \ - OUT_RING(c.u); \ + OUT_RING((chan), c.u); \ } while(0) -#define WAIT_RING(size) do { \ - WAIT_RING_CH(pNv->chan, (size)); \ +#define WAIT_RING(chan,size) do { \ + WAIT_RING_CH((chan), (size)); \ } while(0) -#define FIRE_RING() do { \ - FIRE_RING_CH(pNv->chan);
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
src/Makefile.am | 12 src/drmmode_display.c| 129 ++ src/drmmode_display.h|4 src/nouveau_xv.c | 2190 +++ src/nv04_video_blitter.c | 268 - src/nv04_video_overlay.c | 201 src/nv04_xv_blit.c | 241 + src/nv04_xv_ovl.c| 201 src/nv10_video_overlay.c | 302 -- src/nv10_xv_ovl.c| 301 ++ src/nv30_video_texture.c | 457 - src/nv30_xv_tex.c| 431 + src/nv40_video_texture.c | 441 - src/nv40_xv_tex.c| 415 src/nv50_randr.c | 95 +- src/nv50_randr.h |1 src/nv_driver.c | 63 + src/nv_exa.c | 28 src/nv_proto.h | 41 src/nv_type.h|3 src/nv_video.c | 2173 -- 21 files changed, 4102 insertions(+), 3895 deletions(-) New commits: commit b1f316977e2c79fdf5c83092e953bdfc988299e1 Author: Ben Skeggs <[EMAIL PROTECTED]> Date: Mon Jul 7 01:03:02 2008 +1000 xv: remove some disturbing abuses of buffer related things Also brings to attention a point about the overlay when we use a real memory manager. We'll need to find a way for the overlay to signal it's finished with a buffer, or just resort to pinning pPriv->video_mem.. diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c index 486da87..973cde2 100644 --- a/src/nouveau_xv.c +++ b/src/nouveau_xv.c @@ -1007,7 +1007,6 @@ NV_set_action_flags(ScrnInfoPtr pScrn, DrawablePtr pDraw, NVPortPrivPtr pPriv, * @param data pointer to port * @param pDraw drawable pointer */ -/*FIXME: need to honor the Sync*/ static int NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, short drw_y, short src_w, short src_h, short drw_w, short drw_h, @@ -1079,9 +1078,9 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, &pPriv->video_mem); if (ret) return BadAlloc; - offset = pPriv->video_mem->offset; /* The overlay supports hardware double buffering. We handle this here*/ + offset = 0; if (pPriv->doubleBuffer) { int mask = 1 << (pPriv->currentBuffer << 2); @@ -1231,9 +1230,10 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, BEGIN_RING(NvMemFormat, NV04_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); - OUT_RING ((uint32_t)destination_buffer->offset + -line_len * nlines); - OUT_RING ((uint32_t)offset + dstPitch * nlines); + OUT_RELOCl(destination_buffer, line_len * nlines, + NOUVEAU_BO_GART | NOUVEAU_BO_RD); + OUT_RELOCl(pPriv->video_mem, offset + dstPitch * nlines, + NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); OUT_RING (line_len); OUT_RING (dstPitch); OUT_RING (line_len); @@ -1245,8 +1245,10 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, BEGIN_RING(NvMemFormat, NV04_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); - OUT_RING ((uint32_t)destination_buffer->offset); - OUT_RING ((uint32_t)offset); + OUT_RELOCl(destination_buffer, 0, + NOUVEAU_BO_GART | NOUVEAU_BO_RD); + OUT_RELOCl(pPriv->video_mem, offset, + NOUVEAU_BO_VRAM | NOUVEAU_BO_WR); OUT_RING (line_len); OUT_RING (dstPitch); OUT_RING (line_len); @@ -1287,8 +1289,7 @@ NVPutImage(ScrnInfoPtr pScrn, short src_x, short src_y, short drw_x, } else { CPU_copy: - map = pPriv->video_mem->map + - (offset - pPriv->video_mem->offset); + map = pPriv->video_mem->map + offset; if (action_flags & IS_YV12) { if (action_flags & CONVERT_TO_YUY2) { @@ -1389,9 +1390,9 @@ CPU_copy: if (action_flags & USE_OVERLAY) { if (pNv->Architecture == NV_ARCH_04) { - NV04PutOverlayImage(pScrn, offset, id, dstPitch, - &dstBox, 0, 0, xb, yb, - npixels, nlines, + NV04PutOverlayImage(pScrn, pPriv->video_mem, offset, + id, dstPitch, &dstBox, 0, 0, + xb, yb, npixels, nlines, src_w, src_h, drw_w, drw_h, clipBoxes); } else { @@ -1400,8 +1401,9 @@ CPU_copy: if (action_flags & (IS_YU
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
configure.ac | 13 - src/Makefile.am |2 src/drmmode_display.c | 616 ++ src/drmmode_display.h | 65 + src/nouveau_bo.c |1 src/nouveau_bo.h |1 src/nouveau_device.c |9 src/nv50_randr.c | 12 src/nv50_sor.c| 10 src/nv_bios.c | 16 - src/nv_const.h|4 src/nv_crtc.c | 52 src/nv_cursor.c | 64 + src/nv_dac.c | 61 +--- src/nv_dri.c | 71 + src/nv_driver.c | 231 +- src/nv_exa.c | 59 +--- src/nv_hw.c | 161 + src/nv_i2c.c | 22 + src/nv_include.h |2 src/nv_local.h| 62 + src/nv_output.c | 69 - src/nv_proto.h|3 src/nv_setup.c| 65 ++--- src/nv_shadow.c | 24 + src/nv_type.h | 13 - 26 files changed, 1266 insertions(+), 442 deletions(-) New commits: commit 48c2116fb31872111239f5434215f30c8707091e Author: Maarten Maathuis <[EMAIL PROTECTED]> Date: Wed Jul 2 19:04:58 2008 +0200 NV50_KMS: no int10 please diff --git a/src/nv_driver.c b/src/nv_driver.c index 2fe8819..e715e79 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -1105,7 +1105,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) } /* Save current console video mode */ - if (pNv->Architecture >= NV_ARCH_50 && pNv->pInt10) { + if (pNv->Architecture >= NV_ARCH_50 && pNv->pInt10 && !pNv->kms_enable) { const xf86Int10InfoPtr pInt10 = pNv->pInt10; pInt10->num = 0x10; commit 11102af2896b3fdf2364854b2d7939b2802c5b2a Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Fri Jun 27 16:21:19 2008 +0100 Backport console font save/restore from nouveau_ms diff --git a/src/nv_driver.c b/src/nv_driver.c index 9abca5a..2fe8819 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -2043,6 +2043,8 @@ NVRestore(ScrnInfoPtr pScrn) for (i = 0; i < xf86_config->num_crtc; i++) xf86_config->crtc[i]->funcs->restore(xf86_config->crtc[i]); + nv_save_restore_vga_fonts(pScrn, 0); + for (i = 0; i < xf86_config->num_crtc; i++) NVCrtcLockUnlock(xf86_config->crtc[i], 1); } @@ -2618,6 +2620,8 @@ NVSave(ScrnInfoPtr pScrn) xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int i; + nv_save_restore_vga_fonts(pScrn, 1); + for (i = 0; i < xf86_config->num_crtc; i++) { xf86_config->crtc[i]->funcs->save(xf86_config->crtc[i]); } diff --git a/src/nv_hw.c b/src/nv_hw.c index 5f12428..d5ba9f8 100644 --- a/src/nv_hw.c +++ b/src/nv_hw.c @@ -1,5 +1,6 @@ /* * Copyright 1993-2003 NVIDIA, Corporation + * Copyright 2008 Stuart Bennett * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -1343,3 +1344,90 @@ uint32_t nv_pitch_align(NVPtr pNv, uint32_t width, int bpp) return (width + mask) & ~mask; } + +#define VGA_SEQ_PLANE_WRITE 0x02 +#define VGA_SEQ_MEMORY_MODE 0x04 +#define VGA_GFX_PLANE_READ 0x04 +#define VGA_GFX_MODE0x05 +#define VGA_GFX_MISC0x06 + +void nv_save_restore_vga_fonts(ScrnInfoPtr pScrn, bool save) +{ + NVPtr pNv = NVPTR(pScrn); + bool graphicsmode; + uint8_t misc, gr4, gr5, gr6, seq2, seq4; + int i; + + NVSetEnablePalette(pNv, 0, true); + graphicsmode = NVReadVgaAttr(pNv, 0, 0x10) & 1; + NVSetEnablePalette(pNv, 0, false); + + if (graphicsmode) /* graphics mode => framebuffer => no need to save */ + return; + + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "%sing VGA fonts\n", save ? "Sav" : "Restor"); + if (pNv->twoHeads) + NVBlankScreen(pScrn, 1, true); + NVBlankScreen(pScrn, 0, true); + + /* save control regs */ + misc = NVReadPVIO(pNv, 0, VGA_MISC_OUT_R); + seq2 = NVReadVgaSeq(pNv, 0, VGA_SEQ_PLANE_WRITE); + seq4 = NVReadVgaSeq(pNv, 0, VGA_SEQ_MEMORY_MODE); + gr4 = NVReadVgaGr(pNv, 0, VGA_GFX_PLANE_READ); + gr5 = NVReadVgaGr(pNv, 0, VGA_GFX_MODE); + gr6 = NVReadVgaGr(pNv, 0, VGA_GFX_MISC); + + NVWritePVIO(pNv, 0, VGA_MISC_OUT_W, 0x67); + NVWriteVgaSeq(pNv, 0, VGA_SEQ_MEMORY_MODE, 0x6); + NVWriteVgaGr(pNv, 0, VGA_GFX_MODE, 0x0); + NVWriteVgaGr(pNv, 0, VGA_GFX_MISC, 0x5); + + /* store font in plane 0 */ + NVWriteVgaSeq(pNv, 0, VGA_SEQ_PLANE_WRITE, 0x1); + NVWriteVgaGr(pNv, 0, VGA_GFX_PLANE_READ, 0x0); + for (i = 0; i < 16384; i++) + if (save) + pNv->saved_vga_font[0][i] = MMIO_IN32(pNv->FB_BAR, i * 4); + else +
xserver-xorg-video-nouveau: Changes to 'upstream-experimental'
New branch 'upstream-experimental' available with the following commits: commit e034616ab2bbbc486f90c5f64e2bd2de194cf92e Author: Maarten Maathuis <[EMAIL PROTECTED]> Date: Thu May 22 21:08:48 2008 +0200 NV50: A small extra piece of init that may prove useful to someone, somewhere, at some point for something. commit c21594cf452a1263682386d04718531d76a7a9b8 Author: Maarten Maathuis <[EMAIL PROTECTED]> Date: Tue May 20 19:19:53 2008 +0200 NV50: Be consistent with rules-ng. commit 9c1d87fa9e6152bffc5c5cdf16b1931cc6e58399 Author: Maarten Maathuis <[EMAIL PROTECTED]> Date: Sat May 10 21:58:00 2008 +0200 NV50: Some misc things. commit 5f08db9057f2970171186b20a25d346386dcb0f2 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Thu May 8 21:36:05 2008 +0100 Cosmetic g80 laptop dcb parsing enhancement commit 6a460eae941f3e9a7a8a0297efbbd12dca71a9dd Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Thu May 8 14:17:38 2008 +0100 randr12: some reordering, tidying &c commit 7455bc89116bfc5e88fbd444d83c1415a6020a7f Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Tue Apr 29 19:42:54 2008 +0100 Enable RandR 1.2 code-path by default commit 98a751e773c098382e7675e41ee60ce3d9a67ce0 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Wed May 7 21:25:03 2008 +0100 Don't call call_lvds_script with a null dcbent pointer Stumbled over by hiyuh :) commit 77b24bc93659471bb20254847da124fdaba13a54 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Mon May 5 00:56:28 2008 +0100 randr12: tidy up some nv50 remnants in the pre nv50 code commit 8997f83cd2727b76240e9dc31ec7751f6d69cf6b Author: Maarten Maathuis <[EMAIL PROTECTED]> Date: Tue May 6 19:46:52 2008 +0200 NV50: Some misc fixes. - Even though tv-out is mentioned, it by no means implies that is (nearly) functional. commit ae574ec7d930d8708e4dd9d1d47558666019afe5 Author: Maarten Maathuis <[EMAIL PROTECTED]> Date: Mon May 5 11:02:07 2008 +0200 nv50_exa.c had no license statement. commit a7af057ff67cf5d7baf78d852dee5ac69b24e706 Author: Maarten Maathuis <[EMAIL PROTECTED]> Date: Mon May 5 01:26:37 2008 +0200 NV50: Rework the modesetting code into a different model. - There is now interface independent code for most things. - This structure, although not exclusive, is only used for NV50 atm. - The change in approach is that the concept of a connector is added to the model (randr12 sucks in this aspect). - I'm hacking around randr trying to create a single output for each connector, the indices are the bus numbers. - Limitations: Hot swapping vga and dvi of same monitor will not make randr12 think it changed, so for the moment force a change. - Concept is largely inspired by the radeonhd driver. commit 5e1b5708d3a7e4298f80b1a1b8bb3fafae0c69bd Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Fri May 2 20:36:59 2008 +0100 xv: nv10 double-buffered overlay mode was getting set on nv04 commit 85536023ed7050632d121299ab99382e096b9984 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Wed Apr 30 00:59:47 2008 +0100 Use the actual number of BIT table entries commit 78588c71ffd19e18602b95a55186bc53eebb51c3 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Mon Apr 28 16:51:01 2008 +0100 randr12, xv: manual overlay clipping for randr12 (see #12825) There could be something to be said for doing this clipping when using the blitter and texture adapters too commit 6f7d00a0cb4ec85b058afb0150a122a124542b5f Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Tue Apr 29 22:53:40 2008 +0100 randr12: remove unneeded separate dcb_entry and "or" members Make off-chip outputs clearer too commit 52e58c7e799697989fcfbf95050ce10a4c3d1f8f Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Tue Apr 29 22:08:01 2008 +0100 Pass DCB entry structs in bios functions, rather than index commit 0c1da6907d8e29ed1c058f9655d436c228ea91b6 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Tue Apr 29 21:53:22 2008 +0100 Pass output field, rather than dcb indices, for tmds access functions commit 2333bc907a4be3c7e36bdd02f27e22b63a7ee7c3 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Tue Apr 29 21:58:17 2008 +0100 Add an index field to dcb entries, and carry pointer to dcb entry in output struct commit 21f062cad184f21d33d7f5b43f86937979291b58 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Tue Apr 29 21:27:07 2008 +0100 randr12, xv: oops, transform_in_use doesn't exist on xserver 1.3 commit ee78dc0abef626e29f7617a4b324e847bab1abcc Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Mon Apr 28 02:12:17 2008 +0100 randr12: C51 I2C commit 9b70dfaf4f0317e622ca64fc0804f74a31158108 Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Tue Apr 29 18:46:24 2008 +0100 randr12: only set cr59 to 1 for tmds (fixes nv34 issue) commit c8cec9b2a0b18cd1159613d4dd218725695aef7c Author: Stuart Bennett <[EMAIL PROTECTED]> Date: Mon Ap