rpms/xorg-x11-drv-nouveau/devel .cvsignore, 1.13, 1.14 nouveau-fedora.patch, 1.3, 1.4 sources, 1.14, 1.15 xorg-x11-drv-nouveau.spec, 1.19, 1.20
Ben Skeggs
bskeggs at fedoraproject.org
Thu Mar 5 06:08:26 UTC 2009
Author: bskeggs
Update of /cvs/pkgs/rpms/xorg-x11-drv-nouveau/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23833
Modified Files:
.cvsignore nouveau-fedora.patch sources
xorg-x11-drv-nouveau.spec
Log Message:
* Thu Mar 05 2009 Ben Skeggs <bskeggs at redhat.com> 0.0.12-8.20090305git42f99e6
- upstream update, fixes
- kms: support gamma and dpms calls
- kms: nicer transition to gdm from plymouth
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nouveau/devel/.cvsignore,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- .cvsignore 2 Mar 2009 06:05:37 -0000 1.13
+++ .cvsignore 5 Mar 2009 06:07:55 -0000 1.14
@@ -1 +1 @@
-xf86-video-nouveau-0.0.12-20090302gite6c3b98.tar.bz2
+xf86-video-nouveau-0.0.12-20090305git42f99e6.tar.bz2
nouveau-fedora.patch:
Index: nouveau-fedora.patch
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nouveau/devel/nouveau-fedora.patch,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- nouveau-fedora.patch 2 Mar 2009 06:05:37 -0000 1.3
+++ nouveau-fedora.patch 5 Mar 2009 06:07:55 -0000 1.4
@@ -11,10 +11,61 @@
nouveau_output.h \
nouveau_connector.h \
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
-index ddb6aef..2dbc5a3 100644
+index ddb6aef..ca229db 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
-@@ -151,7 +151,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
+@@ -127,6 +127,50 @@ drmmode_crtc_dpms(xf86CrtcPtr drmmode_crtc, int mode)
+
+ }
+
++static void
++drmmode_fb_copy(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int dst_id, int src_id,
++ int x, int y)
++{
++ drmModeFBPtr fb;
++ NVPtr pNv = NVPTR(pScrn);
++ char *dst = NULL, *src = NULL;
++ struct drm_nouveau_gem_mmap req;
++ int ret, h;
++
++ /* This is not what this should look like. Until we can do driver
++ * pixmaps, this will be a nasty hack!
++ */
++
++ fb = drmModeGetFB(nouveau_device(pNv->dev)->fd, src_id);
++ if (!fb) {
++ ErrorF("src fb\n");
++ return;
++ }
++
++ req.handle = fb->handle;
++ ret = drmCommandWriteRead(nouveau_device(pNv->dev)->fd,
++ DRM_NOUVEAU_GEM_MMAP, &req, sizeof(req));
++ if (ret) {
++ ErrorF("src bo map: %d\n", ret);
++ drmFree(fb);
++ return;
++ }
++ src = (void *)req.vaddr;
++
++ nouveau_bo_map(pNv->scanout, NOUVEAU_BO_WR);
++ dst = pNv->scanout->map;
++
++ h = fb->height;
++ while (h--) {
++ memcpy(dst, src, fb->width * (fb->bpp >> 3));
++ src += fb->pitch;
++ dst += fb->pitch;
++ }
++
++ nouveau_bo_unmap(pNv->scanout);
++ drmFree(fb);
++}
++
+ static Bool
+ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
+ Rotation rotation, int x, int y)
+@@ -151,7 +195,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
ret = drmModeAddFB(drmmode->fd,
pScrn->virtualX, pScrn->virtualY,
pScrn->depth, pScrn->bitsPerPixel,
@@ -23,6 +74,62 @@
if (ret < 0) {
ErrorF("failed to add fb\n");
return FALSE;
+@@ -204,6 +248,12 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
+ fb_id = drmmode->fb_id;
+ if (drmmode_crtc->rotate_fb_id)
+ fb_id = drmmode_crtc->rotate_fb_id;
++ else
++ if (fb_id != drmmode_crtc->mode_crtc->buffer_id) {
++ drmmode_fb_copy(pScrn, drmmode, fb_id,
++ drmmode_crtc->mode_crtc->buffer_id, x, y);
++ }
++
+ ret = drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+ fb_id, x, y, output_ids, output_count, &kmode);
+ if (ret)
+@@ -370,8 +420,6 @@ drmmode_gamma_set(xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
+ drmmode_ptr drmmode = drmmode_crtc->drmmode;
+ int ret;
+
+- return;
+-
+ ret = drmModeCrtcSetGamma(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
+ size, red, green, blue);
+ if (ret != 0) {
+@@ -519,7 +567,32 @@ drmmode_output_destroy(xf86OutputPtr output)
+ static void
+ drmmode_output_dpms(xf86OutputPtr output, int mode)
+ {
+- return;
++ drmmode_output_private_ptr drmmode_output = output->driver_private;
++ drmModeConnectorPtr koutput = drmmode_output->mode_output;
++ drmModePropertyPtr props;
++ drmmode_ptr drmmode = drmmode_output->drmmode;
++ int mode_id = -1, i;
++
++ if (!NVPTR(output->scrn)->allow_dpms)
++ return;
++
++ for (i = 0; i < koutput->count_props; i++) {
++ props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
++ if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
++ if (!strcmp(props->name, "DPMS")) {
++ mode_id = koutput->props[i];
++ drmModeFreeProperty(props);
++ break;
++ }
++ drmModeFreeProperty(props);
++ }
++ }
++
++ if (mode_id < 0)
++ return;
++
++ drmModeConnectorSetProperty(drmmode->fd, koutput->connector_id,
++ mode_id, mode);
+ }
+
+ /*
diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c
index 93fc3c5..6854b68 100644
--- a/src/nouveau_exa.c
@@ -99,7 +206,7 @@
exa->WaitMarker = nouveau_exa_wait_marker;
diff --git a/src/nv50_randr.c b/src/nv50_randr.c
-index f1cca0c..fcf5d7f 100644
+index 6fbba6b..5ce1e64 100644
--- a/src/nv50_randr.c
+++ b/src/nv50_randr.c
@@ -99,7 +99,7 @@ nv50_crtc_mode_set(xf86CrtcPtr crtc, DisplayModePtr mode, DisplayModePtr adjuste
@@ -407,7 +514,7 @@
/* back/depth buffers will likely be allocated on a per-drawable
* basis, but these may be useful if we want to support shared back
diff --git a/src/nv_driver.c b/src/nv_driver.c
-index 97a5aa8..1e6f0e1 100644
+index d7e8025..42df24a 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -1583,6 +1583,8 @@ NVMapMemSW(ScrnInfoPtr pScrn)
@@ -474,21 +581,33 @@
nouveau_bo_ref(NULL, &pNv->GART);
nouveau_bo_ref(NULL, &pNv->Cursor);
nouveau_bo_ref(NULL, &pNv->Cursor2);
-@@ -2058,10 +2083,10 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+@@ -2082,10 +2107,11 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
* up until X decides to draw something
*/
if (!pNv->kms_enable) {
- nouveau_bo_map(pNv->FB, NOUVEAU_BO_WR);
- memset(pNv->FB->map, 0, NOUVEAU_ALIGN(pScrn->virtualX, 64) *
+ nouveau_bo_map(pNv->scanout, NOUVEAU_BO_WR);
-+ memset(pNv->scanout->map, 0, NOUVEAU_ALIGN(pScrn->virtualX, 64) *
++ memset(pNv->scanout->map, 0,
++ NOUVEAU_ALIGN(pScrn->virtualX, 64) *
pScrn->virtualY * (pScrn->bitsPerPixel >> 3));
- nouveau_bo_unmap(pNv->FB);
+ nouveau_bo_unmap(pNv->scanout);
}
- if (!pNv->NoAccel) {
-@@ -2295,6 +2320,15 @@ NVSaveScreen(ScreenPtr pScreen, int mode)
+ if (!pNv->randr12_enable) {
+@@ -2099,8 +2125,10 @@ NVScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ if (!NV50AcquireDisplay(pScrn))
+ return FALSE;
+
++ pNv->allow_dpms = FALSE;
+ if (!xf86SetDesiredModes(pScrn))
+ return FALSE;
++ pNv->allow_dpms = TRUE;
+ }
+
+ /* Darken the screen for aesthetic reasons */
+@@ -2295,6 +2323,15 @@ NVSaveScreen(ScreenPtr pScreen, int mode)
bool on = xf86IsUnblank(mode);
int i;
@@ -505,10 +624,10 @@
return vgaHWSaveScreen(pScreen, mode);
diff --git a/src/nv_proto.h b/src/nv_proto.h
-index baa531d..8451283 100644
+index 28605a8..dd2be16 100644
--- a/src/nv_proto.h
+++ b/src/nv_proto.h
-@@ -278,6 +278,10 @@ void nv50_xv_video_stop(ScrnInfoPtr, pointer, Bool);
+@@ -280,6 +280,10 @@ void nv50_xv_video_stop(ScrnInfoPtr, pointer, Bool);
int nv50_xv_port_attribute_set(ScrnInfoPtr, Atom, INT32, pointer);
int nv50_xv_port_attribute_get(ScrnInfoPtr, Atom, INT32 *, pointer);
@@ -520,10 +639,10 @@
#ifndef exaMoveInPixmap
extern void exaMoveInPixmap(PixmapPtr pPixmap);
diff --git a/src/nv_type.h b/src/nv_type.h
-index d363984..79df562 100644
+index db5023f..70b806b 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
-@@ -268,12 +268,15 @@ typedef struct _NVRec {
+@@ -269,6 +269,7 @@ typedef struct _NVRec {
/* Various pinned memory regions */
struct nouveau_bo * FB;
void * FBMap;
@@ -531,11 +650,21 @@
//struct nouveau_bo * FB_old; /* for KMS */
struct nouveau_bo * shadow[2]; /* for easy acces by exa */
struct nouveau_bo * Cursor;
- struct nouveau_bo * Cursor2;
- struct nouveau_bo * GART;
+@@ -277,6 +278,9 @@ typedef struct _NVRec {
+ struct nvbios VBIOS;
+ struct nouveau_bios_info *vbios;
++
+ DamagePtr screen_damage; /* for NV50+ */
+
- struct nouveau_bios VBIOS;
Bool NoAccel;
Bool HWCursor;
+ Bool FpScale;
+@@ -355,6 +359,7 @@ typedef struct _NVRec {
+
+ #ifdef XF86DRM_MODE
+ void *drmmode; /* for KMS */
++ Bool allow_dpms;
+ #endif
+
+ nouveauCrtcPtr crtc[2];
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nouveau/devel/sources,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- sources 2 Mar 2009 06:05:37 -0000 1.14
+++ sources 5 Mar 2009 06:07:55 -0000 1.15
@@ -1 +1 @@
-4c235d75393cac02d46caa984eeb22bf xf86-video-nouveau-0.0.12-20090302gite6c3b98.tar.bz2
+062620c6fa226f2515dbd75d38f67c8c xf86-video-nouveau-0.0.12-20090305git42f99e6.tar.bz2
Index: xorg-x11-drv-nouveau.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-nouveau/devel/xorg-x11-drv-nouveau.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- xorg-x11-drv-nouveau.spec 2 Mar 2009 06:05:37 -0000 1.19
+++ xorg-x11-drv-nouveau.spec 5 Mar 2009 06:07:55 -0000 1.20
@@ -7,8 +7,8 @@
# git clone git://git.freedesktop.org/git/nouveau/xf86-video-nouveau
# git-archive --format=tar --prefix=xf86-video-nouveau-0.0.10/ %{git_version} | bzip2 > xf86-video-nouveau-0.0.10-%{gitdate}.tar.bz2
-%define gitdate 20090302
-%define git_version e6c3b98
+%define gitdate 20090305
+%define git_version 42f99e6
%define snapshot %{gitdate}git%{git_version}
@@ -19,7 +19,7 @@
# need to set an epoch to get version number in sync with upstream
Epoch: 1
Version: %{nouveau_version}
-Release: 7.%{snapshot}%{?dist}
+Release: 8.%{snapshot}%{?dist}
URL: http://www.x.org
License: MIT
Group: User Interface/X Hardware Support
@@ -75,6 +75,11 @@
%{_mandir}/man4/nouveau.4*
%changelog
+* Thu Mar 05 2009 Ben Skeggs <bskeggs at redhat.com> 0.0.12-8.20090305git42f99e6
+- upstream update, fixes
+- kms: support gamma and dpms calls
+- kms: nicer transition to gdm from plymouth
+
* Mon Mar 02 2009 Ben Skeggs <bskeggs at redhat.com> 0.0.12-7.20090302gite6c3b98
- upstream update, fixes
More information about the fedora-extras-commits
mailing list