Commit graph

168826 commits

Author SHA1 Message Date
Yiwei Zhang
ddf2ca4faf vulkan/wsi/wayland: ensure drm modifiers stored in chain are immutable
Chain stored modifiers point to the mapping of the current feedback
shmem of the surface. The surface tracked feedback mapping will be gone
and replaced with new mapping during surface_dmabuf_feedback_done. There
are two issues here:
1. One issue is that the existing mapping is closed before been used to
   compare against new modifiers in sets_of_modifiers_are_the_same.
2. The other issue is that when the chain is still optimal, the chain
   persists while the mapping is still replaced with the one from the
   new format table shmem.

This change makes a deep copy of the modifiers to store in the chain to
ensure the modifiers used for the current chain are immutable through
the chain lifecycle.

Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26618>
2023-12-16 18:26:38 +00:00
David Heidelberg
33e8f22d84 ci/austriancoder: separate HW definition from SW
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26721>
2023-12-16 16:03:08 +01:00
Christian Gmeiner
64caf90632 etnaviv: disassembler: Switch to isaspec
Use the power of isaspec for our integrated disassembler.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20144>
2023-12-16 14:34:18 +00:00
Christian Gmeiner
fa0ff0849c etnaviv: Add isaspec support
This commit adds etnaviv.xml which describes the used ISA. Quite some
time was spend to to get it into that shape by creating a big collection
of shader asm generated by the binary blob. These shaders are used as basis
for test driven development for this ISA specification.

The xml has some black spots but the internal disasm is used by
developers so that should be no problem. Some refinement will happen
during normal development.

This commit adds only disasm support.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20144>
2023-12-16 14:34:18 +00:00
Christian Gmeiner
a8a33ac5ae isaspec: Add bool_inv type to print inverted bools
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20144>
2023-12-16 14:34:18 +00:00
M Henning
586c34b19c nak: Optimize jumps to fall-through if possible
This saves 15 instructions on the compute shader in Sascha Willems'
computecloth example.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26473>
2023-12-16 06:10:23 +00:00
M Henning
b2420fae4b nak: Add a jump threading pass
This saves 16 instructions on the compute shader in Sascha Willems'
computecloth example.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26473>
2023-12-16 06:10:23 +00:00
M Henning
786bf749bc nak: Print out an instruction count
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26473>
2023-12-16 06:10:23 +00:00
George Ouzounoudis
55c8f5e288 nvk: Support extended dynamic state for tessellation domain origin
The tessellation domain origin, type, prims and spacing are all pushed
together in SET_TESSELLATION_PARAMETERS. So to support domain origin as
dynamic we need to push all these together when the state is dynamically
changed or when a new tessellation shader is bound.
This is also needed for EXT_shader_object.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
George Ouzounoudis
1319cfb40d nvk: Remove pipeline state setting functions
We do not need these functions for graphics pipelines anymore as all the
required state is now dynamic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
George Ouzounoudis
453c50bef9 nvk: Support extended dynamic state for rasterization stream
This is needed for EXT_shader_object. Move to dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
George Ouzounoudis
d8945dd51e vulkan: Fix dynamic graphics state enum usage
Simply replace the correct rasterization stream enum

