Skip to content

Commit aaa9d26

Browse files
committed
Merge tag 'drm-misc-next-2020-02-21' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.7: UAPI Changes: Cross-subsystem Changes: Core Changes: - crtc: Drop get_crtc callback - dp: Add support for DP1.4 EDID corruption test - edid: Improve CEA detailed timings support - format-helper: Move to a GPL2/MIT dual license - mode: Drop drm_display_mode.private - vblank: Convert drm-driver vblank related code to CRTC equivalents and cleanup the core. - drm_global_mutex reworks Driver Changes: - hibmc: Add gamma_set support and improve DPMS support - pl111: Support Integrator IM-PD1 - sun4i: LVDS support for the A20, improvements to panel handling in DSI - virtio: job batching improvements, mem handling code rework - panel: Support for Rocktech RK101II01D-CT - bridge: Support for ADV7535, tc358768, improvements to ti-sn65dsi86 Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 1b245ec + d718e53 commit aaa9d26

File tree

130 files changed

+3036
-1287
lines changed

Some content is hidden

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

130 files changed

+3036
-1287
lines changed

Documentation/devicetree/bindings/display/allwinner,sun4i-a10-tcon.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ properties:
3434
- const: allwinner,sun9i-a80-tcon-lcd
3535
- const: allwinner,sun9i-a80-tcon-tv
3636

37+
- items:
38+
- enum:
39+
- allwinner,sun7i-a20-tcon0
40+
- allwinner,sun7i-a20-tcon1
41+
- const: allwinner,sun7i-a20-tcon
42+
3743
- items:
3844
- enum:
3945
- allwinner,sun50i-a64-tcon-lcd

Documentation/devicetree/bindings/display/bridge/adi,adv7511.txt

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Analog Device ADV7511(W)/13/33 HDMI Encoders
1+
Analog Device ADV7511(W)/13/33/35 HDMI Encoders
22
-----------------------------------------
33

4-
The ADV7511, ADV7511W, ADV7513 and ADV7533 are HDMI audio and video transmitters
5-
compatible with HDMI 1.4 and DVI 1.0. They support color space conversion,
6-
S/PDIF, CEC and HDCP. ADV7533 supports the DSI interface for input pixels, while
7-
the others support RGB interface.
4+
The ADV7511, ADV7511W, ADV7513, ADV7533 and ADV7535 are HDMI audio and video
5+
transmitters compatible with HDMI 1.4 and DVI 1.0. They support color space
6+
conversion, S/PDIF, CEC and HDCP. ADV7533/5 supports the DSI interface for input
7+
pixels, while the others support RGB interface.
88

99
Required properties:
1010

@@ -13,6 +13,7 @@ Required properties:
1313
"adi,adv7511w"
1414
"adi,adv7513"
1515
"adi,adv7533"
16+
"adi,adv7535"
1617

1718
- reg: I2C slave addresses
1819
The ADV7511 internal registers are split into four pages exposed through
@@ -52,14 +53,14 @@ The following input format properties are required except in "rgb 1x" and
5253
- bgvdd-supply: A 1.8V supply that powers up the BGVDD pin. This is
5354
needed only for ADV7511.
5455

55-
The following properties are required for ADV7533:
56+
The following properties are required for ADV7533 and ADV7535:
5657

5758
- adi,dsi-lanes: Number of DSI data lanes connected to the DSI host. It should
5859
be one of 1, 2, 3 or 4.
5960
- a2vdd-supply: 1.8V supply that powers up the A2VDD pin on the chip.
6061
- v3p3-supply: A 3.3V supply that powers up the V3P3 pin on the chip.
6162
- v1p2-supply: A supply that powers up the V1P2 pin on the chip. It can be
62-
either 1.2V or 1.8V.
63+
either 1.2V or 1.8V for ADV7533 but only 1.8V for ADV7535.
6364

6465
Optional properties:
6566

@@ -71,9 +72,9 @@ Optional properties:
7172
- adi,embedded-sync: The input uses synchronization signals embedded in the
7273
data stream (similar to BT.656). Defaults to separate H/V synchronization
7374
signals.
74-
- adi,disable-timing-generator: Only for ADV7533. Disables the internal timing
75-
generator. The chip will rely on the sync signals in the DSI data lanes,
76-
rather than generate its own timings for HDMI output.
75+
- adi,disable-timing-generator: Only for ADV7533 and ADV7535. Disables the
76+
internal timing generator. The chip will rely on the sync signals in the
77+
DSI data lanes, rather than generate its own timings for HDMI output.
7778
- clocks: from common clock binding: reference to the CEC clock.
7879
- clock-names: from common clock binding: must be "cec".
7980
- reg-names : Names of maps with programmable addresses.
@@ -85,7 +86,7 @@ Required nodes:
8586
The ADV7511 has two video ports. Their connections are modelled using the OF
8687
graph bindings specified in Documentation/devicetree/bindings/graph.txt.
8788

