diff --git a/.gitignore b/.gitignore index df973f1..36def29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/xf86-video-nouveau-1.0.13.tar.bz2 +SOURCES/xf86-video-nouveau-1.0.15.tar.bz2 diff --git a/.xorg-x11-drv-nouveau.metadata b/.xorg-x11-drv-nouveau.metadata index 7d6667e..c4177ef 100644 --- a/.xorg-x11-drv-nouveau.metadata +++ b/.xorg-x11-drv-nouveau.metadata @@ -1 +1 @@ -814bbdb849c35e79fac4ae881ab5e4153521fd85 SOURCES/xf86-video-nouveau-1.0.13.tar.bz2 +ed699a59ea509550f60019eef1e092ed0ccdea08 SOURCES/xf86-video-nouveau-1.0.15.tar.bz2 diff --git a/SOURCES/0001-modesetting-Validate-the-atom-for-enum-properties.patch b/SOURCES/0001-modesetting-Validate-the-atom-for-enum-properties.patch deleted file mode 100644 index 8e70965..0000000 --- a/SOURCES/0001-modesetting-Validate-the-atom-for-enum-properties.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 69aecdd305defdd014bc92b82acc6000988511cf Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Tue, 13 Jun 2017 09:23:42 -0400 -Subject: [PATCH] modesetting: Validate the atom for enum properties - -The client could have said anything here, and if what they said doesn't -actually name an atom NameForAtom() will return NULL, and strcmp() will -be unhappy about that. - -[copied from xserver d4995a3936ae283b9080fdaa0905daa669ebacfc] - -Signed-off-by: Adam Jackson ---- - src/drmmode_display.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/drmmode_display.c b/src/drmmode_display.c -index 2b71c9c..04a0b57 100644 ---- a/src/drmmode_display.c -+++ b/src/drmmode_display.c -@@ -1081,7 +1081,8 @@ drmmode_output_set_property(xf86OutputPtr output, Atom property, - if (value->type != XA_ATOM || value->format != 32 || value->size != 1) - return FALSE; - memcpy(&atom, value->data, 4); -- name = NameForAtom(atom); -+ if (!(name = NameForAtom(atom))) -+ return FALSE; - - /* search for matching name string, then set its value down */ - for (j = 0; j < p->mode_prop->count_enums; j++) { --- -2.13.0 - diff --git a/SOURCES/nouveau-1.0.13-fix-pageflipping-with-atomic.patch b/SOURCES/nouveau-1.0.13-fix-pageflipping-with-atomic.patch deleted file mode 100644 index c6ca75e..0000000 --- a/SOURCES/nouveau-1.0.13-fix-pageflipping-with-atomic.patch +++ /dev/null @@ -1,188 +0,0 @@ -From 924083938c8f209d8f6ff472caf8692a644f7e78 Mon Sep 17 00:00:00 2001 -From: Lyude -Date: Fri, 3 Mar 2017 18:27:42 -0500 -Subject: [PATCH] Consider CRTCs disabled when DPMS is off - -It turns out there's a difference in X between a CRTC being "disabled" -and simply having it's DPMS turned off. This is problematic though, -because if DPMS is turned off you can't really use the CRTC as a normal -CRTC anyway since page flipping and vblanks will be non-functional. As a -result, we've been considering DPMS-on CRTCs as enabled and attempt to -perform pageflips, vblank waits, etc. on them which inevitably fails. and -usually breaks the display the first time any of the CRTCs have their -DPMS turned on. - -This was a problem that didn't really show itself until kernel 4.10 when -atomic modesetting was added which caused nouveau to stop trying to -fulfill pageflips and vblank waits on disabled CRTCs. I'm not sure how -pageflipping disabled CRTCs ever worked in the first place, but since -not doing so is the proper behavior anyway I haven't investigated any -further. - -So, copy the ms_crtc_on() function from the modesetting driver and add -it here as drmmode_crtc_on(), then use that in all of the places where -we should be checking for both DPMS off and disabled CRTCs. - -This fixes issues with the X ceasing to function (usually) after the -first time a CRTC has it's DPMS turned on. Reproduction recipe: - -- Load up gnome-shell on a machine -- Wait for the display to timeout from inactivity and turn itself off -- Shake the cursor or press something on the keyboard. Chances are the - monitor will come back on, but the display remains black until the - next time the X server is restarted. - -Signed-off-by: Lyude -Reviewed-by: Adam Jackson ---- - src/drmmode_display.c | 14 ++++++++++++-- - src/nouveau_dri2.c | 14 +++++++++----- - src/nouveau_present.c | 6 +++--- - src/nouveau_xv.c | 2 +- - src/nv_proto.h | 1 + - 5 files changed, 26 insertions(+), 11 deletions(-) - -diff --git a/src/drmmode_display.c b/src/drmmode_display.c -index b6c9bb9..dd9fa27 100644 ---- a/src/drmmode_display.c -+++ b/src/drmmode_display.c -@@ -65,6 +65,7 @@ typedef struct { - uint32_t rotate_fb_id; - Bool cursor_visible; - int scanout_pixmap_x; -+ int dpms_mode; - } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr; - - typedef struct { -@@ -114,6 +115,14 @@ drmmode_crtc(xf86CrtcPtr crtc) - return drmmode_crtc->mode_crtc->crtc_id; - } - -+Bool -+drmmode_crtc_on(xf86CrtcPtr crtc) -+{ -+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; -+ -+ return crtc->enabled && drmmode_crtc->dpms_mode == DPMSModeOn; -+} -+ - int - drmmode_head(xf86CrtcPtr crtc) - { -@@ -313,9 +322,10 @@ drmmode_ConvertToKMode(ScrnInfoPtr scrn, drmModeModeInfo *kmode, - } - - static void --drmmode_crtc_dpms(xf86CrtcPtr drmmode_crtc, int mode) -+drmmode_crtc_dpms(xf86CrtcPtr crtc, int mode) - { -- -+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; -+ drmmode_crtc->dpms_mode = mode; - } - - void -diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c -index 81ee9be..cbb7b2a 100644 ---- a/src/nouveau_dri2.c -+++ b/src/nouveau_dri2.c -@@ -279,23 +279,27 @@ can_exchange(DrawablePtr draw, PixmapPtr dst_pix, PixmapPtr src_pix) - ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); - NVPtr pNv = NVPTR(scrn); -- int i; -+ int i, active_crtc_count = 0; - - if (!xf86_config->num_crtc) - return FALSE; - - for (i = 0; i < xf86_config->num_crtc; i++) { - xf86CrtcPtr crtc = xf86_config->crtc[i]; -- if (crtc->enabled && crtc->rotatedData) -- return FALSE; -+ if (drmmode_crtc_on(crtc)) { -+ if (crtc->rotatedData) -+ return FALSE; - -+ active_crtc_count++; -+ } - } - - return ((DRI2CanFlip(draw) && pNv->has_pageflip)) && - dst_pix->drawable.width == src_pix->drawable.width && - dst_pix->drawable.height == src_pix->drawable.height && - dst_pix->drawable.bitsPerPixel == src_pix->drawable.bitsPerPixel && -- dst_pix->devKind == src_pix->devKind; -+ dst_pix->devKind == src_pix->devKind && -+ active_crtc_count; - } - - static Bool -@@ -475,7 +479,7 @@ dri2_page_flip(DrawablePtr draw, PixmapPtr back, void *priv, - int head = drmmode_crtc(config->crtc[i]); - void *token; - -- if (!config->crtc[i]->enabled) -+ if (!drmmode_crtc_on(config->crtc[i])) - continue; - - flipdata->flip_count++; -diff --git a/src/nouveau_present.c b/src/nouveau_present.c -index 482ac6e..ebd5fcf 100644 ---- a/src/nouveau_present.c -+++ b/src/nouveau_present.c -@@ -152,7 +152,7 @@ nouveau_present_flip_check(RRCrtcPtr rrcrtc, WindowPtr window, - ScrnInfoPtr scrn = xf86ScreenToScrn(window->drawable.pScreen); - xf86CrtcPtr crtc = rrcrtc->devPrivate; - -- if (!scrn->vtSema || !crtc->enabled) -+ if (!scrn->vtSema || !drmmode_crtc_on(crtc)) - return FALSE; - - return TRUE; -@@ -199,7 +199,7 @@ nouveau_present_flip_exec(ScrnInfoPtr scrn, uint64_t event_id, int sync, - flip->msc = target_msc; - - for (i = 0; i < config->num_crtc; i++) { -- if (config->crtc[i]->enabled) -+ if (drmmode_crtc_on(config->crtc[i])) - last = i; - } - -@@ -208,7 +208,7 @@ nouveau_present_flip_exec(ScrnInfoPtr scrn, uint64_t event_id, int sync, - int crtc = drmmode_crtc(config->crtc[i]); - void *user = NULL; - -- if (!config->crtc[i]->enabled) -+ if (!drmmode_crtc_on(config->crtc[i])) - continue; - - if (token && ((crtc == sync) || (i == last))) { -diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c -index 716b18d..4b939f7 100644 ---- a/src/nouveau_xv.c -+++ b/src/nouveau_xv.c -@@ -299,7 +299,7 @@ nv_window_belongs_to_crtc(ScrnInfoPtr pScrn, int x, int y, int w, int h) - for (i = 0; i < xf86_config->num_crtc; i++) { - xf86CrtcPtr crtc = xf86_config->crtc[i]; - -- if (!crtc->enabled) -+ if (!drmmode_crtc_on(crtc)) - continue; - - if ((x < (crtc->x + crtc->mode.HDisplay)) && -diff --git a/src/nv_proto.h b/src/nv_proto.h -index 122ede5..4a57406 100644 ---- a/src/nv_proto.h -+++ b/src/nv_proto.h -@@ -13,6 +13,7 @@ void drmmode_screen_init(ScreenPtr pScreen); - void drmmode_screen_fini(ScreenPtr pScreen); - - int drmmode_crtc(xf86CrtcPtr crtc); -+Bool drmmode_crtc_on(xf86CrtcPtr crtc); - int drmmode_head(xf86CrtcPtr crtc); - void drmmode_swap(ScrnInfoPtr, uint32_t, uint32_t *); - --- -2.9.3 - diff --git a/SPECS/xorg-x11-drv-nouveau.spec b/SPECS/xorg-x11-drv-nouveau.spec index eb99780..9942520 100644 --- a/SPECS/xorg-x11-drv-nouveau.spec +++ b/SPECS/xorg-x11-drv-nouveau.spec @@ -9,8 +9,8 @@ Summary: Xorg X11 nouveau video driver for NVIDIA graphics chipsets Name: xorg-x11-drv-nouveau # need to set an epoch to get version number in sync with upstream Epoch: 1 -Version: 1.0.13 -Release: 3%{?dist} +Version: 1.0.15 +Release: 1%{?dist} URL: http://www.x.org License: MIT Group: User Interface/X Hardware Support @@ -19,13 +19,10 @@ Group: User Interface/X Hardware Support %if 0%{?gitdate} Source0: xf86-video-nouveau-%{gitdate}.tar.xz %else -Source0: http://xorg.freedesktop.org/archive/individual/driver/xf86-video-nouveau-%{version}.tar.bz2 +Source0: https://xorg.freedesktop.org/archive/individual/driver/xf86-video-nouveau-%{version}.tar.bz2 %endif Source1: make-git-snapshot.sh -Patch0: nouveau-1.0.13-fix-pageflipping-with-atomic.patch -Patch1: 0001-modesetting-Validate-the-atom-for-enum-properties.patch - ExcludeArch: s390 s390x BuildRequires: libtool automake autoconf @@ -52,9 +49,7 @@ X.Org X11 nouveau video driver. %endif %prep -%setup -q -n xf86-video-nouveau-%{dirsuffix} -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 -n xf86-video-nouveau-%{dirsuffix} %build autoreconf -v --install --force @@ -70,6 +65,12 @@ find $RPM_BUILD_ROOT -regex ".*\.la$" | xargs rm -f -- %{_mandir}/man4/nouveau.4* %changelog +* Wed May 30 2018 Adam Jackson - 1.0.15-1 +- nouveau 1.0.15 + +* Wed May 30 2018 Adam Jackson - 1:1.0.13-3.1 +- Rebuild for xserver 1.20 + * Mon Jun 19 2017 Adam Jackson - 1.0.13-3 - Validate RANDR output property atoms