All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] GuC code reorganization
@ 2016-11-24 11:30 Arkadiusz Hiler
  2016-11-24 11:30 ` [PATCH 1/4] drm/i915: Rename intel_guc.h to intel_uc.h Arkadiusz Hiler
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2016-11-24 11:30 UTC (permalink / raw)
  To: intel-gfx

With HuC being imminent we could benefit from some code reorganization.
There will be more uC than just GuC so we should name files accordingly.

There is also need to use host2guc_*() family of functions, which are currently
limited to submission only.

Arkadiusz Hiler (4):
  drm/i915: Rename intel_guc.h to intel_uc.h
  drm/i915/guc: Move host2guc_*() to intel_uc.c
  drm/i915/guc: Init action_lock in the loader
  drm/i915/guc: Remove spurious include

 drivers/gpu/drm/i915/Makefile                    |   3 +-
 drivers/gpu/drm/i915/i915_drv.h                  |   2 +-
 drivers/gpu/drm/i915/i915_guc_submission.c       | 142 +-------------------
 drivers/gpu/drm/i915/intel_guc_loader.c          |   3 +-
 drivers/gpu/drm/i915/intel_uc.c                  | 164 +++++++++++++++++++++++
 drivers/gpu/drm/i915/{intel_guc.h => intel_uc.h} |  17 ++-
 6 files changed, 185 insertions(+), 146 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_uc.c
 rename drivers/gpu/drm/i915/{intel_guc.h => intel_uc.h} (90%)

-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/4] drm/i915: Rename intel_guc.h to intel_uc.h
  2016-11-24 11:30 [PATCH 0/4] GuC code reorganization Arkadiusz Hiler
@ 2016-11-24 11:30 ` Arkadiusz Hiler
  2016-11-24 11:30 ` [PATCH 2/4] drm/i915/guc: Move host2guc_*() to intel_uc.c Arkadiusz Hiler
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2016-11-24 11:30 UTC (permalink / raw)
  To: intel-gfx

GuC is not the only one micro controller we have.

There are also HuC and DMC.

Making the file more general will help with code organization.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h                  | 2 +-
 drivers/gpu/drm/i915/i915_guc_submission.c       | 2 +-
 drivers/gpu/drm/i915/intel_guc_loader.c          | 2 +-
 drivers/gpu/drm/i915/{intel_guc.h => intel_uc.h} | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)
 rename drivers/gpu/drm/i915/{intel_guc.h => intel_uc.h} (99%)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index e3f1a4b..be1ba08 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -55,7 +55,7 @@
 
 #include "intel_bios.h"
 #include "intel_dpll_mgr.h"
-#include "intel_guc.h"
+#include "intel_uc.h"
 #include "intel_lrc.h"
 #include "intel_ringbuffer.h"
 
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 4462112..e14220e 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -26,7 +26,7 @@
 #include <linux/debugfs.h>
 #include <linux/relay.h>
 #include "i915_drv.h"
-#include "intel_guc.h"
+#include "intel_uc.h"
 
 /**
  * DOC: GuC-based command submission
diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index e2d0bda..27f6fd5 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -28,7 +28,7 @@
  */
 #include <linux/firmware.h>
 #include "i915_drv.h"
-#include "intel_guc.h"
+#include "intel_uc.h"
 
 /**
  * DOC: GuC-specific firmware loader
diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_uc.h
similarity index 99%
rename from drivers/gpu/drm/i915/intel_guc.h
rename to drivers/gpu/drm/i915/intel_uc.h
index 02337a8..0d8a493 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -21,8 +21,8 @@
  * IN THE SOFTWARE.
  *
  */
-#ifndef _INTEL_GUC_H_
-#define _INTEL_GUC_H_
+#ifndef _INTEL_UC_H_
+#define _INTEL_UC_H_
 
 #include "intel_guc_fwif.h"
 #include "i915_guc_reg.h"
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/4] drm/i915/guc: Move host2guc_*() to intel_uc.c
  2016-11-24 11:30 [PATCH 0/4] GuC code reorganization Arkadiusz Hiler
  2016-11-24 11:30 ` [PATCH 1/4] drm/i915: Rename intel_guc.h to intel_uc.h Arkadiusz Hiler
@ 2016-11-24 11:30 ` Arkadiusz Hiler
  2016-11-24 11:30 ` [PATCH 3/4] drm/i915/guc: Init action_lock in the loader Arkadiusz Hiler
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2016-11-24 11:30 UTC (permalink / raw)
  To: intel-gfx

host2guc_*() series of functions were introduced in the
i915_guc_submission.c and their scope was limited only to that file.

