Lines Matching defs:plane

371 	struct drm_plane *plane;
388 list_for_each_entry(plane, &dev->mode_config.plane_list, head) {
389 if (plane->fb == fb) {
391 ret = plane->funcs->disable_plane(plane);
393 DRM_ERROR("failed to disable plane with busy fb\n");
394 /* disconnect the plane from the fb and crtc: */
395 plane->fb = NULL;
396 plane->crtc = NULL;
646 int drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
656 ret = drm_mode_object_get(dev, &plane->base, DRM_MODE_OBJECT_PLANE);
660 plane->base.properties = &plane->properties;
661 plane->dev = dev;
662 plane->funcs = funcs;
663 plane->format_types = malloc(sizeof(uint32_t) * format_count,
665 memcpy(plane->format_types, formats, format_count * sizeof(uint32_t));
666 plane->format_count = format_count;
667 plane->possible_crtcs = possible_crtcs;
674 list_add_tail(&plane->head, &dev->mode_config.plane_list);
677 INIT_LIST_HEAD(&plane->head);
687 void drm_plane_cleanup(struct drm_plane *plane)
689 struct drm_device *dev = plane->dev;
692 free(plane->format_types, DRM_MEM_KMS);
693 drm_mode_object_put(dev, &plane->base);
694 /* if not added to a list, it must be a private plane */
695 if (!list_empty(&plane->head)) {
696 list_del(&plane->head);
1061 struct drm_plane *plane, *plt;
1087 list_for_each_entry_safe(plane, plt, &dev->mode_config.plane_list,
1089 plane->funcs->destroy(plane);
1606 * drm_mode_getplane_res - get plane info
1614 * Return an plane count and set of IDs.
1621 struct drm_plane *plane;
1639 list_for_each_entry(plane, &config->plane_list, head) {
1640 if (put_user(plane->base.id, plane_ptr + copied)) {
1655 * drm_mode_getplane - get plane info
1663 * Return plane info, including formats supported, gamma size, any
1671 struct drm_plane *plane;
1685 plane = obj_to_plane(obj);
1687 if (plane->crtc)
1688 plane_resp->crtc_id = plane->crtc->base.id;
1692 if (plane->fb)
1693 plane_resp->fb_id = plane->fb->base.id;
1697 plane_resp->plane_id = plane->base.id;
1698 plane_resp->possible_crtcs = plane->possible_crtcs;
1699 plane_resp->gamma_size = plane->gamma_size;
1705 if (plane->format_count &&
1706 (plane_resp->count_format_types >= plane->format_count)) {
1709 plane->format_types,
1710 sizeof(uint32_t) * plane->format_count)) {
1715 plane_resp->count_format_types = plane->format_count;
1723 * drm_mode_setplane - set up or tear down an plane
1731 * Set plane info, including placement, fb, scaling, and other factors.
1739 struct drm_plane *plane;
1752 * First, find the plane, crtc, and fb objects. If not available,
1758 DRM_DEBUG_KMS("Unknown plane ID %d\n",
1763 plane = obj_to_plane(obj);
1767 plane->funcs->disable_plane(plane);
1768 plane->crtc = NULL;
1769 plane->fb = NULL;
1793 /* Check whether this plane supports the fb pixel format. */
1794 for (i = 0; i < plane->format_count; i++)
1795 if (fb->pixel_format == plane->format_types[i])
1797 if (i == plane->format_count) {
1837 ret = plane->funcs->update_plane(plane, crtc, fb,
1843 plane->crtc = crtc;
1844 plane->fb = fb;
2275 DRM_DEBUG_KMS("no buffer object handle for plane %d\n", i);
2286 DRM_DEBUG_KMS("bad pitch %u for plane %d\n", r->pitches[i], i);
3246 struct drm_plane *plane = obj_to_plane(obj);
3248 if (plane->funcs->set_property)
3249 ret = plane->funcs->set_property(plane, property, value);
3784 * @plane: plane index
3787 * The bytes per pixel value for the specified plane.
3789 int drm_format_plane_cpp(uint32_t format, int plane)
3794 if (plane >= drm_format_num_planes(format))
3809 return plane ? 2 : 1;