History log of /openbsd-current/sys/dev/pci/drm/radeon/radeon.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.29 16-Jan-2024 jsg

update drm to linux 6.6.12

Thanks to the OpenBSD Foundation for sponsoring this work.


Revision tags: OPENBSD_7_3_BASE OPENBSD_7_4_BASE
# 1.28 01-Jan-2023 jsg

update drm to linux 6.1.2

new hardware support includes

AMD
Raphael, Ryzen 7000 desktop, gfx1036/GC 10.3.6
Mendocino, Ryzen & Athlon 7020 Series mobile APU, gfx1037/GC 10.3.7
Navi 31, gfx1100 dGPU, GC 11.0.0, Radeon RX 7900 XT/XTX
gfx1101 dGPU
gfx1102 dGPU
gfx1103 APU

Thanks to the OpenBSD Foundation for sponsoring this work.


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.27 14-Jan-2022 jsg

update drm to linux 5.15.14

new hardware support includes

Intel
ehl/Elkhart Lake (embedded)
jsl/Jasper Lake (atom)
rkl/Rocket Lake (desktop)

AMD
van gogh APU (gfx1033)
yellow carp / rembrandt APU (gfx1035?)
Ryzen 6000 APU
navy flounder / navi 22 (gfx1031)
RX 6700, RX 6700 XT, RX 6700M, RX 6800M, RX 6850M XT
dimgrey cavefish / navi 23 (gfx1032)
Pro W6600, Pro W6600M, RX 6600, RX 6600 XT, RX 6600M,
RX 6600S, RX 6650M, RX 6650M XT, RX 6700S, RX 6800S
beige goby / navi 24 (gfx1034)
RX 6500 XT, RX 6400, RX 6500M, RX 6300M

Thanks to the OpenBSD Foundation for sponsoring this work
niklas@ for helping with ttm and amdgpu and patrick@ for adapting
rockchip drm.


Revision tags: OPENBSD_7_0_BASE
# 1.26 07-Jul-2021 jsg

update drm to linux 5.10.47

hardware support changes include
inteldrm: better support for tiger lake
amdgpu: support for navi12, navi21 "sienna_cichlid", arcturus
amdgpu: support for cezanne "green sardine" ryzen 5000 apu

Thanks to the OpenBSD Foundation for sponsoring this work,
patrick@ for helping adapt rockchip drm, kettenis@ and mpi@
for uvm discussions and various testers.


Revision tags: OPENBSD_6_9_BASE
# 1.25 28-Oct-2020 kettenis

Use the function from <linux/io.h> for all "Memory Space" IO. This reduces
the diffs to Linux and makes sure we use memory barriers in the same way
as Linux does.

ok jsg@ (who added the doorbell changes)


Revision tags: OPENBSD_6_8_BASE
# 1.24 08-Jun-2020 jsg

update drm to linux 5.7

adds kernel support for
amdgpu: vega20, raven2, renoir, navi10, navi14
inteldrm: icelake, tigerlake

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping, patrick@ for helping adapt rockchip drm and many developers for
testing.


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.23 04-May-2019 kettenis

Improve the interaction between efifb(4), inteldrm(4) and radeondrm(4)
when we have a serial console by introducing the notion of a "primary"
graphics device. The primary graphics device is the one set up and
used by firmware (BIOS, UEFI).

The goal is to make sure that wsdisplay0 and drm0 reliably attach to
the primary graphics device such that X works out of the box even
if you have multiple cards or if you are using a serial console.

This also fixes the situation where inteldrm(4) or radeondrm(4) would
take over the console on UEFI systems even if the kernel was booted
with a serial console.

ok jsg@


# 1.22 14-Apr-2019 jsg

Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.

Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)

This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


# 1.28 01-Jan-2023 jsg

update drm to linux 6.1.2

new hardware support includes

AMD
Raphael, Ryzen 7000 desktop, gfx1036/GC 10.3.6
Mendocino, Ryzen & Athlon 7020 Series mobile APU, gfx1037/GC 10.3.7
Navi 31, gfx1100 dGPU, GC 11.0.0, Radeon RX 7900 XT/XTX
gfx1101 dGPU
gfx1102 dGPU
gfx1103 APU

