All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: host1x: Fix MLOCK's debug info
@ 2015-06-28 19:27 ` Dmitry Osipenko
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2015-06-28 19:27 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Dmitry Osipenko, Terje Bergström,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

MLOCK's debug info, spewed on CDMA timeout, contains meaningless MLOCK
owner channel ID because HOST1X_SYNC_MLOCK_OWNER_CHID_F() returns shifted
value, while unshifted should be used. Fix it by changing '_F' to '_V'.

Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/gpu/host1x/hw/debug_hw.c         | 2 +-
 drivers/gpu/host1x/hw/hw_host1x01_sync.h | 8 ++++----
 drivers/gpu/host1x/hw/hw_host1x02_sync.h | 8 ++++----
 drivers/gpu/host1x/hw/hw_host1x04_sync.h | 8 ++++----
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
index 791de93..cc3f182 100644
--- a/drivers/gpu/host1x/hw/debug_hw.c
+++ b/drivers/gpu/host1x/hw/debug_hw.c
@@ -298,7 +298,7 @@ static void host1x_debug_show_mlocks(struct host1x *host, struct output *o)
 			host1x_sync_readl(host, HOST1X_SYNC_MLOCK_OWNER(i));
 		if (HOST1X_SYNC_MLOCK_OWNER_CH_OWNS_V(owner))
 			host1x_debug_output(o, "%d: locked by channel %d\n",
-				i, HOST1X_SYNC_MLOCK_OWNER_CHID_F(owner));
+				i, HOST1X_SYNC_MLOCK_OWNER_CHID_V(owner));
 		else if (HOST1X_SYNC_MLOCK_OWNER_CPU_OWNS_V(owner))
 			host1x_debug_output(o, "%d: locked by cpu\n", i);
 		else
diff --git a/drivers/gpu/host1x/hw/hw_host1x01_sync.h b/drivers/gpu/host1x/hw/hw_host1x01_sync.h
index ac704e5..31238c2 100644
--- a/drivers/gpu/host1x/hw/hw_host1x01_sync.h
+++ b/drivers/gpu/host1x/hw/hw_host1x01_sync.h
@@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
 }
 #define HOST1X_SYNC_MLOCK_OWNER(id) \
 	host1x_sync_mlock_owner_r(id)
-static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
+static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
 {
-	return (v & 0xf) << 8;
+	return (v >> 8) & 0xf;
 }
-#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
-	host1x_sync_mlock_owner_chid_f(v)
+#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
+	host1x_sync_mlock_owner_chid_v(v)
 static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
 {
 	return (r >> 1) & 0x1;
diff --git a/drivers/gpu/host1x/hw/hw_host1x02_sync.h b/drivers/gpu/host1x/hw/hw_host1x02_sync.h
index 4495401..540c7b6 100644
--- a/drivers/gpu/host1x/hw/hw_host1x02_sync.h
+++ b/drivers/gpu/host1x/hw/hw_host1x02_sync.h
@@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
 }
 #define HOST1X_SYNC_MLOCK_OWNER(id) \
 	host1x_sync_mlock_owner_r(id)
-static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
+static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
 {
-	return (v & 0xf) << 8;
+	return (v >> 8) & 0xf;
 }
-#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
-	host1x_sync_mlock_owner_chid_f(v)
+#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
+	host1x_sync_mlock_owner_chid_v(v)
 static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
 {
 	return (r >> 1) & 0x1;
diff --git a/drivers/gpu/host1x/hw/hw_host1x04_sync.h b/drivers/gpu/host1x/hw/hw_host1x04_sync.h
index ef2275b..3d6c8ec 100644
--- a/drivers/gpu/host1x/hw/hw_host1x04_sync.h
+++ b/drivers/gpu/host1x/hw/hw_host1x04_sync.h
@@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
 }
 #define HOST1X_SYNC_MLOCK_OWNER(id) \
 	host1x_sync_mlock_owner_r(id)
-static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
+static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
 {
-	return (v & 0xf) << 8;
+	return (v >> 8) & 0xf;
 }
-#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
-	host1x_sync_mlock_owner_chid_f(v)
+#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
+	host1x_sync_mlock_owner_chid_v(v)
 static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
 {
 	return (r >> 1) & 0x1;
-- 
2.4.4

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

* [PATCH] gpu: host1x: Fix MLOCK's debug info
@ 2015-06-28 19:27 ` Dmitry Osipenko
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2015-06-28 19:27 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Dmitry Osipenko, Terje Bergström, dri-devel, linux-tegra,
	linux-kernel