88-
- Video port 0 for the RGB, YUV or DSI input. In the case of ADV7533, the
89+
- Video port 0 for the RGB, YUV or DSI input. In the case of ADV7533/5, the
8990
remote endpoint phandle should be a reference to a valid mipi_dsi_host device
9091
node.
9192
- Video port 1 for the HDMI output
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/bridge/toshiba,tc358768.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Toschiba TC358768/TC358778 Parallel RGB to MIPI DSI bridge
8+
9+
maintainers:
10+
- Peter Ujfalusi <[email protected]>
11+
12+
description: |
13+
The TC358768/TC358778 is bridge device which converts RGB to DSI.
14+
15+
properties:
16+
compatible:
17+
enum:
18+
- toshiba,tc358768
19+
- toshiba,tc358778
20+
21+
reg:
22+
maxItems: 1
23+
description: base I2C address of the device
24+
25+
reset-gpios:
26+
maxItems: 1
27+
description: GPIO connected to active low RESX pin
28+
29+
vddc-supply:
30+
description: Regulator for 1.2V internal core power.
31+
32+
vddmipi-supply:
33+
description: Regulator for 1.2V for the MIPI.
34+
35+
vddio-supply:
36+
description: Regulator for 1.8V - 3.3V IO power.
37+
38+
clocks:
39+
maxItems: 1
40+
41+
clock-names:
42+
const: refclk
43+
44+
ports:
45+
type: object
46+
47+
properties:
48+
"#address-cells":
49+
const: 1
50+
51+
"#size-cells":
52+
const: 0
53+
54+
port@0:
55+
type: object
56+
additionalProperties: false
57+
58+
description: |
59+
Video port for RGB input
60+
61+
properties:
62+
reg:
63+
const: 0
64+
65+
patternProperties:
66+
endpoint:
67+
type: object
68+
additionalProperties: false
69+
70+
properties:
71+
data-lines:
72+
enum: [ 16, 18, 24 ]
73+
74+
remote-endpoint: true
75+
76+
required:
77+
- reg
78+
79+
port@1:
80+
type: object
81+
additionalProperties: false
82+
83+
description: |
84+
Video port for DSI output (panel or connector).
85+
86+
properties:
87+
reg:
88+
const: 1
89+
90+
patternProperties:
91+
endpoint:
92+
type: object
93+
additionalProperties: false
94+
95+
properties:
96+
remote-endpoint: true
97+
98+
required:
99+
- reg
100+
101+
required:
102+
- "#address-cells"
103+
- "#size-cells"
104+
- port@0
105+
- port@1
106+
107+
required:
108+
- compatible
109+
- reg
110+
- vddc-supply
111+
- vddmipi-supply
112+
- vddio-supply
113+
- ports
114+
115+
additionalProperties: false
116+
117+
examples:
118+
- |
119+
#include <dt-bindings/gpio/gpio.h>
120+
121+
i2c1 {
122+
#address-cells = <1>;
123+
#size-cells = <0>;
124+
125+
dsi_bridge: dsi-bridge@e {
126+
compatible = "toshiba,tc358768";
127+
reg = <0xe>;
128+
129+
clocks = <&tc358768_refclk>;
130+
clock-names = "refclk";
131+
132+
reset-gpios = <&pcf_display_board 0 GPIO_ACTIVE_LOW>;
133+
134+
vddc-supply = <&v1_2d>;
135+
vddmipi-supply = <&v1_2d>;
136+
vddio-supply = <&v3_3d>;
137+
138+
dsi_bridge_ports: ports {
139+
#address-cells = <1>;
140+
#size-cells = <0>;
141+
142+
port@0 {
143+
reg = <0>;
144+
rgb_in: endpoint {
145+
remote-endpoint = <&dpi_out>;
146+
data-lines = <24>;
147+
};
148+
};
149+
150+
port@1 {
151+
reg = <1>;
152+
dsi_out: endpoint {
153+
remote-endpoint = <&lcd_in>;
154+
};
155+
};
156+
};
157+
};
158+
};
159+