Thanks to the OpenBSD Foundation for sponsoring this work.


Revision tags: OPENBSD_7_1_BASE OPENBSD_7_2_BASE
# 1.27 14-Jan-2022 jsg

update drm to linux 5.15.14

new hardware support includes

Intel
ehl/Elkhart Lake (embedded)
jsl/Jasper Lake (atom)
rkl/Rocket Lake (desktop)

AMD
van gogh APU (gfx1033)
yellow carp / rembrandt APU (gfx1035?)
Ryzen 6000 APU
navy flounder / navi 22 (gfx1031)
RX 6700, RX 6700 XT, RX 6700M, RX 6800M, RX 6850M XT
dimgrey cavefish / navi 23 (gfx1032)
Pro W6600, Pro W6600M, RX 6600, RX 6600 XT, RX 6600M,
RX 6600S, RX 6650M, RX 6650M XT, RX 6700S, RX 6800S
beige goby / navi 24 (gfx1034)
RX 6500 XT, RX 6400, RX 6500M, RX 6300M

Thanks to the OpenBSD Foundation for sponsoring this work
niklas@ for helping with ttm and amdgpu and patrick@ for adapting
rockchip drm.


Revision tags: OPENBSD_7_0_BASE
# 1.26 07-Jul-2021 jsg

update drm to linux 5.10.47

hardware support changes include
inteldrm: better support for tiger lake
amdgpu: support for navi12, navi21 "sienna_cichlid", arcturus
amdgpu: support for cezanne "green sardine" ryzen 5000 apu

Thanks to the OpenBSD Foundation for sponsoring this work,
patrick@ for helping adapt rockchip drm, kettenis@ and mpi@
for uvm discussions and various testers.


Revision tags: OPENBSD_6_9_BASE
# 1.25 28-Oct-2020 kettenis

Use the function from <linux/io.h> for all "Memory Space" IO. This reduces
the diffs to Linux and makes sure we use memory barriers in the same way
as Linux does.

ok jsg@ (who added the doorbell changes)


Revision tags: OPENBSD_6_8_BASE
# 1.24 08-Jun-2020 jsg

update drm to linux 5.7

adds kernel support for
amdgpu: vega20, raven2, renoir, navi10, navi14
inteldrm: icelake, tigerlake

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping, patrick@ for helping adapt rockchip drm and many developers for
testing.


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.23 04-May-2019 kettenis

Improve the interaction between efifb(4), inteldrm(4) and radeondrm(4)
when we have a serial console by introducing the notion of a "primary"
graphics device. The primary graphics device is the one set up and
used by firmware (BIOS, UEFI).

The goal is to make sure that wsdisplay0 and drm0 reliably attach to
the primary graphics device such that X works out of the box even
if you have multiple cards or if you are using a serial console.

This also fixes the situation where inteldrm(4) or radeondrm(4) would
take over the console on UEFI systems even if the kernel was booted
with a serial console.

ok jsg@


# 1.22 14-Apr-2019 jsg

Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.

Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)

This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


# 1.27 14-Jan-2022 jsg

update drm to linux 5.15.14

new hardware support includes

Intel
ehl/Elkhart Lake (embedded)
jsl/Jasper Lake (atom)
rkl/Rocket Lake (desktop)

AMD
van gogh APU (gfx1033)
yellow carp / rembrandt APU (gfx1035?)
Ryzen 6000 APU
navy flounder / navi 22 (gfx1031)
RX 6700, RX 6700 XT, RX 6700M, RX 6800M, RX 6850M XT
dimgrey cavefish / navi 23 (gfx1032)
Pro W6600, Pro W6600M, RX 6600, RX 6600 XT, RX 6600M,
RX 6600S, RX 6650M, RX 6650M XT, RX 6700S, RX 6800S
beige goby / navi 24 (gfx1034)
RX 6500 XT, RX 6400, RX 6500M, RX 6300M

Thanks to the OpenBSD Foundation for sponsoring this work
niklas@ for helping with ttm and amdgpu and patrick@ for adapting
rockchip drm.