MLOCK's debug info, spewed on CDMA timeout, contains meaningless MLOCK
owner channel ID because HOST1X_SYNC_MLOCK_OWNER_CHID_F() returns shifted
value, while unshifted should be used. Fix it by changing '_F' to '_V'.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/gpu/host1x/hw/debug_hw.c         | 2 +-
 drivers/gpu/host1x/hw/hw_host1x01_sync.h | 8 ++++----
 drivers/gpu/host1x/hw/hw_host1x02_sync.h | 8 ++++----
 drivers/gpu/host1x/hw/hw_host1x04_sync.h | 8 ++++----
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
index 791de93..cc3f182 100644
--- a/drivers/gpu/host1x/hw/debug_hw.c
+++ b/drivers/gpu/host1x/hw/debug_hw.c
@@ -298,7 +298,7 @@ static void host1x_debug_show_mlocks(struct host1x *host, struct output *o)
 			host1x_sync_readl(host, HOST1X_SYNC_MLOCK_OWNER(i));
 		if (HOST1X_SYNC_MLOCK_OWNER_CH_OWNS_V(owner))
 			host1x_debug_output(o, "%d: locked by channel %d\n",
-				i, HOST1X_SYNC_MLOCK_OWNER_CHID_F(owner));
+				i, HOST1X_SYNC_MLOCK_OWNER_CHID_V(owner));
 		else if (HOST1X_SYNC_MLOCK_OWNER_CPU_OWNS_V(owner))
 			host1x_debug_output(o, "%d: locked by cpu\n", i);
 		else
diff --git a/drivers/gpu/host1x/hw/hw_host1x01_sync.h b/drivers/gpu/host1x/hw/hw_host1x01_sync.h
index ac704e5..31238c2 100644
--- a/drivers/gpu/host1x/hw/hw_host1x01_sync.h
+++ b/drivers/gpu/host1x/hw/hw_host1x01_sync.h
@@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
 }
 #define HOST1X_SYNC_MLOCK_OWNER(id) \
 	host1x_sync_mlock_owner_r(id)
-static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
+static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
 {
-	return (v & 0xf) << 8;
+	return (v >> 8) & 0xf;
 }
-#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
-	host1x_sync_mlock_owner_chid_f(v)
+#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
+	host1x_sync_mlock_owner_chid_v(v)
 static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
 {
 	return (r >> 1) & 0x1;
diff --git a/drivers/gpu/host1x/hw/hw_host1x02_sync.h b/drivers/gpu/host1x/hw/hw_host1x02_sync.h
index 4495401..540c7b6 100644
--- a/drivers/gpu/host1x/hw/hw_host1x02_sync.h
+++ b/drivers/gpu/host1x/hw/hw_host1x02_sync.h
@@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
 }
 #define HOST1X_SYNC_MLOCK_OWNER(id) \
 	host1x_sync_mlock_owner_r(id)
-static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
+static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
 {
-	return (v & 0xf) << 8;
+	return (v >> 8) & 0xf;
 }
