Commit graph

469965 commits

Author SHA1 Message Date
Chuck Ebbert
228f2cb32f drm/crtc: Remove duplicated ioctl code
Make drm_mode_add_fb() call drm_mode_add_fb2() after converting its
args to the new internal format, instead of duplicating code.

Also picks up a lot more error checking, which the legacy modes
should pass after being converted to the new format.

Signed-off-by: Chuck Ebbert <cebbert.lkml@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-22 10:39:09 +02:00
Chuck Ebbert
209f5527b7 drm/crtc: Fix two typos
Fix:

  ioclt -> ioctl in comment
  wrong variable name in debug message

Signed-off-by: Chuck Ebbert <cebbert.lkml@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[danvet: Frob manually generated patch to make it apply.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-22 10:38:32 +02:00
Masanari Iida
32197aab04 gpu:drm: Fix typo in Documentation/DocBook/drm.xml
This patch fix spelling typos found in drm.xml.
It is because the file is generated from comments in
source codes, I have to fix the typos within source files.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-21 10:55:33 +02:00
Rickard Strandqvist
d87af4d105 gpu: drm: drm_dp_mst_topology.c: Fix improper use of strncat
Fixed wrong usage of strncat, switched to strlcpy.
While sending the string size to function to reduce
the potential for misuse in future.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-13 11:34:08 +02:00
Joe Perches
a1f1a79c51 drm: drm_err: Remove unnecessary __func__ argument
Removing the unnecessary drm_err __func__ argument by using
the equivalent %pf and __builtin_return_address(0) makes the
code smaller for every use of the DRM_ERROR macro.

For instance: (allmodconfig)

$ size drivers/gpu/drm/i915/i915.o*
   text	   data	    bss	    dec	    hex	filename
 922447	 193257	 296736	1412440	 158d58	drivers/gpu/drm/i915/i915.o.new
 928111	 193257	 296736	1418104	 15a378	drivers/gpu/drm/i915/i915.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-12 20:57:16 +02:00
Chris Wilson
bd008e5b29 drm: Implement O_NONBLOCK support on /dev/dri/cardN
The implmentation is simple in the extreme: we only want to wait for
events if the device was opened in blocking mode, otherwise we grab what
is available and report an error if there was none.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Testcase: igt/kms_flip/nonblocing_read
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-08 15:07:07 +02:00
Andrzej Hajda
1bcecfacde drm/core: use helper to check driver features
The patch replaces direct access to driver_features field
by calls to helper function.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-03 10:38:56 +02:00
Clint Taylor
5a11f7f829 drm/edid: Add missing interlaced flag to 576i@100 modes.
CEA VICs 44 and 45 were missing DRM_MODE_FLAG_INTERLACE.

Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-10-01 11:36:20 +02:00
Dave Airlie
7a42e83d36 Merge branch 'for-airlied-next' of git://people.freedesktop.org/~mlankhorst/linux into drm-next
fixups for nouveau and fencing

* 'for-airlied-next' of git://people.freedesktop.org/~mlankhorst/linux:
  drm/nouveau: export reservation_object from dmabuf to ttm
  drm/ttm: add reservation_object as argument to ttm_bo_init
  drm: Pass dma-buf as argument to gem_prime_import_sg_table
  drm/nouveau: assign fence_chan->name correctly
  drm/nouveau: specify if interruptible wait is desired in nouveau_fence_sync
  drm/nouveau: bump driver patchlevel to 1.2.1
2014-10-01 19:27:38 +10:00
Dave Airlie
c5939a7360 Merge tag 'topic/core-stuff-2014-09-29' of git://anongit.freedesktop.org/drm-intel into drm-next
Ok, here's the update core-stuff pull request with the locking fixup patch
fixed up with another patch.

* tag 'topic/core-stuff-2014-09-29' of git://anongit.freedesktop.org/drm-intel:
  drm: Drop grab fpriv->fbs_lock in drm_fb_release
  drm/udl: use container_of to resolve udl_fbdev from drm_fb_helper
  drm/ast: use container_of to resolve ast_fbdev from drm_fb_helper
  drm/gma500: use container_of to resolve psb_fbdev from drm_fb_helper
  drm/qxl: use container_of to resolve qxl_fbdev from drm_fb_helper
  drm/nouveau: use container_of to resolve nouveau_plane from drm_plane
  drm/nouveau: use container_of to resolve nouveau_fbdev from drm_fb_helper
  drm/radeon: use container_of to resolve radeon_fbdev from drm_fb_helper
  drm/mgag200: use container_of to resolve mga_fbdev from drm_fb_helper
  drm/cirrus: use container_of to resolve cirrus_fbdev from drm_fb_helper
  drm: Improve debug output for drm_wait_one_vblank
  drm: Fixup locking for universal cursor planes
  drm: Don't update vblank timestamp when the counter didn't change
2014-10-01 19:27:01 +10:00
Maarten Lankhorst
bb6178b04f drm/nouveau: export reservation_object from dmabuf to ttm
Adds an extra argument to nouveau_bo_new, which is only used in nouveau_prime.c.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-10-01 11:11:15 +02:00
Maarten Lankhorst
f4f4e3e3e9 drm/ttm: add reservation_object as argument to ttm_bo_init
This allows importing reservation objects from dma-bufs.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-09-30 14:04:00 +02:00
Maarten Lankhorst
b5e9c1a25f drm: Pass dma-buf as argument to gem_prime_import_sg_table
Allows importing dma_reservation_objects from a dma-buf.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-09-30 14:04:00 +02:00
Maarten Lankhorst
15a996bbb6 drm/nouveau: assign fence_chan->name correctly
Make nouveau_fence_chan refcounted, to make trace_fence_destroy
always return the correct name without a race condition.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-09-30 14:04:00 +02:00
Maarten Lankhorst
e3be4c230d drm/nouveau: specify if interruptible wait is desired in nouveau_fence_sync
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-09-30 14:04:00 +02:00
Maarten Lankhorst
055dffdfb6 drm/nouveau: bump driver patchlevel to 1.2.1
Allows userspace to detect shared fences are supported.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
2014-09-30 14:04:00 +02:00
Maarten Lankhorst
1dadba87cb drm/nouveau: nv84+: fix fence context seqno's
This fixes a regression introduced by "drm/nouveau: rework to new fence interface"
(commit 29ba89b237).

The fence sequence should not be reset after creation, the old value is used instead.
On destruction the final value is written, to prevent another source of accidental
wraparound in case of a channel being destroyed after a hang, and unblocking any other
channel that may wait on the about-to-be-deleted channel to signal.

I'm nothing if not optimistic about any hope of recovery from that. ;-)

Reported-by: Ted Percival <ted@tedp.id.au>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Tested-by: Ted Percival <ted@tedp.id.au>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-30 15:49:06 +10:00
Daniel Vetter
1b11629737 drm: Drop grab fpriv->fbs_lock in drm_fb_release
Paulo Zanoni reported a lockdep splat with a locking inversion between
fpriv->fbs_lock and the modeset locks. This issue was introduced in

commit f2b50c1161
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Fri Sep 12 17:07:32 2014 +0200

    drm: Fixup locking for universal cursor planes

This here is actually one of the rare cases where lockdep hits a false
positive: The deadlock only happens in drm_fb_release, which cleans up
the file private structure when all the references are gone. So the
locking is the very last one and no one else can deadlock. It also
doesn't protect anything at all, since all ioctls are guaranteed to
have returned at this point - otherwise they'd still hold a reference
on the file.

So let's just drop it and replace it with a big comment.

Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Paulo Zanoni <przanoni@gmail.com>
Reported-and-Tested-by: Paulo Zanoni <przanoni@gmail.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-25 17:13:40 +02:00
Fabian Frederick
ee0d68ab5f drm/udl: use container_of to resolve udl_fbdev from drm_fb_helper
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:28 +02:00
Fabian Frederick
0d634f6e5b drm/ast: use container_of to resolve ast_fbdev from drm_fb_helper
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:27 +02:00
Fabian Frederick
c39aa6a1e3 drm/gma500: use container_of to resolve psb_fbdev from drm_fb_helper
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:27 +02:00
Fabian Frederick
f38e34ac54 drm/qxl: use container_of to resolve qxl_fbdev from drm_fb_helper
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:26 +02:00
Fabian Frederick
5ee932d049 drm/nouveau: use container_of to resolve nouveau_plane from drm_plane
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:26 +02:00
Fabian Frederick
918b7ed423 drm/nouveau: use container_of to resolve nouveau_fbdev from drm_fb_helper
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:25 +02:00
Fabian Frederick
a1d0280e67 drm/radeon: use container_of to resolve radeon_fbdev from drm_fb_helper
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:25 +02:00
Fabian Frederick
98cc034317 drm/mgag200: use container_of to resolve mga_fbdev from drm_fb_helper
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:24 +02:00
Fabian Frederick
ea0622cfb4 drm/cirrus: use container_of to resolve cirrus_fbdev from drm_fb_helper
Use container_of instead of casting first structure member.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:24 +02:00
Daniel Vetter
80c873b6b7 drm: Improve debug output for drm_wait_one_vblank
This replicates what we've done in i915 in

commit 31e4b89acb
Author: Damien Lespiau <damien.lespiau@intel.com>
Date:   Mon Aug 18 13:51:00 2014 +0100

    drm/i915: Print the pipe on which the vblank wait times out

to make sure that when we switch i915 to drm_wait_one_vblank that the
debug output doesn't regress.

Cc: Damien Lespiau <damien.lespiau@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-24 12:09:23 +02:00
Daniel Vetter
f2b50c1161 drm: Fixup locking for universal cursor planes
Bunch of things amiss:
- Updating crtc->cursor_x/y was done without any locking. Spotted by
  David Herrmann.
- Dereferencing crtc->cursor->fb was using the wrong lock, should take
  the crtc lock.
- Grabbing _all_ modeset locks torpedoes the reason why we added
  fine-grained locks originally: Cursor updates shouldn't stall on
  background stuff like probing outputs.

Best is to just grab the crtc lock around everything and drop all the
other locking. The only issue is that we can't switch planes between
crtcs with that, so make sure that never happens when someone uses
universal plane helpers. This shouldn't be a possible regression ever
since legacy ioctls also only grabbed the crtc lock, so switching
crtcs was never possible for the underlying plane object. And i915
(the only user of universal cursors thus far) has fixed cursor->crtc
links.

Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Pallavi G<pallavi.g@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Tested-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
2014-09-24 12:09:23 +02:00
Mario Kleiner
da8f43962b drm: Don't update vblank timestamp when the counter didn't change
If we already have a timestamp for the current vblank counter, don't
update it with a new timestmap. Small errors can creep in between two
timestamp queries for the same vblank count, which could be confusing to
userspace when it queries the timestamp for the same vblank sequence
number twice.

This problem gets exposed when the vblank disable timer is not used
(or is set to expire quickly) and thus we can get multiple vblank
disable<->enable transition during the same frame which would all
attempt to update the timestamp with the latest estimate.

Testcase: igt/kms_flip/flip-vs-expired-vblank
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>

v2:Mario: Trivial rebase on top of current drm-next (13-Sep-2014)
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24 12:09:22 +02:00
Daniel Vetter
d743ecf360 drm/doc: Fixup drm_irq kerneldoc includes.
Only !P can be used together with a function list.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:43:47 +10:00
Daniel Vetter
d9fc9413f9 drm: Extract <drm/drm_gem.h>
v2: Don't forget git add, noticed by David.

Cc: David Herrmann <dh.herrmann@gmail.com>

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:43:41 +10:00
Daniel Vetter
c2611031b4 drm: Move internal debugfs functions to drm_internal.h
In my header cleanup I've missed the debugfs functions completely.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:43:35 +10:00
Daniel Vetter
e7f0a88984 drm: Move leftover ioctl declarations to drm_internal.h
Somehow I've missed these three, fix this up asap. Plus move
drm_master_create since while at it.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:43:26 +10:00
Daniel Vetter
884d9f05eb drm: Move drm_vm_open_locked into drm_internal.h
Leftover from my previous header cleanup.

This depends upon the patch to rework exynos mmap support, otherwise
it'll break exynos.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:43:20 +10:00
Daniel Vetter
bfbf3c851c drm: move drm_mmap to <drm/drm_legacy.h>
Now that we've removed the copypasted users in gem/ttm we can
relegate the legacy buffer mapping support to where it belongs.
Also give it the proper drm_legacy_ prefix.

While at it statify drm_mmap_locked, somehow I've missed that in my
previous header rework.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:43:07 +10:00
Daniel Vetter
197633b924 drm/gem: Don't call drm_mmap from drm_gem_mmap
The only user I could dig out was i915 back when ums+gem was still a
thing. But we've just very much killed that, and even when someone
screams about that we should resurrect that with a special hack
(wrapping drm_gem_mmap) in i915, not in the core code.

So good riddance to another entry point of the legacy buffer mapping
code.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:42:58 +10:00
Daniel Vetter
884c6dabb0 drm/<ttm-based-drivers>: Don't call drm_mmap
Really, the legacy buffer api should be dead, especially for all these
newfangled drivers. I suspect this is copypasta from the transitioning
days, which probably originated in radeon.

Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Rashika <rashika.kheria@gmail.com>
Cc: Josh Triplett <josh@joshtriplett.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Fabian Frederick <fabf@skynet.be>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Alexandre Courbot <acourbot@nvidia.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Christian Engelmayer <cengelma@gmx.at>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Ben Skeggs <bskeggs@redhat.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:42:51 +10:00
Joe Perches
9908fb6540 drm: change drm_err return type to void
The return value is not used by callers of this function
nor by uses of the DRM_ERROR macro so change the function
to return void.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-24 11:42:36 +10:00
Benjamin Herrenschmidt
94318d50ff drm/ttm: Clean usage of ttm_io_prot() with TTM_PL_FLAG_CACHED
Today, most callers of ttm_io_prot() check TTM_PL_FLAG_CACHED before
calling it since on some archs it will unconditionally create non-cached
mappings.

But not all callers do which is incorrect as far as I can tell.

Instead, move that check inside ttm_io_port() itself for all archs
and make powerpc use the same implementation as ia64 and arm

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-23 15:00:26 +10:00
Benjamin Herrenschmidt
6bd3110ce6 drm: powerpc can use a simpler drm_io_prot()
What the code does is equivalent to the x86 code, so let's use
it as well

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2014-09-23 14:35:53 +10:00
Dave Airlie
42532512ee Merge branch 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos into drm-next
Sorry for late. This pull request includes some enhancements
   for Exynos drm, new feature supports, cleanups and fixups
   like below,

   - Consider low power transmission for drm mipi dsi module,
     and also add non-continuous clock mode support for Exynos
     mipi dsi driver.
   - Add Exynos3250 SoC support.
   - Enhance and clean up ipp framework and fimc driver.
   - Update to use component match support and fix up
     de-initialization order.
   - Remove a direct mmap interface and relevant stuff specific to
     Exynos drm, use drm generic mmap interface instead.
     And we will remove the specific interface from userspace
     library, libdrm soon.
   - Use universal plane which allows to replace fake primary plane
     with the real one.
   - Some code cleanups and fixups.

* 'exynos-drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos: (40 commits)
  drm/exynos: switch to universal plane API
  drm/exynos: use drm generic mmap interface
  drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl
  drm/exynos: factor out initial setting of each driver
  drm/exynos/hdmi: unregister connector on removal
  drm/exynos/dp: unregister connector on removal
  drm/exynos/dpi: unregister connector and panel on removal
  drm/exynos/dsi: unregister connector on removal
  drm/exynos/fb: free exynos framebuffer on error
  drm/exynos/fbdev: fix fbdev gem object cleanup
  drm/exynos: fix drm driver de-initialization order
  drm/exynos/ipp: traverse ipp drivers list safely
  drm/exynos: update to use component match support
  drm/exynos/ipp: add file checks for ioctls
  drm/exynos/ipp: remove file argument from node related functions
  drm/exynos/fimc: fix source buffer registers
  drm/exynos/fimc: simplify buffer queuing
  drm/exynos/fimc: do not enable fimc twice
  drm/exynos/fimc: avoid clearing overflow bits
  drm/exynos/ipp: remove events during command cleaning
  ...
2014-09-22 10:07:25 +10:00
Andrzej Hajda
72ed6ccd08 drm/exynos: switch to universal plane API
The patch replaces legacy functions
drm_plane_init() / drm_crtc_init() with
drm_universal_plane_init() and drm_crtc_init_with_planes().
It allows to replace fake primary plane with the real one.
Additionally the patch leaves cleanup of crtcs to core,
this way planes and crtcs are cleaned in correct order.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20 01:17:53 +09:00
Inki Dae
832316c704 drm/exynos: use drm generic mmap interface
This patch removes DRM_EXYNOS_GEM_MMAP ictrl feature specific
to Exynos drm and instead uses drm generic mmap.

We had used the interface specific to Exynos drm to do mmap directly,
not to use demand paging which maps each page with physical memory
at page fault handler. We don't need the specific mmap interface
because the drm generic mmap which uses vm offset manager stuff can
also do mmap directly.

This patch makes a userspace region to be mapped with whole physical
memory region allocated by userspace request when mmap system call is
requested.

Changelog v2:
- do not set VM_IO, VM_DONTEXPEND and VM_DONTDUMP. These flags were already
  set by drm_gem_mmap
- do not include <linux/anon_inodes.h>, which isn't needed anymore.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20 01:00:13 +09:00
Inki Dae
d931589c01 drm/exynos: remove DRM_EXYNOS_GEM_MAP_OFFSET ioctl
This interface and relevant codes aren't used anymore.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20 01:00:07 +09:00
Joonyoung Shim
4a3ffedda2 drm/exynos: factor out initial setting of each driver
From fimd driver and vidi driver, dev->irq_enabled and
dev->vblank_disable_allowed are set and also mixer needs them even if
missed. It's duplicated so set them when loads drm driver.

Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20 00:56:39 +09:00
Andrzej Hajda
ad279310d7 drm/exynos/hdmi: unregister connector on removal
During component removal driver should unregister connector.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20 00:56:15 +09:00
Andrzej Hajda
7c61b1ecab drm/exynos/dp: unregister connector on removal
During component removal driver should unregister connector.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20 00:56:15 +09:00
Andrzej Hajda
90eac89726 drm/exynos/dpi: unregister connector and panel on removal
During component removal it should unregister connector
and optionally detach the panel.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20 00:56:15 +09:00
Andrzej Hajda
0ae460159f drm/exynos/dsi: unregister connector on removal
During component unbind connector should be unregistered.
Also DSI host should be unregistered after KMS cleanup.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-09-20 00:56:15 +09:00