Skip to contentSkip to conversation

mei: gsc proxy component

PATCH Superseded Tomas Winkler 2 participants 6 messages Feb 5, 2023 – Feb 8, 2023

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

v2 cover mei: gsc proxy component

GSC Proxy component is used for communication between the Intel graphics driver and MEI driver.

V2:
1. Add missing patch from the series
2. Use device information instead of driver name
to identify the aggregate device.

Alexander Usyskin (2):
drm/i915/mtl: Define GSC Proxy component interface
mei: gsc_proxy: add gsc proxy driver

 MAINTAINERS                                |   1 +
 drivers/misc/mei/Kconfig                   |   2 +-
 drivers/misc/mei/Makefile                  |   1 +
 drivers/misc/mei/gsc_proxy/Kconfig         |  14 ++
 drivers/misc/mei/gsc_proxy/Makefile        |   7 +
 drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c | 208 +++++++++++++++++++++
 include/drm/i915_component.h               |   3 +-
 include/drm/i915_gsc_proxy_mei_interface.h |  36 ++++
 8 files changed, 270 insertions(+), 2 deletions(-)
 create mode 100644 drivers/misc/mei/gsc_proxy/Kconfig
 create mode 100644 drivers/misc/mei/gsc_proxy/Makefile
 create mode 100644 drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c
 create mode 100644 include/drm/i915_gsc_proxy_mei_interface.h
Signature · 1 line
2.39.1
#1 lore raw

PATCH v2 1/2 drm/i915/mtl: Define GSC Proxy component interface

From: Alexander Usyskin <[email protected]>

GSC Proxy component is used for communication between the Intel graphics driver and MEI driver.

---
V2: This patch was missing in the first series.

 MAINTAINERS                                |  1 +
 include/drm/i915_component.h               |  3 +-
 include/drm/i915_gsc_proxy_mei_interface.h | 36 ++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 include/drm/i915_gsc_proxy_mei_interface.h
MAINTAINERS +1 -0
index c81bbb771678..2c432b4d8506 100644
@@ -10570,6 +10570,7 @@ S:	Supported
 F:	Documentation/driver-api/mei/*
 F:	drivers/misc/mei/
 F:	drivers/watchdog/mei_wdt.c
+F:	include/drm/i915_gsc_proxy_mei_interface.h
 F:	include/linux/mei_aux.h
 F:	include/linux/mei_cl_bus.h
 F:	include/uapi/linux/mei.h
include/drm/i915_component.h +2 -1
index c1e2a43d2d1e..56a84ee1c64c 100644
@@ -29,7 +29,8 @@
 enum i915_component_type {
 	I915_COMPONENT_AUDIO = 1,
 	I915_COMPONENT_HDCP,
-	I915_COMPONENT_PXP
+	I915_COMPONENT_PXP,
+	I915_COMPONENT_GSC_PROXY,
 };
 
 /* MAX_PORT is the number of port
include/drm/i915_gsc_proxy_mei_interface.h new file +36 -0
new file mode 100644
index 000000000000..e817bb316d5c
@@ -0,0 +1,36 @@
+/* SPDX-License-Identifier: MIT */
+/*
+ * Copyright (c) 2022-2023 Intel Corporation
+ */
+
+#ifndef _I915_GSC_PROXY_MEI_INTERFACE_H_
+#define _I915_GSC_PROXY_MEI_INTERFACE_H_
+
+#include <linux/mutex.h>
+#include <linux/device.h>
+
+/**
+ * struct i915_gsc_proxy_component_ops - ops for GSC Proxy services.
+ * @owner: Module providing the ops
+ * @send: sends data through GSC proxy
+ * @recv: receives data through GSC proxy
+ */
+struct i915_gsc_proxy_component_ops {
+	struct module *owner;
+
+	int (*send)(struct device *dev, const void *buf, size_t size);
+	int (*recv)(struct device *dev, void *buf, size_t size);
+};
+
+/**
+ * struct i915_gsc_proxy_component - Used for communication between i915 and
+ * MEI drivers for GSC proxy services
+ * @mei_dev: device that provide the GSC proxy service.
+ * @ops: Ops implemented by GSC proxy driver, used by i915 driver.
+ */
+struct i915_gsc_proxy_component {
+	struct device *mei_dev;
+	const struct i915_gsc_proxy_component_ops *ops;
+};
+
+#endif /* _I915_GSC_PROXY_MEI_INTERFACE_H_ */
Signature · 1 line
2.39.1
#2 lore raw

Re: [char-misc-next v2 1/2] drm/i915/mtl: Define GSC Proxy component interface

Quoted 7 lines · Tomas Winkler

From: Alexander Usyskin <[email protected]>

GSC Proxy component is used for communication between the Intel graphics driver and MEI driver.

Quoted 8 lines

---
V2: This patch was missing in the first series.

 MAINTAINERS                                |  1 +
 include/drm/i915_component.h               |  3 +-
 include/drm/i915_gsc_proxy_mei_interface.h | 36 ++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 include/drm/i915_gsc_proxy_mei_interface.h

Why do you add .h files in include/drm/ yet only use them in drivers/mei/ ?

Shouldn't they just live in the mei subdir? Especially given that you also want to maintain them through the mei subsystem as per this change:

MAINTAINERS S: Supported · line 10576

