Commit Graph

892 Commits

Author SHA1 Message Date
jmcneill
1dadc0e100 If the "is_console" property is already specified, do not overwrite it. 2015-11-09 23:11:18 +00:00
jmcneill
4c7cdde22d only clear agp hook on last close when agp is in use, from riastradh@ 2015-11-09 22:04:53 +00:00
mrg
cfc4a92dd2 set the "width" and "height" parameters from the surface_width and
surface_height members.  idea from the intel code and jmcneill@.

this makes the fb on my RV370 use the full display size, not the
(not actually connected) 800x600 the svideo output supports.

X still starts up at 800x600 mode, but xrandr can fix that.
2015-11-05 20:52:46 +00:00
riastradh
18ad84c50a Paranoia about mmio register mapping size. 2015-11-05 20:32:39 +00:00
riastradh
dfa2d2a702 Return error from bus_space_map. 2015-11-05 20:31:26 +00:00
riastradh
2faf0f97dd Fix bogus output parameter for bus_space_map.
We stored the bus space handle in nv_subdev(device)->mmioh, which we
then overwrote with whatever was in the mmioh local variable -- maybe
garbage, maybe an old mapping, almost certainly wrong either way.

Instead store it in mmioh so that the subsequent assignment
nv_subdev(device)->mmioh = mmioh actually works as intended.
2015-11-05 20:26:10 +00:00
mrg
feca107492 disable the once-a-second and many-times-a-minute logs about thermals.
these trigger on multiple cards for me and totally spam my logs in the
normal case.  one card switches from 41% to 42% and back again quite
regularly.
2015-10-31 09:14:27 +00:00
mrg
961142429c provide a ttm-backed set of nouveau_uvm_ops{} in the ttm_bo_driver{}.
fixes NULL pointer derefs inside UVM due to lack of pager ops.

copy the DRM_FILE_PAGE_OFFSET vs !_LP64 workaround.

with these, X starts up on my GTX 440.
2015-10-29 08:08:52 +00:00
mrg
364ba5db1e push the real attach down via config_mountroot, like radeon, as we
need firmware files.. which are currently missing:

drm kern error: nouveau E[  PGRAPH][nouveau0] failed to load fuc409c
2015-10-27 21:46:42 +00:00
riastradh
2514940e31 Eliminate Linux struct pci_dev::dev, struct platform_device::dev. 2015-10-27 13:21:18 +00:00
riastradh
0175714435 dev->dev, not &dev->pdev->dev.
Latter is a mistake that is all my fault.  Oops.
2015-10-27 13:18:21 +00:00
riastradh
6ab51059a2 dev->dev, not &dev->pdev->dev.
Latter is a charlatan, soon to meet judgment for its sins.
2015-10-27 13:16:33 +00:00
riastradh
8c09016329 Use nv_device_base(dev) like other callers, not dev->pdev->dev.
First step in fixing the struct device nonsense.  This won't actually
fix anything yet until we also fix nv_device_base.
2015-10-27 13:13:47 +00:00
mrg
8278793a0f minor re-format of the previous. 2015-10-26 07:12:08 +00:00
mrg
67f989452a don't try to wait if (cold), spin waiting for registers to clear.
same as in nouveau_engine_fifo_nve0.c 1.5.  should fix PR#50362.
2015-10-25 21:44:16 +00:00
jmcneill
5012fa7461 Non-PCI IRQ support for Tegra. 2015-10-22 23:17:08 +00:00
jmcneill
79078b5a75 sprinkle -Wno-missing-field-initializers 2015-10-22 23:16:23 +00:00
jmcneill
d0df0c8fc8 fix build on amd64 2015-10-22 23:12:46 +00:00
jmcneill
54c05a799d Don't assume that PAGE_SIZE is the same as the GPU page size (4K).
LGTM riastradh@
2015-10-22 22:39:46 +00:00
jmcneill
1c995f393c map stolen memory with BUS_DMA_COHERENT 2015-10-19 23:31:26 +00:00
jmcneill
dd0d2f10c2 Backport GK20A support from linux-3.16.
commits:	53d206bb4aadba255d20b70893ed5ba1d89f41e1
		88ff3f5f63370a8ff5b0e34bdb58144bf1c2fa9b
		90a5500c2bf0e83cd965128fce9ac1f5fa4f04f5
		fef94f6272c6d1ce1c9177770f50f7281d61f5f6
		86ebef722dab7f9ea4c5753640ef7d660c681985
		b7c852a646b12051e61c4dde4ddaa6c14af9c80b
		370eec76b67430f6055ebda07c820f02288d93b8
		a4d4bbf130724c9a9a3dff673eb9342f1dbe2392
		52e98f1a84094f9cfb36d02a73bc4271a71c70eb

