riastradh
cc7d357c56
Fix header guard name.
2014-09-17 15:46:57 +00:00
riastradh
0f679d06ed
Use %hhx for uint8_t, not %hx.
2014-09-17 15:41:56 +00:00
riastradh
8715d36a14
Don't redefine __u64 &c. here if we included <linux/types.h>.
2014-09-17 15:36:04 +00:00
riastradh
5c57068fcc
Fix mistakes in Linux ww_mutex code.
...
I wrote some cases for the WW_WANTOWN state forgetting that there is
an acquisition context associated with it.
- On acceptance of a lock, allow WW_WANTOWN as well as WW_CTX.
- On unlock when WW_WANTOWN, decrement the context's acquire count.
Fixes KASSERT(ctx->wwx_acquired == 0) failure in ww_acquire_fini, and
would fix unlikely but possible kasserts in ww_mutex_lock* if another
lwp swoops in to lock without a context quickly enough.
While here, add some comments and kassert up the wazoo.
2014-09-15 20:24:55 +00:00
riastradh
6585c4c418
Fix module build of drmkms.
2014-09-14 20:08:21 +00:00
riastradh
1a497622d8
Split drm ttm config into a separate file.
2014-09-14 19:06:00 +00:00
riastradh
faa04ab45f
Disable VGA plane after vga_cndetach.
...
Disabling the VGA plane requires access to the VGA registers, which
don't become available until vga_cndetach. Oops!
2014-09-14 16:02:15 +00:00
riastradh
9b266c96fa
Omit vestigial notes on porting before the API was made to match.
2014-09-13 00:33:45 +00:00
riastradh
ddbd581e58
Use KASSERTMSG in ww_acquire_fini to show number of locks held.
2014-09-13 00:32:36 +00:00
skrll
7c2a9a0993
Improve USB debugging with USBHIST based on KERNHIST.
...
Convert some DPRINTFs to USBHIST_LOG and allow usbdebug, ehcidebug and
umassdebug to be changed via sysctl.
Remove the #define mess in usb.h.
This was started by mrg@ and updated by reinoud@
2014-09-12 16:40:38 +00:00
riastradh
53f64d0bd0
We dropped vmobjlock, so reacquire it before uvmfault_unlockall.
2014-09-10 18:24:16 +00:00
matt
312da988e7
Change enum pipe to enum i915_pipe
...
(enum pipe uses too global of a tag and conflicts with struct pipe).
2014-09-07 23:03:11 +00:00
mrg
ae42b0a717
test some pointers and return EINVAL instead of blindly assuming
...
they're valid. converts kernel crashes in to app failures.
GL is still not working on evergreen for me.
2014-09-06 18:43:00 +00:00
matt
0886859292
Rename enum pipe to enum pipe so it won't conflcit with struct pipe.
2014-09-05 09:40:44 +00:00
skrll
df4a329d05
Adapt the NAK holdoff scheme for FS/LS devices from the Raspberry Pi
...
Foundation driver.
Should fix PR/49019 - RPI: interrupt storm when url0 is up
2014-09-03 10:00:08 +00:00
macallan
f80ae09972
dwc2_hubd appears to be unused so #if 0 it in order to appease clang
2014-09-02 23:26:20 +00:00
jmcneill
e257bf702a
expose vchi_get_peer_version
2014-09-02 21:38:28 +00:00
skrll
58bae7ccc1
Use IPL_SCHED for dwctwo(4) - no need for the KERNEL_LOCK.
2014-09-02 14:55:56 +00:00
jmcneill
95c59df5a7
IPL_VM -> IPL_SCHED, and callout_stop -> callout_halt
2014-09-02 09:55:48 +00:00
jmcneill
fdfb248720
IPL_VM -> IPL_SCHED
2014-09-02 09:54:20 +00:00
riastradh
587af62e94
Don't forget to lock wq_lock around handling wq_delayed.
2014-08-29 15:22:18 +00:00
mrg
cb87482f69
hack around an evergreen attach crash for now: provide a hard coded
...
name for the i2c.
2014-08-28 20:40:57 +00:00
riastradh
a2eca9ebfa
Make Linux io_mapping actually work.
...
Can't use bus_space_map/bus_space_unmap in interrupt context, where
Linux uses this io_mapping abstraction. Instead, do uvm_km_alloc up
front and then use bus_space_mmap/pmap_kenter_pa to map it.
XXX Should bus_space_reserve the region (but that's x86-only for now).
XXX Should use direct map if possible.
XXX Should set an MTRR WC too in case of direct map or no PAT.
2014-08-28 13:45:59 +00:00
riastradh
05033b64b7
Lock irq_lock around i915_error_wake_up in i915_error_work_func.
2014-08-27 23:30:26 +00:00
riastradh
ff92100382
Use direct map if available in linux_kmap.
...
Yields 20% increase in glxgears framerate.
2014-08-27 16:41:50 +00:00
riastradh
d9db38b5ac
Tweak style.
...
No functional change intended. Assembly differences appear to be
only related to kassert line numbers.
2014-08-27 16:19:54 +00:00
riastradh
f21065750d
__diagused, not __unused.
2014-08-27 16:11:24 +00:00
riastradh
0e9b339d0c
Assert sleepable in Linux kmap/kunmap.
2014-08-27 16:09:16 +00:00
riastradh
809fbbc14a
Simplify empty test for linux_kmap_entries.
2014-08-27 16:06:38 +00:00
riastradh
ee81707c83
Convert linux_kmap_lock to an adaptive lock.
...
kmap/kunmap can't be used in interrupt context anyway, so there is no
need for this to be a spin lock.
2014-08-27 16:05:38 +00:00
riastradh
84eae6ff7f
Fix two mistakes in previous.
...
- i915_error_wake_up is given irq_lock, so it need not take that.
- Unlock irq_lock on exit from i915_hangcheck_elapsed if ring_hung.
XXX This introduces the lock order irq_lock -> pending_flip_lock.
How about just using irq_lock for pending flips?
2014-08-27 15:31:08 +00:00
riastradh
d17e3cf8d3
Fix i915 locking around error handling.
2014-08-27 13:21:15 +00:00
riastradh
89b4554f68
Partial viadrm2 snapshot.
...
To do:
- autoconf attachment (shouldn't be hard)
- viafb (maybe steal unichromefb and adapt attachment structure)
- actually run it (no hardware here)
2014-08-26 17:28:14 +00:00
riastradh
894179c374
Add Linux timer_pending and del_timer.
2014-08-26 17:26:05 +00:00
riastradh
3b88c214c8
Return 0, not uninitialized, if the condition is already true.
2014-08-26 00:48:29 +00:00
riastradh
fd20828015
Another round of nouveau whack-a-mole.
2014-08-23 08:03:33 +00:00
riastradh
f7a0cd6406
Add some Linux list routines.
2014-08-20 15:26:52 +00:00
riastradh
f40a74cd43
Drop take the {ttm,gem} vmobjlock in the fault handler.
...
- We don't need this lock.
- uvm does nothing between taking it and calling the fault handler.
- Now that the uvm_aobj shares vmobjlock with the {ttm,gem} uvm
object, we must not hold the lock when we call uvm_obj_wirepages on
the uvm_aobj.
XXX pullup to netbsd-7
2014-08-20 13:48:08 +00:00
riastradh
0d847ab144
Restore Intel opregion stuff.
2014-08-18 16:55:34 +00:00
riastradh
5407cca9a3
Simplify previous.
2014-08-18 02:43:27 +00:00
riastradh
6f817c5016
For gem and ttm objects backed by uvm_aobjs, share the vmobjlock.
...
XXX pullup to 7
2014-08-18 01:21:03 +00:00
riastradh
b1a057f4fd
bus_space_mmap cookies are not paddrs, so don't pmap_enter them!
2014-08-18 01:17:34 +00:00
riastradh
76be0e7906
Zero ttm_agp objects on creation.
2014-08-14 16:50:22 +00:00
riastradh
1a58402320
Use ttm_dma_tt_init in ttm_agp_tt_create so we can use ttm_bus_dma.
2014-08-14 16:47:52 +00:00
riastradh
22405d4653
Fix shifts & masks in Linux pci_read_config_{word,byte}.
2014-08-13 20:56:21 +00:00
joerg
190e92d8bd
Import compiler-rt r215309. Extends 128bit IEEE support in soft-float,
...
uses Thumb mode by default on ARM when available and fixes a bug in the
division code for ARMs with hardware integer division.
2014-08-10 10:14:03 +00:00
jmcneill
95758279dd
no need to call drm_fb_helper_set_config after genfb attaches, as the setmode callback is called by genfb_attach
2014-08-09 12:46:07 +00:00
riastradh
e5c9e28826
Multiply by PAGE_SIZE, not PAGE_SHIFT!
2014-08-09 00:18:58 +00:00
jmcneill
128b925846
add a pmf shutdown handler to switch genfb into polling mode
2014-08-08 02:27:40 +00:00
jmcneill
51a894e61c
provide a setmode callback for genfb; with this change, vt switching in and out of X works
2014-08-06 22:16:38 +00:00