summaryrefslogtreecommitdiff
path: root/sys/external/bsd/drm2
AgeCommit message (Collapse)Author
2023-06-03adapt to ${CC_WNO_MAYBE_UNINITIALIZED}lukem
Use ${CC_WNO_MAYBE_UNINITIALIZED} instead of the older style more complex expressions. Remove workarounds if they were for a specific version of gcc < 10.
2023-06-03adapt to ${CC_WNO_IMPLICIT_FALLTHROUGH}lukem
Use ${CC_WNO_IMPLICIT_FALLTHROUGH} instead of the older style more complex expressions.
2023-05-25amdgpu: Fix mostly harmless merge botch.riastradh
Avoids confusing error message that should have been confined to an error branch.
2023-05-22Use the offset in mmap calculations.nat
It fixes wsfb(4) when used with intelfb(4). Ok riastradh@ XXX pullup-10
2023-05-12i915: Avoid dereferencing null fence if resv has changed.riastradh
PR kern/57402 XXX pullup-10
2023-05-01drm: KASSERT(A && B) -> KASSERT(A); KASSERT(B)riastradh
2023-03-07remove "nouveau" from a comment. noted by jmcneill.mrg
2023-03-07radeon: Kick out genfb on firmware framebuffer before initializing.mrg
this is the same change as nouveau_pci.c:1.37, and should fix at least PR#56714 and i thought at least another PR i can't find right now. it fixes at least 2 different radeon cards for me on UEFI booted system. XXX: pullup-10 also include the original change: http://mail-index.netbsd.org/source-changes/2023/03/01/msg143606.html
2023-03-01nouveau: Kick out genfb on firmware framebuffer before initializing.riastradh
PR kern/53126
2023-03-01amdgpu: Fix bogus loop invariant assertions in amdgpu_gart_map.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
2023-02-21drm: Teach dmabuf to handle lseek.riastradh
Needed by libdrm_amdgpu. Based on patch from Jeff Frasca -- thanks! XXX pullup-10
2023-02-21amdgpu: Fix scale factor for 64-bit doorbell indexing.riastradh
The register is 64 bits wide, but the indexing is for 32-bit quantities (and presumably index must be even here). Found by Jeff Frasca -- thanks!
2022-10-28drm(4): Mark PCI interrupt handlers as MP-safe.riastradh
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-25vmwgfx(4): Partially adapt rbtree.riastradh
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-25vmwgfx(4): Hand-cruft threaded irq with a workqueue(9).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-25vmwgfx(4): Port fd creation.riastradh
2022-10-25vmwgfx(4): Misc porting too.riastradh
- inl/outl -> bus_space_read/write - struct device for DMA stuff -> bus_dma_tag_t - spin_lock_destroy (and don't hold spin lock across kfree) - driver load/unload, fops, &c. - drm_irq_install/uninstall
2022-10-25vmwgfx(4): Use bus_dma tag, not struct device, for dma_pool shims.riastradh
2022-10-25vmwgfx(4): Convert fence_queue and fifo_queue to drm_waitqueue_t.riastradh
2022-10-25vmwgfx(4): Convert cmdbuf to drm_waitqueue_t.riastradh
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-25vmwgfx(4): dma_alloc/free_coherent -> bus_dma_*riastradh
2022-10-25linux/module.h: MODULE_VERSIONriastradh
2022-10-25vmwgfx: Set some warning and config flags. Nix vmwgfx_fb.c for now.riastradh
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-10-15i915: Suspend ioctls while device is suspended.riastradh
2022-10-15drm: New mechanism to suspend ioctls during system suspend.riastradh
drm drivers must opt into this by calling drm_suspend_ioctl in their driver suspend routine, and drm_resume_ioctl in their driver resume routine. This is a stop-gap measure -- it would be better to fill in the pm_runtime_* API with new pmf(9) hooks to acquire/release references to devices for coordinating with suspend/resume, but getting the details right is tricky, and this stop-gap is enough to get i915 suspend/resume to work reliably on my Kaby Lake laptop. Rather than wait until I've got all the details right, let's just go with this stop-gap for now.
2022-10-08amdgpu: Remove an #ifdef __NetBSD__ around drm_waitqueue_t.riastradh
No functional change intended.
2022-09-25vmwgfxfb(4): Omit now-needless is_console hack.riastradh
This has been resolved in drmfb.
2022-09-22i915: Make sure to call i915_drm_prepare too on suspend.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-13i915: Fix error branches of execbuffer vma pinning.riastradh
PR kern/56591
2022-09-01drmfb: Rework console detection and takeover.riastradh
While here, simplify logic by removing an unreachable error branch so we never have to contemplate unwinding claiming of the console.
2022-09-01drmfb: Take is_console property from parent, not from self.riastradh
The parent is the pci or platform device that firmware knows about. The `drmfb' device is more of a fictitious invention of the drm stack that exists for the convenience of the genfb abstraction which needs device_private to be a struct genfb_softc. Let's see if this does any better than the last attempt to rework the logic here.
2022-09-01i915: Stop pretending the GTT size is zero as workaround.riastradh
Whatever bug this was I don't know how to reproduce any more. Convinces Mesa iris_dri.so to work on this kernel.
2022-09-01drm_mm: Give up on trying to phrase find_hole with public rbtree API.riastradh
Firefox works with WebGL on Mesa iris_dri.so now.
2022-09-01drm: Fix dma fence stub fix so the lock is actually initialized.riastradh
Tested but forgot to amend change before exporting to CVS again.
2022-09-01drm: Fix dma fence stub so it works with locking operations.riastradh
2022-09-01drm_mm: Match __drm_mm_interval_first semantics.riastradh
- Use the right search criterion. - Return &mm->head_node, not NULL, if not found.