summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_gsc_types.h
diff options
context:
space:
mode:
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2024-01-17 21:26:20 +0300
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>2024-01-18 22:04:37 +0300
commiteb08104f90fc474054211244d668d3fe1d84bccb (patch)
tree7ce6166cc027558b88e065fa51b10a276aca246b /drivers/gpu/drm/xe/xe_gsc_types.h
parent997a55caa1c3b770979836bbfd82b311addf95c7 (diff)
downloadlinux-eb08104f90fc474054211244d668d3fe1d84bccb.tar.xz
drm/xe/gsc: add support for GSC proxy interrupt
The GSC notifies us of a proxy request via the HECI2 interrupt. The interrupt must be enabled both in the HECI layer and in our usual gt irq programming; for the latter, the interrupt is enabled via the same enable register as the GSC CS, but it does have its own mask register. When the interrupt is received, we also need to de-assert it in both layers. The handling of the proxy request is deferred to the same worker that we use for GSC load. New flags have been added to distinguish between the init case and the proxy interrupt. v2: rename irq define, fix include ordering (Alan) Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Alan Previn <alan.previn.teres.alexis@intel.com> Cc: Suraj Kandpal <suraj.kandpal@intel.com> Reviewed-by: Alan Previn <alan.previn.teres.alexis@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240117182621.2653049-3-daniele.ceraolospurio@intel.com
Diffstat (limited to 'drivers/gpu/drm/xe/xe_gsc_types.h')
-rw-r--r--drivers/gpu/drm/xe/xe_gsc_types.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_gsc_types.h b/drivers/gpu/drm/xe/xe_gsc_types.h
index 07bfa87ec002..060d0fe848ad 100644
--- a/drivers/gpu/drm/xe/xe_gsc_types.h
+++ b/drivers/gpu/drm/xe/xe_gsc_types.h
@@ -8,6 +8,7 @@
#include <linux/iosys-map.h>
#include <linux/mutex.h>
+#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/workqueue.h>
@@ -39,6 +40,14 @@ struct xe_gsc {
/** @work: delayed load and proxy handling work */
struct work_struct work;
+ /** @lock: protects access to the work_actions mask */
+ spinlock_t lock;
+
+ /** @work_actions: mask of actions to be performed in the work */
+ u32 work_actions;
+#define GSC_ACTION_FW_LOAD BIT(0)
+#define GSC_ACTION_SW_PROXY BIT(1)
+
/** @proxy: sub-structure containing the SW proxy-related variables */
struct {
/** @component: struct for communication with mei component */