Skip to content

Commit 7ed0936

Browse files
committed
Merge tag 'drm-misc-next-2019-10-09-2' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
drm-misc-next for 5.5: UAPI Changes: -Colorspace: Expose different prop values for DP vs. HDMI (Gwan-gyeong Mun) -fourcc: Add DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED (Raymond) -not_actually: s/ENOTSUPP/EOPNOTSUPP/ in drm_edid and drm_mipi_dbi. This should not reach userspace, but adding here to specifically call that out (Daniel) -i810: Prevent underflow in dispatch ioctls (Dan) -komeda: Add ACLK sysfs attribute (Mihail) -v3d: Allow userspace to clean up after render jobs (Iago) Cross-subsystem Changes: -MAINTAINERS: -Add Alyssa & Steven as panfrost reviewers (Rob) -Add Jernej as DE2 reviewer (Maxime) -Add Chen-Yu as Allwinner maintainer (Maxime) -staging: Make some stack arrays static const (Colin) Core Changes: -ttm: Allow drivers to specify their vma manager (to use gem mgr) (Gerd) -docs: Various fixes in connector/encoder/bridge docs (Daniel, Lyude, Laurent) -connector: Allow more than 3 possible encoders for a connector (José) -dp_cec: Allow a connector to be associated with a cec device (Dariusz) -various: Fix some compile/sparse warnings (Ville) -mm: Ensure mm node removals are properly serialised (Chris) -panel: Specify the type of panel for drm_panels for later use (Laurent) -panel: Use drm_panel_init to init device and funcs (Laurent) -mst: Refactors and cleanups in anticipation of suspend/resume support (Lyude) -vram: -Add lazy unmapping for gem bo's (Thomas) -Unify and rationalize vram mm and gem vram (Thomas) -Expose vmap and vunmap for gem vram objects (Thomas) -Allow objects to be pinned at the top of vram to avoid fragmentation (Thomas) Driver Changes: -various: Include drm_bridge.h instead of relying on drm_crtc.h (Boris) -ast/mgag200: Refactor show_cursor(), move cursor to top of video mem (Thomas) -komeda: -Add error event printing (behind CONFIG) and reg dump support (Lowry) -Add suspend/resume support (Lowry) -Workaround D71 shadow registers not flushing on disable (Lowry) -meson: Add suspend/resume support (Neil) -omap: Miscellaneous refactors and improvements (Tomi/Jyri) -panfrost/shmem: Silence lockdep by using mutex_trylock (Rob) -panfrost: Miscellaneous small fixes (Rob/Steven) -sti: Fix warnings (Benjamin/Linus) -sun4i: -Add vcc-dsi regulator to sun6i_mipi_dsi (Jagan) -A few patches to figure out the DRQ/start delay calc on dsi (Jagan/Icenowy) -virtio: -Add module param to switch resource reuse workaround on/off (Gerd) -Avoid calling vmexit while holding spinlock (Gerd) -Use gem shmem helpers instead of ttm (Gerd) -Accommodate command buffer allocations too big for cma (David) Cc: Rob Herring <robh@kernel.org> Cc: Maxime Ripard <mripard@kernel.org> Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Lyude Paul <lyude@redhat.com> Cc: José Roberto de Souza <jose.souza@intel.com> Cc: Dariusz Marcinkiewicz <darekm@google.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Raymond Smith <raymond.smith@arm.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Colin Ian King <colin.king@canonical.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Mihail Atanassov <Mihail.Atanassov@arm.com> Cc: Lowry Li <Lowry.Li@arm.com> Cc: Neil Armstrong <narmstrong@baylibre.com> Cc: Jyri Sarha <jsarha@ti.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Cc: Steven Price <steven.price@arm.com> Cc: Benjamin Gaignard <benjamin.gaignard@st.com> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Icenowy Zheng <icenowy@aosc.io> Cc: Iago Toral Quiroga <itoral@igalia.com> Cc: David Riley <davidriley@chromium.org> Signed-off-by: Dave Airlie <airlied@redhat.com> # gpg: Signature made Thu 10 Oct 2019 01:00:47 AM AEST # gpg: using RSA key 732C002572DCAF79 # gpg: Can't check signature: public key not found # Conflicts: # drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c # drivers/gpu/drm/i915/i915_drv.c # drivers/gpu/drm/i915/i915_gem.c # drivers/gpu/drm/i915/i915_gem_gtt.c # drivers/gpu/drm/i915/i915_vma.c From: Sean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20191009150825.GA227673@art_vandelay
2 parents 97ea565 + 354c2d3 commit 7ed0936

