Skip to content

Commit 7ada90e

Browse files
committed
Merge tag 'drm-next-2019-12-06' of git://anongit.freedesktop.org/drm/drm
Pull more drm updates from Dave Airlie: "Rob pointed out I missed his pull request for msm-next, it's been in next for a while outside of my tree so shouldn't cause any unexpected issues, it has some OCMEM support in drivers/soc that is acked by other maintainers as it's outside my tree. Otherwise it's a usual fixes pull, i915, amdgpu, the main ones, with some tegra, omap, mgag200 and one core fix. Summary: msm-next: - OCMEM support for a3xx and a4xx GPUs. - a510 support + display support core: - mst payload deletion fix i915: - uapi alignment fix - fix for power usage regression due to security fixes - change default preemption timeout to 640ms from 100ms - EHL voltage level display fixes - TGL DGL PHY fix - gvt - MI_ATOMIC cmd parser fix, CFL non-priv warning - CI spotted deadlock fix - EHL port D programming fix amdgpu: - VRAM lost fixes on BACO for CI/VI - navi14 DC fixes - misc SR-IOV, gfx10 fixes - XGMI fixes for arcturus - SRIOV fixes amdkfd: - KFD on ppc64le enabled - page table optimisations radeon: - fix for r1xx/2xx register checker. tegra: - displayport regression fixes - DMA API regression fixes mgag200: - fix devices that can't scanout except at 0 addr omap: - fix dma_addr refcounting" * tag 'drm-next-2019-12-06' of git://anongit.freedesktop.org/drm/drm: (100 commits) drm/dp_mst: Correct the bug in drm_dp_update_payload_part1() drm/omap: fix dma_addr refcounting drm/tegra: Run hub cleanup on ->remove() drm/tegra: sor: Make the +5V HDMI supply optional drm/tegra: Silence expected errors on IOMMU attach drm/tegra: vic: Export module device table drm/tegra: sor: Implement system suspend/resume drm/tegra: Use proper IOVA address for cursor image drm/tegra: gem: Remove premature import restrictions drm/tegra: gem: Properly pin imported buffers drm/tegra: hub: Remove bogus connection mutex check ia64: agp: Replace empty define with do while agp: Add bridge parameter documentation agp: remove unused variable num_segments agp: move AGPGART_MINOR to include/linux/miscdevice.h agp: remove unused variable size in agp_generic_create_gatt_table drm/dp_mst: Fix build on systems with STACKTRACE_SUPPORT=n drm/radeon: fix r1xx/r2xx register checker for POT textures drm/amdgpu: fix GFX10 missing CSIB set(v3) drm/amdgpu: should stop GFX ring in hw_fini ...
2 parents 9feb1af + 9c1867d commit 7ada90e

File tree

126 files changed

+2014
-764
lines changed

Some content is hidden

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

126 files changed

+2014
-764
lines changed

Documentation/devicetree/bindings/display/msm/gmu.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ Required properties:
3131
- iommus: phandle to the adreno iommu
3232
- operating-points-v2: phandle to the OPP operating points
3333

34+
Optional properties:
35+
- sram: phandle to the On Chip Memory (OCMEM) that's present on some Snapdragon
36+
SoCs. See Documentation/devicetree/bindings/sram/qcom,ocmem.yaml.
37+
3438
Example:
3539

