Skip to content

Commit 397ab98

Browse files
committed
Merge tag 'drm-msm-next-2021-08-12' of https://gitlab.freedesktop.org/drm/msm into drm-next
This is the main pull for v5.15, after the early pull request with drm/scheduler conversion: * New a6xx GPU support: a680 and 7c3 * dsi: 7nm phi, sc7280 support, test pattern generator support * mdp4 fixes for older hw like the nexus7 * displayport fixes Signed-off-by: Dave Airlie <[email protected]> From: Rob Clark <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGs_tyanTeDGMH1X+Uf4wdyy7jYj-CinGXXVETiYOESahw@mail.gmail.com
2 parents f97a1b6 + cb0927a commit 397ab98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+1193
-585
lines changed

Documentation/devicetree/bindings/display/msm/dsi-controller-main.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,18 @@ properties:
6464
Indicates if the DSI controller is driving a panel which needs
6565
2 DSI links.
6666
67+
assigned-clocks:
68+
minItems: 2
69+
maxItems: 2
70+
description: |
71+
Parents of "byte" and "pixel" for the given platform.
72+
73+
assigned-clock-parents:
74+
minItems: 2
75+
maxItems: 2
76+
description: |
77+
The Byte clock and Pixel clock PLL outputs provided by a DSI PHY block.
78+
6779
power-domains:
6880
maxItems: 1
6981

@@ -119,6 +131,8 @@ required:
119131
- clock-names
120132
- phys
121133
- phy-names
134+
- assigned-clocks
135+
- assigned-clock-parents
122136
- power-domains
123137
- operating-points-v2
124138
- ports
@@ -159,6 +173,9 @@ examples:
159173
phys = <&dsi0_phy>;
160174
phy-names = "dsi";
161175
176+
assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>, <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
177+
assigned-clock-parents = <&dsi_phy 0>, <&dsi_phy 1>;
178+
162179
power-domains = <&rpmhpd SC7180_CX>;
163180
operating-points-v2 = <&dsi_opp_table>;
164181
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/msm/dsi-phy-7nm.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm Display DSI 7nm PHY
8+
9+
maintainers:
10+
- Jonathan Marek <[email protected]>
11+
12+
allOf:
13+
- $ref: dsi-phy-common.yaml#
14+
15+
properties:
16+
compatible:
17+
oneOf:
18+
- const: qcom,dsi-phy-7nm
19+
- const: qcom,dsi-phy-7nm-8150
20+
- const: qcom,sc7280-dsi-phy-7nm
21+
22+
reg:
23+
items:
24+
- description: dsi phy register set
25+
- description: dsi phy lane register set
26+
- description: dsi pll register set
27+
28+
reg-names:
29+
items:
30+
- const: dsi_phy
31+
- const: dsi_phy_lane
32+
- const: dsi_pll
33+
34+
vdds-supply:
35+
description: |
36+
Connected to VDD_A_DSI_PLL_0P9 pin (or VDDA_DSI{0,1}_PLL_0P9 for sm8150)
37+
38+
phy-type:
39+
description: D-PHY (default) or C-PHY mode
40+
enum: [ 10, 11 ]
41+
default: 10
42+
43+
required:
44+
- compatible
45+
- reg
46+
- reg-names
47+
- vdds-supply
48+
49+
unevaluatedProperties: false
50+
51+
examples:
52+
- |
53+
#include <dt-bindings/clock/qcom,dispcc-sm8250.h>
54+
#include <dt-bindings/clock/qcom,rpmh.h>
55+
56+
dsi-phy@ae94400 {
57+
compatible = "qcom,dsi-phy-7nm";
58+
reg = <0x0ae94400 0x200>,
59+
<0x0ae94600 0x280>,
60+
<0x0ae94900 0x260>;
61+
reg-names = "dsi_phy",
62+
"dsi_phy_lane",
63+
"dsi_pll";
64+
65+
#clock-cells = <1>;
66+
#phy-cells = <0>;
67+
68+
vdds-supply = <&vreg_l5a_0p88>;
69+
clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
70+
<&rpmhcc RPMH_CXO_CLK>;
71+
clock-names = "iface", "ref";
72+
};

drivers/gpu/drm/msm/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,9 @@ config DRM_MSM_DSI_10NM_PHY
116116
Choose this option if DSI PHY on SDM845 is used on the platform.
117117

118118
config DRM_MSM_DSI_7NM_PHY
119-
bool "Enable DSI 7nm PHY driver in MSM DRM (used by SM8150/SM8250)"
119+
bool "Enable DSI 7nm PHY driver in MSM DRM"
120120
depends on DRM_MSM_DSI
121121
default y
122122
help
123-
Choose this option if DSI PHY on SM8150/SM8250 is used on the
124-
platform.
123+
Choose this option if DSI PHY on SM8150/SM8250/SC7280 is used on
124+
the platform.

drivers/gpu/drm/msm/adreno/a5xx_gpu.c

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,18 @@ static void a5xx_dump(struct msm_gpu *gpu);
1818

1919
#define GPU_PAS_ID 13
2020