299 files changed

Lines changed: 4632 additions & 2969 deletions

File tree

Some content is hidden

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

‎Documentation/devicetree/bindings/display/allwinner,sun6i-a31-mipi-dsi.yaml‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ properties:
3636
resets:
3737
maxItems: 1
3838

39+
vcc-dsi-supply:
40+
description: VCC-DSI power supply of the DSI encoder
41+
3942
phys:
4043
maxItems: 1
4144

@@ -64,6 +67,7 @@ required:
6467
- phys
6568
- phy-names
6669
- resets
70+
- vcc-dsi-supply
6771
- port
6872

6973
additionalProperties: false
@@ -79,6 +83,7 @@ examples:
7983
resets = <&ccu 4>;
8084
phys = <&dphy0>;
8185
phy-names = "dphy";
86+
vcc-dsi-supply = <&reg_dcdc1>;
8287
#address-cells = <1>;
8388
#size-cells = <0>;
8489

‎Documentation/devicetree/bindings/display/bridge/anx7814.txt‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ designed for portable devices.
66

77
Required properties:
88

9-
- compatible : "analogix,anx7814"
9+
- compatible : Must be one of:
10+
"analogix,anx7808"
11+
"analogix,anx7812"
12+
"analogix,anx7814"
13+
"analogix,anx7818"
1014
- reg : I2C address of the device
1115
- interrupts : Should contain the INTP interrupt
1216
- hpd-gpios : Which GPIO to use for hpd

‎Documentation/gpu/drm-mm.rst‎

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -400,16 +400,13 @@ GEM VRAM Helper Functions Reference
400400
.. kernel-doc:: drivers/gpu/drm/drm_gem_vram_helper.c
401401
:export:
402402

403-
VRAM MM Helper Functions Reference
404-
----------------------------------
403+
GEM TTM Helper Functions Reference
404+
-----------------------------------
405405

406-
.. kernel-doc:: drivers/gpu/drm/drm_vram_mm_helper.c
406+
.. kernel-doc:: drivers/gpu/drm/drm_gem_ttm_helper.c
407407
:doc: overview
408408

409-
.. kernel-doc:: include/drm/drm_vram_mm_helper.h
410-
:internal:
411-
412-
.. kernel-doc:: drivers/gpu/drm/drm_vram_mm_helper.c
409+
.. kernel-doc:: drivers/gpu/drm/drm_gem_ttm_helper.c
413410
:export:
414411

415412
VMA Offset Manager

‎Documentation/gpu/mcde.rst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
=======================================================
66

77
.. kernel-doc:: drivers/gpu/drm/mcde/mcde_drv.c
8-
:doc: ST-Ericsson MCDE DRM Driver
8+
:doc: ST-Ericsson MCDE Driver

‎Documentation/gpu/todo.rst‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,18 @@ drm_fb_helper tasks
284284
removed: drm_fb_helper_single_add_all_connectors(),
285285
drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
286286

287+
connector register/unregister fixes
288+
-----------------------------------
289+
290+
- For most connectors it's a no-op to call drm_connector_register/unregister
291+
directly from driver code, drm_dev_register/unregister take care of this
292+
already. We can remove all of them.
293+
294+
- For dp drivers it's a bit more a mess, since we need the connector to be
295+
registered when calling drm_dp_aux_register. Fix this by instead calling
296+
drm_dp_aux_init, and moving the actual registering into a late_register
297+
callback as recommended in the kerneldoc.
298+
287299
Core refactorings
288300
=================
289301