-#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
-	host1x_sync_mlock_owner_chid_f(v)
+#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
+	host1x_sync_mlock_owner_chid_v(v)
 static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
 {
 	return (r >> 1) & 0x1;
diff --git a/drivers/gpu/host1x/hw/hw_host1x04_sync.h b/drivers/gpu/host1x/hw/hw_host1x04_sync.h
index ef2275b..3d6c8ec 100644
--- a/drivers/gpu/host1x/hw/hw_host1x04_sync.h
+++ b/drivers/gpu/host1x/hw/hw_host1x04_sync.h
@@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
 }
 #define HOST1X_SYNC_MLOCK_OWNER(id) \
 	host1x_sync_mlock_owner_r(id)
-static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
+static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
 {
-	return (v & 0xf) << 8;
+	return (v >> 8) & 0xf;
 }
-#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
-	host1x_sync_mlock_owner_chid_f(v)
+#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
+	host1x_sync_mlock_owner_chid_v(v)
 static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
 {
 	return (r >> 1) & 0x1;
-- 
2.4.4


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

* Re: [PATCH] gpu: host1x: Fix MLOCK's debug info
  2015-06-28 19:27 ` Dmitry Osipenko
@ 2015-07-02 21:15   ` Terje Bergstrom
  -1 siblings, 0 replies; 6+ messages in thread
From: Terje Bergstrom @ 2015-07-02 21:15 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding; +Cc: linux-tegra, linux-kernel, dri-devel


On 06/28/2015 12:27 PM, Dmitry Osipenko wrote:
> MLOCK's debug info, spewed on CDMA timeout, contains meaningless MLOCK
> owner channel ID because HOST1X_SYNC_MLOCK_OWNER_CHID_F() returns shifted
> value, while unshifted should be used. Fix it by changing '_F' to '_V'.
>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>   drivers/gpu/host1x/hw/debug_hw.c         | 2 +-
>   drivers/gpu/host1x/hw/hw_host1x01_sync.h | 8 ++++----
>   drivers/gpu/host1x/hw/hw_host1x02_sync.h | 8 ++++----
>   drivers/gpu/host1x/hw/hw_host1x04_sync.h | 8 ++++----
>   4 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
> index 791de93..cc3f182 100644
> --- a/drivers/gpu/host1x/hw/debug_hw.c
> +++ b/drivers/gpu/host1x/hw/debug_hw.c
> @@ -298,7 +298,7 @@ static void host1x_debug_show_mlocks(struct host1x *host, struct output *o)
>   			host1x_sync_readl(host, HOST1X_SYNC_MLOCK_OWNER(i));
>   		if (HOST1X_SYNC_MLOCK_OWNER_CH_OWNS_V(owner))
>   			host1x_debug_output(o, "%d: locked by channel %d\n",
> -				i, HOST1X_SYNC_MLOCK_OWNER_CHID_F(owner));
> +				i, HOST1X_SYNC_MLOCK_OWNER_CHID_V(owner));
>   		else if (HOST1X_SYNC_MLOCK_OWNER_CPU_OWNS_V(owner))
>   			host1x_debug_output(o, "%d: locked by cpu\n", i);
>   		else
(...)

Looks good, and fixes a bad gotcha.

Reviewed-By: Terje Bergstrom <tbergstrom@nvidia.com>

