Skip to content

Commit ef23d50

Browse files
committed
Merge tag 'drm-misc-next-fixes-2021-02-11' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next-fixes cherry picked from drm-misc-next for v5.12: - Assorted small fixes. - Disable and remove gma3600 support. - Fix CEC for vc4/hdmi. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/dac2ae30-c5d9-4222-39e2-f64067310491@linux.intel.com
2 parents ac35d19 + e2183fb commit ef23d50

37 files changed

Lines changed: 261 additions & 5954 deletions

Documentation/devicetree/bindings/display/brcm,bcm2711-hdmi.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,24 @@ properties:
5353
- const: audio
5454
- const: cec
5555

56+
interrupts:
57+
items:
58+
- description: CEC TX interrupt
59+
- description: CEC RX interrupt
60+
- description: CEC stuck at low interrupt
61+
- description: Wake-up interrupt
62+
- description: Hotplug connected interrupt
63+
- description: Hotplug removed interrupt
64+
65+
interrupt-names:
66+
items:
67+
- const: cec-tx
68+
- const: cec-rx
69+
- const: cec-low
70+
- const: wakeup
71+
- const: hpd-connected
72+
- const: hpd-removed
73+
5674
ddc:
5775
allOf:
5876
- $ref: /schemas/types.yaml#/definitions/phandle
@@ -90,7 +108,7 @@ required:
90108
- resets
91109
- ddc
92110

93-
additionalProperties: false
111+
unevaluatedProperties: false
94112

95113
examples:
96114
- |

Documentation/gpu/todo.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ Advanced: Tricky tasks that need fairly good understanding of the DRM subsystem
2323
and graphics topics. Generally need the relevant hardware for development and
2424
testing.
2525

26+
Expert: Only attempt these if you've successfully completed some tricky
27+
refactorings already and are an expert in the specific area
28+
2629
Subsystem-wide refactorings
2730
===========================
2831

@@ -168,6 +171,22 @@ Contact: Daniel Vetter, respective driver maintainers
168171

169172
Level: Advanced
170173

174+
Move Buffer Object Locking to dma_resv_lock()
175+
---------------------------------------------
176+
177+
Many drivers have their own per-object locking scheme, usually using
178+
mutex_lock(). This causes all kinds of trouble for buffer sharing, since
179+
depending which driver is the exporter and importer, the locking hierarchy is
180+
reversed.
181+
182+
To solve this we need one standard per-object locking mechanism, which is
183+
dma_resv_lock(). This lock needs to be called as the outermost lock, with all
184+
other driver specific per-object locks removed. The problem is tha rolling out
185+
the actual change to the locking contract is a flag day, due to struct dma_buf
186+
buffer sharing.
187+
188+
Level: Expert
189+
171190
Convert logging to drm_* functions with drm_device paramater
172191
------------------------------------------------------------
173192

drivers/dma-buf/st-dma-fence.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,11 @@ static int thread_signal_callback(void *arg)
471471
dma_fence_signal(f1);
472472

473473
smp_store_mb(cb.seen, false);
474-
if (!f2 || dma_fence_add_callback(f2, &cb.cb, simple_callback))
475-
miss++, cb.seen = true;
474+
if (!f2 ||
475+
dma_fence_add_callback(f2, &cb.cb, simple_callback)) {
476+
miss++;
477+
cb.seen = true;
478+
}
476479

477480
if (!t->before)
478481
dma_fence_signal(f1);

drivers/gpu/drm/drm_client_modeset.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Copyright (c) 2007 Dave Airlie <airlied@linux.ie>
88
*/
99

10+
#include "drm/drm_modeset_lock.h"
1011
#include <linux/module.h>
1112
#include <linux/mutex.h>
1213
#include <linux/slab.h>
@@ -1181,9 +1182,11 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dp
11811182
struct drm_device *dev = client->dev;
11821183
struct drm_connector *connector;
11831184
struct drm_mode_set *modeset;
1185+
struct drm_modeset_acquire_ctx ctx;
11841186
int j;
1187+
int ret;
11851188

1186-
drm_modeset_lock_all(dev);
1189+
DRM_MODESET_LOCK_ALL_BEGIN(dev, ctx, 0, ret);
11871190
drm_client_for_each_modeset(modeset, client) {
11881191
if (!modeset->crtc->enabled)
11891192
continue;
@@ -1195,7 +1198,7 @@ static void drm_client_modeset_dpms_legacy(struct drm_client_dev *client, int dp
11951198
dev->mode_config.dpms_property, dpms_mode);
11961199
}
11971200
}
1198-
drm_modeset_unlock_all(dev);
1201+
DRM_MODESET_LOCK_ALL_END(dev, ctx, ret);
11991202
}
12001203

