diff options
Diffstat (limited to 'include/drm/drm_plane.h')
-rw-r--r-- | include/drm/drm_plane.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h index 9ab3e7044812..73f90f9d057f 100644 --- a/include/drm/drm_plane.h +++ b/include/drm/drm_plane.h @@ -233,11 +233,9 @@ struct drm_plane_funcs { * This is the legacy entry point to update a property attached to the * plane. * - * Drivers implementing atomic modeset should use - * drm_atomic_helper_plane_set_property() to implement this hook. - * * This callback is optional if the driver does not support any legacy - * driver-private properties. + * driver-private properties. For atomic drivers it is not used because + * property handling is done entirely in the DRM core. * * RETURNS: * @@ -392,6 +390,22 @@ struct drm_plane_funcs { */ void (*atomic_print_state)(struct drm_printer *p, const struct drm_plane_state *state); + + /** + * @format_mod_supported: + * + * This optional hook is used for the DRM to determine if the given + * format/modifier combination is valid for the plane. This allows the + * DRM to generate the correct format bitmask (which formats apply to + * which modifier). + * + * Returns: + * + * True if the given modifier is valid for that format on the plane. + * False otherwise. + */ + bool (*format_mod_supported)(struct drm_plane *plane, uint32_t format, + uint64_t modifier); }; /** @@ -487,6 +501,9 @@ struct drm_plane { unsigned int format_count; bool format_default; + uint64_t *modifiers; + unsigned int modifier_count; + struct drm_crtc *crtc; struct drm_framebuffer *fb; @@ -527,13 +544,14 @@ struct drm_plane { #define obj_to_plane(x) container_of(x, struct drm_plane, base) -__printf(8, 9) +__printf(9, 10) int drm_universal_plane_init(struct drm_device *dev, struct drm_plane *plane, uint32_t possible_crtcs, const struct drm_plane_funcs *funcs, const uint32_t *formats, unsigned int format_count, + const uint64_t *format_modifiers, enum drm_plane_type type, const char *name, ...); int drm_plane_init(struct drm_device *dev, |