Commit Graph

15 Commits

Author SHA1 Message Date
Matt Coster e6b752ff62 pvr: Add pvr_bo_cpu_map_unchanged() helper to load saved vbits on map
When HAVE_VALGRIND is set, vbits of the CPU mapping are stored when
pvr_bo_cpu_unmap() is called. They can be reloaded by calling
pvr_bo_cpu_map_unchanged() instead of pvr_bo_cpu_map(). The vbits are
not loaded by default on every map, since they could easily have been
changed by the device between the unmap/map calls. Only use
pvr_bo_cpu_map_unchanged() when you can safely assume that nothing has
changed in the underlying memory.

When HAVE_VALGRIND is not set, pvr_bo_cpu_map_unchanged() just inlines
to pvr_bo_cpu_map().

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18948>
2022-11-25 16:42:55 +00:00
Matt Coster 947e183ff5 pvr: Implement new firmware stream interface
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19530>
2022-11-11 11:34:17 +00:00
Frank Binns 40e683b907 pvr: remove implicit sync support
This is the legacy way of doing synchronisation and is no longer necessary now
that the DMA_BUF_IOCTL_EXPORT_SYNC_FILE / DMA_BUF_IOCTL_IMPORT_SYNC_FILE ioctls
exist, which the wsi code is already making use of.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19293>
2022-10-28 10:44:55 +00:00
Karmjit Mahil 849c2e14ab pvr: Handle pipeline barrier vk_sync.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19110>
2022-10-19 16:07:26 +00:00
Sarah Walker 48d07fb7d3 pvr: Update FWIF compute register structure
This matches changes made in FW 1.17.OS@6280047.

Signed-off-by: Sarah Walker <sarah.walker@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17680>
2022-09-01 10:01:28 +00:00
Matt Coster 282f0a9330 pvr: Split pvr_dev_addr_t into a separate header
This type is useful beyond the scope of winsys.

It can now be used without being lumbered with a dependency on
pvr_winsys.h. Since pvr_winsys.h is used by pvr_private.h, this can be
a common cause for circular dependencies during development.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17488>
2022-07-15 10:39:21 +01:00
Rajnesh Kanwal 16d4ca6e14 pvr: Add services winsys transfer cmd submit interface.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal 11d8973efb pvr: Add transfer 3d parameter heap support.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16897>
2022-06-07 14:55:10 +01:00
Rajnesh Kanwal d50418a4fc pvr: Add vk_sync support and remove service winsys syncobjs interface.
Removing internal pvr_winsys_syncobj abstraction and porting
service winsys syncobj over to vk_sync_type.

Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15709>
2022-05-13 23:18:16 +00:00
Rajnesh Kanwal f88d1fbdbd pvr: Add services winsys transfer context support.
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16451>
2022-05-12 12:38:48 +01:00
Karmjit Mahil e7351178aa pvr: Update pvrsrvkm to fw 1.17 .
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16238>
2022-05-05 10:35:35 +00:00
Karmjit Mahil 1250e30929 pvr: Add pvrsrvkm visibility test heap.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15880>
2022-04-13 17:58:03 +00:00
Karmjit Mahil 76ee1671f6 pvr: Add core count info and pvr_device_runtime_info.
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15880>
2022-04-13 17:58:03 +00:00
Karmjit Mahil e5439bf4aa pvr: Add stricter type checking in pvr_csb_pack().
Since the packing functions generated by csbgen use a void pointer
for the buffer in which to pack, it's possible to easily write out
of bounds. This commits attempts to reduce the chances by
having the pack macro check that the pointer passed points to an
element sized equally to the state word being packed. Catching
these errors earlier.

As can be seen in this commit, there already was a case of this:
"pds_ctrl". The word size is meant to be 64 bits but the pointer
was pointing to a 32 bit field.

Although it's fine for the word size to be smaller than the
storage pointed to by the pointer, this is not allowed just to
be extra careful.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15687>
2022-04-04 03:40:48 +00:00
Frank Binns 8991e64641 pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs
Co-authored-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Co-authored-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Co-authored-by: Simon Perretta <simon.perretta@imgtec.com>
Co-authored-by: Alexander Wasey <Alexander.Wasey@imgtec.com>
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Rajnesh Kanwal <rajnesh.kanwal@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Signed-off-by: Alexander Wasey <Alexander.Wasey@imgtec.com>
Acked-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15243>
2022-03-22 15:04:55 +00:00