Fixes: 9d0ed9cbcc ("vulkan: Add more dynamic rasterizer state")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
George Ouzounoudis
8b178f9ce4 nvk: Support extended dynamic state for alpha to coverage/one
This is needed for EXT_shader_object. Move to dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:51 -06:00
Faith Ekstrand
b42fae61bb nvk: Support extendedDynamicState3ColorWriteMask
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:50 -06:00
George Ouzounoudis
c7135e94cb nvk: Support extendedDynamicState3SampleMask
This is needed for EXT_shader_object. Move to dynamic state.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:33 -06:00
George Ouzounoudis
88e661db99 nvk: Support extendedDynamicState3ColorBlendEquation
This is needed for EXT_shader_object. Move state to dynamic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:33 -06:00
George Ouzounoudis
e27b4855f7 nvk: Support extendedDynamicState3ColorBlendEnable
This is needed for EXT_shader_object. Move state to dynamic.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:28:33 -06:00
Faith Ekstrand
b24cbb0b29 nvk: Use render->color_att_count for color write enables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 22:26:07 -06:00
George Ouzounoudis
4325efd2cf nvk: Move SET_BLEND_STATE_PER_TARGET to graphics state initialization
We never change this state so it needs to be set only once at state init.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24872>
2023-12-15 18:02:19 -06:00
Faith Ekstrand
5d937f09b2 nvk: Advertise VK_KHR_vulkan_memory_model
Now that the NAK barrier bugs seem fixed and we're passing all the
tests, we can turn this on.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9608
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>
2023-12-15 22:38:45 +00:00
Faith Ekstrand
629bef2a4c nak: Handle minimum execution latencies in the dep tracker
Some instructions have a minimum latency before another instruction can
execute.  It's a little unclear exactly what the details on these are.
For things like OpBar it's probably something to do with when stuff
actually convergres.  For MemBar, maybe we only need to wait before we
do something that also touches memory?  Unclear and the few docs seem to
imply that it's a straight-up stall.  For now, we model it as an
execution latency where nothing is allowed to happen until then.

The blob also inserts a NOP with a delay of 2 in these cases.  It's not
entirely clear why but it's probably best we do the same.  Theses
instructions tend to be pretty heavy-weight anyway so 2 cycles isn't
really going to cost much compared to the chances that we're missing
some subtle HW issues somewhere.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>
2023-12-15 22:38:45 +00:00
Faith Ekstrand
26c2566606 nak: Plumb shader model into instruction latency queries
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>
2023-12-15 22:38:45 +00:00
Faith Ekstrand
8c1daae469 nak: Switch to //-style comments
Some time ago I dropped the C-style `/* */` for `//` which seems to be
more idiomatic in Rust.  Let's get rid of the rest of the C-style ones
and make the codebase consistent.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26716>
2023-12-15 22:38:45 +00:00
Nanley Chery
45d7764a06 iris: Don't memset the clear color BO during aux init
The clear color BO is sometimes getting unnecessarily zeroed. For
example, if the resource will be fast-cleared, the app may pick a
non-zero color, causing the initial memset to be unneeded.  So, skip the
memset and mark the clear color as unknown if it has not been freshly
allocated. For now, we leave the memsets on imported dmabufs alone for
simplicity.

On non-small BAR ACM systems, this also allows internal resources using
compression to be created without executing an IOCTL for memory mapping.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26675>
2023-12-15 21:58:16 +00:00
Nanley Chery
68d56b15d7 iris: Zero the clear color before FCV_CCS_E rendering
On small-BAR ACM systems, we don't initialize the clear color at
resource creation time. This could cause an issue with FCV_CCS_E.

Because the rendering and sampling fields may not be in agreement, FCV
may generate fast-cleared blocks during rendering and the sampler may
interpret them with the wrong values.

Thankfully, the register bit which enables FCV on ACM is disabled by
default, so there is not an actually issue today. Regardless, this patch
implements the fix for this issue now. The next patch will actually skip
explicit clear color initialization at resource creation time. So, this
fix will be useful for other systems that do have FCV enabled today.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26675>
2023-12-15 21:58:16 +00:00
Nanley Chery
6064de1d53 iris: Optimize BO_ALLOC_ZEROED for suballocations
Fresh suballocations from fresh allocations have already been zeroed by
the kernel. So, make BO_ALLOC_ZEROED a no-op for them.

This introduces a new field, iris_bo::zeroed, which will be reused for
similar optimizations in the future.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26675>
2023-12-15 21:58:16 +00:00
José Roberto de Souza
ba6faeb974 anv: Remove libdrm usage from Xe KMD backend
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26699>
2023-12-15 20:40:49 +00:00
José Roberto de Souza
dea6c82437 intel: Sync xe_drm.h final part
Sync xe_drm.h with commit a8ff56e160bb ("drm/xe/uapi: Remove reset uevent for now").

This is the last xe_drm.h uAPI break.

The only relevant change for ANV and Iris is that now VM bind uAPI
is asynchronous only so I had to bring back the syncobj creation, wait
and destruction.