Terje
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] gpu: host1x: Fix MLOCK's debug info
@ 2015-07-02 21:15   ` Terje Bergstrom
  0 siblings, 0 replies; 6+ messages in thread
From: Terje Bergstrom @ 2015-07-02 21:15 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding; +Cc: dri-devel, linux-tegra, linux-kernel


On 06/28/2015 12:27 PM, Dmitry Osipenko wrote:
> MLOCK's debug info, spewed on CDMA timeout, contains meaningless MLOCK
> owner channel ID because HOST1X_SYNC_MLOCK_OWNER_CHID_F() returns shifted
> value, while unshifted should be used. Fix it by changing '_F' to '_V'.
>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>   drivers/gpu/host1x/hw/debug_hw.c         | 2 +-
>   drivers/gpu/host1x/hw/hw_host1x01_sync.h | 8 ++++----
>   drivers/gpu/host1x/hw/hw_host1x02_sync.h | 8 ++++----
>   drivers/gpu/host1x/hw/hw_host1x04_sync.h | 8 ++++----
>   4 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
> index 791de93..cc3f182 100644
> --- a/drivers/gpu/host1x/hw/debug_hw.c
> +++ b/drivers/gpu/host1x/hw/debug_hw.c
> @@ -298,7 +298,7 @@ static void host1x_debug_show_mlocks(struct host1x *host, struct output *o)
>   			host1x_sync_readl(host, HOST1X_SYNC_MLOCK_OWNER(i));
>   		if (HOST1X_SYNC_MLOCK_OWNER_CH_OWNS_V(owner))
>   			host1x_debug_output(o, "%d: locked by channel %d\n",
> -				i, HOST1X_SYNC_MLOCK_OWNER_CHID_F(owner));
> +				i, HOST1X_SYNC_MLOCK_OWNER_CHID_V(owner));
>   		else if (HOST1X_SYNC_MLOCK_OWNER_CPU_OWNS_V(owner))
>   			host1x_debug_output(o, "%d: locked by cpu\n", i);
>   		else
(...)

Looks good, and fixes a bad gotcha.

Reviewed-By: Terje Bergstrom <tbergstrom@nvidia.com>

Terje

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

* Re: [PATCH] gpu: host1x: Fix MLOCK's debug info
  2015-06-28 19:27 ` Dmitry Osipenko
@ 2015-09-07  9:22     ` Dmitry Osipenko
  -1 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2015-09-07  9:22 UTC (permalink / raw)
  To: Thierry Reding
  Cc: Terje Bergström, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

28.06.2015 22:27, Dmitry Osipenko пишет:
> MLOCK's debug info, spewed on CDMA timeout, contains meaningless MLOCK
> owner channel ID because HOST1X_SYNC_MLOCK_OWNER_CHID_F() returns shifted
> value, while unshifted should be used. Fix it by changing '_F' to '_V'.
>
> Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>   drivers/gpu/host1x/hw/debug_hw.c         | 2 +-
>   drivers/gpu/host1x/hw/hw_host1x01_sync.h | 8 ++++----
>   drivers/gpu/host1x/hw/hw_host1x02_sync.h | 8 ++++----
>   drivers/gpu/host1x/hw/hw_host1x04_sync.h | 8 ++++----
>   4 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
> index 791de93..cc3f182 100644
> --- a/drivers/gpu/host1x/hw/debug_hw.c
> +++ b/drivers/gpu/host1x/hw/debug_hw.c
> @@ -298,7 +298,7 @@ static void host1x_debug_show_mlocks(struct host1x *host, struct output *o)
>   			host1x_sync_readl(host, HOST1X_SYNC_MLOCK_OWNER(i));
>   		if (HOST1X_SYNC_MLOCK_OWNER_CH_OWNS_V(owner))
>   			host1x_debug_output(o, "%d: locked by channel %d\n",
> -				i, HOST1X_SYNC_MLOCK_OWNER_CHID_F(owner));
> +				i, HOST1X_SYNC_MLOCK_OWNER_CHID_V(owner));
>   		else if (HOST1X_SYNC_MLOCK_OWNER_CPU_OWNS_V(owner))
>   			host1x_debug_output(o, "%d: locked by cpu\n", i);
>   		else
> diff --git a/drivers/gpu/host1x/hw/hw_host1x01_sync.h b/drivers/gpu/host1x/hw/hw_host1x01_sync.h
> index ac704e5..31238c2 100644
> --- a/drivers/gpu/host1x/hw/hw_host1x01_sync.h
> +++ b/drivers/gpu/host1x/hw/hw_host1x01_sync.h
> @@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
>   }
>   #define HOST1X_SYNC_MLOCK_OWNER(id) \
>   	host1x_sync_mlock_owner_r(id)
> -static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
> +static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
>   {
> -	return (v & 0xf) << 8;
> +	return (v >> 8) & 0xf;
>   }
> -#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
> -	host1x_sync_mlock_owner_chid_f(v)
> +#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
> +	host1x_sync_mlock_owner_chid_v(v)
>   static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
>   {
>   	return (r >> 1) & 0x1;
> diff --git a/drivers/gpu/host1x/hw/hw_host1x02_sync.h b/drivers/gpu/host1x/hw/hw_host1x02_sync.h
> index 4495401..540c7b6 100644
> --- a/drivers/gpu/host1x/hw/hw_host1x02_sync.h
> +++ b/drivers/gpu/host1x/hw/hw_host1x02_sync.h
> @@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
>   }
>   #define HOST1X_SYNC_MLOCK_OWNER(id) \
>   	host1x_sync_mlock_owner_r(id)
> -static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
> +static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
>   {
> -	return (v & 0xf) << 8;
> +	return (v >> 8) & 0xf;
>   }
> -#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
> -	host1x_sync_mlock_owner_chid_f(v)
> +#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
> +	host1x_sync_mlock_owner_chid_v(v)
>   static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
>   {
>   	return (r >> 1) & 0x1;
> diff --git a/drivers/gpu/host1x/hw/hw_host1x04_sync.h b/drivers/gpu/host1x/hw/hw_host1x04_sync.h
> index ef2275b..3d6c8ec 100644
> --- a/drivers/gpu/host1x/hw/hw_host1x04_sync.h
> +++ b/drivers/gpu/host1x/hw/hw_host1x04_sync.h
> @@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
>   }
>   #define HOST1X_SYNC_MLOCK_OWNER(id) \
>   	host1x_sync_mlock_owner_r(id)
> -static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
> +static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
>   {
> -	return (v & 0xf) << 8;
> +	return (v >> 8) & 0xf;
>   }
> -#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
> -	host1x_sync_mlock_owner_chid_f(v)
> +#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
> +	host1x_sync_mlock_owner_chid_v(v)
>   static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
>   {
>   	return (r >> 1) & 0x1;
>
Ping Thierry

-- 
Dmitry

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

* Re: [PATCH] gpu: host1x: Fix MLOCK's debug info
@ 2015-09-07  9:22     ` Dmitry Osipenko
  0 siblings, 0 replies; 6+ messages in thread
