summaryrefslogtreecommitdiff
path: root/sys/external/bsd/drm2/include/drm
AgeCommit message (Collapse)Author
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-07-19drm: Teach bus_dma_hacks.h about alpha.riastradh
Not sure if this is correct! Someone who knows alpha should vet.
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.
2021-12-19drm: Mark variable as used only by trace point.riastradh
2021-12-19drm: Fix comments about wait return values.riastradh
2021-12-19drm: Ensure DRM_*WAIT* never counts down from MAX_SCHEDULE_TIMEOUT.riastradh
This faux timeout means `wait forever'.
2021-12-19i915: Make intel_gtt_get prototype match Linux.riastradh
2021-12-19amdgpu: Another pass through.riastradh
amdgpu_object.c amdgpu_pci.c amdgpu_pm.c amdgpu_polaris10_smumgr.c amdgpu_pp_psm.c amdgpu_ppatomctrl.c amdgpu_ppatomfwctrl.c amdgpu_process_pptables_v1_0.o amdgpu_psp.o amdgpu_psp_v10_0.c amdgpu_psp_v11_0.c amdgpu_psp_v12_0.c amdgpu_psp_v3_1.c amdgpu_ras.c amdgpu_ras_eeprom.c amdgpu_rc_calc.c amdgpu_rc_calc_dpi.c amdgpu_ring.c amdgpu_rlc.c amdgpu_rn_clk_mgr.c amdgpu_sdma_v3_0.c amdgpu_sdma_v4_0.c amdgpu_sdma_v5_0.c amdgpu_si.c amdgpu_si_dma.c amdgpu_si_dpm.c amdgpu_smu.c amdgpu_smu10_hwmgr.c amdgpu_smu7_hwmgr.c amdgpu_smu8_hwmgr.c amdgpu_smu8_smumgr.c amdgpu_smu_v11_0.c (and a sprinkling of consts) amdgpu_smu_v11_0_i2c.c amdgpu_soc15.c amdgpu_tonga_smumgr.c amdgpu_ttm.c amdgpu_ucode.c amdgpu_uvd.c amdgpu_uvd_v5_0.c amdgpu_uvd_v6_0.c amdgpu_uvd_v7_0.c amdgpu_vce.c amdgpu_vce_v2_0.c amdgpu_vce_v4_0.c amdgpu_vcn_v1_0.c amdgpu_vcn_v2_0.c amdgpu_vcn_v2_5.c amdgpu_vega10_hwmgr.c amdgpu_vega10_powertune.c amdgpu_vega10_processpptables.c amdgpu_vega10_reg_init.c amdgpu_vega12_hwmgr.c amdgpu_vega20_hwmgr.c amdgpu_vega20_ppt.c amdgpu_vega20_reg_init.c amdgpu_vi.c amdgpu_virt.c amdgpu_vram_mgr.c amdgpu_xgmi.c -- disable (for now?) amdgpufb.c
2021-12-19drm: Set IPL_DRM to IPL_VM, not IPL_TTY.riastradh
We might want some of this stuff to work at higher IPL when dealing with ddb during crashes, but...everything else in drm uses IPL_VM, including Linux spin locks, which means we've been failing to block interrupts during spin locks for the entire time this code has existed...which is a little embarrassing.
2021-12-19drm: Work around client modeset mutex for entering ddb.riastradh
Linux introduced a wait lock (`mutex') around access to the drm client modesets, even for drm_fb_helper_debug_enter/leave -- which happen when we're crashing and can't wait for the scheduler to let whatever thread might hold a mutex continue to run. This really shouldn't be a wait lock, but disentangling the lock order and sleeping allocations is difficult, so let's just hope that it's safe to access unlocked in ddb for now.
2021-12-19drm: Fix index confusion and rename variables to clarify.riastradh
2021-12-19drm: Add drm_vma_offset_exact_lookup_locked.riastradh
2021-12-19Make intel_psr.c buildriastradh
netbsd-ify Stub out intel_lpe_audio.c (for now?). Hammer intel_opregion.c into shape. Hack up intel_lrc.c Adapt intel_reset.c Stub out intel_region_lmem.c Adapt intel_ring_submission.c Adapt intel_rps.c Adapt intel_sdvo.c Adapt intel_runtime_pm.c Adapt intel_sideband.c Adapt intel_sprite.c Adapt intel_tv.c Adapt intel_tc.c Adapt intel_sseu.c Adapt intel_timeline.c Adapt intel_uc_fw.c and fix typo Fix up intel_uncore.c intel_vga.c intel_wakeref.c intel_vdsc.c intel_wopcm.c intel_workarounds.c i915_globals.c Fix up intelfb.c Stub out intel_guc_log.c Stub out intel_dsi_dcs_backlight.c i915_perf.c intel_hdmi.c intel_hdcp.c Author: Maya Rashish <maya@NetBSD.org> Committer: Taylor R Campbell <riastradh@NetBSD.org>
2021-12-19i915: ggttriastradh
2021-12-19i915: another whack at itriastradh
2021-12-19drm: Let's go one segment at a time, not two, shall we?riastradh
2021-12-19drm: Another pass over i915 and some supporting logic.riastradh
This makes a shim around sg_table, which essentially represents two things: 1. an array of pages (roughly corresponding to bus_dma_segment_t[]) 2. an array of DMA addresses stored in a bus_dmamap_t Both parts are optional; different parts of i915 use sg_tables to pass around one or both of the two parts. This helps to reduce the ifdefs by quite a bit, although it's not always clear which part of an sg_table any particular interface is actually using which is why I was reluctant to do this before.
2021-12-19drm: Nix use of uvm pglist. Just use arrays of page pointers.riastradh
2021-12-19i915_mei_hdcp_interface.h from openbsdriastradh
Author: Maya Rashish <maya@NetBSD.org> Committer: Taylor R Campbell <riastradh@NetBSD.org>
2021-12-19Reimplement task barrier without semaphores.riastradh
2021-12-19Make this const.riastradh
(Why did I rewrite drm_encoder_slave.h?)
2021-12-19drm_os_netbsd.h is no moreriastradh
2021-12-19drm_writeback stubsriastradh
2021-12-19Start drm_client.h stubs.riastradh
2021-12-19Update drm_sysfs stubs.riastradh
2021-12-19Delete drmP.h. Good riddance!riastradh
2021-12-19Empty out drm_os_netbsd.h.riastradh
2021-12-19Fix up includes of <sys/vmem.h>.riastradh
2021-12-19Give some more declarations a new home.riastradh
2021-12-19Move drm_io_mapping_* to its own header file.riastradh
2021-12-19Move files which are gone upstream out of dist/.riastradh
2021-12-19match linux side-loadingriastradh
Author: Maya Rashish <maya@NetBSD.org>
2021-12-19nbsd-namespace, and provide CONFIG_LOCKDEP (disabled)riastradh
Author: Maya Rashish <maya@NetBSD.org>
2021-12-19provide DRM_FILE_PAGE_OFFSET_{START,SIZE}riastradh
Author: Maya Rashish <maya@NetBSD.org>
2021-12-19Side-load linux/mm.h from the same headers as linuxriastradh
Author: Maya Rashish <maya@NetBSD.org>
2021-12-19stub drm_writeback_set_fbriastradh
Author: Maya Rashish <maya@NetBSD.org>
2021-12-19provide a stub drm_writeback_prepare_job, knfriastradh
Author: Maya Rashish <maya@NetBSD.org>
2021-12-19Remove GPL header for which we have our own coderiastradh
stub drm_writeback_cleanup_job Author: Maya Rashish <maya@NetBSD.org>
2021-12-19Create stub headers for files included by drm code.riastradh
Author: Maya Rashish <maya@NetBSD.org>
2021-12-19Update intel gtt API.riastradh
TODO: Find where the stolen memory base is in agp_i810.
2021-12-19Linux wants a `readonly' member in struct drm_vma_offset_node.riastradh
2021-12-19Constify some prototypes for great constance.riastradh
2021-12-19Fix typo: list lessees, not list leases.riastradh
2021-12-19drm_vma_manager deals in struct drm_file, not struct file, now.riastradh
Kinda inconvenient because it means we'll need to patch filp->private_data with filp->f_data in various places...
2021-12-19Tweak includes and forward decls.riastradh
2021-12-19More drm_writeback stubs.riastradh
2021-12-19Declare drm_lease_destroy.riastradh
2021-12-19Disable GPL drm_writeback.c, minimal stub for drm_writeback.h.riastradh
2021-12-19Unfinished local implementation of GPL drm_lease.c.riastradh