~ubuntu-kernel-test/ubuntu/+source/linux/+git/mirror-drm-intel:topic/struct_mutex

Last commit made on 2016-04-20
Get this branch:
git clone -b topic/struct_mutex https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mirror-drm-intel
Members of Ubuntu Kernel Test can upload to this branch. Log in for directions.

Branch merges

Branch information

Recent commits

f74418a... by Daniel Vetter

drm/vma_manage: Drop has_offset

It's racy, creating mmap offsets is a slowpath, so better to remove it
to avoid drivers doing broken things.

The only user is i915, and it's ok there because everything (well
almost) is protected by dev->struct_mutex in i915-gem.

While at it add a note in the create_mmap_offset kerneldoc that
drivers must release it again. And then I also noticed that
drm_gem_object_release entirely lacks kerneldoc.

Cc: David Herrmann <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop.<email address hidden>

0797ac6... by Daniel Vetter

drm/vgem: Drop dev->struct_mutex

With the previous two changes it doesn't protect anything any more.

v2: Use _unlocked unreference variant.

v3: Appease gcc noise.

Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop.<email address hidden>

7f340a2... by Daniel Vetter

drm/vgem: Move get_pages to gem_create

vgem doesn't have a shrinker or anything like that and drops backing
storage only at object_free time. There's no use in trying to be
clever and allocating backing storage delayed, it only causes trouble
by requiring locking.

Instead grab pages when we allocate the object right away.

v2: Fix compiling.

Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop.<email address hidden>

e34274f... by Daniel Vetter

drm/vgem: Simplify dumb_map

The offset manager already checks for existing offsets internally,
while holding suitable locks. We can drop this check.

v2: Fix title (Emil).

Reviewed-by: Emil Velikov <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop.<email address hidden>

2f42420... by Daniel Vetter

drm/exynos: drop struct_mutex from fbdev setup

Doesn't protect anything at all, and probably just here because a long
time ago dev->struct_mutex was required to allocate gem objects.

With this patch exynos is completely struct_mutex free!

Cc: Inki Dae <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop.<email address hidden>

6c991a2... by Daniel Vetter

drm/exynos: drop struct_mutex from exynos_drm_gem_get_ioctl

The only things this protects is reading ->flags and ->size, both of
which are invariant over the lifetime of an exynos gem bo. So no
locking needed at all (besides that, nothing protects the writers
anyway).

Aside: exynos_gem_obj->size is redundant with
exynos_gem_obj->base.size and probably should be removed.

v2: Use _unlocked unreference (Daniel Stone).

Cc: Daniel Stone <email address hidden>
Cc: Inki Dae <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop<email address hidden>

8e97d9e... by Daniel Vetter

drm/exynos: drop struct_mutex from exynos_gem_map_sgt_with_dma

The sg table isn't refcounted, there's no corresponding locking for
unmapping and drm_map_sg is ok with being called concurrently.

So drop the locking since it doesn't protect anything.

Cc: Inki Dae <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop<email address hidden>

9126362... by Daniel Vetter

drm/exynos: Drop dev->struct_mutex from mmap offset function

Simply forgotten about this when I was doing my general cleansing of
simple gem mmap offset functions. There's nothing but core functions
called here, and they all have their own protection already.

Aside: DRM_ERROR for userspace controlled input isn't great, but
that's for another patch.

v2: Use _unlocked unreference (Daniel Stone).

Cc: Daniel Stone <email address hidden>
Cc: Inki Dae <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop<email address hidden>

ca25d6b... by Daniel Vetter

drm/nouveau: Drop dev->struct_mutex from fbdev init

Doesn't protect anything at all.

With this patch nouveau is completely dev->struct_mutex free!

Cc: Ben Skeggs <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop<email address hidden>

068149a... by Daniel Vetter

drm/qxl: Use unlocked gem unreferencing

For drm_gem_object_unreference callers are required to hold
dev->struct_mutex, which these paths don't. Enforcing this requirement
has become a bit more strict with

commit ef4c6270bf2867e2f8032e9614d1a8cfc6c71663
Author: Daniel Vetter <email address hidden>
Date: Thu Oct 15 09:36:25 2015 +0200

    drm/gem: Check locking in drm_gem_object_unreference

Cc: Dave Airlie <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>
Link: http://patchwork.freedesktop<email address hidden>
Link: http://patchwork.freedesktop<email address hidden>