Revision tags: OPENBSD_7_0_BASE
# 1.26 07-Jul-2021 jsg

update drm to linux 5.10.47

hardware support changes include
inteldrm: better support for tiger lake
amdgpu: support for navi12, navi21 "sienna_cichlid", arcturus
amdgpu: support for cezanne "green sardine" ryzen 5000 apu

Thanks to the OpenBSD Foundation for sponsoring this work,
patrick@ for helping adapt rockchip drm, kettenis@ and mpi@
for uvm discussions and various testers.


Revision tags: OPENBSD_6_9_BASE
# 1.25 28-Oct-2020 kettenis

Use the function from <linux/io.h> for all "Memory Space" IO. This reduces
the diffs to Linux and makes sure we use memory barriers in the same way
as Linux does.

ok jsg@ (who added the doorbell changes)


Revision tags: OPENBSD_6_8_BASE
# 1.24 08-Jun-2020 jsg

update drm to linux 5.7

adds kernel support for
amdgpu: vega20, raven2, renoir, navi10, navi14
inteldrm: icelake, tigerlake

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping, patrick@ for helping adapt rockchip drm and many developers for
testing.


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.23 04-May-2019 kettenis

Improve the interaction between efifb(4), inteldrm(4) and radeondrm(4)
when we have a serial console by introducing the notion of a "primary"
graphics device. The primary graphics device is the one set up and
used by firmware (BIOS, UEFI).

The goal is to make sure that wsdisplay0 and drm0 reliably attach to
the primary graphics device such that X works out of the box even
if you have multiple cards or if you are using a serial console.

This also fixes the situation where inteldrm(4) or radeondrm(4) would
take over the console on UEFI systems even if the kernel was booted
with a serial console.

ok jsg@


# 1.22 14-Apr-2019 jsg

Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.

Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)

This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


# 1.26 07-Jul-2021 jsg

update drm to linux 5.10.47

hardware support changes include
inteldrm: better support for tiger lake
amdgpu: support for navi12, navi21 "sienna_cichlid", arcturus
amdgpu: support for cezanne "green sardine" ryzen 5000 apu

Thanks to the OpenBSD Foundation for sponsoring this work,
patrick@ for helping adapt rockchip drm, kettenis@ and mpi@
for uvm discussions and various testers.


Revision tags: OPENBSD_6_9_BASE
# 1.25 28-Oct-2020 kettenis

Use the function from <linux/io.h> for all "Memory Space" IO. This reduces
the diffs to Linux and makes sure we use memory barriers in the same way
as Linux does.

ok jsg@ (who added the doorbell changes)


Revision tags: OPENBSD_6_8_BASE
# 1.24 08-Jun-2020 jsg

update drm to linux 5.7

adds kernel support for
amdgpu: vega20, raven2, renoir, navi10, navi14
inteldrm: icelake, tigerlake

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping, patrick@ for helping adapt rockchip drm and many developers for
testing.


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.23 04-May-2019 kettenis

Improve the interaction between efifb(4), inteldrm(4) and radeondrm(4)
when we have a serial console by introducing the notion of a "primary"
graphics device. The primary graphics device is the one set up and
used by firmware (BIOS, UEFI).

The goal is to make sure that wsdisplay0 and drm0 reliably attach to
the primary graphics device such that X works out of the box even
if you have multiple cards or if you are using a serial console.

This also fixes the situation where inteldrm(4) or radeondrm(4) would
take over the console on UEFI systems even if the kernel was booted
with a serial console.

ok jsg@


# 1.22 14-Apr-2019 jsg

Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.

Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)

This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


# 1.25 28-Oct-2020 kettenis

Use the function from <linux/io.h> for all "Memory Space" IO. This reduces
the diffs to Linux and makes sure we use memory barriers in the same way
as Linux does.

ok jsg@ (who added the doorbell changes)


Revision tags: OPENBSD_6_8_BASE
# 1.24 08-Jun-2020 jsg

update drm to linux 5.7