Documentation/devicetree/bindings/display/panel/panel-simple.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ properties:
201201
- osddisplays,osd101t2045-53ts
202202
# QiaoDian XianShi Corporation 4"3 TFT LCD panel
203203
- qiaodian,qd43003c0-40
204+
# Rocktech Displays Ltd. RK101II01D-CT 10.1" TFT 1280x800
205+
- rocktech,rk101ii01d-ct
204206
# Rocktech Display Ltd. RK070ER9427 800(RGB)x480 TFT LCD panel
205207
- rocktech,rk070er9427
206208
# Samsung 12.2" (2560x1600 pixels) TFT LCD panel

drivers/dma-buf/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ config SYNC_FILE
66
default n
77
select DMA_SHARED_BUFFER
88
---help---
9-
The Sync File Framework adds explicit syncronization via
9+
The Sync File Framework adds explicit synchronization via
1010
userspace. It enables send/receive 'struct dma_fence' objects to/from
1111
userspace via Sync File fds for synchronization between drivers via
1212
userspace components. It has been ported from Android.

drivers/gpu/drm/amd/amdgpu/amdgpu.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1174,9 +1174,9 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
11741174
int amdgpu_device_ip_suspend(struct amdgpu_device *adev);
11751175
int amdgpu_device_suspend(struct drm_device *dev, bool fbcon);
11761176
int amdgpu_device_resume(struct drm_device *dev, bool fbcon);
1177-
u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe);
1178-
int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe);
1179-
void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe);
1177+
u32 amdgpu_get_vblank_counter_kms(struct drm_crtc *crtc);
1178+
int amdgpu_enable_vblank_kms(struct drm_crtc *crtc);
1179+
void amdgpu_disable_vblank_kms(struct drm_crtc *crtc);
11801180
long amdgpu_kms_compat_ioctl(struct file *filp, unsigned int cmd,
11811181
unsigned long arg);
11821182

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ static void amdgpu_display_flip_work_func(struct work_struct *__work)
9999
& (DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK)) ==
100100
(DRM_SCANOUTPOS_VALID | DRM_SCANOUTPOS_IN_VBLANK) &&
101101
(int)(work->target_vblank -
102-
amdgpu_get_vblank_counter_kms(adev->ddev, amdgpu_crtc->crtc_id)) > 0) {
102+
amdgpu_get_vblank_counter_kms(crtc)) > 0) {
103103
schedule_delayed_work(&work->flip_work, usecs_to_jiffies(1000));
104104
return;
105105
}
@@ -219,7 +219,7 @@ int amdgpu_display_crtc_page_flip_target(struct drm_crtc *crtc,
219219
if (!adev->enable_virtual_display)
220220
work->base = amdgpu_bo_gpu_offset(new_abo);
221221
work->target_vblank = target - (uint32_t)drm_crtc_vblank_count(crtc) +
222-
amdgpu_get_vblank_counter_kms(dev, work->crtc_id);
222+
amdgpu_get_vblank_counter_kms(crtc);
223223

224224
/* we borrow the event spin lock for protecting flip_wrok */
225225
spin_lock_irqsave(&crtc->dev->event_lock, flags);
@@ -924,3 +924,15 @@ int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc)
924924
return AMDGPU_CRTC_IRQ_NONE;
925925
}
926926
}
927+
928+
bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc,
929+
bool in_vblank_irq, int *vpos,
930+
int *hpos, ktime_t *stime, ktime_t *etime,
931+
const struct drm_display_mode *mode)
932+
{
933+
struct drm_device *dev = crtc->dev;
934+
unsigned int pipe = crtc->index;
935+
936+
return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, hpos,
937+
stime, etime, mode);
938+
}

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1377,16 +1377,6 @@ int amdgpu_file_to_fpriv(struct file *filp, struct amdgpu_fpriv **fpriv)
13771377
return 0;
13781378
}
13791379

