On Thu, 21 Jul 2011 19:30:00 +0900 Joonyoung Shim dofmind@gmail.com wrote:
Hi,
simple questions :)
2011/6/21 Jesse Barnes jbarnes@virtuousgeek.org:
Planes are a bit like half-CRTCs. They have a location and fb, but don't drive outputs directly. Add support for handling them to the core KMS code.
Signed-off-by: Jesse Barnes jbarnes@virtuousgeek.org
drivers/gpu/drm/drm_crtc.c | 235 +++++++++++++++++++++++++++++++++++++++++++- drivers/gpu/drm/drm_drv.c | 3 + include/drm/drm.h | 3 + include/drm/drm_crtc.h | 73 ++++++++++++++- include/drm/drm_mode.h | 35 +++++++ 5 files changed, 346 insertions(+), 3 deletions(-)
snip
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index c4961ea..fa6d348 100644 --- a/include/drm/drm_mode.h +++ b/include/drm/drm_mode.h @@ -120,6 +120,41 @@ struct drm_mode_crtc { struct drm_mode_modeinfo mode; };
+/* Planes blend with or override other bits on the CRTC */ +struct drm_mode_set_plane {
- __u32 plane_id;
- __u32 crtc_id;
- __u32 fb_id; /* fb object contains surface format type */
- /* Signed dest location allows it to be partially off screen */
- __s32 crtc_x, crtc_y;
Is this location offset from base(0, 0) of fb for plane, or from base of crtc(mode)?
This is the offset on the crtc specifically (which could be displaying a nonzero offset of a given fb).
- __u32 crtc_w, crtc_h;
What is it for? size of plane?
These are the size of the rect on the crtc. It's possible to have say a small source fb that gets scaled to a different size on the crtc by the plane blender or display hardware.
- /* Source values are 16.16 fixed point */
- __u32 src_x, src_y;
- __u32 src_h, src_w;
What are these for?
These specify the offset and size of the rect used for the source area. This allows the sprite hardware to send a subregion to the plane blender for display on the crtc.
- __u32 zpos;
Is this for order of plane(overlay)?
Yes.
Hope that helps; most of the above came out of earlier review comments since some display hardware allows a lot of flexibility when displaying overlay planes.