aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/drm/drm_plane.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2018-10-29 20:34:52 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2018-11-06 21:34:22 +0200
commite7afb623b4fb82089c9a50c733c740522b8220bc (patch)
tree881e5747b55073c6da147abb8866df0bd4b96da6 /include/drm/drm_plane.h
parentdrm/lease: look at ->universal_planes only once (diff)
downloadwireguard-linux-e7afb623b4fb82089c9a50c733c740522b8220bc.tar.xz
wireguard-linux-e7afb623b4fb82089c9a50c733c740522b8220bc.zip
drm: Add drm_any_plane_has_format()
Add a function to check whether there is at least one plane that supports a specific format and modifier combination. Drivers can use this to reject unsupported formats/modifiers in .fb_create(). v2: Accept anyformat if the driver doesn't do planes (Eric) s/planes_have_format/any_plane_has_format/ (Eric) Check the modifier as well since we already have a function that does both v3: Don't do the check in the core since we may not know the modifier yet, instead export the function and let drivers call it themselves Cc: Eric Anholt <eric@anholt.net> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181029183453.28541-1-ville.syrjala@linux.intel.com
Diffstat (limited to 'include/drm/drm_plane.h')
-rw-r--r--include/drm/drm_plane.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/drm/drm_plane.h b/include/drm/drm_plane.h
index 0a0834bef8bd..3701f56c3362 100644
--- a/include/drm/drm_plane.h
+++ b/include/drm/drm_plane.h
@@ -798,5 +798,7 @@ static inline struct drm_plane *drm_plane_find(struct drm_device *dev,
#define drm_for_each_plane(plane, dev) \
list_for_each_entry(plane, &(dev)->mode_config.plane_list, head)
+bool drm_any_plane_has_format(struct drm_device *dev,
+ u32 format, u64 modifier);
#endif