diff options
author | Keith Packard <keithp@keithp.com> | 2007-12-16 22:00:45 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2007-12-21 12:16:29 -0800 |
commit | da3601e43ae75695f3b080904b1e090c8eb1cd8e (patch) | |
tree | 7d4b18d289b1908952babc00f248bb10ac4ad638 /linux-core/drm_objects.h | |
parent | d1187641d64f442968a3b9ea6a19de6cdd45acd4 (diff) |
Change drm_bo_type_dc to drm_bo_type_device and comment usage of this value.
I couldn't figure out what drm_bo_type_dc was for; Dave Airlie finally clued
me in that it was the 'normal' buffer objects with kernel allocated pages
that could be mmapped from the drm device file.
I thought that 'drm_bo_type_device' was a more descriptive name.
I also added a bunch of comments describing the use of the type enum values and
the functions that use them.
Diffstat (limited to 'linux-core/drm_objects.h')
-rw-r--r-- | linux-core/drm_objects.h | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/linux-core/drm_objects.h b/linux-core/drm_objects.h index 98421e4c..a2d10b5d 100644 --- a/linux-core/drm_objects.h +++ b/linux-core/drm_objects.h @@ -404,9 +404,31 @@ struct drm_bo_mem_reg { }; enum drm_bo_type { - drm_bo_type_dc, + /* + * drm_bo_type_device are 'normal' drm allocations, + * pages are allocated from within the kernel automatically + * and the objects can be mmap'd from the drm device. Each + * drm_bo_type_device object has a unique name which can be + * used by other processes to share access to the underlying + * buffer. + */ + drm_bo_type_device, + /* + * drm_bo_type_user are buffers of pages that already exist + * in the process address space. They are more limited than + * drm_bo_type_device buffers in that they must always + * remain cached (as we assume the user pages are mapped cached), + * and they are not sharable to other processes through DRM + * (although, regular shared memory should still work fine). + */ drm_bo_type_user, - drm_bo_type_kernel, /* for initial kernel allocations */ + /* + * drm_bo_type_kernel are buffers that exist solely for use + * within the kernel. The pages cannot be mapped into the + * process. One obvious use would be for the ring + * buffer where user access would not (ideally) be required. + */ + drm_bo_type_kernel, }; struct drm_buffer_object { |