diff options
author | Dave Airlie <airlied@redhat.com> | 2011-02-06 21:16:14 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-02-06 21:16:14 -0500 |
commit | ff72145badb834e8051719ea66e024784d000cb4 (patch) | |
tree | 39dc5fc512e3e0836713de9defb91ea8b4033aa2 /include/drm/drmP.h | |
parent | 1f692a14cbfbeb11f9a9c16f25c8ecb8ab50d3d5 (diff) |
drm: dumb scanout create/mmap for intel/radeon (v3)
This is just an idea that might or might not be a good idea,
it basically adds two ioctls to create a dumb and map a dumb buffer
suitable for scanout. The handle can be passed to the KMS ioctls to create
a framebuffer.
It looks to me like it would be useful in the following cases:
a) in development drivers - we can always provide a shadowfb fallback.
b) libkms users - we can clean up libkms a lot and avoid linking
to libdrm_*.
c) plymouth via libkms is a lot easier.
Userspace bits would be just calls + mmaps. We could probably
mark these handles somehow as not being suitable for acceleartion
so as top stop people who are dumber than dumb.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm/drmP.h')
-rw-r--r-- | include/drm/drmP.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h index fe29aadb129d..3cbe7a02d2aa 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h | |||
@@ -880,6 +880,17 @@ struct drm_driver { | |||
880 | /* vga arb irq handler */ | 880 | /* vga arb irq handler */ |
881 | void (*vgaarb_irq)(struct drm_device *dev, bool state); | 881 | void (*vgaarb_irq)(struct drm_device *dev, bool state); |
882 | 882 | ||
883 | /* dumb alloc support */ | ||
884 | int (*dumb_create)(struct drm_file *file_priv, | ||
885 | struct drm_device *dev, | ||
886 | struct drm_mode_create_dumb *args); | ||
887 | int (*dumb_map_offset)(struct drm_file *file_priv, | ||
888 | struct drm_device *dev, uint32_t handle, | ||
889 | uint64_t *offset); | ||
890 | int (*dumb_destroy)(struct drm_file *file_priv, | ||
891 | struct drm_device *dev, | ||
892 | uint32_t handle); | ||
893 | |||
883 | /* Driver private ops for this object */ | 894 | /* Driver private ops for this object */ |
884 | struct vm_operations_struct *gem_vm_ops; | 895 | struct vm_operations_struct *gem_vm_ops; |
885 | 896 | ||
@@ -1544,6 +1555,7 @@ drm_gem_object_unreference_unlocked(struct drm_gem_object *obj) | |||
1544 | int drm_gem_handle_create(struct drm_file *file_priv, | 1555 | int drm_gem_handle_create(struct drm_file *file_priv, |
1545 | struct drm_gem_object *obj, | 1556 | struct drm_gem_object *obj, |
1546 | u32 *handlep); | 1557 | u32 *handlep); |
1558 | int drm_gem_handle_delete(struct drm_file *filp, u32 handle); | ||
1547 | 1559 | ||
1548 | static inline void | 1560 | static inline void |
1549 | drm_gem_object_handle_reference(struct drm_gem_object *obj) | 1561 | drm_gem_object_handle_reference(struct drm_gem_object *obj) |