summaryrefslogtreecommitdiff
path: root/sys/external/bsd/drm2/include
AgeCommit message (Collapse)Author
2023-05-01drm: KASSERT(A && B) -> KASSERT(A); KASSERT(B)riastradh
2023-02-24drm: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.riastradh
Discussed on tech-kern: https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html
2022-10-26ddb/db_active.h: New home for extern db_active.riastradh
This can be included unconditionally, and db_active can then be queried unconditionally; if DDB is not in the kernel, then db_active is a constant zero. Reduces need for #include opt_ddb.h, #ifdef DDB.
2022-10-25linux asm/vmware.h: Fill this in with hypercall asm.riastradh
Not sure if it's necessary to support vmcall or vmmcall -- if so, need to deal with binary patching inline asm, ugh.
2022-10-25linux asm/uaccess.h: strncpy_from_userriastradh
(which does not actually have strncpy semantics, naturally, from what I can gather)
2022-10-25linux/frame.h: STACK_FRAME_NON_STANDARDriastradh
2022-10-25linux/suspend.h: Stubs for (un)register_pm_notifier.riastradh
2022-10-25linux/pci.h: Stubs for pci_request/release_region(s).riastradh
2022-10-25linux/idr.h: Update ida_* API.riastradh
2022-10-25drm: New IRQ_WAKE_THREAD constant.riastradh
Not really wired up to anything but helps reduce diffs -- driver is responsible for making decisions based on it, corresponding to Linux's built-in `threaded irq'.
2022-10-25linux/spinlock.h: spin_lock_bh, spin_unlock_bhriastradh
Nothing special needed here; NetBSD mutex(9) at IPL_* giving spin locks already blocks `BH' (i.e., softints -- although I'm not sure softints are relevant to the one use of this in vmwgfx).
2022-10-25linux asm/io.h: Side-load linux/vmalloc.h like Linux does.riastradh
2022-10-25linux/dmapool.h: Start filling out stubs.riastradh
2022-10-25linux/module.h: MODULE_VERSIONriastradh
2022-10-17add pcie capability and read request size linux compat, some pci root supportmrg
implement support for: - pcie_capability_read_dword() - pcie_capability_read_word() - pcie_capability_write_dword() - pcie_capability_write_word() - pcie_get_readrq() - pcie_set_readrq() implement the "struct pci_dev" bus->self member by creating a minimal fake "struct pci_dev" for the pci bus itself. this is kind of gross. it checks that the current device's parent is a netbsd "pci" device, and that it has a (grand) parent "ppb" device, and then fills in the fake device based upon the pci and ppb devices. add some PCIE_LCSR2_TGT_LSPEED encodings, and map them to linux names. map several other PCIE_LCSR and PCIE_LCAP names. uncomment several pcie code segments in radeon and amdgpu. (not sure that we can test the amdgpu_si.c change, as we use the radeon version and the amdgpu version hangs on the one machine i have.) tested on amdgpu (RX550) and radeon (7750 & 3650). ok @riastradh
2022-09-20fill out more of the linux pci API compatmrg
- implement pcie_get_speed_cap(), pcie_bandwidth_available(), and pci_is_root_bus(). - expand "enum pci_bus_speed" to add PCIe 5.x and 6.x speeds. - add "enum pcie_link_width". - add defines for PCIE_LCSR_LINKSPEED (PCIe generation) and PCIE_LCSR_NLW (negotiated lane width) to pcireg.h - enable amdgpu_device_get_pcie_info() code now it works. ok riastradh@
2022-09-01drm: Fix dma fence stub so it works with locking operations.riastradh
2022-08-20x86: Move definition of struct pmap to pmap_private.h.riastradh
This makes pmap_resident_count and pmap_wired_count out-of-line functions instead of inline. No functional change intended otherwise.
2022-07-29drm: Reduce verbosity of drm kernel messages.riastradh
2022-07-19drm: Teach bus_dma_hacks.h about alpha.riastradh
Not sure if this is correct! Someone who knows alpha should vet.
2022-07-17linux/ww_mutex: Make wwm_debug member unconditional.riastradh
This way LOCKDEBUG doesn't change any structure sizes. Shuffle members around to make better use of padding, on both LP32 and LP64.
2022-07-17drm: Ifdef out devm_* stuff rather than stub it out.riastradh
Stub is not helpful, and this pollutes the symbol namespace.
2022-07-17linux: Add missing symbol namespacing for tasklet, sync_file.riastradh
2022-07-09linux/hdmi: Use ssize_t for all hdmi_*_infoframe_pack functions.riastradh
2022-07-09linux/hdmi: Handle unpacking audio frames too. Sort by number.riastradh
2022-07-09linux/hdmi: Make some private functions static.riastradh
2022-07-09linux/hdmi: Fix missing hdmi_avi_infoframe_init namespacing.riastradh
2022-07-09linux/hdmi.h: Split out logic into .c file.riastradh
Shoulda done this ages ago.
2022-07-09linux/hdmi.h: Implement hdmi_infoframe_log.riastradh
2022-07-09linux/hdmi.h: Fix spd infoframe header version.riastradh
Possibly relevant to PR kern/56740.
2022-07-02Add a missing ';'skrll
2022-07-02drm: Rewrite drm_gem_cma_helper.h from scratch.riastradh
The header file was originally part of drm with no licence text, which I took to mean BSD-licensed like the rest of the Linux drm code base is by default -- everything in Linux under include/drm and drivers/gpu/drm not otherwise marked. In 2017, a tree-wide automated change was applied to Linux which caused an SPDX GPL header to appear in drm_gem_cma_helper.h. When I asked the drm developers about this in drm files, they explained that it was an automated process and many of the SPDX headers were wrong, so when excluding GPL files in drm updates, I heeded the actual GPL vs BSD/MIT licence text and revision history rather than the SPDX headers. I excluded drm_gem_cma_helper.c because it was clearly originally GPL as an exception to the default BSD licence under Linux's drivers/gpu/drm, and Jared reimplemented the API for ues by some (NetBSD, BSD-licensed) Arm display drivers. During an update after that, the header file was lost in the merge shuffle and I copied it back in without noticing the SPDX header file. In retrospect, I see now that it's not clear what the intent was: the .c file was obviously GPL, and maybe the .h file was supposed to be too but it wasn't carved out as an exception among the drm code. To keep our story simpler, I just drafted a new .h file that provides a compatible subset of the interface we use, derived from the .c file Jared wrote, written according to several deterministic rules based on KNF that yield a non-creative specification of the compatible interface: 1. $NetBSD$ RCS id 2. standard TNF copyright statement 3. header guard derived from #include file name 4. minimal #includes, grouped and sorted according to KNF 5. forward declaration of structs, sorted lexicographically 6. definitions of structs, members sorted lexicographically by name 7. downcasting macros, written in KNF and sorted lexicographically 8. minimal extern variable declarations, sorted lexicographically 9. minimal, function prototypes, written in KNF and sorted lexicographically `Minimal' means added one by one, according to the errors issued by the compiler (and in the case of #includes, according to the correct header file for the missing types or function prototypes being used), until the compiler is formally satisfied. Any changes to this will, unless otherwise marked, be covered by the standard TNF licence now on the file.
2022-05-28Let radeon DRM driver build on ports that lack ACPImanu
2022-04-09linux/ratelimit: Convert to membar_acquire and atomic_store_release.riastradh
Simplify while here: atomic_swap is enough, no need for atomic_cas. (Maybe drm'll run faster on sparcv8 this way...!)
2022-04-09linux/llist: Use membar_release and membar_datadep_consumer.riastradh
No need for membar_acquire here! Loads are all data-dependent.
2022-04-09linux/kref: Fix memory barriers and use membar_release/acquire.riastradh
2022-03-18drm: Use getticks(), not hardclock_ticks.riastradh
2022-02-27linux: Define PCI_CLASS_DISPLAY_OTHER, wanted by radeon/amdgpu.riastradh
2022-02-27linux: Define acpi_size as alias for ACPI_SIZE.riastradh
2022-02-27drm: Move Linux ACPI case aliases to new nbsd-namespace-acpi.h.riastradh
2022-02-27drm: Omit needless conditionals around #include "acpica.h".riastradh
2022-02-27drm: Move acpi_check_dsm &c. from intel_acpi.c to new linux_acpi.c.riastradh
2022-02-27linux: New rb_move(&to, &from) to replace `to = from'.riastradh
NetBSD rbtree(3) is not relocatable, so this extra step is needed. Unfortunately, there's no easy way to automate detection of where we need to apply this in ported code...
2022-02-27linux: Actually do post-order tree traversal.riastradh
Requires breaking the rbtree(3) abstraction, but this is necessary because the body of the loop often frees the element, so as is we had a huge pile of use-after-free going on. Requires changing struct interval_tree_node's rbnode member to match the Linux name, since we now use container_of here, and radeon relies on this.
2022-02-26drm2: do not try to return a value from a void functionrillig
lint complained: vmalloc.h(79): error: void function vfree cannot return value [213] No functional change.
2022-02-17drm/vmwgfx: First draft. Passes make depend, doesn't build yet.riastradh
2022-02-14linux: Don't skip the last node in rbtree iteration.riastradh
2022-02-14drm: Delete mmiowb.riastradh
This no longer exists in Linux.
2021-12-27drm: Define TASK_INTERRUPTIBLE so we can reduce diffs a little.riastradh
2021-12-19linux: Define need_resched as alias for preempt_needed.riastradh
No need to open-code this (nor to do it slightly wrong).