From: Dmitry Osipenko @ 2015-09-07  9:22 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Terje Bergström, dri-devel, linux-tegra, linux-kernel

28.06.2015 22:27, Dmitry Osipenko пишет:
> MLOCK's debug info, spewed on CDMA timeout, contains meaningless MLOCK
> owner channel ID because HOST1X_SYNC_MLOCK_OWNER_CHID_F() returns shifted
> value, while unshifted should be used. Fix it by changing '_F' to '_V'.
>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>   drivers/gpu/host1x/hw/debug_hw.c         | 2 +-
>   drivers/gpu/host1x/hw/hw_host1x01_sync.h | 8 ++++----
>   drivers/gpu/host1x/hw/hw_host1x02_sync.h | 8 ++++----
>   drivers/gpu/host1x/hw/hw_host1x04_sync.h | 8 ++++----
>   4 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/host1x/hw/debug_hw.c b/drivers/gpu/host1x/hw/debug_hw.c
> index 791de93..cc3f182 100644
> --- a/drivers/gpu/host1x/hw/debug_hw.c
> +++ b/drivers/gpu/host1x/hw/debug_hw.c
> @@ -298,7 +298,7 @@ static void host1x_debug_show_mlocks(struct host1x *host, struct output *o)
>   			host1x_sync_readl(host, HOST1X_SYNC_MLOCK_OWNER(i));
>   		if (HOST1X_SYNC_MLOCK_OWNER_CH_OWNS_V(owner))
>   			host1x_debug_output(o, "%d: locked by channel %d\n",
> -				i, HOST1X_SYNC_MLOCK_OWNER_CHID_F(owner));
> +				i, HOST1X_SYNC_MLOCK_OWNER_CHID_V(owner));
>   		else if (HOST1X_SYNC_MLOCK_OWNER_CPU_OWNS_V(owner))
>   			host1x_debug_output(o, "%d: locked by cpu\n", i);
>   		else
> diff --git a/drivers/gpu/host1x/hw/hw_host1x01_sync.h b/drivers/gpu/host1x/hw/hw_host1x01_sync.h
> index ac704e5..31238c2 100644
> --- a/drivers/gpu/host1x/hw/hw_host1x01_sync.h
> +++ b/drivers/gpu/host1x/hw/hw_host1x01_sync.h
> @@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
>   }
>   #define HOST1X_SYNC_MLOCK_OWNER(id) \
>   	host1x_sync_mlock_owner_r(id)
> -static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
> +static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
>   {
> -	return (v & 0xf) << 8;
> +	return (v >> 8) & 0xf;
>   }
> -#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
> -	host1x_sync_mlock_owner_chid_f(v)
> +#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
> +	host1x_sync_mlock_owner_chid_v(v)
>   static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
>   {
>   	return (r >> 1) & 0x1;
> diff --git a/drivers/gpu/host1x/hw/hw_host1x02_sync.h b/drivers/gpu/host1x/hw/hw_host1x02_sync.h
> index 4495401..540c7b6 100644
> --- a/drivers/gpu/host1x/hw/hw_host1x02_sync.h
> +++ b/drivers/gpu/host1x/hw/hw_host1x02_sync.h
> @@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
>   }
>   #define HOST1X_SYNC_MLOCK_OWNER(id) \
>   	host1x_sync_mlock_owner_r(id)
> -static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
> +static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
>   {
> -	return (v & 0xf) << 8;
> +	return (v >> 8) & 0xf;
>   }
> -#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
> -	host1x_sync_mlock_owner_chid_f(v)
> +#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
> +	host1x_sync_mlock_owner_chid_v(v)
>   static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
>   {
>   	return (r >> 1) & 0x1;
> diff --git a/drivers/gpu/host1x/hw/hw_host1x04_sync.h b/drivers/gpu/host1x/hw/hw_host1x04_sync.h
> index ef2275b..3d6c8ec 100644
> --- a/drivers/gpu/host1x/hw/hw_host1x04_sync.h
> +++ b/drivers/gpu/host1x/hw/hw_host1x04_sync.h
> @@ -131,12 +131,12 @@ static inline u32 host1x_sync_mlock_owner_r(unsigned int id)
>   }
>   #define HOST1X_SYNC_MLOCK_OWNER(id) \
>   	host1x_sync_mlock_owner_r(id)
> -static inline u32 host1x_sync_mlock_owner_chid_f(u32 v)
> +static inline u32 host1x_sync_mlock_owner_chid_v(u32 v)
>   {
> -	return (v & 0xf) << 8;
> +	return (v >> 8) & 0xf;
>   }
> -#define HOST1X_SYNC_MLOCK_OWNER_CHID_F(v) \
> -	host1x_sync_mlock_owner_chid_f(v)
> +#define HOST1X_SYNC_MLOCK_OWNER_CHID_V(v) \
> +	host1x_sync_mlock_owner_chid_v(v)
>   static inline u32 host1x_sync_mlock_owner_cpu_owns_v(u32 r)
>   {
>   	return (r >> 1) & 0x1;
>
Ping Thierry

-- 
Dmitry

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

end of thread, other threads:[~2015-09-07  9:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-28 19:27 [PATCH] gpu: host1x: Fix MLOCK's debug info Dmitry Osipenko
2015-06-28 19:27 ` Dmitry Osipenko
2015-07-02 21:15 ` Terje Bergstrom
2015-07-02 21:15   ` Terje Bergstrom
     [not found] ` <1435519624-16444-1-git-send-email-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-09-07  9:22   ` Dmitry Osipenko
2015-09-07  9:22     ` Dmitry Osipenko

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.