]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
gpu: host1x: Fix mask for syncpoint increment register
authorMikko Perttunen <mperttunen@nvidia.com>
Thu, 19 Jan 2023 13:38:59 +0000 (15:38 +0200)
committerThierry Reding <treding@nvidia.com>
Thu, 26 Jan 2023 14:55:38 +0000 (15:55 +0100)
On Tegra186+, the syncpoint ID has 10 bits of space. To allow
using more than 256 syncpoints, fix the mask.

Fixes: 9abdd497cd0a ("gpu: host1x: Tegra234 device data and headers")
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/hw/hw_host1x06_uclass.h
drivers/gpu/host1x/hw/hw_host1x07_uclass.h
drivers/gpu/host1x/hw/hw_host1x08_uclass.h

index 5f831438d19bb39209055cded9a10ceb5ada825b..50c32de452fb1be43de4aa6ffabe4525fec6af6b 100644 (file)
@@ -53,7 +53,7 @@ static inline u32 host1x_uclass_incr_syncpt_cond_f(u32 v)
        host1x_uclass_incr_syncpt_cond_f(v)
 static inline u32 host1x_uclass_incr_syncpt_indx_f(u32 v)
 {
-       return (v & 0xff) << 0;
+       return (v & 0x3ff) << 0;
 }
 #define HOST1X_UCLASS_INCR_SYNCPT_INDX_F(v) \
        host1x_uclass_incr_syncpt_indx_f(v)
index 8cd2ef087d5d03dee9f1a47ae9252e3719bb1abb..887b878f92f79ef1afc85f45c62d6318a98296d7 100644 (file)
@@ -53,7 +53,7 @@ static inline u32 host1x_uclass_incr_syncpt_cond_f(u32 v)
        host1x_uclass_incr_syncpt_cond_f(v)
 static inline u32 host1x_uclass_incr_syncpt_indx_f(u32 v)
 {
-       return (v & 0xff) << 0;
+       return (v & 0x3ff) << 0;
 }
 #define HOST1X_UCLASS_INCR_SYNCPT_INDX_F(v) \
        host1x_uclass_incr_syncpt_indx_f(v)
index 724cccd71aa1a56c02bc35bf4e4483e38d9c61ef..4fb1d090edae5a968a55613a5f99e7ea993bdce8 100644 (file)
@@ -53,7 +53,7 @@ static inline u32 host1x_uclass_incr_syncpt_cond_f(u32 v)
        host1x_uclass_incr_syncpt_cond_f(v)
 static inline u32 host1x_uclass_incr_syncpt_indx_f(u32 v)
 {
-       return (v & 0xff) << 0;
+       return (v & 0x3ff) << 0;
 }
 #define HOST1X_UCLASS_INCR_SYNCPT_INDX_F(v) \
        host1x_uclass_incr_syncpt_indx_f(v)