Skip to content

Commit 1493bdd

Browse files
committed
Merge tag 'drm-misc-next-2020-05-14' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.8: UAPI Changes: Cross-subsystem Changes: * dma-buf: use atomic64_fetch_add() for context id * Documentation: document bindings for ASUS ZOOT TM5P5, BOE NV133FHM-N62, hpd-gpios Core Changes: Driver Changes: * drm/ast: fix supend; cleanups * drm/i2c: cleanups * drm/panel: add MODULE_LICENSE to panel-visinox-rm69299; add support for ASUS TM5P5i, BOE NV133FHM-N62i; fix size and bpp of BOE NV133FHM-N61 add hpd-gpio to panel-simple * drm/mcde: fix return value check in mcde_dsi_bind() * drm/mgag200: use managed drmm_mode_config_init(); cleanups * fbdev/pxa168fb: cleanups Signed-off-by: Dave Airlie <[email protected]> From: Thomas Zimmermann <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20200514070819.GA6930@linux-uq9g
2 parents 80c9b58 + 1c530d4 commit 1493bdd

File tree

20 files changed

+654
-169
lines changed

20 files changed

+654
-169
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/display/panel/asus,z00t-tm5p5-nt35596.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: ASUS Z00T TM5P5 NT35596 5.5" 1080×1920 LCD Panel
8+
9+
maintainers:
10+
- Konrad Dybcio <[email protected]>
11+
12+
description: |+
13+
This panel seems to only be found in the Asus Z00T
14+
smartphone and we have no straightforward way of
15+
actually getting the correct model number,
16+
as no schematics are released publicly.
17+
18+
allOf:
19+
- $ref: panel-common.yaml#
20+
21+
properties:
22+
compatible:
23+
const: asus,z00t-tm5p5-n35596
24+
reg: true
25+
reset-gpios: true
26+
vdd-supply:
27+
description: core voltage supply
28+
vddio-supply:
29+
description: vddio supply
30+
31+
required:
32+
- compatible
33+
- reg
34+
- vdd-supply
35+
- vddio-supply
36+
- reset-gpios
37+
38+
additionalProperties: false
39+
40+
examples:
41+
- |
42+
#include <dt-bindings/gpio/gpio.h>
43+
44+
dsi {
45+
#address-cells = <1>;
46+
#size-cells = <0>;
47+
panel@0 {
48+
reg = <0>;
49+
50+
compatible = "asus,z00t-tm5p5-n35596";
51+
52+
vdd-supply = <&pm8916_l8>;
53+
vddio-supply = <&pm8916_l6>;
54+
reset-gpios = <&msmgpio 25 GPIO_ACTIVE_HIGH>;
55+
};
56+
};

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ properties:
9696
(hot plug detect) signal, but the signal isn't hooked up so we should
9797
hardcode the max delay from the panel spec when powering up the panel.
9898

99+
hpd-gpios:
100+
maxItems: 1
101+
description:
102+
If Hot Plug Detect (HPD) is connected to a GPIO in the system rather
103+
than a dedicated HPD pin the pin can be specified here.
104+
99105
# Control I/Os
100106

101107
# Many display panels can be controlled through pins driven by GPIOs. The nature

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ properties:
7575
- boe,nv101wxmn51
7676
# BOE NV133FHM-N61 13.3" FHD (1920x1080) TFT LCD Panel
7777
- boe,nv133fhm-n61
78+
# BOE NV133FHM-N62 13.3" FHD (1920x1080) TFT LCD Panel
79+
- boe,nv133fhm-n62
7880
# BOE NV140FHM-N49 14.0" FHD a-Si FT panel
7981
- boe,nv140fhmn49
8082
# CDTech(H.K.) Electronics Limited 4.3" 480x272 color TFT-LCD panel

drivers/dma-buf/dma-fence.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ EXPORT_SYMBOL(dma_fence_get_stub);
106106
u64 dma_fence_context_alloc(unsigned num)
107107
{
108108
WARN_ON(!num);
109-
return atomic64_add_return(num, &dma_fence_context_counter) - num;
109+
return atomic64_fetch_add(num, &dma_fence_context_counter);
110110
}
111111
EXPORT_SYMBOL(dma_fence_context_alloc);
112112

drivers/gpu/drm/ast/ast_mode.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,9 @@ static int ast_primary_plane_helper_atomic_check(struct drm_plane *plane,
561561
return 0;
562562
}
563563