Is still in the Xe port TODO list to make VM binds truly asynchronous.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26699>
2023-12-15 20:40:49 +00:00
Sagar Ghuge
2ac78b5096 anv: Enable blitter engine unconditionally on ACM+
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26703>
2023-12-15 20:10:53 +00:00
Eric Engestrom
8043e8c4a6 vulkan/wsi: fix build when platform headers are installed in non-standard locations
Anything that uses the platform defines in `vulkan_wsi_list` will need
to be able to resole the includes they trigger, which are provided by
`vulkan_wsi_deps`.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10304
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26715>
2023-12-15 18:35:54 +00:00
Friedrich Vock
f9a394b753 radv/rt: Initialize unused children in PLOC early-exit
Bad things happen when these aren't initialized.

Fixes GPU hangs when loading Avatar: Frontiers of Pandora savegames.

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26712>
2023-12-15 17:52:00 +00:00
Job Noorman
286caa5080 ir3: lower 64b registers
After all int64/double lowerings, there might still be 64b registers
left which ir3 currently doesn't handle. This only happens in a small
number of Piglit tests where those registers (or the variables they come
from) did not get DCE'd.

This patch handles 64b registers in ir3 by adding a NIR pass that does
the following:
 - @decl_reg -> split in two 32b ones
 - @store_reg -> unpack_64_2x32_split_x/y and two separate stores
 - @load_reg -> two separate loads and pack_64_2x32_split

After this pass, the 64b vecs used for the original loads/stores are
still present and are also not handled yet by ir3. This patch removes
them by running nir_lower_alu_to_scalar and nir_copy_prop.

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26175>
2023-12-15 17:19:28 +00:00
Job Noorman
6e7a61df4c nir: add _safe variants of nir_foreach_reg_load/store
Signed-off-by: Job Noorman <jnoorman@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26175>
2023-12-15 17:19:28 +00:00
Iago Toral Quiroga
5057eb90a1 v3dv: implement VK_KHR_shader_terminate_invocation
The semantics for this matches those of discard.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26683>
2023-12-15 16:35:50 +00:00
Iago Toral Quiroga
d0f75fdeab broadcom: lower null pointers
We only support the variablePointersStorageBuffer feature of variable pointers,
which basically ensures that pointers may only target one buffer. This means
that a particular pointer may change where it points within a given buffer but
it cannot change its value to point to some other buffer. This is a requirement
from us since we expect buffer indices on buffer loads and stores to be
constant, so we can't have a buffer load come through a pointer that may
be assigned to different buffers, since in that case the buffer index
would need to come from bcsel.

There is, however, a small complication: the spec still allows pointers to
be null, and NIR defines null pointers to use 0xffffffff for both the buffer
index and the offset, which will cause a problem in a scenario like this:

int *b = ...
if (cond) {
   b = null;
   discard;
}
ubo_load(b);