12011204
/**

drivers/gpu/drm/drm_dp_mst_topology.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2302,7 +2302,8 @@ drm_dp_mst_port_add_connector(struct drm_dp_mst_branch *mstb,
23022302
}
23032303

23042304
if (port->pdt != DP_PEER_DEVICE_NONE &&
2305-
drm_dp_mst_is_end_device(port->pdt, port->mcs)) {
2305+
drm_dp_mst_is_end_device(port->pdt, port->mcs) &&
2306+
port->port_num >= DP_MST_LOGICAL_PORT_0) {
23062307
port->cached_edid = drm_get_edid(port->connector,
23072308
&port->aux.ddc);
23082309
drm_connector_set_tile_property(port->connector);

drivers/gpu/drm/gma500/Kconfig

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# SPDX-License-Identifier: GPL-2.0-only
22
config DRM_GMA500
3-
tristate "Intel GMA5/600 KMS Framebuffer"
3+
tristate "Intel GMA500/600/3600/3650 KMS Framebuffer"
44
depends on DRM && PCI && X86 && MMU
55
select DRM_KMS_HELPER
6-
select DRM_TTM
76
# GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915
87
select ACPI_VIDEO if ACPI
98
select BACKLIGHT_CLASS_DEVICE if ACPI
@@ -19,17 +18,3 @@ config DRM_GMA600
1918
help
2019
Say yes to include support for GMA600 (Intel Moorestown/Oaktrail)
2120
platforms with LVDS ports. MIPI is not currently supported.
22-
23-
config DRM_GMA3600
24-
bool "Intel GMA3600/3650 support (Experimental)"
25-
depends on DRM_GMA500
26-
help
27-
Say yes to include basic support for Intel GMA3600/3650 (Intel
28-
Cedar Trail) platforms.
29-
30-
config DRM_MEDFIELD
31-
bool "Intel Medfield support (Experimental)"
32-
depends on DRM_GMA500 && X86_INTEL_MID
33-
help
34-
Say yes to include support for the Intel Medfield platform.
35-

drivers/gpu/drm/gma500/Makefile

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,40 @@
66
gma500_gfx-y += \
77
accel_2d.o \
88
backlight.o \
9+
blitter.o \
10+
cdv_device.o \
11+
cdv_intel_crt.o \
12+
cdv_intel_display.o \
13+
cdv_intel_dp.o \
14+
cdv_intel_hdmi.o \
15+
cdv_intel_lvds.o \
916
framebuffer.o \
1017
gem.o \
18+
gma_device.o \
19+
gma_display.o \
1120
gtt.o \
1221
intel_bios.o \
13-
intel_i2c.o \
1422
intel_gmbus.o \
23+
intel_i2c.o \
24+
mid_bios.o \
1525
mmu.o \
16-
blitter.o \
1726
power.o \
27+
psb_device.o \
1828
psb_drv.o \
19-
gma_display.o \
20-
gma_device.o \
2129
psb_intel_display.o \
2230
psb_intel_lvds.o \
2331
psb_intel_modes.o \
2432
psb_intel_sdvo.o \
2533
psb_lid.o \
26-
psb_irq.o \
27-
psb_device.o \
28-
mid_bios.o
34+
psb_irq.o
2935

3036
gma500_gfx-$(CONFIG_ACPI) += opregion.o \
3137

32-
gma500_gfx-$(CONFIG_DRM_GMA3600) += cdv_device.o \
33-
cdv_intel_crt.o \
34-
cdv_intel_display.o \
35-
cdv_intel_hdmi.o \
36-
cdv_intel_lvds.o \
37-
cdv_intel_dp.o
38-
3938
gma500_gfx-$(CONFIG_DRM_GMA600) += oaktrail_device.o \
4039
oaktrail_crtc.o \
4140
oaktrail_lvds.o \
4241
oaktrail_lvds_i2c.o \
4342
oaktrail_hdmi.o \
4443
oaktrail_hdmi_i2c.o
4544

46-
gma500_gfx-$(CONFIG_DRM_MEDFIELD) += mdfld_device.o \
47-
mdfld_output.o \
48-
mdfld_intel_display.o \
49-
mdfld_dsi_output.o \
50-
mdfld_dsi_dpi.o \
51-
mdfld_dsi_pkg_sender.o \
52-
mdfld_tpo_vid.o \
53-
mdfld_tmd_vid.o \
54-
tc35876x-dsi-lvds.o
55-
5645
obj-$(CONFIG_DRM_GMA500) += gma500_gfx.o

drivers/gpu/drm/gma500/cdv_intel_hdmi.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
*
2323
* Authors:
2424
* jim liu <jim.liu@intel.com>
25-
*
26-
* FIXME:
27-
* We should probably make this generic and share it with Medfield
2825
*/
2926

3027
#include <linux/pm_runtime.h>
@@ -56,7 +53,6 @@ struct mid_intel_hdmi_priv {
5653
bool has_hdmi_audio;
5754
/* Should set this when detect hotplug */
5855
bool hdmi_device_connected;
59-
struct mdfld_hdmi_i2c *i2c_bus;
6056
struct i2c_adapter *hdmi_i2c_adapter; /* for control functions */
6157
struct drm_device *dev;
6258
};

0 commit comments

Comments
 (0)