Skip to content

Commit

Permalink
Merge commit 'refs/for-upstream/mali-dp' of git://linux-arm.org/linux…
Browse files Browse the repository at this point in the history
…-ld into drm-next

This pull requests adds initial Mali D71 support into the Arm "komeda" DRM
driver. The code has been reviewed at the end of last year, I just been
too slow with pushing it into mainline. Since it started baking in
linux-next we had a kbuild-bot issue raised and one from Joe Perches on
the MAINTAINERS entry, for which I'm including fixes here.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Liviu Dudau <Liviu.Dudau@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190401192833.GW21747@e110455-lin.cambridge.arm.com
  • Loading branch information
Dave Airlie committed Apr 3, 2019
2 parents 4571098 + 04c8a1e commit 5ebffda
Show file tree
Hide file tree
Showing 14 changed files with 1,983 additions and 31 deletions.
2 changes: 1 addition & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ S: Supported
T: git git://linux-arm.org/linux-ld.git for-upstream/mali-dp
F: drivers/gpu/drm/arm/display/include/
F: drivers/gpu/drm/arm/display/komeda/
F: Documentation/devicetree/bindings/display/arm/arm,komeda.txt
F: Documentation/devicetree/bindings/display/arm,komeda.txt
F: Documentation/gpu/komeda-kms.rst

ARM MALI-DP DRM DRIVER
Expand Down
31 changes: 31 additions & 0 deletions drivers/gpu/drm/arm/display/include/malidp_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,41 @@
#ifndef _MALIDP_UTILS_
#define _MALIDP_UTILS_

#include <linux/delay.h>

#define has_bit(nr, mask) (BIT(nr) & (mask))
#define has_bits(bits, mask) (((bits) & (mask)) == (bits))

#define dp_for_each_set_bit(bit, mask) \
for_each_set_bit((bit), ((unsigned long *)&(mask)), sizeof(mask) * 8)

#define dp_wait_cond(__cond, __tries, __min_range, __max_range) \
({ \
int num_tries = __tries; \
while (!__cond && (num_tries > 0)) { \
usleep_range(__min_range, __max_range); \
if (__cond) \
break; \
num_tries--; \
} \
num_tries; \
})

/* the restriction of range is [start, end] */
struct malidp_range {
u32 start;
u32 end;
};

static inline void set_range(struct malidp_range *rg, u32 start, u32 end)
{
rg->start = start;
rg->end = end;
}

static inline bool in_range(struct malidp_range *rg, u32 v)
{
return (v >= rg->start) && (v <= rg->end);
}

#endif /* _MALIDP_UTILS_ */
3 changes: 2 additions & 1 deletion drivers/gpu/drm/arm/display/komeda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ komeda-y := \
komeda_private_obj.o

komeda-y += \
d71/d71_dev.o
d71/d71_dev.o \
d71/d71_component.o

obj-$(CONFIG_DRM_KOMEDA) += komeda.o
Loading

0 comments on commit 5ebffda

Please sign in to comment.