‎MAINTAINERS‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,6 +1272,8 @@ F: Documentation/gpu/afbc.rst
12721272
ARM MALI PANFROST DRM DRIVER
12731273
M: Rob Herring <robh@kernel.org>
12741274
M: Tomeu Vizoso <tomeu.vizoso@collabora.com>
1275+
R: Steven Price <steven.price@arm.com>
1276+
R: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
12751277
L: dri-devel@lists.freedesktop.org
12761278
S: Supported
12771279
T: git git://anongit.freedesktop.org/drm/drm-misc
@@ -5376,12 +5378,22 @@ F: include/linux/vga*
53765378

53775379
DRM DRIVERS FOR ALLWINNER A10
53785380
M: Maxime Ripard <mripard@kernel.org>
5381+
M: Chen-Yu Tsai <wens@csie.org>
53795382
L: dri-devel@lists.freedesktop.org
53805383
S: Supported
53815384
F: drivers/gpu/drm/sun4i/
53825385
F: Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt
53835386
T: git git://anongit.freedesktop.org/drm/drm-misc
53845387

5388+
DRM DRIVER FOR ALLWINNER DE2 AND DE3 ENGINE
5389+
M: Maxime Ripard <mripard@kernel.org>
5390+
M: Chen-Yu Tsai <wens@csie.org>
5391+
R: Jernej Skrabec <jernej.skrabec@siol.net>
5392+
L: dri-devel@lists.freedesktop.org
5393+
S: Supported
5394+
F: drivers/gpu/drm/sun4i/sun8i*
5395+
T: git git://anongit.freedesktop.org/drm/drm-misc
5396+
53855397
DRM DRIVERS FOR AMLOGIC SOCS
53865398
M: Neil Armstrong <narmstrong@baylibre.com>
53875399
L: dri-devel@lists.freedesktop.org

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

Lines changed: 35 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,30 @@ void dma_fence_free(struct dma_fence *fence)
273273
}
274274
EXPORT_SYMBOL(dma_fence_free);
275275

