diff options
author | Dave Airlie | 2019-06-25 04:49:08 +0200 |
---|---|---|
committer | Dave Airlie | 2019-06-25 04:56:40 +0200 |
commit | 9b75276e4fb190b47ed62693cc4d9549a45c76a2 (patch) | |
tree | cf3dbfa427c19bbc6097865a527cea91376f60b5 /drivers/gpu/drm/arm/display/include | |
parent | Merge tag 'drm-intel-next-2019-06-19' of git://anongit.freedesktop.org/drm/dr... (diff) | |
parent | drm/komeda: Make Komeda interrupts shareable (diff) | |
download | kernel-qcow2-linux-9b75276e4fb190b47ed62693cc4d9549a45c76a2.tar.gz kernel-qcow2-linux-9b75276e4fb190b47ed62693cc4d9549a45c76a2.tar.xz kernel-qcow2-linux-9b75276e4fb190b47ed62693cc4d9549a45c76a2.zip |
Merge commit 'refs/for-upstream/mali-dp' of git://linux-arm.org/linux-ld into drm-next
Picking up pace on the upstreaming of Komeda driver, with quite a lot
of new features added this time. On top of that we have the small
cleanups and improved usage of the debugfs functions. Please pull!
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Liviu Dudau <Liviu.Dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190621095349.GI17204@e110455-lin.cambridge.arm.com
Diffstat (limited to 'drivers/gpu/drm/arm/display/include')
-rw-r--r-- | drivers/gpu/drm/arm/display/include/malidp_io.h | 7 | ||||
-rw-r--r-- | drivers/gpu/drm/arm/display/include/malidp_utils.h | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/arm/display/include/malidp_io.h b/drivers/gpu/drm/arm/display/include/malidp_io.h index 4fb3caf864ce..9440dff94212 100644 --- a/drivers/gpu/drm/arm/display/include/malidp_io.h +++ b/drivers/gpu/drm/arm/display/include/malidp_io.h @@ -22,6 +22,13 @@ malidp_write32(u32 __iomem *base, u32 offset, u32 v) } static inline void +malidp_write64(u32 __iomem *base, u32 offset, u64 v) +{ + writel(lower_32_bits(v), (base + (offset >> 2))); + writel(upper_32_bits(v), (base + (offset >> 2) + 1)); +} + +static inline void malidp_write32_mask(u32 __iomem *base, u32 offset, u32 m, u32 v) { u32 tmp = malidp_read32(base, offset); diff --git a/drivers/gpu/drm/arm/display/include/malidp_utils.h b/drivers/gpu/drm/arm/display/include/malidp_utils.h index 8cfd91196e15..3bc383d5bf73 100644 --- a/drivers/gpu/drm/arm/display/include/malidp_utils.h +++ b/drivers/gpu/drm/arm/display/include/malidp_utils.h @@ -8,6 +8,7 @@ #define _MALIDP_UTILS_ #include <linux/delay.h> +#include <linux/errno.h> #define has_bit(nr, mask) (BIT(nr) & (mask)) #define has_bits(bits, mask) (((bits) & (mask)) == (bits)) @@ -20,11 +21,9 @@ int num_tries = __tries; \ while (!__cond && (num_tries > 0)) { \ usleep_range(__min_range, __max_range); \ - if (__cond) \ - break; \ num_tries--; \ } \ - num_tries; \ + (__cond) ? 0 : -ETIMEDOUT; \ }) /* the restriction of range is [start, end] */ |