1380-
static bool
1381-
amdgpu_get_crtc_scanout_position(struct drm_device *dev, unsigned int pipe,
1382-
bool in_vblank_irq, int *vpos, int *hpos,
1383-
ktime_t *stime, ktime_t *etime,
1384-
const struct drm_display_mode *mode)
1385-
{
1386-
return amdgpu_display_get_crtc_scanoutpos(dev, pipe, 0, vpos, hpos,
1387-
stime, etime, mode);
1388-
}
1389-
13901380
static struct drm_driver kms_driver = {
13911381
.driver_features =
13921382
DRIVER_USE_AGP | DRIVER_ATOMIC |
@@ -1398,11 +1388,6 @@ static struct drm_driver kms_driver = {
13981388
.postclose = amdgpu_driver_postclose_kms,
13991389
.lastclose = amdgpu_driver_lastclose_kms,
14001390
.unload = amdgpu_driver_unload_kms,
1401-
.get_vblank_counter = amdgpu_get_vblank_counter_kms,
1402-
.enable_vblank = amdgpu_enable_vblank_kms,
1403-
.disable_vblank = amdgpu_disable_vblank_kms,
1404-
.get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos,
1405-
.get_scanout_position = amdgpu_get_crtc_scanout_position,
14061391
.irq_handler = amdgpu_irq_handler,
14071392
.ioctls = amdgpu_ioctls_kms,
14081393
.gem_free_object_unlocked = amdgpu_gem_object_free,

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,14 +1110,15 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
11101110
/**
11111111
* amdgpu_get_vblank_counter_kms - get frame count
11121112
*
1113-
* @dev: drm dev pointer
1114-
* @pipe: crtc to get the frame count from
1113+
* @crtc: crtc to get the frame count from
11151114
*
11161115
* Gets the frame count on the requested crtc (all asics).
11171116
* Returns frame count on success, -EINVAL on failure.
11181117
*/
1119-
u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
1118+
u32 amdgpu_get_vblank_counter_kms(struct drm_crtc *crtc)
11201119
{
1120+
struct drm_device *dev = crtc->dev;
1121+
unsigned int pipe = crtc->index;
11211122
struct amdgpu_device *adev = dev->dev_private;
11221123
int vpos, hpos, stat;
11231124
u32 count;
@@ -1177,14 +1178,15 @@ u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe)
11771178
/**
11781179
* amdgpu_enable_vblank_kms - enable vblank interrupt
11791180
*
1180-
* @dev: drm dev pointer
1181-
* @pipe: crtc to enable vblank interrupt for
1181+
* @crtc: crtc to enable vblank interrupt for
11821182
*
11831183
* Enable the interrupt on the requested crtc (all asics).
11841184
* Returns 0 on success, -EINVAL on failure.
11851185
*/
1186-
int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe)
1186+
int amdgpu_enable_vblank_kms(struct drm_crtc *crtc)
11871187
{
1188+
struct drm_device *dev = crtc->dev;
1189+
unsigned int pipe = crtc->index;
11881190
struct amdgpu_device *adev = dev->dev_private;
11891191
int idx = amdgpu_display_crtc_idx_to_irq_type(adev, pipe);
11901192

@@ -1194,13 +1196,14 @@ int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe)
11941196
/**
11951197
* amdgpu_disable_vblank_kms - disable vblank interrupt
11961198
*
1197-
* @dev: drm dev pointer
1198-
* @pipe: crtc to disable vblank interrupt for
1199+
* @crtc: crtc to disable vblank interrupt for
11991200
*
12001201
* Disable the interrupt on the requested crtc (all asics).
12011202
*/
1202-
void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe)
1203+
void amdgpu_disable_vblank_kms(struct drm_crtc *crtc)
12031204
{
1205+
struct drm_device *dev = crtc->dev;
1206+
unsigned int pipe = crtc->index;
12041207
struct amdgpu_device *adev = dev->dev_private;
12051208
int idx = amdgpu_display_crtc_idx_to_irq_type(adev, pipe);
12061209

drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,11 @@ void amdgpu_panel_mode_fixup(struct drm_encoder *encoder,
612612
struct drm_display_mode *adjusted_mode);
613613
int amdgpu_display_crtc_idx_to_irq_type(struct amdgpu_device *adev, int crtc);
614614

615+
bool amdgpu_crtc_get_scanout_position(struct drm_crtc *crtc,
616+
bool in_vblank_irq, int *vpos,
617+
int *hpos, ktime_t *stime, ktime_t *etime,
618+
const struct drm_display_mode *mode);
619+
615620
/* fbdev layer */
616621
int amdgpu_fbdev_init(struct amdgpu_device *adev);
617622
void amdgpu_fbdev_fini(struct amdgpu_device *adev);

0 commit comments

Comments
 (0)