History log of /freebsd-current/sys/dev/drm2/drmP.h
Revision Date Author Comments
# 685dc743 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# f49fd63a 22-Sep-2022 John Baldwin <jhb@FreeBSD.org>

kmem_malloc/free: Use void * instead of vm_offset_t for kernel pointers.

Reviewed by: kib, markj
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D36549


# 91898857 29-Jul-2019 Mark Johnston <markj@FreeBSD.org>

Avoid relying on header pollution from sys/refcount.h.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation


# 592ffb21 23-Aug-2018 Warner Losh <imp@FreeBSD.org>

Revert drm2 removal.

Revert r338177, r338176, r338175, r338174, r338172

After long consultations with re@, core members and mmacy, revert
these changes. Followup changes will be made to mark them as
deprecated and prent a message about where to find the up-to-date
driver. Followup commits will be made to make this clear in the
installer. Followup commits to reduce POLA in ways we're still
exploring.

It's anticipated that after the freeze, this will be removed in
13-current (with the residual of the drm2 code copied to
sys/arm/dev/drm2 for the TEGRA port's use w/o the intel or
radeon drivers).

Due to the impending freeze, there was no formal core vote for
this. I've been talking to different core members all day, as well as
Matt Macey and Glen Barber. Nobody is completely happy, all are
grudgingly going along with this. Work is in progress to mitigate
the negative effects as much as possible.

Requested by: re@ (gjb, rgrimes)


# d157fbd5 21-Aug-2018 Matt Macy <mmacy@FreeBSD.org>

Remove legacy drm and drm2 from tree

As discussed on the MLs drm2 conflicts with the ports' version and there
is no upstream for most if not all of drm. Both have been merged in to
a single port.

Users on powerpc, 32-bit hardware, or with GPUs predating Radeon
and i915 will need to install the graphics/drm-legacy-kmod. All
other users should be able to use one of the LinuxKPI-based ports:
graphics/drm-stable-kmod, graphics/drm-next-kmod, graphics/drm-devel-kmod.

MFC: never
Approved by: core@


# 6469bdcd 06-Apr-2018 Brooks Davis <brooks@FreeBSD.org>

Move most of the contents of opt_compat.h to opt_global.h.

opt_compat.h is mentioned in nearly 180 files. In-progress network
driver compabibility improvements may add over 100 more so this is
closer to "just about everywhere" than "only some files" per the
guidance in sys/conf/options.