3640
/ {
@@ -63,3 +67,50 @@ Example:
6367
operating-points-v2 = <&gmu_opp_table>;
6468
};
6569
};
70+
71+
a3xx example with OCMEM support:
72+
73+
/ {
74+
...
75+
76+
gpu: adreno@fdb00000 {
77+
compatible = "qcom,adreno-330.2",
78+
"qcom,adreno";
79+
reg = <0xfdb00000 0x10000>;
80+
reg-names = "kgsl_3d0_reg_memory";
81+
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
82+
interrupt-names = "kgsl_3d0_irq";
83+
clock-names = "core",
84+
"iface",
85+
"mem_iface";
86+
clocks = <&mmcc OXILI_GFX3D_CLK>,
87+
<&mmcc OXILICX_AHB_CLK>,
88+
<&mmcc OXILICX_AXI_CLK>;
89+
sram = <&gmu_sram>;
90+
power-domains = <&mmcc OXILICX_GDSC>;
91+
operating-points-v2 = <&gpu_opp_table>;
92+
iommus = <&gpu_iommu 0>;
93+
};
94+
95+
ocmem@fdd00000 {
96+
compatible = "qcom,msm8974-ocmem";
97+
98+
reg = <0xfdd00000 0x2000>,
99+
<0xfec00000 0x180000>;
100+
reg-names = "ctrl",
101+
"mem";
102+
103+
clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>,
104+
<&mmcc OCMEMCX_OCMEMNOC_CLK>;
105+
clock-names = "core",
106+
"iface";
107+
108+
#address-cells = <1>;
109+
#size-cells = <1>;
110+
111+
gmu_sram: gmu-sram@0 {
112+
reg = <0x0 0x100000>;
113+
ranges = <0 0 0xfec00000 0x100000>;
114+
};
115+
};
116+
};

Documentation/devicetree/bindings/display/msm/mdp5.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ Required properties:
7676
Optional properties:
7777
- clock-names: the following clocks are optional:
7878
* "lut"
79+
* "tbu"
80+
* "tbu_rt"
7981

8082
Example:
8183

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sram/qcom,ocmem.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: On Chip Memory (OCMEM) that is present on some Qualcomm Snapdragon SoCs.
8+
9+
maintainers:
10+
- Brian Masney <[email protected]>
11+
12+
description: |
13+
The On Chip Memory (OCMEM) is typically used by the GPU, camera/video, and
14+
audio components on some Snapdragon SoCs.
15+
16+
properties:
17+
compatible:
18+
const: qcom,msm8974-ocmem
19+
20+
reg:
21+
items:
22+
- description: Control registers
23+
- description: OCMEM address range
24+
25+
reg-names:
26+
items:
27+
- const: ctrl
28+
- const: mem
29+
30+
clocks:
31+
items:
32+
- description: Core clock
33+
- description: Interface clock
34+
35+
clock-names:
36+
items:
37+
- const: core
38+
- const: iface
39+
40+
'#address-cells':
41+
const: 1
42+
43+
'#size-cells':
44+
const: 1
45+
46+
required:
47+
- compatible
48+
- reg
49+
- reg-names
50+
- clocks
51+
- clock-names
52+
- '#address-cells'
53+
- '#size-cells'
54+
55+
patternProperties:
56+
"^.+-sram$":
57+
type: object
58+
description: A region of reserved memory.
59+
60+
properties:
61+
reg:
62+
maxItems: 1
63+
64+
ranges:
65+
maxItems: 1
66+
67+
required:
68+
- reg
69+
- ranges
70+
71+
examples:
72+
- |
73+
#include <dt-bindings/clock/qcom,rpmcc.h>
74+
#include <dt-bindings/clock/qcom,mmcc-msm8974.h>
75+
76+
ocmem: ocmem@fdd00000 {
77+
compatible = "qcom,msm8974-ocmem";
78+
79+
reg = <0xfdd00000 0x2000>,
80+
<0xfec00000 0x180000>;
81+
reg-names = "ctrl",
82+
"mem";
83+
84+
clocks = <&rpmcc RPM_SMD_OCMEMGX_CLK>,
85+
<&mmcc OCMEMCX_OCMEMNOC_CLK>;
86+
clock-names = "core",
87+
"iface";
88+
89+
#address-cells = <1>;
90+
#size-cells = <1>;
91+
92+
gmu-sram@0 {
93+
reg = <0x0 0x100000>;
94+
ranges = <0 0 0xfec00000 0x100000>;
95+
};
96+
};

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,6 @@ S: Maintained
862862
F: drivers/i2c/busses/i2c-amd-mp2*
863863

864864
AMD POWERPLAY
865-
M: Rex Zhu <[email protected]>
866865
M: Evan Quan <[email protected]>
867866
868867
S: Supported

