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/drm_mode.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/drm_mode.h')
-rw-r--r-- | include/drm/drm_mode.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index 0fc7397c8f1f..ae6b7a3dbec7 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h | |||
@@ -344,4 +344,33 @@ struct drm_mode_crtc_page_flip { | |||
344 | __u64 user_data; | 344 | __u64 user_data; |
345 | }; | 345 | }; |
346 | 346 | ||
347 | /* create a dumb scanout buffer */ | ||
348 | struct drm_mode_create_dumb { | ||
349 | uint32_t height; | ||
350 | uint32_t width; | ||
351 | uint32_t bpp; | ||
352 | uint32_t flags; | ||
353 | /* handle, pitch, size will be returned */ | ||
354 | uint32_t handle; | ||
355 | uint32_t pitch; | ||
356 | uint64_t size; | ||
357 | }; | ||
358 | |||
359 | /* set up for mmap of a dumb scanout buffer */ | ||
360 | struct drm_mode_map_dumb { | ||
361 | /** Handle for the object being mapped. */ | ||
362 | __u32 handle; | ||
363 | __u32 pad; | ||
364 | /** | ||
365 | * Fake offset to use for subsequent mmap call | ||
366 | * | ||
367 | * This is a fixed-size type for 32/64 compatibility. | ||
368 | */ | ||
369 | __u64 offset; | ||
370 | }; | ||
371 | |||
372 | struct drm_mode_destroy_dumb { | ||
373 | uint32_t handle; | ||
374 | }; | ||
375 | |||
347 | #endif | 376 | #endif |