Lines Matching full:plane
80 * between legacy and universal plane support for setting cursors or in the
423 * plane->props.
426 igt_fill_plane_props(igt_display_t *display, igt_plane_t *plane, in igt_fill_plane_props() argument
434 props = drmModeObjectGetProperties(fd, plane->drm_plane->plane_id, DRM_MODE_OBJECT_PLANE); in igt_fill_plane_props()
445 plane->props[j] = props->props[i]; in igt_fill_plane_props()
559 * @plane_type: display plane type
1543 static void get_plane(char *str, int type, struct kmstest_plane *plane) in get_plane() argument
1548 plane->type = type; in get_plane()
1550 &plane->id, in get_plane()
1554 ret = sscanf(buf + 9, "%4d%*c%4d%*c", &plane->pos_x, &plane->pos_y); in get_plane()
1557 ret = sscanf(buf + 30, "%4d%*c%4d%*c", &plane->width, &plane->height); in get_plane()
1663 * @visibility: Boolean parameter to test against the plane's current visibility state
1665 * Asserts only if the plane's visibility state matches the status being passed by @visibility
1774 igt_plane_set_property(igt_plane_t *plane, uint32_t prop_id, uint64_t value) in igt_plane_set_property() argument
1776 igt_pipe_t *pipe = plane->pipe; in igt_plane_set_property()
1779 return drmModeObjectSetProperty(display->drm_fd, plane->drm_plane->plane_id, in igt_plane_set_property()
1784 * Walk a plane's property list to determine its type. If we don't
1786 * planes and we know the plane is an overlay/sprite.
1801 static void igt_plane_reset(igt_plane_t *plane) in igt_plane_reset() argument
1804 igt_plane_set_prop_value(plane, IGT_PLANE_SRC_X, 0); in igt_plane_reset()
1805 igt_plane_set_prop_value(plane, IGT_PLANE_SRC_Y, 0); in igt_plane_reset()
1806 igt_plane_set_prop_value(plane, IGT_PLANE_SRC_W, 0); in igt_plane_reset()
1807 igt_plane_set_prop_value(plane, IGT_PLANE_SRC_H, 0); in igt_plane_reset()
1810 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_X, 0); in igt_plane_reset()
1811 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_Y, 0); in igt_plane_reset()
1812 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_W, 0); in igt_plane_reset()
1813 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_H, 0); in igt_plane_reset()
1816 igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, 0); in igt_plane_reset()
1817 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, 0); in igt_plane_reset()
1819 if (igt_plane_has_prop(plane, IGT_PLANE_COLOR_ENCODING)) in igt_plane_reset()
1820 igt_plane_set_prop_enum(plane, IGT_PLANE_COLOR_ENCODING, in igt_plane_reset()
1823 if (igt_plane_has_prop(plane, IGT_PLANE_COLOR_RANGE)) in igt_plane_reset()
1824 igt_plane_set_prop_enum(plane, IGT_PLANE_COLOR_RANGE, in igt_plane_reset()
1828 if (igt_plane_has_prop(plane, IGT_PLANE_ROTATION)) in igt_plane_reset()
1829 igt_plane_set_prop_value(plane, IGT_PLANE_ROTATION, IGT_ROTATION_0); in igt_plane_reset()
1831 if (igt_plane_has_prop(plane, IGT_PLANE_PIXEL_BLEND_MODE)) in igt_plane_reset()
1832 igt_plane_set_prop_enum(plane, IGT_PLANE_PIXEL_BLEND_MODE, "Pre-multiplied"); in igt_plane_reset()
1834 if (igt_plane_has_prop(plane, IGT_PLANE_ALPHA)) in igt_plane_reset()
1838 plane->pipe->display->drm_fd, in igt_plane_reset()
1839 plane->props[IGT_PLANE_ALPHA]); in igt_plane_reset()
1851 igt_plane_set_prop_value(plane, IGT_PLANE_ALPHA, max_alpha); in igt_plane_reset()
1855 igt_plane_clear_prop_changed(plane, IGT_PLANE_IN_FENCE_FD); in igt_plane_reset()
1856 plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL; in igt_plane_reset()
1857 plane->gem_handle = 0; in igt_plane_reset()
1928 * prohibited on the primary and cursor plane for legacy commits. in igt_display_reset()
1934 igt_plane_t *plane; in igt_display_reset() local
1936 for_each_plane_on_pipe(display, pipe, plane) in igt_display_reset()
1937 igt_plane_reset(plane); in igt_display_reset()
1949 static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane);
1999 igt_plane_t *plane = &display->planes[i]; in igt_display_require() local
2002 plane->drm_plane = drmModeGetPlane(display->drm_fd, id); in igt_display_require()
2003 igt_assert(plane->drm_plane); in igt_display_require()
2005 plane->type = get_drm_plane_type(display->drm_fd, id); in igt_display_require()
2008 * TODO: Fill in the rest of the plane properties here and in igt_display_require()
2009 * move away from the plane per pipe model to align closer in igt_display_require()
2016 igt_plane_t *plane; in igt_display_require() local
2055 plane = &pipe->planes[0]; in igt_display_require()
2056 plane->index = 0; in igt_display_require()
2059 plane = &pipe->planes[last_plane]; in igt_display_require()
2060 plane->index = last_plane; in igt_display_require()
2064 plane = &pipe->planes[p]; in igt_display_require()
2065 plane->index = p++; in igt_display_require()
2068 igt_assert_f(plane->index < n_planes, "n_planes < plane->index failed\n"); in igt_display_require()
2069 plane->type = type; in igt_display_require()
2070 plane->pipe = pipe; in igt_display_require()
2071 plane->drm_plane = drm_plane; in igt_display_require()
2072 plane->values[IGT_PLANE_IN_FENCE_FD] = ~0ULL; in igt_display_require()
2073 plane->ref = global_plane; in igt_display_require()
2076 * HACK: point the global plane to the first pipe that in igt_display_require()
2080 igt_plane_set_pipe(plane, pipe); in igt_display_require()
2082 igt_fill_plane_props(display, plane, IGT_NUM_PLANE_PROPS, igt_plane_prop_names); in igt_display_require()
2084 igt_fill_plane_format_mod(display, plane); in igt_display_require()
2089 * plane, and it must be in slot 0. in igt_display_require()
2282 igt_plane_t *plane = &display->planes[i]; in igt_display_fini() local
2284 if (plane->drm_plane) { in igt_display_fini()
2285 drmModeFreePlane(plane->drm_plane); in igt_display_fini()
2286 plane->drm_plane = NULL; in igt_display_fini()
2374 * @plane_type: Cursor, primary or an overlay plane
2376 * Finds a valid plane type for the given @pipe otherwise
2379 * Returns: A #igt_plane_t structure that matches the requested plane type
2411 * @plane_type: Cursor, primary or an overlay plane
2415 * Returns: The number of planes that match the requested plane type
2431 * @plane_type: Cursor, primary or an overlay plane
2432 * @index: the index of the plane among planes of the same type
2434 * Get the @index th plane of type @plane_type for the provided @pipe.
2436 * Returns: The @index th plane that matches the requested plane type
2564 static uint32_t igt_plane_get_fb_id(igt_plane_t *plane) in igt_plane_get_fb_id() argument
2566 return plane->values[IGT_PLANE_FB_ID]; in igt_plane_get_fb_id()
2576 * Add position and fb changes of a plane to the atomic property set
2579 igt_atomic_prepare_plane_commit(igt_plane_t *plane, igt_pipe_t *pipe, in igt_atomic_prepare_plane_commit() argument
2585 igt_assert(plane->drm_plane); in igt_atomic_prepare_plane_commit()
2588 "populating plane data: %s.%d, fb %u\n", in igt_atomic_prepare_plane_commit()
2590 plane->index, in igt_atomic_prepare_plane_commit()
2591 igt_plane_get_fb_id(plane)); in igt_atomic_prepare_plane_commit()
2594 if (!igt_plane_is_prop_changed(plane, i)) in igt_atomic_prepare_plane_commit()
2598 igt_assert(plane->props[i]); in igt_atomic_prepare_plane_commit()
2600 igt_debug("plane %s.%d: Setting property \"%s\" to 0x%"PRIx64"/%"PRIi64"\n", in igt_atomic_prepare_plane_commit()
2601 kmstest_pipe_name(pipe->pipe), plane->index, igt_plane_prop_names[i], in igt_atomic_prepare_plane_commit()
2602 plane->values[i], plane->values[i]); in igt_atomic_prepare_plane_commit()
2604 igt_assert_lt(0, drmModeAtomicAddProperty(req, plane->drm_plane->plane_id, in igt_atomic_prepare_plane_commit()
2605 plane->props[i], in igt_atomic_prepare_plane_commit()
2606 plane->values[i])); in igt_atomic_prepare_plane_commit()
2617 * with the atomic cap set, but that's not how our legacy plane
2628 * Commit position and fb changes to a DRM plane via the SetPlane ioctl; if the
2629 * DRM call to program the plane fails, we'll either fail immediately (for
2633 static int igt_drm_plane_commit(igt_plane_t *plane, in igt_drm_plane_commit() argument
2650 igt_plane_is_prop_changed(plane, IGT_PLANE_FB_ID) || in igt_drm_plane_commit()
2651 plane->changed & IGT_PLANE_COORD_CHANGED_MASK; in igt_drm_plane_commit()
2653 igt_assert(plane->drm_plane); in igt_drm_plane_commit()
2655 fb_id = igt_plane_get_fb_id(plane); in igt_drm_plane_commit()
2660 "SetPlane pipe %s, plane %d, disabling\n", in igt_drm_plane_commit()
2662 plane->index); in igt_drm_plane_commit()
2665 plane->drm_plane->plane_id, in igt_drm_plane_commit()
2678 src_x = plane->values[IGT_PLANE_SRC_X]; in igt_drm_plane_commit()
2679 src_y = plane->values[IGT_PLANE_SRC_Y]; in igt_drm_plane_commit()
2680 src_w = plane->values[IGT_PLANE_SRC_W]; in igt_drm_plane_commit()
2681 src_h = plane->values[IGT_PLANE_SRC_H]; in igt_drm_plane_commit()
2682 crtc_x = plane->values[IGT_PLANE_CRTC_X]; in igt_drm_plane_commit()
2683 crtc_y = plane->values[IGT_PLANE_CRTC_Y]; in igt_drm_plane_commit()
2684 crtc_w = plane->values[IGT_PLANE_CRTC_W]; in igt_drm_plane_commit()
2685 crtc_h = plane->values[IGT_PLANE_CRTC_H]; in igt_drm_plane_commit()
2691 plane->index, in igt_drm_plane_commit()
2697 plane->drm_plane->plane_id, in igt_drm_plane_commit()
2709 changed_mask = plane->changed & LEGACY_PLANE_COMMIT_MASK; in igt_drm_plane_commit()
2715 LOG(display, "SetProp plane %s.%d \"%s\" to 0x%"PRIx64"/%"PRIi64"\n", in igt_drm_plane_commit()
2716 kmstest_pipe_name(pipe->pipe), plane->index, igt_plane_prop_names[i], in igt_drm_plane_commit()
2717 plane->values[i], plane->values[i]); in igt_drm_plane_commit()
2719 igt_assert(plane->props[i]); in igt_drm_plane_commit()
2721 ret = igt_plane_set_property(plane, in igt_drm_plane_commit()
2722 plane->props[i], in igt_drm_plane_commit()
2723 plane->values[i]); in igt_drm_plane_commit()
2785 * Commit position and fb changes to a primary plane via the legacy interface
2857 static int igt_plane_fixup_rotation(igt_plane_t *plane, in igt_plane_fixup_rotation() argument
2862 if (!igt_plane_has_prop(plane, IGT_PLANE_ROTATION)) in igt_plane_fixup_rotation()
2865 LOG(pipe->display, "Fixing up initial rotation pipe %s, plane %d\n", in igt_plane_fixup_rotation()
2866 kmstest_pipe_name(pipe->pipe), plane->index); in igt_plane_fixup_rotation()
2869 ret = igt_plane_set_property(plane, plane->props[IGT_PLANE_ROTATION], in igt_plane_fixup_rotation()
2870 plane->values[IGT_PLANE_ROTATION]); in igt_plane_fixup_rotation()
2874 /* Disable the plane, while we tinker with rotation */ in igt_plane_fixup_rotation()
2876 plane->drm_plane->plane_id, in igt_plane_fixup_rotation()
2883 if (ret && plane->type != DRM_PLANE_TYPE_PRIMARY) in igt_plane_fixup_rotation()
2886 /* For primary plane, fall back to disabling the crtc. */ in igt_plane_fixup_rotation()
2896 return igt_plane_set_property(plane, plane->props[IGT_PLANE_ROTATION], in igt_plane_fixup_rotation()
2897 plane->values[IGT_PLANE_ROTATION]); in igt_plane_fixup_rotation()
2901 * Commit position and fb changes to a plane. The value of @s will determine
2904 static int igt_plane_commit(igt_plane_t *plane, in igt_plane_commit() argument
2910 igt_plane_is_prop_changed(plane, IGT_PLANE_ROTATION))) { in igt_plane_commit()
2913 ret = igt_plane_fixup_rotation(plane, pipe); in igt_plane_commit()
2917 if (plane->type == DRM_PLANE_TYPE_CURSOR && s == COMMIT_LEGACY) { in igt_plane_commit()
2918 return igt_cursor_commit_legacy(plane, pipe, fail_on_error); in igt_plane_commit()
2919 } else if (plane->type == DRM_PLANE_TYPE_PRIMARY && s == COMMIT_LEGACY && in igt_plane_commit()
2920 plane == igt_pipe_get_plane_type(plane->pipe, DRM_PLANE_TYPE_PRIMARY)) { in igt_plane_commit()
2921 return igt_primary_plane_commit_legacy(plane, pipe, in igt_plane_commit()
2924 return igt_drm_plane_commit(plane, pipe, fail_on_error); in igt_plane_commit()
2939 * Commit all plane changes to an output. Note that if @s is COMMIT_LEGACY,
2940 * enabling/disabling the primary plane will also enable/disable the CRTC.
2942 * If @fail_on_error is true, any failure to commit plane state will lead
2968 igt_plane_t *plane = &pipe->planes[i]; in igt_pipe_commit() local
2971 if (plane->ref->pipe != pipe) in igt_pipe_commit()
2974 ret = igt_plane_commit(plane, pipe, s, fail_on_error); in igt_pipe_commit()
3040 * @plane: Target plane.
3043 * Return current value on a plane for a given property.
3049 uint64_t igt_plane_get_prop(igt_plane_t *plane, enum igt_atomic_plane_properties prop) in igt_plane_get_prop() argument
3051 igt_assert(igt_plane_has_prop(plane, prop)); in igt_plane_get_prop()
3053 return igt_mode_object_get_prop(plane->pipe->display, DRM_MODE_OBJECT_PLANE, in igt_plane_get_prop()
3054 plane->drm_plane->plane_id, plane->props[prop]); in igt_plane_get_prop()
3075 bool igt_plane_try_prop_enum(igt_plane_t *plane, in igt_plane_try_prop_enum() argument
3079 igt_display_t *display = plane->pipe->display; in igt_plane_try_prop_enum()
3082 igt_assert(plane->props[prop]); in igt_plane_try_prop_enum()
3085 plane->props[prop], val, &uval)) in igt_plane_try_prop_enum()
3088 igt_plane_set_prop_value(plane, prop, uval); in igt_plane_try_prop_enum()
3092 void igt_plane_set_prop_enum(igt_plane_t *plane, in igt_plane_set_prop_enum() argument
3096 igt_assert(igt_plane_try_prop_enum(plane, prop, val)); in igt_plane_set_prop_enum()
3101 * @plane: plane to set property on.
3113 igt_plane_replace_prop_blob(igt_plane_t *plane, enum igt_atomic_plane_properties prop, const void *… in igt_plane_replace_prop_blob() argument
3115 igt_display_t *display = plane->pipe->display; in igt_plane_replace_prop_blob()
3116 uint64_t *blob = &plane->values[prop]; in igt_plane_replace_prop_blob()
3128 igt_plane_set_prop_changed(plane, prop); in igt_plane_replace_prop_blob()
3352 igt_plane_t *plane; in igt_atomic_commit() local
3360 for_each_plane_on_pipe(display, pipe, plane) { in igt_atomic_commit()
3362 if (plane->ref->pipe != pipe_obj) in igt_atomic_commit()
3365 if (plane->changed) in igt_atomic_commit()
3366 igt_atomic_prepare_plane_commit(plane, pipe_obj, req); in igt_atomic_commit()
3399 igt_plane_t *plane; in display_commit_changed() local
3418 for_each_plane_on_pipe(display, pipe, plane) { in display_commit_changed()
3421 plane->changed = 0; in display_commit_changed()
3423 fd = plane->values[IGT_PLANE_IN_FENCE_FD]; in display_commit_changed()
3428 plane->values[IGT_PLANE_IN_FENCE_FD] = -1; in display_commit_changed()
3430 plane->changed &= ~IGT_PLANE_COORD_CHANGED_MASK; in display_commit_changed()
3432 igt_plane_clear_prop_changed(plane, IGT_PLANE_CRTC_ID); in display_commit_changed()
3433 igt_plane_clear_prop_changed(plane, IGT_PLANE_FB_ID); in display_commit_changed()
3436 !(plane->type == DRM_PLANE_TYPE_PRIMARY || in display_commit_changed()
3437 plane->type == DRM_PLANE_TYPE_CURSOR)) in display_commit_changed()
3438 plane->changed &= ~LEGACY_PLANE_COMMIT_MASK; in display_commit_changed()
3441 igt_plane_clear_prop_changed(plane, IGT_PLANE_ROTATION); in display_commit_changed()
3466 * Commit all plane changes across all outputs of the display.
3468 * If @fail_on_error is true, any failure to commit plane state will lead
3839 * @plane_type: Cursor, primary or an overlay plane
3841 * Finds a valid plane type for the given @output otherwise
3844 * Returns: A #igt_plane_t structure that matches the requested plane type
3859 * @plane_type: Cursor, primary or an overlay plane
3863 * Returns: The number of planes that match the requested plane type
3876 * @plane_type: Cursor, primary or an overlay plane
3877 * @index: the index of the plane among planes of the same type
3879 * Get the @index th plane of type @plane_type for the provided @output.
3881 * Returns: The @index th plane that matches the requested plane type
3894 * @plane: Plane
3897 * Pairs a given @framebuffer to a @plane
3902 void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb) in igt_plane_set_fb() argument
3904 igt_pipe_t *pipe = plane->pipe; in igt_plane_set_fb()
3908 plane->index, fb ? fb->fb_id : 0); in igt_plane_set_fb()
3910 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_ID, fb ? pipe->crtc_id : 0); in igt_plane_set_fb()
3911 igt_plane_set_prop_value(plane, IGT_PLANE_FB_ID, fb ? fb->fb_id : 0); in igt_plane_set_fb()
3913 if (plane->type == DRM_PLANE_TYPE_CURSOR && fb) in igt_plane_set_fb()
3914 plane->gem_handle = fb->gem_handle; in igt_plane_set_fb()
3916 plane->gem_handle = 0; in igt_plane_set_fb()
3920 /* set default plane size as fb size */ in igt_plane_set_fb()
3921 igt_plane_set_size(plane, fb->width, fb->height); in igt_plane_set_fb()
3924 igt_fb_set_position(fb, plane, 0, 0); in igt_plane_set_fb()
3925 igt_fb_set_size(fb, plane, fb->width, fb->height); in igt_plane_set_fb()
3927 if (igt_plane_has_prop(plane, IGT_PLANE_COLOR_ENCODING)) in igt_plane_set_fb()
3928 igt_plane_set_prop_enum(plane, IGT_PLANE_COLOR_ENCODING, in igt_plane_set_fb()
3930 if (igt_plane_has_prop(plane, IGT_PLANE_COLOR_RANGE)) in igt_plane_set_fb()
3931 igt_plane_set_prop_enum(plane, IGT_PLANE_COLOR_RANGE, in igt_plane_set_fb()
3934 /* Hack to prioritize the plane on the pipe that last set fb */ in igt_plane_set_fb()
3935 igt_plane_set_pipe(plane, pipe); in igt_plane_set_fb()
3937 igt_plane_set_size(plane, 0, 0); in igt_plane_set_fb()
3940 igt_fb_set_position(fb, plane, 0, 0); in igt_plane_set_fb()
3941 igt_fb_set_size(fb, plane, 0, 0); in igt_plane_set_fb()
3947 * @plane: plane
3953 void igt_plane_set_fence_fd(igt_plane_t *plane, int fence_fd) in igt_plane_set_fence_fd() argument
3957 fd = plane->values[IGT_PLANE_IN_FENCE_FD]; in igt_plane_set_fence_fd()
3967 igt_plane_set_prop_value(plane, IGT_PLANE_IN_FENCE_FD, fd); in igt_plane_set_fence_fd()
3972 * @plane: Target plane pointer
3973 * @pipe: The pipe to assign the plane to
3976 void igt_plane_set_pipe(igt_plane_t *plane, igt_pipe_t *pipe) in igt_plane_set_pipe() argument
3979 * HACK: Point the global plane back to the local plane. in igt_plane_set_pipe()
3981 * we're moving away from the single pipe per plane model. in igt_plane_set_pipe()
3983 plane->ref->ref = plane; in igt_plane_set_pipe()
3984 plane->ref->pipe = pipe; in igt_plane_set_pipe()
3989 * @plane: Plane pointer for which position is to be set
3993 * This function sets a new (x,y) position for the given plane.
3994 * New position will be committed at plane commit time via drmModeSetPlane().
3996 void igt_plane_set_position(igt_plane_t *plane, int x, int y) in igt_plane_set_position() argument
3998 igt_pipe_t *pipe = plane->pipe; in igt_plane_set_position()
4002 kmstest_pipe_name(pipe->pipe), plane->index, x, y); in igt_plane_set_position()
4004 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_X, x); in igt_plane_set_position()
4005 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_Y, y); in igt_plane_set_position()
4010 * @plane: plane pointer for which size to be set
4014 * This function sets width and height for requested plane.
4015 * New size will be committed at plane commit time via
4018 void igt_plane_set_size(igt_plane_t *plane, int w, int h) in igt_plane_set_size() argument
4020 igt_pipe_t *pipe = plane->pipe; in igt_plane_set_size()
4024 kmstest_pipe_name(pipe->pipe), plane->index, w, h); in igt_plane_set_size()
4026 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_W, w); in igt_plane_set_size()
4027 igt_plane_set_prop_value(plane, IGT_PLANE_CRTC_H, h); in igt_plane_set_size()
4033 * @plane: plane
4037 * This function sets position for requested framebuffer as src to plane.
4038 * New position will be committed at plane commit time via drmModeSetPlane().
4040 void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane, in igt_fb_set_position() argument
4043 igt_pipe_t *pipe = plane->pipe; in igt_fb_set_position()
4047 kmstest_pipe_name(pipe->pipe), plane->index, x, y); in igt_fb_set_position()
4049 igt_plane_set_prop_value(plane, IGT_PLANE_SRC_X, IGT_FIXED(x, 0)); in igt_fb_set_position()
4050 igt_plane_set_prop_value(plane, IGT_PLANE_SRC_Y, IGT_FIXED(y, 0)); in igt_fb_set_position()
4056 * @plane: plane
4061 * to plane. New size will be committed at plane commit time via
4064 void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane, in igt_fb_set_size() argument
4067 igt_pipe_t *pipe = plane->pipe; in igt_fb_set_size()
4071 kmstest_pipe_name(pipe->pipe), plane->index, w, h); in igt_fb_set_size()
4073 igt_plane_set_prop_value(plane, IGT_PLANE_SRC_W, IGT_FIXED(w, 0)); in igt_fb_set_size()
4074 igt_plane_set_prop_value(plane, IGT_PLANE_SRC_H, IGT_FIXED(h, 0)); in igt_fb_set_size()
4095 * @plane: Plane pointer for which rotation is to be set
4096 * @rotation: Plane rotation value (0, 90, 180, 270)
4098 * This function sets a new rotation for the requested @plane.
4099 * New @rotation will be committed at plane commit time via
4102 void igt_plane_set_rotation(igt_plane_t *plane, igt_rotation_t rotation) in igt_plane_set_rotation() argument
4104 igt_pipe_t *pipe = plane->pipe; in igt_plane_set_rotation()
4109 plane->index, rotation_name(rotation)); in igt_plane_set_rotation()
4111 igt_plane_set_prop_value(plane, IGT_PLANE_ROTATION, rotation); in igt_plane_set_rotation()
4393 static void igt_fill_plane_format_mod(igt_display_t *display, igt_plane_t *plane) in igt_fill_plane_format_mod() argument
4401 if (!igt_plane_has_prop(plane, IGT_PLANE_IN_FORMATS)) { in igt_fill_plane_format_mod()
4402 drmModePlanePtr p = plane->drm_plane; in igt_fill_plane_format_mod()
4406 plane->format_mod_count = count; in igt_fill_plane_format_mod()
4407 plane->formats = calloc(count, sizeof(plane->formats[0])); in igt_fill_plane_format_mod()
4408 igt_assert(plane->formats); in igt_fill_plane_format_mod()
4409 plane->modifiers = calloc(count, sizeof(plane->modifiers[0])); in igt_fill_plane_format_mod()
4410 igt_assert(plane->modifiers); in igt_fill_plane_format_mod()
4417 plane->formats[i] = p->formats[i]; in igt_fill_plane_format_mod()
4418 plane->modifiers[i] = DRM_FORMAT_MOD_LINEAR; in igt_fill_plane_format_mod()
4424 blob_id = igt_plane_get_prop(plane, IGT_PLANE_IN_FORMATS); in igt_fill_plane_format_mod()
4436 plane->format_mod_count = count; in igt_fill_plane_format_mod()
4437 plane->formats = calloc(count, sizeof(plane->formats[0])); in igt_fill_plane_format_mod()
4438 igt_assert(plane->formats); in igt_fill_plane_format_mod()
4439 plane->modifiers = calloc(count, sizeof(plane->modifiers[0])); in igt_fill_plane_format_mod()
4440 igt_assert(plane->modifiers); in igt_fill_plane_format_mod()
4451 plane->formats[idx] = formats[modifiers[i].offset + j]; in igt_fill_plane_format_mod()
4452 plane->modifiers[idx] = modifiers[i].modifier; in igt_fill_plane_format_mod()
4454 igt_assert_lte(idx, plane->format_mod_count); in igt_fill_plane_format_mod()
4458 igt_assert_eq(idx, plane->format_mod_count); in igt_fill_plane_format_mod()
4461 bool igt_plane_has_format_mod(igt_plane_t *plane, uint32_t format, in igt_plane_has_format_mod() argument
4466 for (i = 0; i < plane->format_mod_count; i++) { in igt_plane_has_format_mod()
4467 if (plane->formats[i] == format && in igt_plane_has_format_mod()
4468 plane->modifiers[i] == modifier) in igt_plane_has_format_mod()
4482 igt_plane_t *plane; in igt_count_display_format_mod() local
4484 for_each_plane_on_pipe(display, pipe, plane) { in igt_count_display_format_mod()
4485 count += plane->format_mod_count; in igt_count_display_format_mod()
4524 igt_plane_t *plane; in igt_fill_display_format_mod() local
4526 for_each_plane_on_pipe(display, pipe, plane) { in igt_fill_display_format_mod()
4527 for (int i = 0; i < plane->format_mod_count; i++) { in igt_fill_display_format_mod()
4529 plane->formats[i], in igt_fill_display_format_mod()
4530 plane->modifiers[i]); in igt_fill_display_format_mod()