Those are not submission specific though.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/Makefile              |   3 +-
 drivers/gpu/drm/i915/i915_guc_submission.c | 138 ------------------------
 drivers/gpu/drm/i915/intel_uc.c            | 164 +++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_uc.h            |  13 +++
 4 files changed, 179 insertions(+), 139 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_uc.c

diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile
index 580602d..3c30916 100644
--- a/drivers/gpu/drm/i915/Makefile
+++ b/drivers/gpu/drm/i915/Makefile
@@ -55,7 +55,8 @@ i915-y += i915_cmd_parser.o \
 	  intel_uncore.o
 
 # general-purpose microcontroller (GuC) support
-i915-y += intel_guc_loader.o \
+i915-y += intel_uc.o \
+	  intel_guc_loader.o \
 	  i915_guc_submission.o
 
 # autogenerated null render state
diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index e14220e..556b7f8 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -66,144 +66,6 @@
  */
 
 /*
- * Read GuC command/status register (SOFT_SCRATCH_0)
- * Return true if it contains a response rather than a command
- */
-static inline bool host2guc_action_response(struct drm_i915_private *dev_priv,
-					    u32 *status)
-{
-	u32 val = I915_READ(SOFT_SCRATCH(0));
-	*status = val;
-	return GUC2HOST_IS_RESPONSE(val);
-}
-
-static int host2guc_action(struct intel_guc *guc, u32 *data, u32 len)
-{
-	struct drm_i915_private *dev_priv = guc_to_i915(guc);
-	u32 status;
-	int i;
-	int ret;
-
-	if (WARN_ON(len < 1 || len > 15))
-		return -EINVAL;
-
-	mutex_lock(&guc->action_lock);
-	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
-
-	dev_priv->guc.action_count += 1;
-	dev_priv->guc.action_cmd = data[0];
-
-	for (i = 0; i < len; i++)
-		I915_WRITE(SOFT_SCRATCH(i), data[i]);
-
-	POSTING_READ(SOFT_SCRATCH(i - 1));
-
-	I915_WRITE(HOST2GUC_INTERRUPT, HOST2GUC_TRIGGER);
-
-	/*
-	 * Fast commands should complete in less than 10us, so sample quickly
-	 * up to that length of time, then switch to a slower sleep-wait loop.
-	 * No HOST2GUC command should ever take longer than 10ms.
-	 */
-	ret = wait_for_us(host2guc_action_response(dev_priv, &status), 10);
-	if (ret)
-		ret = wait_for(host2guc_action_response(dev_priv, &status), 10);
-	if (status != GUC2HOST_STATUS_SUCCESS) {
-		/*
-		 * Either the GuC explicitly returned an error (which
-		 * we convert to -EIO here) or no response at all was
-		 * received within the timeout limit (-ETIMEDOUT)
-		 */
-		if (ret != -ETIMEDOUT)
-			ret = -EIO;
-
-		DRM_WARN("Action 0x%X failed; ret=%d status=0x%08X response=0x%08X\n",
-			 data[0], ret, status, I915_READ(SOFT_SCRATCH(15)));
-
-		dev_priv->guc.action_fail += 1;
-		dev_priv->guc.action_err = ret;
-	}
-	dev_priv->guc.action_status = status;
-
-	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
-	mutex_unlock(&guc->action_lock);
-
-	return ret;
-}
-
-/*
- * Tell the GuC to allocate or deallocate a specific doorbell
- */
-
-static int host2guc_allocate_doorbell(struct intel_guc *guc,
-				      struct i915_guc_client *client)
-{
-	u32 data[2];
-
-	data[0] = HOST2GUC_ACTION_ALLOCATE_DOORBELL;
-	data[1] = client->ctx_index;
-
-	return host2guc_action(guc, data, 2);
-}
-
-static int host2guc_release_doorbell(struct intel_guc *guc,
-				     struct i915_guc_client *client)
-{
-	u32 data[2];
-
-	data[0] = HOST2GUC_ACTION_DEALLOCATE_DOORBELL;
-	data[1] = client->ctx_index;
-
-	return host2guc_action(guc, data, 2);
-}
-
-static int host2guc_sample_forcewake(struct intel_guc *guc,
-				     struct i915_guc_client *client)
-{
-	struct drm_i915_private *dev_priv = guc_to_i915(guc);
-	u32 data[2];
-
-	data[0] = HOST2GUC_ACTION_SAMPLE_FORCEWAKE;
-	/* WaRsDisableCoarsePowerGating:skl,bxt */
-	if (!intel_enable_rc6() || NEEDS_WaRsDisableCoarsePowerGating(dev_priv))
-		data[1] = 0;
-	else
-		/* bit 0 and 1 are for Render and Media domain separately */
-		data[1] = GUC_FORCEWAKE_RENDER | GUC_FORCEWAKE_MEDIA;
-
-	return host2guc_action(guc, data, ARRAY_SIZE(data));
-}
-
-static int host2guc_logbuffer_flush_complete(struct intel_guc *guc)
-{
-	u32 data[1];
-
-	data[0] = HOST2GUC_ACTION_LOG_BUFFER_FILE_FLUSH_COMPLETE;
-
-	return host2guc_action(guc, data, 1);
-}
-
-static int host2guc_force_logbuffer_flush(struct intel_guc *guc)
-{
-	u32 data[2];
-
-	data[0] = HOST2GUC_ACTION_FORCE_LOG_BUFFER_FLUSH;
-	data[1] = 0;
-
-	return host2guc_action(guc, data, 2);
-}
-
-static int host2guc_logging_control(struct intel_guc *guc, u32 control_val)
-{
-	u32 data[2];
-
-	data[0] = HOST2GUC_ACTION_UK_LOG_ENABLE_LOGGING;
-	data[1] = control_val;
-
-	return host2guc_action(guc, data, 2);
-}
-
-/*
  * Initialise, update, or clear doorbell data shared with the GuC
  *
  * These functions modify shared data and so need access to the mapped
diff --git a/drivers/gpu/drm/i915/intel_uc.c b/drivers/gpu/drm/i915/intel_uc.c
new file mode 100644
index 0000000..d833382
--- /dev/null
+++ b/drivers/gpu/drm/i915/intel_uc.c
@@ -0,0 +1,164 @@
+/*
+ * Copyright © 2016 Intel Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ *
+ */
+
+
+#include "i915_drv.h"
+#include "intel_uc.h"
+
+/*
+ * Read GuC command/status register (SOFT_SCRATCH_0)
+ * Return true if it contains a response rather than a command
+ */
+bool host2guc_action_response(struct drm_i915_private *dev_priv, u32 *status)
+{
+	u32 val = I915_READ(SOFT_SCRATCH(0));
+	*status = val;
+	return GUC2HOST_IS_RESPONSE(val);
+}
+
+int host2guc_action(struct intel_guc *guc, u32 *data, u32 len)
+{
+	struct drm_i915_private *dev_priv = guc_to_i915(guc);
+	u32 status;
+	int i;
+	int ret;
+
+	if (WARN_ON(len < 1 || len > 15))
+		return -EINVAL;
+
+	mutex_lock(&guc->action_lock);
+	intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL);
+
+	dev_priv->guc.action_count += 1;
+	dev_priv->guc.action_cmd = data[0];
+
+	for (i = 0; i < len; i++)
+		I915_WRITE(SOFT_SCRATCH(i), data[i]);
+
+	POSTING_READ(SOFT_SCRATCH(i - 1));
+
+	I915_WRITE(HOST2GUC_INTERRUPT, HOST2GUC_TRIGGER);
+
+	/*
+	 * Fast commands should complete in less than 10us, so sample quickly
+	 * up to that length of time, then switch to a slower sleep-wait loop.
+	 * No HOST2GUC command should ever take longer than 10ms.
+	 */
+	ret = wait_for_us(host2guc_action_response(dev_priv, &status), 10);
+	if (ret)
+		ret = wait_for(host2guc_action_response(dev_priv, &status), 10);
+	if (status != GUC2HOST_STATUS_SUCCESS) {
+		/*
+		 * Either the GuC explicitly returned an error (which
+		 * we convert to -EIO here) or no response at all was
+		 * received within the timeout limit (-ETIMEDOUT)
+		 */
+		if (ret != -ETIMEDOUT)
+			ret = -EIO;
+
+		DRM_WARN("Action 0x%X failed; ret=%d status=0x%08X response=0x%08X\n",
+			 data[0], ret, status, I915_READ(SOFT_SCRATCH(15)));
+
+		dev_priv->guc.action_fail += 1;
+		dev_priv->guc.action_err = ret;
+	}
+	dev_priv->guc.action_status = status;
+
+	intel_uncore_forcewake_put(dev_priv, FORCEWAKE_ALL);
+	mutex_unlock(&guc->action_lock);
+
+	return ret;
+}
+
+/*
+ * Tell the GuC to allocate or deallocate a specific doorbell
+ */
+
+int host2guc_allocate_doorbell(struct intel_guc *guc,
+			       struct i915_guc_client *client)
+{
+	u32 data[2];
+
+	data[0] = HOST2GUC_ACTION_ALLOCATE_DOORBELL;
+	data[1] = client->ctx_index;
+
+	return host2guc_action(guc, data, 2);
+}
+
+int host2guc_release_doorbell(struct intel_guc *guc,
+			      struct i915_guc_client *client)
+{
+	u32 data[2];
+
+	data[0] = HOST2GUC_ACTION_DEALLOCATE_DOORBELL;
+	data[1] = client->ctx_index;
+
+	return host2guc_action(guc, data, 2);
+}
+
+int host2guc_sample_forcewake(struct intel_guc *guc,
+			      struct i915_guc_client *client)
+{
+	struct drm_i915_private *dev_priv = guc_to_i915(guc);
+	u32 data[2];
+
+	data[0] = HOST2GUC_ACTION_SAMPLE_FORCEWAKE;
+	/* WaRsDisableCoarsePowerGating:skl,bxt */
+	if (!intel_enable_rc6() || NEEDS_WaRsDisableCoarsePowerGating(dev_priv))
+		data[1] = 0;
+	else
+		/* bit 0 and 1 are for Render and Media domain separately */
+		data[1] = GUC_FORCEWAKE_RENDER | GUC_FORCEWAKE_MEDIA;
+
+	return host2guc_action(guc, data, ARRAY_SIZE(data));
+}
+
+int host2guc_logbuffer_flush_complete(struct intel_guc *guc)
+{
+	u32 data[1];
+
+	data[0] = HOST2GUC_ACTION_LOG_BUFFER_FILE_FLUSH_COMPLETE;
+
+	return host2guc_action(guc, data, 1);
+}
+
+int host2guc_force_logbuffer_flush(struct intel_guc *guc)
+{
+	u32 data[2];
+
+	data[0] = HOST2GUC_ACTION_FORCE_LOG_BUFFER_FLUSH;
+	data[1] = 0;
+
+	return host2guc_action(guc, data, 2);
+}
+
+int host2guc_logging_control(struct intel_guc *guc, u32 control_val)
+{
+	u32 data[2];
+
+	data[0] = HOST2GUC_ACTION_UK_LOG_ENABLE_LOGGING;
+	data[1] = control_val;
+
+	return host2guc_action(guc, data, 2);
+}
diff --git a/drivers/gpu/drm/i915/intel_uc.h b/drivers/gpu/drm/i915/intel_uc.h
index 0d8a493..ec2d141 100644
--- a/drivers/gpu/drm/i915/intel_uc.h
+++ b/drivers/gpu/drm/i915/intel_uc.h
@@ -168,6 +168,19 @@ struct intel_guc {
 	struct mutex action_lock;
 };
 