Here the buffer index for the ubo load may come from a bcsel choosing between
the null pointer (0xffffffff) and the valid address (let's say 0), so we don't
have a constant and we assert fail.

This change detects this scenario and upon finding it will rewrite the buffer
index on the null pointer branch of the bcsel to match that of the valid
branch so that later optimizations passes can remove the bcsel and we end up
with a constant index. This is fine because a null pointer dereference is
undefined behavior and it is not something we should see in valid applications.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26683>
2023-12-15 16:35:50 +00:00
Iago Toral Quiroga
716847a77d broadcom: disable perquad tmu loads after discards
Otherwise we may emit a load from an invalid offset from
a lane that was discarded.

This fixes an simulator assert from triggering when
executing:
dEQP-VK.spirv_assembly.instruction.terminate_invocation.terminate.no_null_pointer_load

That test emits a conditional kill and then a buffer load
which would have invalid offsets for the lines killed. Since
the buffer load is in uniform control flow we were incorrectly
emitting a full quad load, including disabled lanes which would
prompt the simulator to assert on invalid offsets being loaded
coming from the lanes that had been killed in the shader.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26683>
2023-12-15 16:35:50 +00:00
Sil Vilerino
2b04fb410f d3d12: Fix warning C4065 switch statement contains default but no case labels
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26710>
2023-12-15 16:17:50 +00:00
Ruijing Dong
8bbdde2d9a radeonsi/vcn: enable ROI feature in vcn.
Enable ROI feature.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659>
2023-12-15 14:06:34 +00:00
Ruijing Dong
9c07a2e10d radeonsi/vcn: ROI feature implementation
Implemented ROI feature in VCN generations.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659>
2023-12-15 14:06:34 +00:00
Ruijing Dong
d6da63071e frontends/va: add ROI feature
ROI (region of interest) feature implementation
in va.

It does not support ROI priority, and supports
qp delta, and the maximum number of supported
region is defined as 32, the region sequence implies
the priority, the lower the sequence number, the higher
the region priority, when region overlapping happened,
the higher priority region overwrites the lower
priority one.

And specifically for AV1, the adjust step will be
rounded by 5 when rate control is used, for example,
if qp_delta (q index) is 6, it will use 5, if
qp_delta is 8, it will use 10.

For AVC/HEVC (RC/CQP) and AV1 CQP mode, the
qp_delta granularity is 1.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659>
2023-12-15 14:06:34 +00:00
Ruijing Dong
434a53ebbe radesonsi/vcn add qp_map definition
This is for enabling ROI (region of interest)
feature in VAAPI interface. It will support
both CQP and rate control mode.

Reviewed-by: Boyuan Zhang <boyuan.zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26659>
2023-12-15 14:06:34 +00:00
Boris Brezillon
0463a951ad panfrost: Flag BO shareable when appropriate
Let the kmod backend know when we might end up exporting a BO. This
doesn't change anything for the Panfrost kmod backend, but will be
needed for Panthor.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:27 +00:00
Boris Brezillon
30d6dfb861 panvk: Pass PAN_BO_SHAREABLE when relevant
Check VkExportMemoryAllocateInfo to know if we might export the BO
object at some point.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:27 +00:00
Boris Brezillon
aa6176ee1e panfrost: Introduce a PAN_BO_SHAREABLE flag
This flag reflects the ability to share a BO. This lets the kmod
backend optimize the case where the BO stays private to a specific
VM.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:27 +00:00
Boris Brezillon
5089a758df panfrost: Back panfrost_bo with pan_kmod_bo object
We keep the existing implementation unchanged but use pan_kmod for
all interactions with the kernel driver.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:27 +00:00
Boris Brezillon
7a9c471009 panfrost: Add a VM to panfrost_device
The current code assumes the logical device comes with a VM, so let's
explicitly create this default VM so we can map BOs with the kmod API.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon
91fe8a0d28 panfrost: Back panfrost_device with pan_kmod_dev object
Back panfrost_device with pan_kmod_dev object and query all props using
the pan_kmod_dev_query_props().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon
70bcdbee6c panfrost: Avoid direct accesses to some panfrost_bo fields
We are about to delegate some BO-related operations to the pan_kmod
layer, but before we can do that, we need to hide panfrost_bo
internals so we can redirect such accesses to pan_kmod.

Provide panfrost_bo_{size,handle}() accessors and start using them.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon
d47e01a3c3 panfrost: Avoid direct accesses to some panfrost_device fields
We are about to delegate some device-related operations to the pan_kmod
layer, but before we can do that, we need to hide panfrost_device
internals so we can redirect such accesses to pan_kmod.

Provide a few panfrost_device_xxx() accessors and start using them.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00
Boris Brezillon
93178999f6 pan/kmod: Add a backend for the panfrost kernel driver
Just a few implementation details that are worth mentioning:

- Panfrost doesn't support explicit VM management. This means
  panfrost_kmod_vm_create() must always be created with
  PAN_KMOD_VM_FLAG_AUTO_VA and panfrost_kmod_vm_bind(op=map) must
  always be passed PAN_KMOD_VM_MAP_AUTO_VA. The actual VA is assigned
  at BO creation time, and returned through
  drm_panfrost_create_bo.offset, or can be queried through
  DRM_IOCTL_PANFROST_GET_BO_OFFSET for imported BOs.

- Evictability is hooked up to DRM_IOCTL_PANFROST_MADVISE.

- BO wait is natively supported through DRM_IOCTL_PANFROST_WAIT_BO.

The rest is just a straightforward translation between the kmod API and
the existing panfrost ioctls.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26357>
2023-12-15 11:33:26 +00:00