ok riastradh@
2015-10-18 15:41:59 +00:00
jmcneill
37616aad69 fix non-debug build 2015-10-18 14:49:24 +00:00
jmcneill
4c6feb1de0 _nouveau_mc_dtor: only pci_intr_disestablish if the device is pci 2015-10-18 14:05:58 +00:00
jmcneill
c38f74337c add dma tag to struct platform_device 2015-10-18 14:04:03 +00:00
jmcneill
fc3eeb3e54 add get_num_physpages 2015-10-18 14:03:20 +00:00
jmcneill
2bd668c167 dont pull in agp.h when building as a module 2015-10-17 21:27:02 +00:00
jmcneill
43233df756 support for non-PCI devices 2015-10-17 21:13:38 +00:00
jmcneill
3aeff20214 vunmap takes 2 parameters on netbsd 2015-10-17 21:12:37 +00:00
jmcneill
34aee25b16 skip clflush on arm 2015-10-17 21:11:56 +00:00
jmcneill
0268766007 use VM_FREELIST_DEFAULT on arm 2015-10-17 21:11:06 +00:00
jmcneill
93cbfef3b2 only define __OS_HAS_AGP if x86 and NAGP > 0 2015-10-17 21:09:49 +00:00
jmcneill
d6b6ab7cd6 only include acpivar.h when NACPICA > 0 2015-10-17 21:07:23 +00:00
jmcneill
cff98699ef only use mtrr api if options MTRR is present and we are on x86 2015-10-17 21:06:42 +00:00
jmcneill
2cd973ce83 only build ttm_agp code if __OS_HAS_AGP is defined 2015-10-17 21:05:57 +00:00
jmcneill
71739b1918 nouveau_pci.c depends on nouveau_pci condition, not nouveau 2015-10-17 17:32:18 +00:00
jmcneill
f12750737e fix __OS_HAS_AGP=0 build 2015-10-17 16:17:22 +00:00
jmcneill
252c030555 include sys/cpu.h for CPU_INFO_ITERATOR 2015-10-17 15:57:32 +00:00
jmcneill
0a23657fe0 build on platforms without agp_i810 2015-10-17 15:13:39 +00:00
jmcneill
5e1b565005 machine/cpufunc.h is MD, move it to i386/amd64 block 2015-10-17 15:13:19 +00:00
jmcneill
738258c98f Don't include ACPI headers unless NACPICA > 0 2015-10-17 14:54:10 +00:00
jmcneill
23dfd71d21 Split nouveau@pci from nouveau so we can attach it to other busses.
nouveaufb still depends on nouveau_pci, but it is not applicable to
non-PCI devices anyway.
2015-10-17 12:02:44 +00:00
mrg
0ea4e8dbad use pci_dma64_available() to choose a valid DMA tag. 2015-10-14 00:12:55 +00:00
mrg
40e7a16ab0 nouveau_drm.c:
- hook up an empty uvm_pagerops like radeon does.
- hook up nouveau_ttm_mmap_object().
nouveau_engine_fifo_nve0.c:
- if (cold), don't try to wait, but hard-spin until the timeout period.

with these in place, i am able to get working text-console with nouveau!


ok riastradh.
2015-10-13 01:43:47 +00:00
riastradh
aada118d75 Fix comment in previous. 2015-10-13 00:42:59 +00:00
riastradh
f9e0bb4791 Fix indexing convention of Linux __ffs/__ffs64 shims.
They reject zero input, and yield zero-based indexing, unlike our
ffs/ffs64, which return zero for zero and yield one-based indexing.

May let nouveau make a little more progress toward booting!

Found by mrg@.
2015-10-13 00:42:20 +00:00
christos
d921302e7e fix the same bug on the linux side, print the error, and return the -tive
error to mimick linux.
2015-10-10 19:35:15 +00:00
christos
571f38dae1 Zero out the guard for bus_space_unmap before calling i915_dma_cleanup() which
calls i915_free_hws(), which then tries to unmap. Perhaps this fixes PR/50060.
2015-10-10 19:29:44 +00:00
prlw1
5a545d3afd Update comments to match previous change (avoid panic in SIOCGNATL) 2015-10-06 10:21:08 +00:00
dholland
2dfda247ec viadrmkms is not i915drmkms; from Vicente Chaves in PR 50103. 2015-09-05 23:04:01 +00:00
skrll
574285fdc2 kern/50185: dwctwo attach failure
Another hunk went walkabout during the import - reapply with a little
update
2015-09-01 14:03:00 +00:00