History

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.

Inki Dae committed 12 years ago

Commit 832316c1 parent d9315895 files · +16 −132Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/drm/exynos_drm.h+0−22
@@ -32,24 +32,6 @@ struct drm_exynos_gem_create { · 31 unmodified lines
32 unsigned int handle;32 unsigned int handle;
33};33};
34 34
35/**
36 * A structure for mapping buffer.
37 *
38 * @handle: a handle to gem object created.
39 * @pad: just padding to be 64-bit aligned.
40 * @size: memory size to be mapped.
41 * @mapped: having user virtual address mmaped.
42 * - this variable would be filled by exynos gem module
43 * of kernel side with user virtual address which is allocated
44 * by do_mmap().
45 */
46struct drm_exynos_gem_mmap {
47 unsigned int handle;
48 unsigned int pad;
49 uint64_t size;
50 uint64_t mapped;
51};
52
53/**35/**
54 * A structure to gem information.36 * A structure to gem information.
55 *37 *
@@ -302,7 +284,6 @@ struct drm_exynos_ipp_cmd_ctrl { · 246 unmodified lines
302};284};
303 285
304#define DRM_EXYNOS_GEM_CREATE 0x00286#define DRM_EXYNOS_GEM_CREATE 0x00
305#define DRM_EXYNOS_GEM_MMAP 0x02
306/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */287/* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */
307#define DRM_EXYNOS_GEM_GET 0x04288#define DRM_EXYNOS_GEM_GET 0x04
308#define DRM_EXYNOS_VIDI_CONNECTION 0x07289#define DRM_EXYNOS_VIDI_CONNECTION 0x07
@@ -321,9 +302,6 @@ struct drm_exynos_ipp_cmd_ctrl { · 12 unmodified lines
321#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \302#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \
322 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)303 DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
323 304
324#define DRM_IOCTL_EXYNOS_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + \
325 DRM_EXYNOS_GEM_MMAP, struct drm_exynos_gem_mmap)
326
327#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \305#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \
328 DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)306 DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info)
329 307

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t