276+
static bool __dma_fence_enable_signaling(struct dma_fence *fence)
277+
{
278+
bool was_set;
279+
280+
lockdep_assert_held(fence->lock);
281+
282+
was_set = test_and_set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
283+
&fence->flags);
284+
285+
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
286+
return false;
287+
288+
if (!was_set && fence->ops->enable_signaling) {
289+
trace_dma_fence_enable_signal(fence);
290+
291+
if (!fence->ops->enable_signaling(fence)) {
292+
dma_fence_signal_locked(fence);
293+
return false;
294+
}
295+
}
296+
297+
return true;
298+
}
299+
276300
/**
277301
* dma_fence_enable_sw_signaling - enable signaling on fence
278302
* @fence: the fence to enable
@@ -285,19 +309,12 @@ void dma_fence_enable_sw_signaling(struct dma_fence *fence)
285309
{
286310
unsigned long flags;
287311

288-
if (!test_and_set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
289-
&fence->flags) &&
290-
!test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags) &&
291-
fence->ops->enable_signaling) {
292-
trace_dma_fence_enable_signal(fence);
293-
294-
spin_lock_irqsave(fence->lock, flags);
295-
296-
if (!fence->ops->enable_signaling(fence))
297-
dma_fence_signal_locked(fence);
312+
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
313+
return;
298314

299-
spin_unlock_irqrestore(fence->lock, flags);
300-
}
315+
spin_lock_irqsave(fence->lock, flags);
316+
__dma_fence_enable_signaling(fence);
317+
spin_unlock_irqrestore(fence->lock, flags);
301318
}
302319
EXPORT_SYMBOL(dma_fence_enable_sw_signaling);
303320

@@ -331,7 +348,6 @@ int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
331348
{
332349
unsigned long flags;
333350
int ret = 0;
334-
bool was_set;
335351

336352
if (WARN_ON(!fence || !func))
337353
return -EINVAL;
@@ -343,25 +359,14 @@ int dma_fence_add_callback(struct dma_fence *fence, struct dma_fence_cb *cb,
343359

344360
spin_lock_irqsave(fence->lock, flags);
345361

346-
was_set = test_and_set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
347-
&fence->flags);
348-
349-
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
350-
ret = -ENOENT;
351-
else if (!was_set && fence->ops->enable_signaling) {
352-
trace_dma_fence_enable_signal(fence);
353-
354-
if (!fence->ops->enable_signaling(fence)) {
355-
dma_fence_signal_locked(fence);
356-
ret = -ENOENT;
357-
}
358-
}
359-
360-
if (!ret) {
362+
if (__dma_fence_enable_signaling(fence)) {
361363
cb->func = func;
362364
list_add_tail(&cb->node, &fence->cb_list);
363-
} else
365+
} else {
364366
INIT_LIST_HEAD(&cb->node);
367+
ret = -ENOENT;
368+
}
369+
365370
spin_unlock_irqrestore(fence->lock, flags);
366371

367372
return ret;
@@ -461,7 +466,6 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
461466
struct default_wait_cb cb;
462467
unsigned long flags;
463468
signed long ret = timeout ? timeout : 1;
464-
bool was_set;
465469

466470
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
467471
return ret;
@@ -473,21 +477,9 @@ dma_fence_default_wait(struct dma_fence *fence, bool intr, signed long timeout)
473477
goto out;
474478
}
475479

476-
was_set = test_and_set_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
477-
&fence->flags);
478-
479-
if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->flags))
480+
if (!__dma_fence_enable_signaling(fence))
480481
goto out;
481482

482-
if (!was_set && fence->ops->enable_signaling) {
483-
trace_dma_fence_enable_signal(fence);
484-
485-
if (!fence->ops->enable_signaling(fence)) {
486-
dma_fence_signal_locked(fence);
487-
goto out;
488-
}
489-
}
490-
491483
if (!timeout) {
492484
ret = 0;
493485
goto out;

‎drivers/dma-buf/dma-resv.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ int dma_resv_get_fences_rcu(struct dma_resv *obj,
471471
if (pfence_excl)
472472
*pfence_excl = fence_excl;
473473
else if (fence_excl)
474-
shared[++shared_count] = fence_excl;
474+
shared[shared_count++] = fence_excl;
475475

476476
if (!shared_count) {
477477
kfree(shared);

‎drivers/gpu/drm/Kconfig‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,16 @@ config DRM_TTM
168168
config DRM_VRAM_HELPER
169169
tristate
170170
depends on DRM
171-
select DRM_TTM
172171
help
173172
Helpers for VRAM memory management
174173

174+
config DRM_TTM_HELPER
175+
tristate
176+
depends on DRM
177+
select DRM_TTM
178+
help
179+
Helpers for ttm-based gem objects
180+
175181
config DRM_GEM_CMA_HELPER
176182
bool
177183
depends on DRM

‎drivers/gpu/drm/Makefile‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ drm-$(CONFIG_DEBUG_FS) += drm_debugfs.o drm_debugfs_crc.o
3333
drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o
3434

3535
drm_vram_helper-y := drm_gem_vram_helper.o \
36-
drm_vram_helper_common.o \
37-
drm_vram_mm_helper.o
36+
drm_vram_helper_common.o
3837
obj-$(CONFIG_DRM_VRAM_HELPER) += drm_vram_helper.o
3938

39+
drm_ttm_helper-y := drm_gem_ttm_helper.o
40+
obj-$(CONFIG_DRM_TTM_HELPER) += drm_ttm_helper.o
41+
4042
drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_dsc.o drm_probe_helper.o \
4143
drm_plane_helper.o drm_dp_mst_topology.o drm_atomic_helper.o \
4244
drm_kms_helper_common.o drm_dp_dual_mode_helper.o \

0 commit comments

Comments
 (0)