arch/ia64/include/asm/agp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
* in coherent mode, which lets us map the AGP memory as normal (write-back) memory
1515
* (unlike x86, where it gets mapped "write-coalescing").
1616
*/
17-
#define map_page_into_agp(page) /* nothing */
18-
#define unmap_page_from_agp(page) /* nothing */
17+
#define map_page_into_agp(page) do { } while (0)
18+
#define unmap_page_from_agp(page) do { } while (0)
1919
#define flush_agp_cache() mb()
2020

2121
/* GATT allocation. Returns/accepts GATT kernel virtual address. */

drivers/char/agp/frontend.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,13 @@ agp_segment_priv *agp_find_seg_in_client(const struct agp_client *client,
102102
int size, pgprot_t page_prot)
103103
{
104104
struct agp_segment_priv *seg;
105-
int num_segments, i;
105+
int i;
106106
off_t pg_start;
107107
size_t pg_count;
108108

109109
pg_start = offset / 4096;
110110
pg_count = size / 4096;
111111
seg = *(client->segments);
112-
num_segments = client->num_segments;
113112

114113
for (i = 0; i < client->num_segments; i++) {
115114
if ((seg[i].pg_start == pg_start) &&

drivers/char/agp/generic.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ EXPORT_SYMBOL(agp_free_memory);
207207
/**
208208
* agp_allocate_memory - allocate a group of pages of a certain type.
209209
*
210+
* @bridge: an agp_bridge_data struct allocated for the AGP host bridge.
210211
* @page_count: size_t argument of the number of pages
211212
* @type: u32 argument of the type of memory to be allocated.
212213
*
@@ -355,6 +356,7 @@ EXPORT_SYMBOL_GPL(agp_num_entries);
355356
/**
356357
* agp_copy_info - copy bridge state information
357358
*
359+
* @bridge: an agp_bridge_data struct allocated for the AGP host bridge.
358360
* @info: agp_kern_info pointer. The caller should insure that this pointer is valid.
359361
*
360362
* This function copies information about the agp bridge device and the state of
@@ -850,7 +852,6 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
850852
{
851853
char *table;
852854
char *table_end;
853-
int size;
854855
int page_order;
855856
int num_entries;
856857
int i;
@@ -864,33 +865,30 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
864865
table = NULL;
865866
i = bridge->aperture_size_idx;
866867
temp = bridge->current_size;
867-
size = page_order = num_entries = 0;
868+
page_order = num_entries = 0;
868869

869870
if (bridge->driver->size_type != FIXED_APER_SIZE) {
870871
do {
871872
switch (bridge->driver->size_type) {
872873
case U8_APER_SIZE:
873-
size = A_SIZE_8(temp)->size;
874874
page_order =
875875
A_SIZE_8(temp)->page_order;
876876
num_entries =
877877
A_SIZE_8(temp)->num_entries;
878878
break;
879879
case U16_APER_SIZE:
880-
size = A_SIZE_16(temp)->size;
881880
page_order = A_SIZE_16(temp)->page_order;
882881
num_entries = A_SIZE_16(temp)->num_entries;
883882
break;
884883
case U32_APER_SIZE:
885-
size = A_SIZE_32(temp)->size;
886884
page_order = A_SIZE_32(temp)->page_order;
887885
num_entries = A_SIZE_32(temp)->num_entries;
888886
break;
889887
/* This case will never really happen. */
890888
case FIXED_APER_SIZE:
891889
case LVL2_APER_SIZE:
892890
default:
893-
size = page_order = num_entries = 0;
891+
page_order = num_entries = 0;
894892
break;
895893
}
896894

@@ -920,7 +918,6 @@ int agp_generic_create_gatt_table(struct agp_bridge_data *bridge)
920918
}
921919
} while (!table && (i < bridge->driver->num_aperture_sizes));
922920
} else {
923-
size = ((struct aper_size_info_fixed *) temp)->size;
924921
page_order = ((struct aper_size_info_fixed *) temp)->page_order;
925922
num_entries = ((struct aper_size_info_fixed *) temp)->num_entries;
926923
table = alloc_gatt_pages(page_order);
@@ -1282,6 +1279,7 @@ EXPORT_SYMBOL(agp_generic_destroy_page);
12821279
/**
12831280
* agp_enable - initialise the agp point-to-point connection.
12841281
*
1282+
* @bridge: an agp_bridge_data struct allocated for the AGP host bridge.
12851283
* @mode: agp mode register value to configure with.
12861284
*/
12871285
void agp_enable(struct agp_bridge_data *bridge, u32 mode)

drivers/firmware/qcom_scm-32.c

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,41 @@ int __qcom_scm_hdcp_req(struct device *dev, struct qcom_scm_hdcp_req *req,
442442
req, req_cnt * sizeof(*req), resp, sizeof(*resp));
443443
}
444444

