aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/imagination/pvr_device.h
diff options
context:
space:
mode:
authorSarah Walker <[email protected]>2023-11-22 16:34:37 +0000
committerMaxime Ripard <[email protected]>2023-11-23 09:01:46 +0100
commitd2d79d29bb98a32c511f7339a8e93b47544fdeac (patch)
treee42b413c285188fd677d059e8c9f9806bc32c414 /drivers/gpu/drm/imagination/pvr_device.h
parent6eedddab733b350886571f98b810108b13bf74ae (diff)
drm/imagination: Implement context creation/destruction ioctls
Implement ioctls for the creation and destruction of contexts. Contexts are used for job submission and each is associated with a particular job type. Changes since v8: - Fixed one error path in pvr_stream_process_1() - Corrected license identifiers Changes since v5: - Fix context release in final error path in pvr_context_create() Changes since v3: - Use drm_dev_{enter,exit} Co-developed-by: Boris Brezillon <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Signed-off-by: Sarah Walker <[email protected]> Signed-off-by: Donald Robson <[email protected]> Link: https://lore.kernel.org/r/ac474a1f7dda2582d290798e4837140a2989aa2a.1700668843.git.donald.robson@imgtec.com Signed-off-by: Maxime Ripard <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/imagination/pvr_device.h')
-rw-r--r--drivers/gpu/drm/imagination/pvr_device.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/gpu/drm/imagination/pvr_device.h b/drivers/gpu/drm/imagination/pvr_device.h
index f5b82b793566..299f3e022c82 100644
--- a/drivers/gpu/drm/imagination/pvr_device.h
+++ b/drivers/gpu/drm/imagination/pvr_device.h
@@ -7,6 +7,8 @@
#include "pvr_ccb.h"
#include "pvr_device_info.h"
#include "pvr_fw.h"
+#include "pvr_rogue_fwif_stream.h"
+#include "pvr_stream.h"
#include <drm/drm_device.h>
#include <drm/drm_file.h>
@@ -146,6 +148,9 @@ struct pvr_device {
/** @fw_dev: Firmware related data. */
struct pvr_fw_device fw_dev;
+ /** @stream_musthave_quirks: Bit array of "must-have" quirks for stream commands. */
+ u32 stream_musthave_quirks[PVR_STREAM_TYPE_MAX][PVR_STREAM_EXTHDR_TYPE_MAX];
+
/**
* @mmu_flush_cache_flags: Records which MMU caches require flushing
* before submitting the next job.
@@ -153,6 +158,14 @@ struct pvr_device {
atomic_t mmu_flush_cache_flags;
/**
+ * @ctx_ids: Array of contexts belonging to this device. Array members
+ * are of type "struct pvr_context *".
+ *
+ * This array is used to allocate IDs used by the firmware.
+ */
+ struct xarray ctx_ids;
+
+ /**
* @free_list_ids: Array of free lists belonging to this device. Array members
* are of type "struct pvr_free_list *".
*
@@ -256,6 +269,14 @@ struct pvr_file {
struct pvr_device *pvr_dev;
/**
+ * @ctx_handles: Array of contexts belonging to this file. Array members
+ * are of type "struct pvr_context *".
+ *
+ * This array is used to allocate handles returned to userspace.
+ */
+ struct xarray ctx_handles;
+
+ /**
* @free_list_handles: Array of free lists belonging to this file. Array
* members are of type "struct pvr_free_list *".
*