+/* intel_uc.c */
+bool host2guc_action_response(struct drm_i915_private *dev_priv, u32 *status);
+int host2guc_action(struct intel_guc *guc, u32 *data, u32 len);
+int host2guc_allocate_doorbell(struct intel_guc *guc,
+			       struct i915_guc_client *client);
+int host2guc_release_doorbell(struct intel_guc *guc,
+			      struct i915_guc_client *client);
+int host2guc_sample_forcewake(struct intel_guc *guc,
+			      struct i915_guc_client *client);
+int host2guc_logbuffer_flush_complete(struct intel_guc *guc);
+int host2guc_force_logbuffer_flush(struct intel_guc *guc);
+int host2guc_logging_control(struct intel_guc *guc, u32 control_val);
+
 /* intel_guc_loader.c */
 extern void intel_guc_init(struct drm_device *dev);
 extern int intel_guc_setup(struct drm_device *dev);
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/4] drm/i915/guc: Init action_lock in the loader
  2016-11-24 11:30 [PATCH 0/4] GuC code reorganization Arkadiusz Hiler
  2016-11-24 11:30 ` [PATCH 1/4] drm/i915: Rename intel_guc.h to intel_uc.h Arkadiusz Hiler
  2016-11-24 11:30 ` [PATCH 2/4] drm/i915/guc: Move host2guc_*() to intel_uc.c Arkadiusz Hiler
