summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_internal.h
AgeCommit message (Collapse)AuthorFilesLines
2015-09-09drm: move drm_class into drm_sysfs.cDavid Herrmann1-1/+1
Right now, drm_sysfs_create() returns the newly allocated "struct class" to the caller (which is drm_core_init()), which then has to set the global variable 'drm_class'. During cleanup, though, we call drm_sysfs_destroy() which implicitly uses the global 'drm_class'. This is confusing, as ownership of the global 'drm_class' is non-obvious. This patch changes drm_sysfs_create() to drm_sysfs_init() and makes it initialize the 'drm_class' object directly, rather than returning it. This way, both drm_sysfs_init() and drm_sysfs_destroy() work in a similar fashion and manage the global drm class. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-05-05drm: simplify authentication managementDavid Herrmann1-1/+0
The magic auth tokens we have are a simple map from cyclic IDs to drm_file objects. Remove all the old bulk of code and replace it with a simple, direct IDR. The previous behavior is kept. Especially calling authmagic multiple times on the same magic results in EINVAL except on the first call. The only difference in behavior is that we never allocate IDs multiple times as long as a client has its FD open. v2: - Fix return code of GetMagic() - Use non-cyclic IDR allocator - fix off-by-one in "magic > INT_MAX" sanity check v3: - drop redundant "magic > INT_MAX" check Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-12-16drm/info: Remove unused codeThierry Reding1-1/+0
Commit 28a62277e06f ("drm: Convert proc files to seq_file and introduce debugfs") converted /proc files to debugfs and in the process dropped the entry for the vblank statistics. Since that file has been gone for almost five years, there is no use to keep the code that provides the file's content around. Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-24drm: Move internal debugfs functions to drm_internal.hDaniel Vetter1-0/+28
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-24drm: Move leftover ioctl declarations to drm_internal.hDaniel Vetter1-0/+9
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-24drm: Move drm_vm_open_locked into drm_internal.hDaniel Vetter1-0/+1
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-24drm: move drm_mmap to <drm/drm_legacy.h>Daniel Vetter1-1/+0
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-12drm: Move drm_class to drm_internal.hDaniel Vetter1-0/+2
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-12drm: unexport drm_global_mutexDaniel Vetter1-0/+1
Drivers really, really have no business even looking at this lock. And thankfully they don't. So unexport it and move the declaration to drm_internal.h. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-12drm: Move piles of functions from drmP.h to drm_internal.hDaniel Vetter1-0/+68
This way drivers can't grow crazy ideas any more, and it also helps a bit in reviewing EXPORT_SYMBOLS. v2: Even more stuff. Unfortunately we can't move drm_vm_open_locked because exynos does some horrible stuff with it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-09-12drm: Move vblank related module options into drm_irq.cDaniel Vetter1-0/+24
This allows us to drop 2 header declarations from drmP.h. The 3rd one is also used in drm_ioctl.c, so for that create a new drm_internal.h header for non-legacy non-kms (since we have internal headers for those parts already) declarations private to drm.ko. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>