564-
void ast_primary_plane_helper_atomic_update(struct drm_plane *plane,
565-
struct drm_plane_state *old_state)
564+
static void
565+
ast_primary_plane_helper_atomic_update(struct drm_plane *plane,
566+
struct drm_plane_state *old_state)
566567
{
567568
struct ast_private *ast = plane->dev->dev_private;
568569
struct drm_plane_state *state = plane->state;
@@ -801,6 +802,9 @@ static int ast_crtc_helper_atomic_check(struct drm_crtc *crtc,
801802
return -EINVAL;
802803
}
803804

805+
if (!state->enable)
806+
return 0; /* no mode checks if CRTC is being disabled */
807+
804808
ast_state = to_ast_crtc_state(state);
805809

806810
format = ast_state->format;

drivers/gpu/drm/i2c/tda998x_drv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,8 @@ static void tda998x_audio_shutdown(struct device *dev, void *data)
11331133
mutex_unlock(&priv->audio_mutex);
11341134
}
11351135

1136-
int tda998x_audio_digital_mute(struct device *dev, void *data, bool enable)
1136+
static int tda998x_audio_digital_mute(struct device *dev, void *data,
1137+
bool enable)
11371138
{
11381139
struct tda998x_priv *priv = dev_get_drvdata(dev);
11391140

drivers/gpu/drm/mcde/mcde_dsi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,10 +1073,9 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
10731073
panel = NULL;
10741074

10751075
bridge = of_drm_find_bridge(child);
1076-
if (IS_ERR(bridge)) {
1077-
dev_err(dev, "failed to find bridge (%ld)\n",
1078-
PTR_ERR(bridge));
1079-
return PTR_ERR(bridge);
1076+
if (!bridge) {
1077+
dev_err(dev, "failed to find bridge\n");
1078+
return -EINVAL;
10801079
}
10811080
}
10821081
}

drivers/gpu/drm/mgag200/mgag200_cursor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ int mgag200_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
260260
uint32_t handle, uint32_t width, uint32_t height)
261261
{
262262
struct drm_device *dev = crtc->dev;
263-
struct mga_device *mdev = (struct mga_device *)dev->dev_private;
263+
struct mga_device *mdev = to_mga_device(dev);
264264
struct drm_gem_object *obj;
265265
struct drm_gem_vram_object *gbo = NULL;
266266
int ret;
@@ -307,7 +307,7 @@ int mgag200_crtc_cursor_set(struct drm_crtc *crtc, struct drm_file *file_priv,
307307

308308
int mgag200_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
309309
{
310-
struct mga_device *mdev = (struct mga_device *)crtc->dev->dev_private;
310+
struct mga_device *mdev = to_mga_device(crtc->dev);
311311

312312
/* Our origin is at (64,64) */
313313
x += 64;

drivers/gpu/drm/mgag200/mgag200_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int mgag200_driver_dumb_create(struct drm_file *file,
120120
struct drm_device *dev,
121121
struct drm_mode_create_dumb *args)
122122
{
123-
struct mga_device *mdev = dev->dev_private;
123+
struct mga_device *mdev = to_mga_device(dev);
124124
unsigned long pg_align;
125125

126126
if (WARN_ONCE(!dev->vram_mm, "VRAM MM not initialized"))

drivers/gpu/drm/mgag200/mgag200_drv.h

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,11 +104,6 @@ struct mga_crtc {
104104
bool enabled;
105105
};
106106

107-
struct mga_mode_info {
108-
bool mode_config_initialized;
109-
struct mga_crtc *crtc;
110-
};
111-
112107
struct mga_i2c_chan {
113108
struct i2c_adapter adapter;
114109
struct drm_device *dev;
@@ -160,17 +155,14 @@ struct mga_device {
160155
void __iomem *rmmio;
161156

162157
struct mga_mc mc;
163-
struct mga_mode_info mode_info;
164158

165159
struct mga_cursor cursor;
166160

167161
size_t vram_fb_available;
168162

169163
bool suspended;
170-
int num_crtc;
171164
enum mga_type type;
172165
int has_sdram;
173-
struct drm_display_mode mode;
174166

175167
int bpp_shifts[4];
176168

@@ -179,9 +171,15 @@ struct mga_device {
179171
/* SE model number stored in reg 0x1e24 */
180172
u32 unique_rev_id;
181173

174+
struct mga_connector connector;
182175
struct drm_encoder encoder;
183176
};
184177

178+
static inline struct mga_device *to_mga_device(struct drm_device *dev)
179+
{
180+
return dev->dev_private;
181+
}
182+
185183
static inline enum mga_type
186184
mgag200_type_from_driver_data(kernel_ulong_t driver_data)
187185
{
@@ -196,7 +194,6 @@ mgag200_flags_from_driver_data(kernel_ulong_t driver_data)
196194

197195
/* mgag200_mode.c */
198196
int mgag200_modeset_init(struct mga_device *mdev);
199-
void mgag200_modeset_fini(struct mga_device *mdev);
200197

201198
/* mgag200_main.c */
202199
int mgag200_driver_load(struct drm_device *dev, unsigned long flags);

0 commit comments

Comments
 (0)