21+
static void update_shadow_rptr(struct msm_gpu *gpu, struct msm_ringbuffer *ring)
22+
{
23+
struct adreno_gpu *adreno_gpu = to_adreno_gpu(gpu);
24+
struct a5xx_gpu *a5xx_gpu = to_a5xx_gpu(adreno_gpu);
25+
26+
if (a5xx_gpu->has_whereami) {
27+
OUT_PKT7(ring, CP_WHERE_AM_I, 2);
28+
OUT_RING(ring, lower_32_bits(shadowptr(a5xx_gpu, ring)));
29+
OUT_RING(ring, upper_32_bits(shadowptr(a5xx_gpu, ring)));
30+
}
31+
}
32+
2133
void a5xx_flush(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
2234
bool sync)
2335
{
@@ -30,11 +42,8 @@ void a5xx_flush(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
3042
* Most flush operations need to issue a WHERE_AM_I opcode to sync up
3143
* the rptr shadow
3244
*/
33-
if (a5xx_gpu->has_whereami && sync) {
34-
OUT_PKT7(ring, CP_WHERE_AM_I, 2);
35-
OUT_RING(ring, lower_32_bits(shadowptr(a5xx_gpu, ring)));
36-
OUT_RING(ring, upper_32_bits(shadowptr(a5xx_gpu, ring)));
37-
}
45+
if (sync)
46+
update_shadow_rptr(gpu, ring);
3847

3948
spin_lock_irqsave(&ring->preempt_lock, flags);
4049

@@ -168,6 +177,16 @@ static void a5xx_submit(struct msm_gpu *gpu, struct msm_gem_submit *submit)
168177
ibs++;
169178
break;
170179
}
180+
181+
/*
182+
* Periodically update shadow-wptr if needed, so that we
183+
* can see partial progress of submits with large # of
184+
* cmds.. otherwise we could needlessly stall waiting for
185+
* ringbuffer state, simply due to looking at a shadow
186+
* rptr value that has not been updated
187+
*/
188+
if ((ibs % 32) == 0)
189+
update_shadow_rptr(gpu, ring);
171190
}
172191

173192
/*

drivers/gpu/drm/msm/adreno/a6xx_gmu.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,9 @@ static void a6xx_gmu_rpmh_init(struct a6xx_gmu *gmu)
519519
if (!pdcptr)
520520
goto err;
521521

522-
if (adreno_is_a650(adreno_gpu) || adreno_is_a660(adreno_gpu))
522+
if (adreno_is_a650(adreno_gpu) || adreno_is_a660_family(adreno_gpu))
523523
pdc_in_aop = true;
524-
else if (adreno_is_a618(adreno_gpu) || adreno_is_a640(adreno_gpu))
524+
else if (adreno_is_a618(adreno_gpu) || adreno_is_a640_family(adreno_gpu))
525525
pdc_address_offset = 0x30090;
526526
else
527527
pdc_address_offset = 0x30080;
@@ -933,6 +933,7 @@ int a6xx_gmu_resume(struct a6xx_gpu *a6xx_gpu)
933933

934934
/* Use a known rate to bring up the GMU */
935935
clk_set_rate(gmu->core_clk, 200000000);
936+
clk_set_rate(gmu->hub_clk, 150000000);
936937
ret = clk_bulk_prepare_enable(gmu->nr_clocks, gmu->clocks);
937938
if (ret) {
938939
pm_runtime_put(gmu->gxpd);
@@ -1393,6 +1394,9 @@ static int a6xx_gmu_clocks_probe(struct a6xx_gmu *gmu)
13931394
gmu->core_clk = msm_clk_bulk_get_clock(gmu->clocks,
13941395
gmu->nr_clocks, "gmu");
13951396

1397+
gmu->hub_clk = msm_clk_bulk_get_clock(gmu->clocks,
1398+
gmu->nr_clocks, "hub");
1399+
13961400
return 0;
13971401
}
13981402

@@ -1504,7 +1508,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
15041508
* are otherwise unused by a660.
15051509
*/
15061510
gmu->dummy.size = SZ_4K;
1507-
if (adreno_is_a660(adreno_gpu)) {
1511+
if (adreno_is_a660_family(adreno_gpu)) {
15081512
ret = a6xx_gmu_memory_alloc(gmu, &gmu->debug, SZ_4K * 7, 0x60400000);
15091513
if (ret)
15101514
goto err_memory;
@@ -1522,7 +1526,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
15221526
SZ_16M - SZ_16K, 0x04000);
15231527
if (ret)
15241528
goto err_memory;
1525-
} else if (adreno_is_a640(adreno_gpu)) {
1529+
} else if (adreno_is_a640_family(adreno_gpu)) {
15261530
ret = a6xx_gmu_memory_alloc(gmu, &gmu->icache,
15271531
SZ_256K - SZ_16K, 0x04000);
15281532
if (ret)

drivers/gpu/drm/msm/adreno/a6xx_gmu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ struct a6xx_gmu {
6666
int nr_clocks;
6767
struct clk_bulk_data *clocks;
6868
struct clk *core_clk;
69+
struct clk *hub_clk;
6970

7071
/* current performance index set externally */
7172
int current_perf_index;

0 commit comments

Comments
 (0)