All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions
@ 2018-03-19 13:49 Michal Wajdeczko
  2018-03-19 13:49 ` [PATCH v2 2/3] drm/i915/guc: Drop union guc_log_control Michal Wajdeczko
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Michal Wajdeczko @ 2018-03-19 13:49 UTC (permalink / raw)
  To: intel-gfx

We should avoid using guc_log prefix for functions that don't
operate on GuC log, but rather request action from the GuC.
Better to use guc_action prefix.

v2: rebase + naming compromise

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_log.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index 4cb422c..39928e6 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -38,7 +38,7 @@
  * registers value.
  */
 
-static int guc_log_flush_complete(struct intel_guc *guc)
+static int guc_action_flush_log_complete(struct intel_guc *guc)
 {
 	u32 action[] = {
 		INTEL_GUC_ACTION_LOG_BUFFER_FILE_FLUSH_COMPLETE
@@ -47,7 +47,7 @@ static int guc_log_flush_complete(struct intel_guc *guc)
 	return intel_guc_send(guc, action, ARRAY_SIZE(action));
 }
 
-static int guc_log_flush(struct intel_guc *guc)
+static int guc_action_flush_log(struct intel_guc *guc)
 {
 	u32 action[] = {
 		INTEL_GUC_ACTION_FORCE_LOG_BUFFER_FLUSH,
@@ -57,8 +57,8 @@ static int guc_log_flush(struct intel_guc *guc)
 	return intel_guc_send(guc, action, ARRAY_SIZE(action));
 }
 
-static int guc_log_control(struct intel_guc *guc, bool enable,
-			   bool default_logging, u32 verbosity)
+static int guc_action_control_log(struct intel_guc *guc, bool enable,
+				  bool default_logging, u32 verbosity)
 {
 	union guc_log_control control_val = {
 		{
@@ -449,7 +449,7 @@ static void guc_log_capture_logs(struct intel_guc_log *log)
 	 * time, so get/put should be really quick.
 	 */
 	intel_runtime_pm_get(dev_priv);
-	guc_log_flush_complete(guc);
+	guc_action_flush_log_complete(guc);
 	intel_runtime_pm_put(dev_priv);
 }
 
@@ -527,9 +527,9 @@ int intel_guc_log_level_set(struct intel_guc_log *log, u64 val)
 	}
 
 	intel_runtime_pm_get(dev_priv);
-	ret = guc_log_control(guc, GUC_LOG_LEVEL_TO_VERBOSE(val),
-			      GUC_LOG_LEVEL_TO_ENABLED(val),
-			      GUC_LOG_LEVEL_TO_VERBOSITY(val));
+	ret = guc_action_control_log(guc, GUC_LOG_LEVEL_TO_VERBOSE(val),
+				     GUC_LOG_LEVEL_TO_ENABLED(val),
+				     GUC_LOG_LEVEL_TO_VERBOSITY(val));
 	intel_runtime_pm_put(dev_priv);
 	if (ret) {
 		DRM_DEBUG_DRIVER("guc_log_control action failed %d\n", ret);
@@ -611,7 +611,7 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log)
 	flush_work(&log->relay.flush_work);
 
 	intel_runtime_pm_get(i915);
-	guc_log_flush(guc);
+	guc_action_flush_log(guc);
 	intel_runtime_pm_put(i915);
 
 	/* GuC would have updated log buffer by now, so capture it */
-- 
1.9.1

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

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

* [PATCH v2 2/3] drm/i915/guc: Drop union guc_log_control
  2018-03-19 13:49 [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michal Wajdeczko
@ 2018-03-19 13:49 ` Michal Wajdeczko
  2018-03-19 15:32   ` Michał Winiarski
  2018-03-19 13:49 ` [PATCH v2 3/3] drm/i915/guc: Move enable/disable msg functions to GuC header Michal Wajdeczko
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Michal Wajdeczko @ 2018-03-19 13:49 UTC (permalink / raw)
  To: intel-gfx

