diff options
author | Jakob Bornecrantz <jakob@vmware.com> | 2011-10-04 14:13:14 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-10-05 05:17:09 -0400 |
commit | 497a3ff9877424108020c7091c7886b364c0486e (patch) | |
tree | 5032eaa3c8b47b9f049c9fe4b08c46b9ef9c572e | |
parent | de12d44fcad409e1b2956ef0ffd48818423fc701 (diff) |
vmwgfx: Add comments for buffer pinning code
Signed-off-by: Jakob Bornecrantz <jakob@vmware.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 1a4c84cecca..c14eb764e09 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | |||
@@ -706,6 +706,10 @@ static struct drm_framebuffer_funcs vmw_framebuffer_dmabuf_funcs = { | |||
706 | .create_handle = vmw_framebuffer_create_handle, | 706 | .create_handle = vmw_framebuffer_create_handle, |
707 | }; | 707 | }; |
708 | 708 | ||
709 | /** | ||
710 | * We need to reserve the start of vram because the host might | ||
711 | * scribble to it at mode changes, so we need to reserve it. | ||
712 | */ | ||
709 | static int vmw_surface_dmabuf_pin(struct vmw_framebuffer *vfb) | 713 | static int vmw_surface_dmabuf_pin(struct vmw_framebuffer *vfb) |
710 | { | 714 | { |
711 | struct vmw_private *dev_priv = vmw_priv(vfb->base.dev); | 715 | struct vmw_private *dev_priv = vmw_priv(vfb->base.dev); |
@@ -729,6 +733,9 @@ static int vmw_surface_dmabuf_pin(struct vmw_framebuffer *vfb) | |||
729 | return ret; | 733 | return ret; |
730 | } | 734 | } |
731 | 735 | ||
736 | /** | ||
737 | * See vmw_surface_dmabuf_pin. | ||
738 | */ | ||
732 | static int vmw_surface_dmabuf_unpin(struct vmw_framebuffer *vfb) | 739 | static int vmw_surface_dmabuf_unpin(struct vmw_framebuffer *vfb) |
733 | { | 740 | { |
734 | struct ttm_buffer_object *bo; | 741 | struct ttm_buffer_object *bo; |
@@ -745,6 +752,9 @@ static int vmw_surface_dmabuf_unpin(struct vmw_framebuffer *vfb) | |||
745 | return 0; | 752 | return 0; |
746 | } | 753 | } |
747 | 754 | ||
755 | /** | ||
756 | * Pin the dmabuffer to the start of vram. | ||
757 | */ | ||
748 | static int vmw_framebuffer_dmabuf_pin(struct vmw_framebuffer *vfb) | 758 | static int vmw_framebuffer_dmabuf_pin(struct vmw_framebuffer *vfb) |
749 | { | 759 | { |
750 | struct vmw_private *dev_priv = vmw_priv(vfb->base.dev); | 760 | struct vmw_private *dev_priv = vmw_priv(vfb->base.dev); |