adds kernel support for
amdgpu: vega20, raven2, renoir, navi10, navi14
inteldrm: icelake, tigerlake

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping, patrick@ for helping adapt rockchip drm and many developers for
testing.


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.23 04-May-2019 kettenis

Improve the interaction between efifb(4), inteldrm(4) and radeondrm(4)
when we have a serial console by introducing the notion of a "primary"
graphics device. The primary graphics device is the one set up and
used by firmware (BIOS, UEFI).

The goal is to make sure that wsdisplay0 and drm0 reliably attach to
the primary graphics device such that X works out of the box even
if you have multiple cards or if you are using a serial console.

This also fixes the situation where inteldrm(4) or radeondrm(4) would
take over the console on UEFI systems even if the kernel was booted
with a serial console.

ok jsg@


# 1.22 14-Apr-2019 jsg

Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.

Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)

This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


# 1.24 08-Jun-2020 jsg

update drm to linux 5.7

adds kernel support for
amdgpu: vega20, raven2, renoir, navi10, navi14
inteldrm: icelake, tigerlake

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping, patrick@ for helping adapt rockchip drm and many developers for
testing.


Revision tags: OPENBSD_6_6_BASE OPENBSD_6_7_BASE
# 1.23 04-May-2019 kettenis

Improve the interaction between efifb(4), inteldrm(4) and radeondrm(4)
when we have a serial console by introducing the notion of a "primary"
graphics device. The primary graphics device is the one set up and
used by firmware (BIOS, UEFI).

The goal is to make sure that wsdisplay0 and drm0 reliably attach to
the primary graphics device such that X works out of the box even
if you have multiple cards or if you are using a serial console.

This also fixes the situation where inteldrm(4) or radeondrm(4) would
take over the console on UEFI systems even if the kernel was booted
with a serial console.

ok jsg@


# 1.22 14-Apr-2019 jsg

Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.

Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)

This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


# 1.23 04-May-2019 kettenis

Improve the interaction between efifb(4), inteldrm(4) and radeondrm(4)
when we have a serial console by introducing the notion of a "primary"
graphics device. The primary graphics device is the one set up and
used by firmware (BIOS, UEFI).

The goal is to make sure that wsdisplay0 and drm0 reliably attach to
the primary graphics device such that X works out of the box even
if you have multiple cards or if you are using a serial console.

This also fixes the situation where inteldrm(4) or radeondrm(4) would
take over the console on UEFI systems even if the kernel was booted
with a serial console.

ok jsg@


# 1.22 14-Apr-2019 jsg

Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.

Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)

This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


# 1.22 14-Apr-2019 jsg

Update shared drm code, inteldrm(4) and radeondrm(4) from linux 4.4 to
linux 4.19.34.

Adds support for more Intel hardware:
Broxton/Apollo Lake (was is_preliminary in 4.4)
Amber Lake (another Kaby Lake refresh)
Gemini Lake
Coffee Lake
Whiskey Lake
Cannon Lake (though no hardware with Intel graphics ever shipped)
Ice Lake (alpha support, hardware not released)

This does not add support for new radeon hardware on the AMD side as
newer radeons have a different kernel driver (amdgpu).

Thanks to the OpenBSD Foundation for sponsoring this work, kettenis@ for
helping and a bunch of other developers for testing.


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


# 1.21 25-Apr-2018 jsg

update ttm and radeondrm(4) to Linux 4.4.129

Compared to the previous Linux 3.8 based port this adds support for
KAVERI/KABINI/MULLINS APUs and OLAND/BONAIRE/HAINAN/HAWAII GPUs.

Thanks to the OpenBSD Foundation for sponsoring this work.


# 1.20 20-Apr-2018 deraadt

oops, snapshot tests not ready yet


# 1.19 20-Apr-2018 deraadt

sync


Revision tags: OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.


Revision tags: OPENBSD_6_2_BASE
# 1.18 01-Jul-2017 kettenis

Update inteldrm(4) to code based on Linux 4.4.70. This brings us support for
Skylake and Cherryview and better support for Broadwell and Valleyview. Also
adds MST support. Some tweaks to the TTM code and radeondrm(4) to keep it
working with the updated generic DRM code needed for inteldrm(4).