@ 2016-11-24 11:30 ` Arkadiusz Hiler
  2016-11-24 11:30 ` [PATCH 4/4] drm/i915/guc: Remove spurious include Arkadiusz Hiler
  2016-11-24 12:15 ` [PATCH 0/4] GuC code reorganization Chris Wilson
  4 siblings, 0 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2016-11-24 11:30 UTC (permalink / raw)
  To: intel-gfx

Action_lock is a mutex used to serialise communication with GuC.

Since some functions which utilize the mutex (host2guc_*()) are no
longer limited to submission, initialization  should be handled as a
part of GuC setup.

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 1 -
 drivers/gpu/drm/i915/intel_guc_loader.c    | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 556b7f8..7c20721 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -1362,7 +1362,6 @@ int i915_guc_submission_init(struct drm_i915_private *dev_priv)
 
 	guc->ctx_pool_vma = vma;
 	ida_init(&guc->ctx_ids);
-	mutex_init(&guc->action_lock);
 	guc_log_create(guc);
 	guc_addon_create(guc);
 
diff --git a/drivers/gpu/drm/i915/intel_guc_loader.c b/drivers/gpu/drm/i915/intel_guc_loader.c
index 27f6fd5..a3e1c08 100644
--- a/drivers/gpu/drm/i915/intel_guc_loader.c
+++ b/drivers/gpu/drm/i915/intel_guc_loader.c
@@ -484,6 +484,7 @@ int intel_guc_setup(struct drm_device *dev)
 		goto fail;
 	}
 
+	mutex_init(&dev_priv->guc.action_lock);
 	guc_interrupts_release(dev_priv);
 	gen9_reset_guc_interrupts(dev_priv);
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 4/4] drm/i915/guc: Remove spurious include
  2016-11-24 11:30 [PATCH 0/4] GuC code reorganization Arkadiusz Hiler
                   ` (2 preceding siblings ...)
  2016-11-24 11:30 ` [PATCH 3/4] drm/i915/guc: Init action_lock in the loader Arkadiusz Hiler
@ 2016-11-24 11:30 ` Arkadiusz Hiler
  2016-11-24 12:15 ` [PATCH 0/4] GuC code reorganization Chris Wilson
  4 siblings, 0 replies; 6+ messages in thread
From: Arkadiusz Hiler @ 2016-11-24 11:30 UTC (permalink / raw)
  To: intel-gfx

Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michal Winiarski <michal.winiarski@intel.com>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index 7c20721..aefe0dd 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -21,7 +21,6 @@
  * IN THE SOFTWARE.
  *
  */
-#include <linux/firmware.h>
 #include <linux/circ_buf.h>
 #include <linux/debugfs.h>
 #include <linux/relay.h>
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 0/4] GuC code reorganization
  2016-11-24 11:30 [PATCH 0/4] GuC code reorganization Arkadiusz Hiler
                   ` (3 preceding siblings ...)
  2016-11-24 11:30 ` [PATCH 4/4] drm/i915/guc: Remove spurious include Arkadiusz Hiler
@ 2016-11-24 12:15 ` Chris Wilson
  4 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2016-11-24 12:15 UTC (permalink / raw)
  To: Arkadiusz Hiler; +Cc: intel-gfx