Keep COMPAT_LINUX32 in opt_compat.h as it is confined to a subset of
sys/compat/linux/*.c. A fake _COMPAT_LINUX option ensure opt_compat.h
is created on all architectures.

Move COMPAT_LINUXKPI to opt_dontuse.h as it is only used to control the
set of compiled files.

Reviewed by: kib, cem, jhb, jtl
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14941


# 9ed01c32 17-Apr-2017 Gleb Smirnoff <glebius@FreeBSD.org>

All these files need sys/vmmeter.h, but now they got it implicitly
included via sys/pcpu.h.


# 02fe53a4 26-Dec-2016 Michal Meloun <mmel@FreeBSD.org>

Import drm_patform.c, an implementation of non-PCI based attachment
for graphics drivers.
It will be used in upcoming driver for Nvidia Tegra boards.

MFC after: 1 month


# aa1f683b 13-Nov-2016 Michal Meloun <mmel@FreeBSD.org>

Allow DRM2 code to be built on platforms without AGP.
This patch is taken from original drm-3.8 code.

Differential Revision: https://reviews.freebsd.org/D8454
MFC after: 3 weeks


# 402e32a8 03-Sep-2016 Dimitry Andric <dim@FreeBSD.org>

Define drmP.h's __OS_HAS_AGP and __OS_HAS_MTRR macros in a defined and
portable way.

Reviewed by: dumbbell
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7770


# 740be6d7 08-Mar-2016 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm/i915: Update to match Linux 3.8.13

This update brings initial support for Haswell GPUs.

Tested by: Many users of FreeBSD, PC-BSD and HardenedBSD
Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D5554


# d6849317 22-Feb-2016 Svatopluk Kraus <skra@FreeBSD.org>

As <machine/param.h> is included from <sys/param.h>, there is no need
to include it explicitly when <sys/param.h> is already included.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D5378


# a1e1814d 22-Feb-2016 Svatopluk Kraus <skra@FreeBSD.org>

As <machine/pmap.h> is included from <vm/pmap.h>, there is no need to
include it explicitly when <vm/pmap.h> is already included.

Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D5373


# 280bcab3 04-Oct-2015 Adrian Chadd <adrian@FreeBSD.org>

drm2: a few minor fixes after r280183

* Remove obsolete drm_agp_*_memory() prototypes.
* Fix comment in drm_fops.c (outisde -> outside).
* Fix some formatting issues in drm_stub.c (spaces -> tabs).
* Add missing case statement (gen == 3) in intel_gpu_reset().
* Restore pci_enable_busmaster() call in the init path (fixes gpu hang on i945GM).
* Replace M_WAITOK with M_NOWAIT when the return value of malloc is checked (may be incorrect).

Submitted by: <s3erios@gmail.com>
Reviewed by: dumbbell
Approved by: dumbbell
Differential Revision: https://reviews.freebsd.org/D3413


# de84ba19 26-Aug-2015 Baptiste Daroussin <bapt@FreeBSD.org>

More fixes to the new macros


# 43eb73d4 26-Aug-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Fix typo in new macros


# 95fb5cf7 26-Aug-2015 Baptiste Daroussin <bapt@FreeBSD.org>

Add more DRM_* debug macros from linux 3.8.13


# d8f4b935 11-Aug-2015 Koop Mast <kwm@FreeBSD.org>

Instead of defining the actualy user and group id in the drmP.h files
define GID_VIDEO in sys/conf.h, and use it together with UID_ROOT
to define DRM_DEV_UID and DRM_DEV_GID in the drmP.h files.

So there is one place where the UID's and GID's are defined.

Submitted by: ed@
Reviewed by: ed@, dumbbell@
Differential Revision: https://reviews.freebsd.org/D3360


# 34c7eb57 08-Aug-2015 Koop Mast <kwm@FreeBSD.org>

Add a new group named 'video' with the id of 44. And make drm create
devices in /dev/dri/ with this new group.

This will allow ports and users to more easily access to these devices
for OpenGL and OpenCL support.

Reviewed by: dumbbell@
Approved by: dumbbell@
Differential Revision: https://reviews.freebsd.org/D1260


# 455fa651 17-Mar-2015 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: Update the device-independent code to match Linux 3.8.13

This update brings few features:
o Support for the setmaster/dropmaster ioctls. For instance, they
are used to run multiple X servers simultaneously.
o Support for minor devices. The only user-visible change is a new
entry in /dev/dri but it is useless at the moment. This is a
first step to support render nodes [1].

The main benefit is to greatly reduce the diff with Linux (at the
expense of an unreadable commit diff). Hopefully, next upgrades will be
easier.

No updates were made to the drivers, beside adapting them to API
changes.

[1] https://en.wikipedia.org/wiki/Direct_Rendering_Manager#Render_nodes

Tested by: Many people
MFC after: 1 month
Relnotes: yes


# 47671d1b 21-Jan-2015 Konstantin Belousov <kib@FreeBSD.org>

An update for the i915 GPU driver, which brings the code up to Linux
commit 4d93914ae3db4a897ead4b. Some related drm infrastructure
changes are imported as needed.

Biggest update is the rewrite of the i915 gem io to more closely
follow Linux model, althought the mechanism used by FreeBSD port is
different.

Sponsored by: The FreeBSD Foundation
MFC after: 2 month


# 8c68d7b2 10-Dec-2013 Aleksandr Rybalko <ray@FreeBSD.org>

Disable error message about failed attempt to attach fbd when drm2 built with
syscons.

Sponsored by: The FreeBSD Foundation


# 05ad6397 17-Nov-2013 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: Support DRM_CAP_TIMESTAMP_MONOTONIC capability

This fixes DPMS with KDE and radeonkms. Without this, the display would
freeze when the monitor is put into sleep state, and only resumes after
several dozens of minutes once the monitor is powered on again.

Tested by: Mathias Picker <Mathias.Picker@virtual-earth.de>


# 7311dad7 29-Aug-2013 Jung-uk Kim <jkim@FreeBSD.org>

'u_long' is consistently spelled 'unsigned long' in this file. Fix it.


# 9dcd4b12 29-Aug-2013 Jung-uk Kim <jkim@FreeBSD.org>

Clarify confusions between atomic_t and bitmap. Fix bitmap operations
accordingly.


# 01655b85 25-Aug-2013 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: Add missing bits to drmP.h, required by the Radeon driver

Some of the FreeBSD-specific definitions are moved to drm_os_freebsd.h.
But there's still work to do to clean it up and reduce the diff with
Linux' drmP.h.


# e27c6c9f 25-Aug-2013 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: Import drm_pcie_get_speed_cap_mask() in drm_pci.c

This comes with several PCI_VENDOR_ID_* defines which should go in a
more central place.


# 1eeccc8f 25-Aug-2013 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: Support gem_open_object() and gem_close_object() callbacks

... in struct drm_driver_info.


# 92cf4f8d 24-Aug-2013 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: In drm_mmap_single, try ttm_bo_mmap_single() before drm_gem_mmap_single()

In drivers such as the Radeon driver, the DRIVER_GEM features flag is
set but TTM is used to mmap buffer object.


# 22f61fe5 24-Aug-2013 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: Use driver-provided "use_msi" callback to determine if MSI is blacklisted

For now, keep the static array for i915. But eventually, it should be
moved to a callback in the driver itself.


# 285be846 24-Aug-2013 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: Move definition of EREMOTEIO to drmP.h

It will be used by both i915 and radeon drivers.

Add ERESTARTSYS definition at the same time.


# 74eb6a63 24-Aug-2013 Jean-Sébastien Pédron <dumbbell@FreeBSD.org>

drm: Import drm_dp_helper.c from Linux 3.8-rc3

While here, update drm_dp_helper.h to better match Linux one.


# 89f6b863 08-Mar-2013 Attilio Rao <attilio@FreeBSD.org>

Switch the vm_object mutex to be a rwlock. This will enable in the
future further optimizations where the vm_object lock will be held
in read mode most of the time the page cache resident pool of pages
are accessed for reading purposes.

The change is mostly mechanical but few notes are reported:
* The KPI changes as follow:
- VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK()
- VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK()
- VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK()
- VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED()
(in order to avoid visibility of implementation details)
- The read-mode operations are added:
VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(),
VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED()
* The vm/vm_pager.h namespace pollution avoidance (forcing requiring
sys/mutex.h in consumers directly to cater its inlining functions
using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h
consumers now must include also sys/rwlock.h.
* zfs requires a quite convoluted fix to include FreeBSD rwlocks into
the compat layer because the name clash between FreeBSD and solaris
versions must be avoided.
At this purpose zfs redefines the vm_object locking functions
directly, isolating the FreeBSD components in specific compat stubs.

The KPI results heavilly broken by this commit. Thirdy part ports must
be updated accordingly (I can think off-hand of VirtualBox, for example).

Sponsored by: EMC / Isilon storage division
Reviewed by: jeff
Reviewed by: pjd (ZFS specific review)
Discussed with: alc
Tested by: pho


# 9b7efb74 05-Mar-2013 Konstantin Belousov <kib@FreeBSD.org>

Correct the r247832.

Noted by: marius, rdivacky
MFC after: 1 month


# e6cd8542 05-Mar-2013 Konstantin Belousov <kib@FreeBSD.org>

Import the preliminary port of the TTM.

The early commit is done to facilitate the off-tree work on the
porting of the Radeon driver.

Sponsored by: The FreeBSD Foundation
Debugged and tested by: dumbbell
MFC after: 1 month


# 214bb838 05-Mar-2013 Konstantin Belousov <kib@FreeBSD.org>

Import the likely() compat macro.

Sponsored by: The FreeBSD Foundation
MFC after: 1 month


# d1c3436c 18-Aug-2012 Konstantin Belousov <kib@FreeBSD.org>

Add drm and i915 ioctl translations for 32 bit process on 64 bit host.

Submitted by: meowthink@gmail.com
MFC after: 2 weeks


# d7f7144a 28-Jun-2012 Alexander Motin <mav@FreeBSD.org>

Fix millisecond to ticks conversion in drm_msleep().

On systems with HZ=100 it caused Intel eDP video output initialization
(and Xorg startup) to take several minutes instead of several seconds.

Reviewed by: kib
MFC after: 3 days


# e27f8719 22-May-2012 Konstantin Belousov <kib@FreeBSD.org>

Add the code for new Intel GPU driver, which supports GEM, KMS and
works with new generations of GPUs (IronLake, SandyBridge and
supposedly IvyBridge).

The driver is not connected to the build yet.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week