Tested by many.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE OPENBSD_6_1_BASE
# 1.17 27-Sep-2015 jsg

Switch remaining users of the FreeBSD refcount apis back to the original
linux kref/kobject use.

ok kettenis@


Revision tags: OPENBSD_5_8_BASE
# 1.16 11-Jul-2015 jsg

Make use of recent drm_linux.h additions to further reduce the
diff to linux.

ok kettenis@


# 1.15 18-Apr-2015 jsg

another round of reducing the diff to linux


# 1.14 12-Apr-2015 jsg

make wait_queue_head a struct with a mutex
better matches linux behaviour


# 1.13 11-Apr-2015 jsg

change back to spinlock_t/DEFINE_SPINLOCK


# 1.12 06-Apr-2015 jsg

add back some more static use to reduce the diff to linux


Revision tags: OPENBSD_5_7_BASE
# 1.11 10-Feb-2015 jsg

switch most rwlock calls back to their linux equivalents


# 1.10 27-Jan-2015 dlg

remove the second void * argument on tasks.

when workqs were introduced, we provided a second argument so you
could pass a thing and some context to work on it in. there were
very few things that took advantage of the second argument, so when
i introduced pools i suggested removing it. since tasks were meant
to replace workqs, it was requested that we keep the second argument
to make porting from workqs to tasks easier.

now that workqs are gone, i had a look at the use of the second
argument again and found only one good use of it (vdsp(4) on sparc64
if you're interested) and a tiny handful of questionable uses. the
vast majority of tasks only used a single argument. i have since
modified all tasks that used two args to only use one, so now we
can remove the second argument.

so this is a mechanical change. all tasks only passed NULL as their
second argument, so we can just remove it.

ok krw@


# 1.9 20-Dec-2014 krw

Replace switch workq with taskq.

Diff from blambert@, double ok@ kettenis.


Revision tags: OPENBSD_5_6_BASE
# 1.8 07-Apr-2014 jsg

reduce the diff to linux for drm pci vid/pid tests
ok kettenis@


Revision tags: OPENBSD_5_5_BASE
# 1.7 10-Feb-2014 jsg

drm/radeon: expose render backend mask to the userspace

From Marek Olsak
413f46c51b173d8a46135d33fa3adef05f2b1a7e in ubuntu 3.8
439a1cfffe2c1a06e5a6394ccd5d18a8e89b15d3 in mainline linux


# 1.6 09-Feb-2014 jsg

drm/radeon: allow selection of alignment in the sub-allocator

From Alex Deucher
bc25f63f795ee2c8b7296d0dc1e9afe071dbfa88 in ubuntu 3.8
6c4f978b357bc779c703fda1f200e9179623d3e9 in mainline linux


# 1.5 23-Jan-2014 kettenis

Switch radeondrm(4) to MSI on the cards that support it.

ok jsg@


# 1.4 05-Dec-2013 kettenis

Rename 'struct drm_obj' to 'struct drm_gem_object' to reduce the diffs with
Linux.

ok jsg@


# 1.3 04-Nov-2013 kettenis

The radeondrm code that sets the DPMS mode may sleep, so it should not be run
from a timeout like our burner code does. Hand this off to a taskq.

tracked down by claudio@
ok jsg@


# 1.2 29-Oct-2013 jsg

Move most of the uses of workqs in drm to the new task/taskq api.
Prevents unintended multiple additions to workqs that was causing
hangs on radeon, and lets us remove tasks more closely matching
the behaviour of the original linux code.

ok kettenis@
cause of the ttm/radeon hangs debugged by claudio@ and kettenis@


# 1.1 12-Aug-2013 jsg

Add a port of the TTM and Radeon DRM code from Linux 3.8.13.
Includes kernel modesetting, framebuffer console and support
for newer hardware.

Firmware needs to be present for acceleration and in some cases
modesetting to work. It can be installed via fw_update
or manually via pkg_add.

With lots of help from kettenis@ some macppc bits from mpi@
and some ttm refcount/queue bits from FreeBSD.

Thanks to M:Tier and the OpenBSD Foundation for sponsoring this work.