On Thu, Nov 24, 2016 at 12:30:39PM +0100, Arkadiusz Hiler wrote:
> With HuC being imminent we could benefit from some code reorganization.
> There will be more uC than just GuC so we should name files accordingly.
> 
> There is also need to use host2guc_*() family of functions, which are currently
> limited to submission only.
> 
> Arkadiusz Hiler (4):
>   drm/i915: Rename intel_guc.h to intel_uc.h

Ok.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

>   drm/i915/guc: Move host2guc_*() to intel_uc.c

host2guc_action() is generic, but host2guc_allocate_doorbell() is not.

host2guc is an unconventional prefix, it should be intel_uc_<verb> to
match its new location. (I like intel_uc_send / intel_uc_recv but I'm
just an old fuddy-duddy.)

>   drm/i915/guc: Init action_lock in the loader

Where's intel_uc_init() ? The lock is for the uc sidechannel, it should
only really be used in intel_uc.c for intel_uc_send / intel_uc_recb.

>   drm/i915/guc: Remove spurious include

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-11-24 12:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-24 11:30 [PATCH 0/4] GuC code reorganization Arkadiusz Hiler
2016-11-24 11:30 ` [PATCH 1/4] drm/i915: Rename intel_guc.h to intel_uc.h Arkadiusz Hiler
2016-11-24 11:30 ` [PATCH 2/4] drm/i915/guc: Move host2guc_*() to intel_uc.c Arkadiusz Hiler
2016-11-24 11:30 ` [PATCH 3/4] drm/i915/guc: Init action_lock in the loader Arkadiusz Hiler
2016-11-24 11:30 ` [PATCH 4/4] drm/i915/guc: Remove spurious include Arkadiusz Hiler
2016-11-24 12:15 ` [PATCH 0/4] GuC code reorganization Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.