Skip to content

Commit e32b248

Browse files
committed
Merge tag 'drm-misc-fixes-2020-04-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes
A few resources-related fixes (tidss, dp_mst, scheduler), probe fixes and DT bindings adjustments. Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 11c5ec7 + 9da6743 commit e32b248

File tree

10 files changed

+57
-19
lines changed

10 files changed

+57
-19
lines changed

Documentation/devicetree/bindings/display/panel/leadtek,ltk500hd1829.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ examples:
3737
dsi {
3838
#address-cells = <1>;
3939
#size-cells = <0>;
40-
reg = <0xff450000 0x1000>;
4140
4241
panel@0 {
4342
compatible = "leadtek,ltk500hd1829";

Documentation/devicetree/bindings/display/panel/lvds.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,20 @@ properties:
9696
If set, reverse the bit order described in the data mappings below on all
9797
data lanes, transmitting bits for slots 6 to 0 instead of 0 to 6.
9898

99+
port: true
100+
ports: true
101+
99102
required:
100103
- compatible
101104
- data-mapping
102105
- width-mm
103106
- height-mm
104107
- panel-timing
105-
- port
108+
109+
oneOf:
110+
- required:
111+
- port
112+
- required:
113+
- ports
106114

107115
...

Documentation/devicetree/bindings/display/panel/xinpeng,xpp055c272.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ examples:
3737
dsi {
3838
#address-cells = <1>;
3939
#size-cells = <0>;
40-
reg = <0xff450000 0x1000>;
4140
4241
panel@0 {
4342
compatible = "xinpeng,xpp055c272";

drivers/gpu/drm/bridge/analogix/analogix-anx6345.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,9 @@ static int anx6345_get_modes(struct drm_connector *connector)
485485

486486
num_modes += drm_add_edid_modes(connector, anx6345->edid);
487487

488+
/* Driver currently supports only 6bpc */
489+
connector->display_info.bpc = 6;
490+
488491
unlock:
489492
if (power_off)
490493
anx6345_poweroff(anx6345);

drivers/gpu/drm/drm_dp_mst_topology.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4295,6 +4295,7 @@ int drm_dp_atomic_release_vcpi_slots(struct drm_atomic_state *state,
42954295
if (pos->vcpi) {
42964296
drm_dp_mst_put_port_malloc(port);
42974297
pos->vcpi = 0;
4298+
pos->pbn = 0;
42984299
}
42994300

43004301
return 0;

drivers/gpu/drm/meson/meson_dw_hdmi.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,10 +1034,8 @@ static int meson_dw_hdmi_bind(struct device *dev, struct device *master,
10341034
return PTR_ERR(dw_plat_data->regm);
10351035

10361036
irq = platform_get_irq(pdev, 0);
1037-
if (irq < 0) {
1038-
dev_err(dev, "Failed to get hdmi top irq\n");
1037+
if (irq < 0)
10391038
return irq;
1040-
}
10411039

10421040
ret = devm_request_threaded_irq(dev, irq, dw_hdmi_top_irq,
10431041
dw_hdmi_top_thread_irq, IRQF_SHARED,

drivers/gpu/drm/scheduler/sched_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ drm_sched_get_cleanup_job(struct drm_gpu_scheduler *sched)
676676
*/
677677
if ((sched->timeout != MAX_SCHEDULE_TIMEOUT &&
678678
!cancel_delayed_work(&sched->work_tdr)) ||
679-
__kthread_should_park(sched->thread))
679+
kthread_should_park())
680680
return NULL;
681681

682682
spin_lock(&sched->job_list_lock);

drivers/gpu/drm/tidss/tidss_crtc.c

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,9 +379,17 @@ static struct drm_crtc_state *tidss_crtc_duplicate_state(struct drm_crtc *crtc)
379379
return &state->base;
380380
}
381381

382+
static void tidss_crtc_destroy(struct drm_crtc *crtc)
383+
{
384+
struct tidss_crtc *tcrtc = to_tidss_crtc(crtc);
385+
386+
drm_crtc_cleanup(crtc);
387+
kfree(tcrtc);
388+
}
389+
382390
static const struct drm_crtc_funcs tidss_crtc_funcs = {
383391
.reset = tidss_crtc_reset,
384-
.destroy = drm_crtc_cleanup,
392+
.destroy = tidss_crtc_destroy,
385393
.set_config = drm_atomic_helper_set_config,
386394
.page_flip = drm_atomic_helper_page_flip,
387395
.atomic_duplicate_state = tidss_crtc_duplicate_state,
@@ -400,7 +408,7 @@ struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss,
400408
bool has_ctm = tidss->feat->vp_feat.color.has_ctm;
401409
int ret;
402410

403-
tcrtc = devm_kzalloc(tidss->dev, sizeof(*tcrtc), GFP_KERNEL);
411+
tcrtc = kzalloc(sizeof(*tcrtc), GFP_KERNEL);
404412
if (!tcrtc)
405413
return ERR_PTR(-ENOMEM);
406414

@@ -411,8 +419,10 @@ struct tidss_crtc *tidss_crtc_create(struct tidss_device *tidss,
411419

412420
ret = drm_crtc_init_with_planes(&tidss->ddev, crtc, primary,
413421
NULL, &tidss_crtc_funcs, NULL);
414-
if (ret < 0)
422+
if (ret < 0) {
423+
kfree(tcrtc);
415424
return ERR_PTR(ret);
425+
}
416426

417427
drm_crtc_helper_add(crtc, &tidss_crtc_helper_funcs);
418428

drivers/gpu/drm/tidss/tidss_encoder.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,18 @@ static int tidss_encoder_atomic_check(struct drm_encoder *encoder,
5555
return 0;
5656
}
5757

58+
static void tidss_encoder_destroy(struct drm_encoder *encoder)
59+
{
60+
drm_encoder_cleanup(encoder);
61+
kfree(encoder);
62+
}
63+
5864
static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
5965
.atomic_check = tidss_encoder_atomic_check,
6066
};
6167

6268
static const struct drm_encoder_funcs encoder_funcs = {
63-
.destroy = drm_encoder_cleanup,
69+
.destroy = tidss_encoder_destroy,
6470
};
6571

6672
struct drm_encoder *tidss_encoder_create(struct tidss_device *tidss,
@@ -69,16 +75,18 @@ struct drm_encoder *tidss_encoder_create(struct tidss_device *tidss,
6975
struct drm_encoder *enc;
7076
int ret;
7177

72-
enc = devm_kzalloc(tidss->dev, sizeof(*enc), GFP_KERNEL);
78+
enc = kzalloc(sizeof(*enc), GFP_KERNEL);
7379
if (!enc)
7480
return ERR_PTR(-ENOMEM);
7581

7682
enc->possible_crtcs = possible_crtcs;
7783

7884
ret = drm_encoder_init(&tidss->ddev, enc, &encoder_funcs,
7985
encoder_type, NULL);
80-
if (ret < 0)
86+
if (ret < 0) {
87+
kfree(enc);
8188
return ERR_PTR(ret);
89+
}
8290

8391
drm_encoder_helper_add(enc, &encoder_helper_funcs);
8492

drivers/gpu/drm/tidss/tidss_plane.c

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ static void tidss_plane_atomic_disable(struct drm_plane *plane,
141141
dispc_plane_enable(tidss->dispc, tplane->hw_plane_id, false);
142142
}
143143

144+
static void drm_plane_destroy(struct drm_plane *plane)
145+
{
146+
struct tidss_plane *tplane = to_tidss_plane(plane);
147+
148+
drm_plane_cleanup(plane);
149+
kfree(tplane);
150+
}
151+
144152
static const struct drm_plane_helper_funcs tidss_plane_helper_funcs = {
145153
.atomic_check = tidss_plane_atomic_check,
146154
.atomic_update = tidss_plane_atomic_update,
@@ -151,7 +159,7 @@ static const struct drm_plane_funcs tidss_plane_funcs = {
151159
.update_plane = drm_atomic_helper_update_plane,
152160
.disable_plane = drm_atomic_helper_disable_plane,
153161
.reset = drm_atomic_helper_plane_reset,
154-
.destroy = drm_plane_cleanup,
162+
.destroy = drm_plane_destroy,
155163
.atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state,
156164
.atomic_destroy_state = drm_atomic_helper_plane_destroy_state,
157165
};
@@ -175,7 +183,7 @@ struct tidss_plane *tidss_plane_create(struct tidss_device *tidss,
175183
BIT(DRM_MODE_BLEND_COVERAGE));
176184
int ret;
177185

178-
tplane = devm_kzalloc(tidss->dev, sizeof(*tplane), GFP_KERNEL);
186+
tplane = kzalloc(sizeof(*tplane), GFP_KERNEL);
179187
if (!tplane)
180188
return ERR_PTR(-ENOMEM);
181189

@@ -190,7 +198,7 @@ struct tidss_plane *tidss_plane_create(struct tidss_device *tidss,
190198
formats, num_formats,
191199
NULL, type, NULL);
192200
if (ret < 0)
193-
return ERR_PTR(ret);
201+
goto err;
194202

195203
drm_plane_helper_add(&tplane->plane, &tidss_plane_helper_funcs);
196204

@@ -203,15 +211,19 @@ struct tidss_plane *tidss_plane_create(struct tidss_device *tidss,
203211
default_encoding,
204212
default_range);
205213
if (ret)
206-
return ERR_PTR(ret);
214+
goto err;
207215

208216
ret = drm_plane_create_alpha_property(&tplane->plane);
209217
if (ret)
210-
return ERR_PTR(ret);
218+
goto err;
211219

212220
ret = drm_plane_create_blend_mode_property(&tplane->plane, blend_modes);
213221
if (ret)
214-
return ERR_PTR(ret);
222+
goto err;
215223

216224
return tplane;
225+
226+
err:
227+
kfree(tplane);
228+
return ERR_PTR(ret);
217229
}

0 commit comments

Comments
 (0)