diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-29 23:49:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-29 23:49:12 -0500 |
commit | 9b0cd304f26b9fca140de15deeac2bf357d1f388 (patch) | |
tree | 03a0d74614865a5b776b2a98a433232013b1d369 /drivers/gpu/drm/gma500/gma_display.c | |
parent | ca2a650f3dfdc30d71d21bcbb04d2d057779f3f9 (diff) | |
parent | ef64cf9d06049e4e9df661f3be60b217e476bee1 (diff) |
Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
Pull drm updates from Dave Airlie:
"Been a bit busy, first week of kids school, and waiting on other trees
to go in before I could send this, so its a bit later than I'd
normally like.
Highlights:
- core:
timestamp fixes, lots of misc cleanups
- new drivers:
bochs virtual vga
- vmwgfx:
major overhaul for their nextgen virt gpu.
- i915:
runtime D3 on HSW, watermark fixes, power well work, fbc fixes,
bdw is no longer prelim.
- nouveau:
gk110/208 acceleration, more pm groundwork, old overlay support
- radeon:
dpm rework and clockgating for CIK, pci config reset, big endian
fixes
- tegra:
panel support and DSI support, build as module, prime.
- armada, omap, gma500, rcar, exynos, mgag200, cirrus, ast:
fixes
- msm:
hdmi support for mdp5"
* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (595 commits)
drm/nouveau: resume display if any later suspend bits fail
drm/nouveau: fix lock unbalance in nouveau_crtc_page_flip
drm/nouveau: implement hooks for needed for drm vblank timestamping support
drm/nouveau/disp: add a method to fetch info needed by drm vblank timestamping
drm/nv50: fill in crtc mode struct members from crtc_mode_fixup
drm/radeon/dce8: workaround for atom BlankCrtc table
drm/radeon/DCE4+: clear bios scratch dpms bit (v2)
drm/radeon: set si_notify_smc_display_change properly
drm/radeon: fix DAC interrupt handling on DCE5+
drm/radeon: clean up active vram sizing
drm/radeon: skip async dma init on r6xx
drm/radeon/runpm: don't runtime suspend non-PX cards
drm/radeon: add ring to fence trace functions
drm/radeon: add missing trace point
drm/radeon: fix VMID use tracking
drm: ast,cirrus,mgag200: use drm_can_sleep
drm/gma500: Lock struct_mutex around cursor updates
drm/i915: Fix the offset issue for the stolen GEM objects
DRM: armada: fix missing DRM_KMS_FB_HELPER select
drm/i915: Decouple GPU error reporting from ring initialisation
...
Diffstat (limited to 'drivers/gpu/drm/gma500/gma_display.c')
-rw-r--r-- | drivers/gpu/drm/gma500/gma_display.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/gma_display.c b/drivers/gpu/drm/gma500/gma_display.c index 24e8af3d22bf..386de2c9dc86 100644 --- a/drivers/gpu/drm/gma500/gma_display.c +++ b/drivers/gpu/drm/gma500/gma_display.c | |||
@@ -349,6 +349,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, | |||
349 | /* If we didn't get a handle then turn the cursor off */ | 349 | /* If we didn't get a handle then turn the cursor off */ |
350 | if (!handle) { | 350 | if (!handle) { |
351 | temp = CURSOR_MODE_DISABLE; | 351 | temp = CURSOR_MODE_DISABLE; |
352 | mutex_lock(&dev->struct_mutex); | ||
352 | 353 | ||
353 | if (gma_power_begin(dev, false)) { | 354 | if (gma_power_begin(dev, false)) { |
354 | REG_WRITE(control, temp); | 355 | REG_WRITE(control, temp); |
@@ -365,6 +366,7 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, | |||
365 | gma_crtc->cursor_obj = NULL; | 366 | gma_crtc->cursor_obj = NULL; |
366 | } | 367 | } |
367 | 368 | ||
369 | mutex_unlock(&dev->struct_mutex); | ||
368 | return 0; | 370 | return 0; |
369 | } | 371 | } |
370 | 372 | ||
@@ -374,9 +376,12 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, | |||
374 | return -EINVAL; | 376 | return -EINVAL; |
375 | } | 377 | } |
376 | 378 | ||
379 | mutex_lock(&dev->struct_mutex); | ||
377 | obj = drm_gem_object_lookup(dev, file_priv, handle); | 380 | obj = drm_gem_object_lookup(dev, file_priv, handle); |
378 | if (!obj) | 381 | if (!obj) { |
379 | return -ENOENT; | 382 | ret = -ENOENT; |
383 | goto unlock; | ||
384 | } | ||
380 | 385 | ||
381 | if (obj->size < width * height * 4) { | 386 | if (obj->size < width * height * 4) { |
382 | dev_dbg(dev->dev, "Buffer is too small\n"); | 387 | dev_dbg(dev->dev, "Buffer is too small\n"); |
@@ -440,10 +445,13 @@ int gma_crtc_cursor_set(struct drm_crtc *crtc, | |||
440 | } | 445 | } |
441 | 446 | ||
442 | gma_crtc->cursor_obj = obj; | 447 | gma_crtc->cursor_obj = obj; |
448 | unlock: | ||
449 | mutex_unlock(&dev->struct_mutex); | ||
443 | return ret; | 450 | return ret; |
444 | 451 | ||
445 | unref_cursor: | 452 | unref_cursor: |
446 | drm_gem_object_unreference(obj); | 453 | drm_gem_object_unreference(obj); |
454 | mutex_unlock(&dev->struct_mutex); | ||
447 | return ret; | 455 | return ret; |
448 | } | 456 | } |
449 | 457 | ||