summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core/dc_resource.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_resource.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index d381e380e974..1f4237fc3e53 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -2535,3 +2535,14 @@ bool dc_validate_stream(const struct dc *dc, struct dc_stream *stream)
return res == DC_OK;
}
+
+bool dc_validate_surface(const struct dc *dc, const struct dc_surface *surface)
+{
+ struct core_dc *core_dc = DC_TO_CORE(dc);
+
+ /* TODO For now validates pixel format only */
+ if (core_dc->res_pool->funcs->validate_surface)
+ return core_dc->res_pool->funcs->validate_surface(surface) == DC_OK;
+
+ return true;
+}