linux/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
/**
 * vmw_du_plane_reset - creates a blank vmw plane state
 * @plane: drm plane
 *
 * Resets the atomic state for @plane by freeing the state pointer (which might
 * be NULL, e.g. at driver load time) and allocating a new empty state object.
 */


Resets the atomic state for @plane by freeing the state pointer (which might
be NULL, e.g. at driver load time) and allocating a new empty state object.
Resets the atomic state for @plane by freeing the state pointer ( which might be NULL e . g . at driver load time ) and allocating a new empty state object .
void vmw_du_plane_reset(struct drm_plane *plane)
{
	struct vmw_plane_state *vps;
	if (plane->state)
		vmw_du_plane_destroy_state(plane, plane->state);
	vps = kzalloc(sizeof(*vps), GFP_KERNEL);
	if (!vps) {
		DRM_ERROR("Cannot allocate vmw_plane_state\n");
		return;
	}
	plane->state = &vps->base;
	plane->state->plane = plane;
	plane->state->rotation = DRM_MODE_ROTATE_0;
}
void vmw_du_plane_reset ( struct drm_plane * plane ) { struct vmw_plane_state * vps ; if ( plane -> state ) vmw_du_plane_destroy_state ( plane , plane -> state ) ; vps = kzalloc ( sizeof ( * vps ) , GFP_KERNEL ) ; if ( ! vps ) { DRM_ERROR ( " \n " ) ; return ; } plane -> state = & vps -> base ; plane -> state -> plane = plane ; plane -> state -> rotation = DRM_MODE_ROTATE_0 ; }
vmw_du_plane_reset - creates a blank vmw plane state
 @plane: drm plane
vmw_du_plane_reset - creates a blank vmw plane state @plane : drm plane