445+
int __qcom_scm_ocmem_lock(struct device *dev, u32 id, u32 offset, u32 size,
446+
u32 mode)
447+
{
448+
struct ocmem_tz_lock {
449+
__le32 id;
450+
__le32 offset;
451+
__le32 size;
452+
__le32 mode;
453+
} request;
454+
455+
request.id = cpu_to_le32(id);
456+
request.offset = cpu_to_le32(offset);
457+
request.size = cpu_to_le32(size);
458+
request.mode = cpu_to_le32(mode);
459+
460+
return qcom_scm_call(dev, QCOM_SCM_OCMEM_SVC, QCOM_SCM_OCMEM_LOCK_CMD,
461+
&request, sizeof(request), NULL, 0);
462+
}
463+
464+
int __qcom_scm_ocmem_unlock(struct device *dev, u32 id, u32 offset, u32 size)
465+
{
466+
struct ocmem_tz_unlock {
467+
__le32 id;
468+
__le32 offset;
469+
__le32 size;
470+
} request;
471+
472+
request.id = cpu_to_le32(id);
473+
request.offset = cpu_to_le32(offset);
474+
request.size = cpu_to_le32(size);
475+
476+
return qcom_scm_call(dev, QCOM_SCM_OCMEM_SVC, QCOM_SCM_OCMEM_UNLOCK_CMD,
477+
&request, sizeof(request), NULL, 0);
478+
}
479+
445480
void __qcom_scm_init(void)
446481
{
447482
}
@@ -582,7 +617,22 @@ int __qcom_scm_assign_mem(struct device *dev, phys_addr_t mem_region,
582617
int __qcom_scm_restore_sec_cfg(struct device *dev, u32 device_id,
583618
u32 spare)
584619
{
585-
return -ENODEV;
620+
struct msm_scm_sec_cfg {
621+
__le32 id;
622+
__le32 ctx_bank_num;
623+
} cfg;
624+
int ret, scm_ret = 0;
625+
626+
cfg.id = cpu_to_le32(device_id);
627+
cfg.ctx_bank_num = cpu_to_le32(spare);
628+
629+
ret = qcom_scm_call(dev, QCOM_SCM_SVC_MP, QCOM_SCM_RESTORE_SEC_CFG,
630+
&cfg, sizeof(cfg), &scm_ret, sizeof(scm_ret));
631+
632+
if (ret || scm_ret)
633+
return ret ? ret : -EINVAL;
634+
635+
return 0;
586636
}
587637

588638
int __qcom_scm_iommu_secure_ptbl_size(struct device *dev, u32 spare,

drivers/firmware/qcom_scm-64.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,18 @@ int __qcom_scm_hdcp_req(struct device *dev, struct qcom_scm_hdcp_req *req,
291291
return ret;
292292
}
293293

294+
int __qcom_scm_ocmem_lock(struct device *dev, uint32_t id, uint32_t offset,
295+
uint32_t size, uint32_t mode)
296+
{
297+
return -ENOTSUPP;
298+
}
299+
300+
int __qcom_scm_ocmem_unlock(struct device *dev, uint32_t id, uint32_t offset,
301+
uint32_t size)
302+
{
303+
return -ENOTSUPP;
304+
}
305+
294306
void __qcom_scm_init(void)
295307
{
296308
u64 cmd;

0 commit comments

Comments
 (0)