summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau
AgeCommit message (Collapse)Author
2011-11-21drm/nouveau: initialize chan->fence.lock before useMarcin Slusarz
commit 5e60ee780e792efe6dce97eceb110b1d30bab850 upstream. Fence lock needs to be initialized before any call to nouveau_channel_put because it calls nouveau_channel_idle->nouveau_fence_update which uses fence lock. BUG: spinlock bad magic on CPU#0, test/24134 lock: ffff88019f90dba8, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 Pid: 24134, comm: test Not tainted 3.0.0-nv+ #800 Call Trace: spin_bug+0x9c/0xa3 do_raw_spin_lock+0x29/0x13c _raw_spin_lock+0x1e/0x22 nouveau_fence_update+0x2d/0xf1 nouveau_channel_idle+0x22/0xa0 nouveau_channel_put_unlocked+0x84/0x1bd nouveau_channel_put+0x20/0x24 nouveau_channel_alloc+0x4ec/0x585 nouveau_ioctl_fifo_alloc+0x50/0x130 drm_ioctl+0x289/0x361 do_vfs_ioctl+0x4dd/0x52c sys_ioctl+0x42/0x65 system_call_fastpath+0x16/0x1b It's easily triggerable from userspace. Additionally remove double initialization of chan->fence.pending. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-09drm/nv04/crtc: Bail out if FB is not bound to crtcEmil Velikov
This commit resolves a possible 'NULL pointer dereference' It uses the same approach as radeon, intel and nouveau/nv50 Fixes bug 'Nouveau: Kernel oops when unplugging external monitor' https://bugs.freedesktop.org/show_bug.cgi?id=40336 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09drm/nouveau: fix nv04_sgdma_bind on non-"4kB pages" archsMarcin Slusarz
nv04_sgdma_bind binds the same page multiple times on architectures where PAGE_SIZE != 4096. Let's fix it. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09drm/nouveau: properly handle allocation failure in nouveau_sgdma_populateMarcin Slusarz
Not cleaning after alloc failure would result in crash on destroy, because nouveau_sgdma_clear assumes "ttm_alloced" to be not null when "pages" is not null. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Cc: stable@kernel.org Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09drm/nouveau: fix oops on pre-semaphore hardwareBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-09-09drm/nv50/crtc: Bail out if FB is not bound to crtcEmil Velikov
Fixes possbile NULL pointer dereference Resolves 'kernel crash in nv50_crtc_do_mode_set_base during shutdown' https://bugs.freedesktop.org/show_bug.cgi?id=40005 Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-26Merge branch 'drm-core-next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6 * 'drm-core-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (135 commits) drm/radeon/kms: fix DP training for DPEncoderService revision bigger than 1.1 drm/radeon/kms: add missing vddci setting on NI+ drm/radeon: Add a rmb() in IH processing drm/radeon: ATOM Endian fix for atombios_crtc_program_pll() drm/radeon: Fix the definition of RADEON_BUF_SWAP_32BIT drm/radeon: Do an MMIO read on interrupts when not uisng MSIs drm/radeon: Writeback endian fixes drm/radeon: Remove a bunch of useless _iomem casts drm/gem: add support for private objects DRM: clean up and document parsing of video= parameter DRM: Radeon: Fix section mismatch. drm: really make debug levels match in edid failure code drm/radeon/kms: fix i2c map for rv250/280 drm/nouveau/gr: disable fifo access and idle before suspend ctx unload drm/nouveau: pass flag to engine fini() method on suspend drm/nouveau: replace nv04_graph_fifo_access() use with direct reg bashing drm/nv40/gr: rewrite/split context takedown functions drm/nouveau: detect disabled device in irq handler and return IRQ_NONE drm/nouveau: ignore connector type when deciding digital/analog on DVI-I drm/nouveau: Add a quirk for Gigabyte NX86T ...
2011-07-25Merge branch 'drm-nouveau-next' of ↵Dave Airlie
git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-core-next * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: drm/nouveau/gr: disable fifo access and idle before suspend ctx unload drm/nouveau: pass flag to engine fini() method on suspend drm/nouveau: replace nv04_graph_fifo_access() use with direct reg bashing drm/nv40/gr: rewrite/split context takedown functions drm/nouveau: detect disabled device in irq handler and return IRQ_NONE drm/nouveau: ignore connector type when deciding digital/analog on DVI-I drm/nouveau: Add a quirk for Gigabyte NX86T drm/nouveau: do not leak in nv20_graph_create drm/nv50/dp: fix hack to work for macbooks booted via EFI
2011-07-25drm/nouveau/gr: disable fifo access and idle before suspend ctx unloadBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-25drm/nouveau: pass flag to engine fini() method on suspendBen Skeggs
It may not be necessary to fail in certain cases (such as failing to idle) on module unload, whereas on suspend it's important to ensure a consistent state can be restored on resume. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-25drm/nouveau: replace nv04_graph_fifo_access() use with direct reg bashingBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-25drm/nv40/gr: rewrite/split context takedown functionsBen Skeggs
It's completely pointless to save the PGRAPH context when destroying a channel, so don't bother. This commit should also fix kernel.org bug 39422, where the DRM channel state was incorrectly being saved because we left PGRAPH FIFO access enabled while running the ctxprog. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-25drm/nouveau: detect disabled device in irq handler and return IRQ_NONEBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-25drm/nouveau: ignore connector type when deciding digital/analog on DVI-IBen Skeggs
If the connector table is lying, which it often does on the boards of a particular manufacturer, we may end up doing the wrong thing. Listen to the encoder table instead, it's more reliable. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-25drm/nouveau: Add a quirk for Gigabyte NX86TEmil Velikov
The connector table lies, the card has DVI-I not HDMI Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=35675 v2: Mention the bugreport Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-25drm/nouveau: do not leak in nv20_graph_createJesper Juhl
If we return due to an unknown chipset in drivers/gpu/drm/nouveau/nv20_graph.c:nv20_graph_create() we'll leak the memory allocated to 'pgraph'. This patch should fix the leak. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Reviewed-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-25drm/nv50/dp: fix hack to work for macbooks booted via EFIBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-07-13Merge 3.0-rc7 into drm-core-nextDave Airlie
This pulls in all the drm fixes up to this point which are needed for some -next patches to work.
2011-07-13DRM: remove drm_pci_device_is_pcieJon Mason
drm_pci_device_is_pcie duplicates the funcationality of pci_is_pcie. Convert callers of the former to the latter. This has the side benefit of removing an unnecessary search in the PCI configuration space due to using a saved PCIe capability offset. [airlied: update for new callsite] Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-07-11Merge branch 'master' into for-nextJiri Kosina
Sync with Linus' tree to be able to apply pending patches that are based on newer code already present upstream.
2011-07-02Revert "drm/nvc0: recognise 0xdX chipsets as NV_C0"Ben Skeggs
Oh boy. That was a bad gamble. PDISP has changed. This reverts commit cdf81a235f11c8a55023c6b181d21d519a8a5967. Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-06-27drm/nouveau: error paths leak in nvc0_graph_construct_context()Dan Carpenter
Two of these error paths returned without freeing "ctx". Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-27drm/nouveau: Calculate reserved VRAM for PRAMIN value before use.Younes Manton
'drm/nouveau: rework vram init/fini ordering a little' changed the order of instmem.init() and nouveau_mem_vram_init() which resulted in using ramin_rsvd_vram before it was calculated and failing to init any accel on pre-NV50 cards. Since it's only used on <NV50 just calculate it where it's needed and leave it as default 0 for NV50. Signed-off-by: Younes Manton <younes.m@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-27drm/nouveau: fix nouveau_vma object leakMarcin Slusarz
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-27drm/nouveau: fix nouveau_mem object leakMarcin Slusarz
It's a regression from "drm/nouveau: create temp vmas for both src and dst of bo moves". Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-27drm/nouveau: fix fetching vbios from above 4GiB vram addressesBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: fix off-by-oneBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau/temp: Add default calibration values for nv67Emil Velikov
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau/temp: Fix signed/unsigned int logicEmil Velikov
Many (all?) of the coefficients related to calculating the correct temperature are signed integers This patch correcly parses and stores those values It also ensures that the default offset is 0 (previously 1) Affected cards - the original nv50 and the nv40 family Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nvc0: push prunk140 irq messages to debug loglevelBen Skeggs
We know they happen, we don't know why. They're annoying, so hide them from users for the moment. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: un-blacklist nvce accelBen Skeggs
Reported working on IRC. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: fix null pointer deref on pre-nv50 chipsetsBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: rework vram init/fini ordering a littleBen Skeggs
Commit "drm/nouveau: add some debug output if nouveau_mm busy at destroy time" revealed an issue where vram mm takedown would actually fail due to there still being nodes present, causing nouveau to leak a small amount of memory on module unload. This splits TTM/nouveau_mm a bit more cleanly and ensures nouveau_mm fini isn't done until all gpuobjs are also destroyed. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: shut lockdep up if last vm ref needs to destroy pgdBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: fix display takedown order to match reverse init orderBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nvc0: enable per-client address spacesBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: add some debug output if nouveau_mm busy at destroy timeBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nv50: enable use of per-client gpu address spaceBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: remove implicit mapping of every bo into chan_vmBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: remove 'chan' argument from nouveau_bo_newBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: fixup gem_info ioctl to return client-specific bo virtualBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nvc0: explicitly map PDISP semaphore buffer into each channel's vmBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nv50-nvc0: lookup pushbuf virtual address on dma_pushBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nv84-nvc0: explicitly map semaphore buffer into channel vmBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nv50-nvc0: explicitly map pushbuf bo into channel vmBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nv50-nvc0: explicitly map notifier bo into channel vmBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nv50-nvc0: explicitly map fbcon fb into channel vmBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: initial changes to support multiple VMAs per buffer objectBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nv50-nvc0: completely disable relocsBen Skeggs
GPU virtual addresses are constant now so this should never be getting hit anyway and userspace shouldn't break from them being ignored. This is being done in preference to teaching the code how to deal with BOs that exist at different virtual addresses within separate VMs. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2011-06-23drm/nouveau: convert bo.mem.start usage to bo.offsetBen Skeggs
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>