Quoted 13 lines
MAINTAINERS +1 -0
index c81bbb771678..2c432b4d8506 100644
@@ -10570,6 +10570,7 @@ S:	Supported
 F:	Documentation/driver-api/mei/*
 F:	drivers/misc/mei/
 F:	drivers/watchdog/mei_wdt.c
+F:	include/drm/i915_gsc_proxy_mei_interface.h
 F:	include/linux/mei_aux.h
 F:	include/linux/mei_cl_bus.h
 F:	include/uapi/linux/mei.h

And I would need some i915 maintainer acks before I could take this in my tree.

thanks,

greg k-h

#3 lore raw

RE: [char-misc-next v2 1/2] drm/i915/mtl: Define GSC Proxy component interface

Quoted 20 lines · Tomas Winkler
Quoted 10 lines

From: Alexander Usyskin <[email protected]>

GSC Proxy component is used for communication between the Intel graphics driver and MEI driver.

---
V2: This patch was missing in the first series.

Quoted 6 lines
 MAINTAINERS                                |  1 +
 include/drm/i915_component.h               |  3 +-
 include/drm/i915_gsc_proxy_mei_interface.h | 36
++++++++++++++++++++++
 3 files changed, 39 insertions(+), 1 deletion(-)  create mode 100644

include/drm/i915_gsc_proxy_mei_interface.h

Quoted 4 lines

Why do you add .h files in include/drm/ yet only use them in drivers/mei/ ?

Shouldn't they just live in the mei subdir? Especially given that you also want to maintain them through the mei subsystem as per this change:

Rigth, will drop, this part.

Quoted 17 lines
Quoted 7 lines
MAINTAINERS index renamed from MAINTAINERS +0 -0

c81bbb771678..2c432b4d8506 100644

MAINTAINERS S: Supported · line 10576

Quoted 7 lines
MAINTAINERS +1 -0
@@ -10570,6 +10570,7 @@ S:	Supported
 F:	Documentation/driver-api/mei/*
 F:	drivers/misc/mei/
 F:	drivers/watchdog/mei_wdt.c
+F:	include/drm/i915_gsc_proxy_mei_interface.h
 F:	include/linux/mei_aux.h
 F:	include/linux/mei_cl_bus.h
 F:	include/uapi/linux/mei.h

And I would need some i915 maintainer acks before I could take this in my tree.

Okay

Quoted 4 lines

thanks,

greg k-h

#4 lore raw

PATCH v2 2/2 mei: gsc_proxy: add gsc proxy driver

In reply to Tomas Winkler

From: Alexander Usyskin <[email protected]>

Add GSC proxy driver. It to allows messaging between GSC component on Intel on board graphics card and CSE device.

---

V2: refactor match function
use device information instead of driver name
to identify the aggregate device.

 drivers/misc/mei/Kconfig                   |   2 +-
 drivers/misc/mei/Makefile                  |   1 +
 drivers/misc/mei/gsc_proxy/Kconfig         |  14 ++
 drivers/misc/mei/gsc_proxy/Makefile        |   7 +
 drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c | 208 +++++++++++++++++++++
 5 files changed, 231 insertions(+), 1 deletion(-)
 create mode 100644 drivers/misc/mei/gsc_proxy/Kconfig
 create mode 100644 drivers/misc/mei/gsc_proxy/Makefile
 create mode 100644 drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c
drivers/misc/mei/Kconfig +1 -1
index d21486d69df2..37db142de413 100644
@@ -62,4 +62,4 @@ config INTEL_MEI_GSC
 
 source "drivers/misc/mei/hdcp/Kconfig"
 source "drivers/misc/mei/pxp/Kconfig"
-
+source "drivers/misc/mei/gsc_proxy/Kconfig"
drivers/misc/mei/Makefile +1 -0
index fb740d754900..14aee253ae48 100644
@@ -30,3 +30,4 @@ CFLAGS_mei-trace.o = -I$(src)
 
 obj-$(CONFIG_INTEL_MEI_HDCP) += hdcp/
 obj-$(CONFIG_INTEL_MEI_PXP) += pxp/
+obj-$(CONFIG_INTEL_MEI_GSC_PROXY) += gsc_proxy/
drivers/misc/mei/gsc_proxy/Kconfig new file +14 -0
new file mode 100644
index 000000000000..fd45ce8c1df4
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0
+# Copyright (c) 2022-2023, Intel Corporation. All rights reserved.
+#
+config INTEL_MEI_GSC_PROXY
+	tristate "Intel GSC Proxy services of ME Interface"
+	select INTEL_MEI_ME
+	depends on DRM_I915
+	help
+         MEI Support for GSC Proxy Services on Intel platforms.
+
+         MEI GSC proxy enables messaging between GSC service on
+         Intel graphics on-board card and services on CSE (MEI)
+         firmware residing SoC or PCH.
+
drivers/misc/mei/gsc_proxy/Makefile new file +7 -0
new file mode 100644
index 000000000000..358847e9aaa9
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Copyright (c) 2022-2023, Intel Corporation. All rights reserved.
+#
+# Makefile - GSC Proxy client driver for Intel MEI Bus Driver.
+
+obj-$(CONFIG_INTEL_MEI_GSC_PROXY) += mei_gsc_proxy.o
drivers/misc/mei/gsc_proxy/mei_gsc_proxy.c new file +208 -0

208 lines not on this page · raw message

Signature · 1 line
2.39.1
#5 lore raw

Re: [char-misc-next v2 2/2] mei: gsc_proxy: add gsc proxy driver

Quoted 5 lines · Tomas Winkler

From: Alexander Usyskin <[email protected]>

Add GSC proxy driver. It to allows messaging between GSC component on Intel on board graphics card and CSE device.

Quoted 7 lines

---

V2: refactor match function
use device information instead of driver name
to identify the aggregate device.

Much much better, thank you!

If you can clear up the answers to patch 1, I'll be glad to take this through my tree.

thanks,

greg k-h