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

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
  • Loading branch information
Dave Airlie committed Jun 25, 2019
2 parents 417f254 + 2cfb198 commit 9b75276
Show file tree
Hide file tree
Showing 25 changed files with 2,728 additions and 227 deletions.
23 changes: 14 additions & 9 deletions Documentation/devicetree/bindings/display/arm,komeda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ Required properties:
- clocks: A list of phandle + clock-specifier pairs, one for each entry
in 'clock-names'
- clock-names: A list of clock names. It should contain:
- "mclk": for the main processor clock
- "pclk": for the APB interface clock
- "aclk": for the main processor clock
- #address-cells: Must be 1
- #size-cells: Must be 0
- iommus: configure the stream id to IOMMU, Must be configured if want to
enable iommu in display. for how to configure this node please reference
devicetree/bindings/iommu/arm,smmu-v3.txt,
devicetree/bindings/iommu/iommu.txt

Required properties for sub-node: pipeline@nq
Each device contains one or two pipeline sub-nodes (at least one), each
Expand All @@ -20,7 +23,6 @@ pipeline node should provide properties:
in 'clock-names'
- clock-names: should contain:
- "pxclk": pixel clock
- "aclk": AXI interface clock

- port: each pipeline connect to an encoder input port. The connection is
modeled using the OF graph bindings specified in
Expand All @@ -42,12 +44,15 @@ Example:
compatible = "arm,mali-d71";
reg = <0xc00000 0x20000>;
interrupts = <0 168 4>;
clocks = <&dpu_mclk>, <&dpu_aclk>;
clock-names = "mclk", "pclk";
clocks = <&dpu_aclk>;
clock-names = "aclk";
iommus = <&smmu 0>, <&smmu 1>, <&smmu 2>, <&smmu 3>,
<&smmu 4>, <&smmu 5>, <&smmu 6>, <&smmu 7>,
<&smmu 8>, <&smmu 9>;

dp0_pipe0: pipeline@0 {
clocks = <&fpgaosc2>, <&dpu_aclk>;
clock-names = "pxclk", "aclk";
clocks = <&fpgaosc2>;
clock-names = "pxclk";
reg = <0>;

port {
Expand All @@ -58,8 +63,8 @@ Example:
};

dp0_pipe1: pipeline@1 {
clocks = <&fpgaosc2>, <&dpu_aclk>;
clock-names = "pxclk", "aclk";
clocks = <&fpgaosc2>;
clock-names = "pxclk";
reg = <1>;

port {
Expand Down
7 changes: 7 additions & 0 deletions drivers/gpu/drm/arm/display/include/malidp_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ malidp_write32(u32 __iomem *base, u32 offset, u32 v)
writel(v, (base + (offset >> 2)));
}

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)
{
Expand Down
5 changes: 2 additions & 3 deletions drivers/gpu/drm/arm/display/include/malidp_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand All @@ -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] */
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/arm/display/komeda/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ komeda-y := \
komeda_drv.o \
komeda_dev.o \
komeda_format_caps.o \
komeda_color_mgmt.o \
komeda_pipeline.o \
komeda_pipeline_state.o \
komeda_framebuffer.o \
komeda_kms.o \
komeda_crtc.o \
komeda_plane.o \
komeda_wb_connector.o \
komeda_private_obj.o

komeda-y += \
Expand Down
Loading

0 comments on commit 9b75276

Please sign in to comment.