Usually we use shift/mask macros for bit field definitions.
Union guc_log_control was not following that pattern.

Additional bonus:

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-25 (-25)
Function                                     old     new   delta
intel_guc_log_level_set                      388     363     -25

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
---
 drivers/gpu/drm/i915/intel_guc_fwif.h | 16 +++++-----------
 drivers/gpu/drm/i915/intel_guc_log.c  | 11 +++--------
 2 files changed, 8 insertions(+), 19 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
index 4971685..72941bd 100644
--- a/drivers/gpu/drm/i915/intel_guc_fwif.h
+++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
@@ -534,17 +534,6 @@ struct guc_log_buffer_state {
 	u32 version;
 } __packed;
 
-union guc_log_control {
-	struct {
-		u32 logging_enabled:1;
-		u32 reserved1:3;
-		u32 verbosity:4;
-		u32 default_logging:1;
-		u32 reserved2:23;
-	};
-	u32 value;
-} __packed;
-
 struct guc_ctx_report {
 	u32 report_return_status;
 	u32 reserved1[64];
@@ -603,6 +592,11 @@ enum intel_guc_report_status {
 	INTEL_GUC_REPORT_STATUS_COMPLETE = 0x4,
 };
 
+#define GUC_LOG_CONTROL_LOGGING_ENABLED	(1 << 0)
+#define GUC_LOG_CONTROL_VERBOSITY_SHIFT	4
+#define GUC_LOG_CONTROL_VERBOSITY_MASK	(0xF << GUC_LOG_CONTROL_VERBOSITY_SHIFT)
+#define GUC_LOG_CONTROL_DEFAULT_LOGGING	(1 << 8)
+
 /*
  * The GuC sends its response to a command by overwriting the
  * command in SS0. The response is distinguishable from a command
diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index 39928e6..c84b67f 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -60,16 +60,11 @@ static int guc_action_flush_log(struct intel_guc *guc)
 static int guc_action_control_log(struct intel_guc *guc, bool enable,
 				  bool default_logging, u32 verbosity)
 {
-	union guc_log_control control_val = {
-		{
-			.logging_enabled = enable,
-			.verbosity = verbosity,
-			.default_logging = default_logging,
-		},
-	};
 	u32 action[] = {
 		INTEL_GUC_ACTION_UK_LOG_ENABLE_LOGGING,
-		control_val.value
+		(enable ? GUC_LOG_CONTROL_LOGGING_ENABLED : 0) |
+		(verbosity << GUC_LOG_CONTROL_VERBOSITY_SHIFT) |
+		(default_logging ? GUC_LOG_CONTROL_DEFAULT_LOGGING : 0)
 	};
 
 	return intel_guc_send(guc, action, ARRAY_SIZE(action));
-- 
1.9.1

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

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

* [PATCH v2 3/3] drm/i915/guc: Move enable/disable msg functions to GuC header
  2018-03-19 13:49 [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michal Wajdeczko
  2018-03-19 13:49 ` [PATCH v2 2/3] drm/i915/guc: Drop union guc_log_control Michal Wajdeczko
@ 2018-03-19 13:49 ` Michal Wajdeczko
  2018-03-19 15:33   ` Michał Winiarski
  2018-03-19 15:15 ` [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michał Winiarski
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Michal Wajdeczko @ 2018-03-19 13:49 UTC (permalink / raw)
  To: intel-gfx

While today we are modifying GuC enabled msg mask only in GuC
log, this code should be defined as generic GuC to allow future
code reuse.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_guc.h     | 14 ++++++++++++++
 drivers/gpu/drm/i915/intel_guc_log.c | 26 ++++++++++++--------------
 2 files changed, 26 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_guc.h b/drivers/gpu/drm/i915/intel_guc.h
index 9a95d15..13f3d1d 100644
--- a/drivers/gpu/drm/i915/intel_guc.h
+++ b/drivers/gpu/drm/i915/intel_guc.h
@@ -155,4 +155,18 @@ static inline int intel_guc_sanitize(struct intel_guc *guc)
 	return 0;
 }
 
+static inline void intel_guc_enable_msg(struct intel_guc *guc, u32 mask)
+{
+	spin_lock_irq(&guc->irq_lock);
+	guc->msg_enabled_mask |= mask;
+	spin_unlock_irq(&guc->irq_lock);
+}
+
+static inline void intel_guc_disable_msg(struct intel_guc *guc, u32 mask)
+{
+	spin_lock_irq(&guc->irq_lock);
+	guc->msg_enabled_mask &= ~mask;
+	spin_unlock_irq(&guc->irq_lock);
+}
+
 #endif
diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index c84b67f..49aeaae 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -70,25 +70,23 @@ static int guc_action_control_log(struct intel_guc *guc, bool enable,
 	return intel_guc_send(guc, action, ARRAY_SIZE(action));
 }
 
-static void guc_flush_log_msg_enable(struct intel_guc *guc)
+static inline struct intel_guc *log_to_guc(struct intel_guc_log *log)
 {
-	spin_lock_irq(&guc->irq_lock);
-	guc->msg_enabled_mask |= INTEL_GUC_RECV_MSG_FLUSH_LOG_BUFFER |
-				 INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED;
-	spin_unlock_irq(&guc->irq_lock);
+	return container_of(log, struct intel_guc, log);
 }
 
-static void guc_flush_log_msg_disable(struct intel_guc *guc)
+static void guc_log_enable_flush_events(struct intel_guc_log *log)
 {
-	spin_lock_irq(&guc->irq_lock);
-	guc->msg_enabled_mask &= ~(INTEL_GUC_RECV_MSG_FLUSH_LOG_BUFFER |
-				   INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED);
-	spin_unlock_irq(&guc->irq_lock);
+	intel_guc_enable_msg(log_to_guc(log),
+			     INTEL_GUC_RECV_MSG_FLUSH_LOG_BUFFER |
+			     INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED);
 }
 
-static inline struct intel_guc *log_to_guc(struct intel_guc_log *log)
+static void guc_log_disable_flush_events(struct intel_guc_log *log)
 {
-	return container_of(log, struct intel_guc, log);
+	intel_guc_disable_msg(log_to_guc(log),
+			      INTEL_GUC_RECV_MSG_FLUSH_LOG_BUFFER |
+			      INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED);
 }
 
 /*
@@ -575,7 +573,7 @@ int intel_guc_log_relay_open(struct intel_guc_log *log)
 
 	mutex_unlock(&log->relay.lock);
 
-	guc_flush_log_msg_enable(log_to_guc(log));
+	guc_log_enable_flush_events(log);
 
 	/*
 	 * When GuC is logging without us relaying to userspace, we're ignoring
@@ -615,7 +613,7 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log)
 
 void intel_guc_log_relay_close(struct intel_guc_log *log)
 {
-	guc_flush_log_msg_disable(log_to_guc(log));
+	guc_log_disable_flush_events(log);
 	flush_work(&log->relay.flush_work);
 
 	mutex_lock(&log->relay.lock);
-- 
1.9.1

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

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

* Re: [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions
  2018-03-19 13:49 [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michal Wajdeczko
  2018-03-19 13:49 ` [PATCH v2 2/3] drm/i915/guc: Drop union guc_log_control Michal Wajdeczko
  2018-03-19 13:49 ` [PATCH v2 3/3] drm/i915/guc: Move enable/disable msg functions to GuC header Michal Wajdeczko
@ 2018-03-19 15:15 ` Michał Winiarski
  2018-03-19 16:26 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/3] " Patchwork
  2018-03-19 19:26 ` ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Michał Winiarski @ 2018-03-19 15:15 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

On Mon, Mar 19, 2018 at 01:49:22PM +0000, Michal Wajdeczko wrote:
> We should avoid using guc_log prefix for functions that don't
> operate on GuC log, but rather request action from the GuC.
> Better to use guc_action prefix.
> 
> v2: rebase + naming compromise
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>

Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

-Michał

> ---
>  drivers/gpu/drm/i915/intel_guc_log.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 2/3] drm/i915/guc: Drop union guc_log_control
  2018-03-19 13:49 ` [PATCH v2 2/3] drm/i915/guc: Drop union guc_log_control Michal Wajdeczko
@ 2018-03-19 15:32   ` Michał Winiarski
  2018-03-19 15:45     ` Michal Wajdeczko
  0 siblings, 1 reply; 9+ messages in thread
From: Michał Winiarski @ 2018-03-19 15:32 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

On Mon, Mar 19, 2018 at 01:49:23PM +0000, Michal Wajdeczko wrote:
> Usually we use shift/mask macros for bit field definitions.
> Union guc_log_control was not following that pattern.
> 
> Additional bonus:
> 
> add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-25 (-25)
> Function                                     old     new   delta
> intel_guc_log_level_set                      388     363     -25
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_guc_fwif.h | 16 +++++-----------
>  drivers/gpu/drm/i915/intel_guc_log.c  | 11 +++--------
>  2 files changed, 8 insertions(+), 19 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h b/drivers/gpu/drm/i915/intel_guc_fwif.h
> index 4971685..72941bd 100644
> --- a/drivers/gpu/drm/i915/intel_guc_fwif.h
> +++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
> @@ -534,17 +534,6 @@ struct guc_log_buffer_state {
>  	u32 version;
>  } __packed;
>  
> -union guc_log_control {
> -	struct {
> -		u32 logging_enabled:1;
> -		u32 reserved1:3;
> -		u32 verbosity:4;
> -		u32 default_logging:1;
> -		u32 reserved2:23;
> -	};
> -	u32 value;
> -} __packed;
> -
>  struct guc_ctx_report {
>  	u32 report_return_status;
>  	u32 reserved1[64];
> @@ -603,6 +592,11 @@ enum intel_guc_report_status {
>  	INTEL_GUC_REPORT_STATUS_COMPLETE = 0x4,
>  };
>  
> +#define GUC_LOG_CONTROL_LOGGING_ENABLED	(1 << 0)
> +#define GUC_LOG_CONTROL_VERBOSITY_SHIFT	4
> +#define GUC_LOG_CONTROL_VERBOSITY_MASK	(0xF << GUC_LOG_CONTROL_VERBOSITY_SHIFT)

You're not using the mask anywhere. Is it just to describe the iface?
Or was it supposed to be used in guc_action_control_log?
(there's a slight change in behavior here, which may lead to confusion when
passing out-of-range verbosity)

-Michał

> +#define GUC_LOG_CONTROL_DEFAULT_LOGGING	(1 << 8)
> +
>  /*
>   * The GuC sends its response to a command by overwriting the
>   * command in SS0. The response is distinguishable from a command
> diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
> index 39928e6..c84b67f 100644
> --- a/drivers/gpu/drm/i915/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/intel_guc_log.c
> @@ -60,16 +60,11 @@ static int guc_action_flush_log(struct intel_guc *guc)
>  static int guc_action_control_log(struct intel_guc *guc, bool enable,
>  				  bool default_logging, u32 verbosity)
>  {
> -	union guc_log_control control_val = {
> -		{
> -			.logging_enabled = enable,
> -			.verbosity = verbosity,
> -			.default_logging = default_logging,
> -		},
> -	};
>  	u32 action[] = {
>  		INTEL_GUC_ACTION_UK_LOG_ENABLE_LOGGING,
> -		control_val.value
> +		(enable ? GUC_LOG_CONTROL_LOGGING_ENABLED : 0) |
> +		(verbosity << GUC_LOG_CONTROL_VERBOSITY_SHIFT) |
> +		(default_logging ? GUC_LOG_CONTROL_DEFAULT_LOGGING : 0)
>  	};
>  
>  	return intel_guc_send(guc, action, ARRAY_SIZE(action));
> -- 
> 1.9.1
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 3/3] drm/i915/guc: Move enable/disable msg functions to GuC header
  2018-03-19 13:49 ` [PATCH v2 3/3] drm/i915/guc: Move enable/disable msg functions to GuC header Michal Wajdeczko
@ 2018-03-19 15:33   ` Michał Winiarski
  0 siblings, 0 replies; 9+ messages in thread
From: Michał Winiarski @ 2018-03-19 15:33 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

On Mon, Mar 19, 2018 at 01:49:24PM +0000, Michal Wajdeczko wrote:
> While today we are modifying GuC enabled msg mask only in GuC
> log, this code should be defined as generic GuC to allow future
> code reuse.
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Michal Winiarski <michal.winiarski@intel.com>
> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>

-Michał

> ---
>  drivers/gpu/drm/i915/intel_guc.h     | 14 ++++++++++++++
>  drivers/gpu/drm/i915/intel_guc_log.c | 26 ++++++++++++--------------
>  2 files changed, 26 insertions(+), 14 deletions(-)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 2/3] drm/i915/guc: Drop union guc_log_control
  2018-03-19 15:32   ` Michał Winiarski
@ 2018-03-19 15:45     ` Michal Wajdeczko
  0 siblings, 0 replies; 9+ messages in thread
From: Michal Wajdeczko @ 2018-03-19 15:45 UTC (permalink / raw)
  To: Michał Winiarski; +Cc: intel-gfx

On Mon, 19 Mar 2018 16:32:05 +0100, Michał Winiarski  
<michal.winiarski@intel.com> wrote:

> On Mon, Mar 19, 2018 at 01:49:23PM +0000, Michal Wajdeczko wrote:
>> Usually we use shift/mask macros for bit field definitions.
>> Union guc_log_control was not following that pattern.
>>
>> Additional bonus:
>>
>> add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-25 (-25)
>> Function                                     old     new   delta
>> intel_guc_log_level_set                      388     363     -25
>>
>> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
>> Cc: Michal Winiarski <michal.winiarski@intel.com>
>> Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
>> ---
>>  drivers/gpu/drm/i915/intel_guc_fwif.h | 16 +++++-----------
>>  drivers/gpu/drm/i915/intel_guc_log.c  | 11 +++--------
>>  2 files changed, 8 insertions(+), 19 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_guc_fwif.h  
>> b/drivers/gpu/drm/i915/intel_guc_fwif.h
>> index 4971685..72941bd 100644
>> --- a/drivers/gpu/drm/i915/intel_guc_fwif.h
>> +++ b/drivers/gpu/drm/i915/intel_guc_fwif.h
>> @@ -534,17 +534,6 @@ struct guc_log_buffer_state {
>>  	u32 version;
>>  } __packed;
>>
>> -union guc_log_control {
>> -	struct {
>> -		u32 logging_enabled:1;
>> -		u32 reserved1:3;
>> -		u32 verbosity:4;
>> -		u32 default_logging:1;
>> -		u32 reserved2:23;
>> -	};
>> -	u32 value;
>> -} __packed;
>> -
>>  struct guc_ctx_report {
>>  	u32 report_return_status;
>>  	u32 reserved1[64];
>> @@ -603,6 +592,11 @@ enum intel_guc_report_status {
>>  	INTEL_GUC_REPORT_STATUS_COMPLETE = 0x4,
>>  };
>>
>> +#define GUC_LOG_CONTROL_LOGGING_ENABLED	(1 << 0)
>> +#define GUC_LOG_CONTROL_VERBOSITY_SHIFT	4
>> +#define GUC_LOG_CONTROL_VERBOSITY_MASK	(0xF <<  
>> GUC_LOG_CONTROL_VERBOSITY_SHIFT)
>
> You're not using the mask anywhere. Is it just to describe the iface?

yep, only bit-field interface

> Or was it supposed to be used in guc_action_control_log?
> (there's a slight change in behavior here, which may lead to confusion  
> when
> passing out-of-range verbosity)

As you already check for out-of-range verbosity level passed by user:

	if (val < GUC_LOG_LEVEL_DISABLED ||
	    val > GUC_VERBOSITY_TO_LOG_LEVEL(GUC_LOG_VERBOSITY_MAX))
		return -EINVAL;

I can make my check in guc_action() more assertive:

	GEM_BUG_ON(verbosity > GUC_LOG_VERBOSITY_MAX)

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

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

* ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915/guc: Unify naming of private GuC action functions
  2018-03-19 13:49 [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michal Wajdeczko
                   ` (2 preceding siblings ...)
  2018-03-19 15:15 ` [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michał Winiarski
@ 2018-03-19 16:26 ` Patchwork
  2018-03-19 19:26 ` ✓ Fi.CI.IGT: " Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-03-19 16:26 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

== Series Details ==

Series: series starting with [v2,1/3] drm/i915/guc: Unify naming of private GuC action functions
URL   : https://patchwork.freedesktop.org/series/40190/
State : success

== Summary ==

Series 40190v1 series starting with [v2,1/3] drm/i915/guc: Unify naming of private GuC action functions
https://patchwork.freedesktop.org/api/1.0/series/40190/revisions/1/mbox/

---- Known issues:

Test gem_mmap_gtt:
        Subgroup basic-small-bo-tiledx:
                fail       -> PASS       (fi-gdg-551) fdo#102575
Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (fi-cfl-s2) fdo#100368
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:285  pass:264  dwarn:0   dfail:0   fail:0   skip:21  time:429s
fi-bdw-gvtdvm    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:445s
fi-blb-e6850     total:285  pass:220  dwarn:1   dfail:0   fail:0   skip:64  time:385s
fi-bsw-n3050     total:285  pass:239  dwarn:0   dfail:0   fail:0   skip:46  time:534s
fi-bwr-2160      total:285  pass:180  dwarn:0   dfail:0   fail:0   skip:105 time:297s
fi-bxt-dsi       total:285  pass:255  dwarn:0   dfail:0   fail:0   skip:30  time:514s
fi-bxt-j4205     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:512s
fi-byt-j1900     total:285  pass:250  dwarn:0   dfail:0   fail:0   skip:35  time:517s
fi-byt-n2820     total:285  pass:246  dwarn:0   dfail:0   fail:0   skip:39  time:504s
fi-cfl-8700k     total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:410s
fi-cfl-s2        total:285  pass:258  dwarn:0   dfail:0   fail:1   skip:26  time:573s
fi-cfl-u         total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:510s
fi-cnl-drrs      total:285  pass:254  dwarn:3   dfail:0   fail:0   skip:28  time:526s
fi-elk-e7500     total:285  pass:225  dwarn:1   dfail:0   fail:0   skip:59  time:426s
fi-gdg-551       total:285  pass:177  dwarn:0   dfail:0   fail:0   skip:108 time:317s
fi-glk-1         total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:536s
fi-hsw-4770      total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:406s
fi-ilk-650       total:285  pass:225  dwarn:0   dfail:0   fail:0   skip:60  time:427s
fi-ivb-3520m     total:285  pass:256  dwarn:0   dfail:0   fail:0   skip:29  time:473s
fi-ivb-3770      total:285  pass:252  dwarn:0   dfail:0   fail:0   skip:33  time:428s
fi-kbl-7500u     total:285  pass:260  dwarn:1   dfail:0   fail:0   skip:24  time:481s
fi-kbl-7567u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:465s
fi-kbl-r         total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:514s
fi-pnv-d510      total:285  pass:219  dwarn:1   dfail:0   fail:0   skip:65  time:654s
fi-skl-6260u     total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:446s
fi-skl-6600u     total:285  pass:258  dwarn:0   dfail:0   fail:0   skip:27  time:531s
fi-skl-6700hq    total:285  pass:259  dwarn:0   dfail:0   fail:0   skip:26  time:540s
fi-skl-6700k2    total:285  pass:261  dwarn:0   dfail:0   fail:0   skip:24  time:508s
fi-skl-6770hq    total:285  pass:265  dwarn:0   dfail:0   fail:0   skip:20  time:498s
fi-skl-guc       total:285  pass:257  dwarn:0   dfail:0   fail:0   skip:28  time:430s
fi-skl-gvtdvm    total:285  pass:262  dwarn:0   dfail:0   fail:0   skip:23  time:445s
fi-snb-2520m     total:242  pass:208  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:285  pass:245  dwarn:0   dfail:0   fail:0   skip:40  time:399s

9b79492f331e36cf2e08d65ab3221abb66f67844 drm-tip: 2018y-03m-19d-14h-18m-12s UTC integration manifest
2d92dd0eb2bc drm/i915/guc: Move enable/disable msg functions to GuC header
811b8a5cc50f drm/i915/guc: Drop union guc_log_control
47e7b038230a drm/i915/guc: Unify naming of private GuC action functions

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8394/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for series starting with [v2,1/3] drm/i915/guc: Unify naming of private GuC action functions
  2018-03-19 13:49 [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michal Wajdeczko
                   ` (3 preceding siblings ...)
  2018-03-19 16:26 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/3] " Patchwork
@ 2018-03-19 19:26 ` Patchwork
  4 siblings, 0 replies; 9+ messages in thread
From: Patchwork @ 2018-03-19 19:26 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

== Series Details ==

Series: series starting with [v2,1/3] drm/i915/guc: Unify naming of private GuC action functions
URL   : https://patchwork.freedesktop.org/series/40190/
State : success

== Summary ==

---- Possible new issues:

Test pm_rc6_residency:
        Subgroup rc6-accuracy:
                skip       -> PASS       (shard-snb)

---- Known issues:

Test kms_flip:
        Subgroup dpms-vs-vblank-race:
                fail       -> PASS       (shard-hsw) fdo#103060
Test kms_sysfs_edid_timing:
                warn       -> PASS       (shard-apl) fdo#100047

fdo#103060 https://bugs.freedesktop.org/show_bug.cgi?id=103060
fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047

shard-apl        total:3442 pass:1815 dwarn:1   dfail:0   fail:7   skip:1619 time:12953s
shard-hsw        total:3442 pass:1768 dwarn:1   dfail:0   fail:1   skip:1671 time:11956s
shard-snb        total:3442 pass:1359 dwarn:1   dfail:0   fail:2   skip:2080 time:7220s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8394/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-03-19 19:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-19 13:49 [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michal Wajdeczko
2018-03-19 13:49 ` [PATCH v2 2/3] drm/i915/guc: Drop union guc_log_control Michal Wajdeczko
2018-03-19 15:32   ` Michał Winiarski
2018-03-19 15:45     ` Michal Wajdeczko
2018-03-19 13:49 ` [PATCH v2 3/3] drm/i915/guc: Move enable/disable msg functions to GuC header Michal Wajdeczko
2018-03-19 15:33   ` Michał Winiarski
2018-03-19 15:15 ` [PATCH v2 1/3] drm/i915/guc: Unify naming of private GuC action functions Michał Winiarski
2018-03-19 16:26 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/3] " Patchwork
2018-03-19 19:26 ` ✓ Fi.CI.IGT: " Patchwork

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.