Re: [Nouveau] [PATCH] drm/nouveau/nv50: handle failures in crtc objects construction
On Sun, Dec 11, 2011 at 09:03:39PM +0100, Marcin Slusarz wrote: > Fixes oopses / leaks depending on point of failure. > > Signed-off-by: Marcin Slusarz > --- > drivers/gpu/drm/nouveau/nv50_crtc.c| 59 +-- > drivers/gpu/drm/nouveau/nv50_display.c |7 +++- > 2 files changed, 45 insertions(+), 21 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c > b/drivers/gpu/drm/nouveau/nv50_crtc.c > index 8f6c2ac..9fa012d 100644 > --- a/drivers/gpu/drm/nouveau/nv50_crtc.c > +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c > @@ -733,18 +733,16 @@ nv50_crtc_create(struct drm_device *dev, int index) > > ret = nouveau_bo_new(dev, 4096, 0x100, TTM_PL_FLAG_VRAM, >0, 0x, &nv_crtc->lut.nvbo); > - if (!ret) { > - ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM); > - if (!ret) > - ret = nouveau_bo_map(nv_crtc->lut.nvbo); > - if (ret) > - nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo); > - } > + if (ret) > + goto lut_bo_err; > > - if (ret) { > - kfree(nv_crtc); > - return ret; > - } > + ret = nouveau_bo_pin(nv_crtc->lut.nvbo, TTM_PL_FLAG_VRAM); > + if (ret) > + goto lut_bo_pin_err; > + > + ret = nouveau_bo_map(nv_crtc->lut.nvbo); > + if (ret) > + goto lut_bo_map_err; > > nv_crtc->index = index; > > @@ -758,14 +756,37 @@ nv50_crtc_create(struct drm_device *dev, int index) > > ret = nouveau_bo_new(dev, 64*64*4, 0x100, TTM_PL_FLAG_VRAM, >0, 0x, &nv_crtc->cursor.nvbo); > - if (!ret) { > - ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); > - if (!ret) > - ret = nouveau_bo_map(nv_crtc->cursor.nvbo); > - if (ret) > - nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo); > - } > + if (ret) > + goto cursor_bo_err; > + > + ret = nouveau_bo_pin(nv_crtc->cursor.nvbo, TTM_PL_FLAG_VRAM); > + if (ret) > + goto cursor_bo_pin_err; > + > + ret = nouveau_bo_map(nv_crtc->cursor.nvbo); > + if (ret) > + goto cursor_bo_map_err; > + > + ret = nv50_cursor_init(nv_crtc); > + if (ret) > + goto cursor_init_err; > > - nv50_cursor_init(nv_crtc); > return 0; > + > +cursor_init_err: > + nouveau_bo_unmap(nv_crtc->cursor.nvbo); > +cursor_bo_map_err: > + nouveau_bo_unpin(nv_crtc->cursor.nvbo); > +cursor_bo_pin_err: > + nouveau_bo_ref(NULL, &nv_crtc->cursor.nvbo); > +cursor_bo_err: > + drm_crtc_cleanup(&nv_crtc->base); > + nouveau_bo_unmap(nv_crtc->lut.nvbo); > +lut_bo_map_err: > + nouveau_bo_unpin(nv_crtc->lut.nvbo); > +lut_bo_pin_err: > + nouveau_bo_ref(NULL, &nv_crtc->lut.nvbo); > +lut_bo_err: > + kfree(nv_crtc); > + return ret; > } > diff --git a/drivers/gpu/drm/nouveau/nv50_display.c > b/drivers/gpu/drm/nouveau/nv50_display.c > index 7ba28e0..a1b335b 100644 > --- a/drivers/gpu/drm/nouveau/nv50_display.c > +++ b/drivers/gpu/drm/nouveau/nv50_display.c > @@ -335,8 +335,11 @@ nv50_display_create(struct drm_device *dev) > dev_priv->engine.display.priv = priv; > > /* Create CRTC objects */ > - for (i = 0; i < 2; i++) > - nv50_crtc_create(dev, i); > + for (i = 0; i < 2; i++) { > + ret = nv50_crtc_create(dev, i); > + if (ret) > + return ret; > + } > > /* We setup the encoders from the BIOS table */ > for (i = 0 ; i < dcb->entries; i++) { > -- ping ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH] drm/nouveau: cleanup after display init failure
On Sun, Dec 11, 2011 at 09:02:05PM +0100, Marcin Slusarz wrote: > Depending on exact point of failure, not cleaning would lead to > BUG_ONs/oopses in various distant places. > > Signed-off-by: Marcin Slusarz > --- > drivers/gpu/drm/nouveau/nouveau_display.c | 11 +-- > 1 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c > b/drivers/gpu/drm/nouveau/nouveau_display.c > index 05f1692..bea7a41 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_display.c > +++ b/drivers/gpu/drm/nouveau/nouveau_display.c > @@ -304,14 +304,21 @@ nouveau_display_create(struct drm_device *dev) > > ret = disp->create(dev); > if (ret) > - return ret; > + goto disp_create_err; > > if (dev->mode_config.num_crtc) { > ret = drm_vblank_init(dev, dev->mode_config.num_crtc); > if (ret) > - return ret; > + goto vblank_err; > } > > + return 0; > + > +vblank_err: > + disp->destroy(dev); > +disp_create_err: > + drm_kms_helper_poll_fini(dev); > + drm_mode_config_cleanup(dev); > return ret; > } > > -- ping ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH] drm/nv50: fix ramin heap size for kernel channel too
On Fri, Dec 02, 2011 at 08:39:19PM +0100, Marcin Slusarz wrote: > Port change from "drm/nouveau: Keep RAMIN heap within the channel" > to kernel channel, which has its own ramin heap initialisation. > > Signed-off-by: Marcin Slusarz > Cc: Younes Manton > --- > drivers/gpu/drm/nouveau/nv50_instmem.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c > b/drivers/gpu/drm/nouveau/nv50_instmem.c > index a7c12c9..0bba54f 100644 > --- a/drivers/gpu/drm/nouveau/nv50_instmem.c > +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c > @@ -83,7 +83,7 @@ nv50_channel_new(struct drm_device *dev, u32 size, struct > nouveau_vm *vm, > return ret; > } > > - ret = drm_mm_init(&chan->ramin_heap, 0x6000, chan->ramin->size); > + ret = drm_mm_init(&chan->ramin_heap, 0x6000, chan->ramin->size - > 0x6000); > if (ret) { > nv50_channel_del(&chan); > return ret; > -- > 1.7.8.rc3 > ping ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
Re: [Nouveau] [PATCH] drm/nouveau: fix acpi related kbuild warnings
On Fri, Dec 02, 2011 at 07:49:14PM +0100, Marcin Slusarz wrote: > On Wed, Nov 09, 2011 at 10:32:34PM +0100, Marcin Slusarz wrote: > > On Wed, Nov 02, 2011 at 10:39:40PM +0100, Marcin Slusarz wrote: > > > Currently when X86 && ACPI && !X86_PLATFORM_DEVICES kbuild spits: > > > > > > warning: (DRM_NOUVEAU) selects ACPI_WMI which has unmet direct > > > dependencies (X86 && X86_PLATFORM_DEVICES && ACPI) > > > warning: (DRM_NOUVEAU) selects MXM_WMI which has unmet direct > > > dependencies (X86 && X86_PLATFORM_DEVICES && ACPI_WMI) > > > > > > and goes on, which leaves a situation where ACPI_WMI (which depends on > > > X86_PLATFORM_DEVICES) is enabled but X86_PLATFORM_DEVICES is not. > > > Additionally, Nouveau on IA64 would enable these X86-related drivers > > > when ACPI is enabled (doesn't matter but is wrong) and build > > > nouveau_acpi.c which depends on them. > > > > > > To fix this, introduce hidden DRM_NOUVEAU_ACPI variable which selects > > > all acpi/x86 related configs and select it when both X86 and ACPI are > > > enabled. > > > > > > Signed-off-by: Marcin Slusarz > > > --- > > ping? ping ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 44061] New: dri/nouveau: Build error with clang
https://bugs.freedesktop.org/show_bug.cgi?id=44061 Bug #: 44061 Summary: dri/nouveau: Build error with clang Classification: Unclassified Product: Mesa Version: git Platform: All URL: http://lists.freedesktop.org/archives/mesa-dev/2011-No vember/014310.html OS/Version: Linux (All) Status: NEW Severity: blocker Priority: medium Component: Drivers/DRI/nouveau AssignedTo: nouveau@lists.freedesktop.org ReportedBy: johannesoberm...@gmx.de CC: mesa-...@lists.freedesktop.org nouveau_array.c:49:16: error: illegal storage class on function *extract_u = EXTRACT(char, unsigned, 1); ^ nouveau_array.c:38:3: note: expanded from macro 'EXTRACT' auto out_t f(struct nouveau_array *, int, int); \ ^ nouveau_array.c:49:16: error: expected ';' at end of declaration *extract_u = EXTRACT(char, unsigned, 1); ^ nouveau_array.c:39:50: note: expanded from macro 'EXTRACT' out_t f(struct nouveau_array *a, int i, int j) {\ ^ nouveau_array.c:50:16: error: illegal storage class on function *extract_f = EXTRACT(char, float, SCHAR_MAX); ^ nouveau_array.c:38:3: note: expanded from macro 'EXTRACT' auto out_t f(struct nouveau_array *, int, int); \ ^ nouveau_array.c:50:16: error: expected ';' at end of declaration *extract_f = EXTRACT(char, float, SCHAR_MAX); ^ nouveau_array.c:39:50: note: expanded from macro 'EXTRACT' out_t f(struct nouveau_array *a, int i, int j) {\ ^ nouveau_array.c:53:16: error: illegal storage class on function *extract_u = EXTRACT(unsigned char, unsigned, 1); ^ nouveau_array.c:38:3: note: expanded from macro 'EXTRACT' auto out_t f(struct nouveau_array *, int, int); \ ^ nouveau_array.c:53:16: error: expected ';' at end of declaration *extract_u = EXTRACT(unsigned char, unsigned, 1); ^ nouveau_array.c:39:50: note: expanded from macro 'EXTRACT' out_t f(struct nouveau_array *a, int i, int j) {\ ^ nouveau_array.c:54:16: error: illegal storage class on function *extract_f = EXTRACT(unsigned char, float, UCHAR_MAX); ^ nouveau_array.c:38:3: note: expanded from macro 'EXTRACT' auto out_t f(struct nouveau_array *, int, int); \ ^ nouveau_array.c:54:16: error: expected ';' at end of declaration *extract_f = EXTRACT(unsigned char, float, UCHAR_MAX); ^ nouveau_array.c:39:50: note: expanded from macro 'EXTRACT' out_t f(struct nouveau_array *a, int i, int j) {\ ^ nouveau_array.c:57:16: error: illegal storage class on function *extract_u = EXTRACT(short, unsigned, 1); ^ nouveau_array.c:38:3: note: expanded from macro 'EXTRACT' auto out_t f(struct nouveau_array *, int, int); \ ^ nouveau_array.c:57:16: error: expected ';' at end of declaration *extract_u = EXTRACT(short, unsigned, 1); ^ nouveau_array.c:39:50: note: expanded from macro 'EXTRACT' out_t f(struct nouveau_array *a, int i, int j) {\ ^ nouveau_array.c:58:16: error: illegal storage class on function *extract_f = EXTRACT(short, float, SHRT_MAX); ^ nouveau_array.c:38:3: note: expanded from macro 'EXTRACT' auto out_t f(struct nouveau_array *, int, int); \ ^ nouveau_array.c:58:16: error: expected ';' at end of declaration *extract_f = EXTRACT(short, float, SHRT_MAX); ^ nouveau_array.c:39:50: note: expanded from macro 'EXTRACT' out_t f(struct nouveau_array *a, int i, int j) {\ ^ nouveau_array.c:61:16: error: illegal storage class on function *extract_u = EXTRACT(unsigned short, unsigned, 1); ^ nouveau_array.c:38:3: note: expanded from macro 'EXTRACT' auto out_t f(struct nouveau_array *, int, int); \ ^ nouveau_array.c:61:16: error: expected ';' at end
Re: [Nouveau] Why do non-lvds monitors default to dithering these days?
On Sun, Dec 18, 2011 at 8:47 PM, Maarten Maathuis wrote: > In the past we assumed that external displays did their own dithering > if needed. GPU based dithering is only needed for laptop displays if i > had to guess. > > I was almost thinking my monitor was malfunctioning because of strange > barely visible flickering. Now it *seems* as if dithering was the > problem, although time will have to tell, because it's subtle to see > these effects. > > Ofcource i can try and find a way to set the connector property more > permanently (if anyone has suggestions besides sticking an xrandr > command in my .xinitrc please let me know), but i don't see why we > would need to assume that anything but lvds and eDP needs to be > dithered. > > -- > Far away from the primal instinct, the song seems to fade away, the > river get wider between your thoughts and the things we do and say. Ping. -- Far away from the primal instinct, the song seems to fade away, the river get wider between your thoughts and the things we do and say. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 44054] New: Gnome shell videobug on GeForce FX 5200 & Nouveau
https://bugs.freedesktop.org/show_bug.cgi?id=44054 Bug #: 44054 Summary: Gnome shell videobug on GeForce FX 5200 & Nouveau Classification: Unclassified Product: Mesa Version: 7.11 Platform: x86 (IA32) OS/Version: Linux (All) Status: NEW Severity: major Priority: medium Component: Drivers/DRI/nouveau AssignedTo: nouveau@lists.freedesktop.org ReportedBy: ted.korosti...@gmail.com Distribution: Archlinux Clutter: 1.8.2-2 Videocard:GeForce FX 5200 Driver: Nouveau Gnome-shell: 3.2.1-1 Inital thread: https://bbs.archlinux.org/viewtopic.php?id=127879 It's repost from gnome bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=37 -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 44052] desktop freezes
https://bugs.freedesktop.org/show_bug.cgi?id=44052 --- Comment #4 from tonwi 2011-12-22 05:38:00 PST --- Created attachment 54692 --> https://bugs.freedesktop.org/attachment.cgi?id=54692 currently used as suggested on nouveau wiki -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 44052] desktop freezes
https://bugs.freedesktop.org/show_bug.cgi?id=44052 --- Comment #3 from tonwi 2011-12-22 05:36:56 PST --- Created attachment 54691 --> https://bugs.freedesktop.org/attachment.cgi?id=54691 the original log file -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 44052] desktop freezes
https://bugs.freedesktop.org/show_bug.cgi?id=44052 --- Comment #2 from tonwi 2011-12-22 05:36:06 PST --- Created attachment 54690 --> https://bugs.freedesktop.org/attachment.cgi?id=54690 dpkg -l -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 44052] desktop freezes
https://bugs.freedesktop.org/show_bug.cgi?id=44052 --- Comment #1 from tonwi 2011-12-22 05:35:40 PST --- Created attachment 54689 --> https://bugs.freedesktop.org/attachment.cgi?id=54689 lspci -k -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau
[Nouveau] [Bug 44052] New: desktop freezes
https://bugs.freedesktop.org/show_bug.cgi?id=44052 Bug #: 44052 Summary: desktop freezes Classification: Unclassified Product: xorg Version: 7.7 (2011) Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: Driver/nouveau AssignedTo: nouveau@lists.freedesktop.org ReportedBy: wto.wi...@gmx.net QAContact: xorg-t...@lists.x.org Created attachment 54688 --> https://bugs.freedesktop.org/attachment.cgi?id=54688 created by dmesg caused by an "infinite loop" in kernel/nouveau/xserver filling the kernel log with "fail ttm_validate" messages. Debian wheezy AMD64 Nvidia GeForce 6150 both kernel 3.0.0-* as well as kernel 3.1.0-* the issue occurred after a monthly system upgrade (xorg from 2:1.11.2.901-1 to 2:1.11.1.902-1); before this upgrade the system went smoothely (without any xorg.conf...) I run a second PC using the same SW version (same upgrades) but with a newer MB (GeForce 8200). On the GeForce8200-system the kernel 3.1.0-* not only freezes but crashes whereas kernel 3.0.0-* only periodically shows a message "drm EDID checksunm error" all attachments are related to the GeForce 6150 system: kernel_log.txtdmesg lspci.txt.lspci -k dpkg.txt..dpkg -l Xorg.0.logcopy from /var/log/ xorg.conf -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. ___ Nouveau mailing list Nouveau@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/nouveau