bool dc_validate_plane(struct dc *dc, const struct dc_plane_state *plane_state)
{
- struct dc *core_dc = dc;
-
/* TODO For now validates pixel format only */
- if (core_dc->res_pool->funcs->validate_plane)
- return core_dc->res_pool->funcs->validate_plane(plane_state) == DC_OK;
+ if (dc->res_pool->funcs->validate_plane)
+ return dc->res_pool->funcs->validate_plane(plane_state, &dc->caps) == DC_OK;
return true;
}
uint32_t max_downscale_ratio;
uint32_t i2c_speed_in_khz;
unsigned int max_cursor_size;
+ unsigned int max_video_width;
bool dcc_const_color;
bool dynamic_audio;
};
*pool = NULL;
}
-enum dc_status dce100_validate_plane(const struct dc_plane_state *plane_state)
+enum dc_status dce100_validate_plane(const struct dc_plane_state *plane_state, struct dc_caps *caps)
{
if (plane_state->format < SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
uint8_t num_virtual_links,
struct dc *dc);
-enum dc_status dce100_validate_plane(const struct dc_plane_state *plane_state);
+enum dc_status dce100_validate_plane(const struct dc_plane_state *plane_state, struct dc_caps *caps);
enum dc_status dce100_add_stream_to_ctx(
struct dc *dc,
*pool = NULL;
}
-enum dc_status dcn10_validate_plane(const struct dc_plane_state *plane_state)
+static enum dc_status dcn10_validate_plane(const struct dc_plane_state *plane_state, struct dc_caps *caps)
{
if (plane_state->format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN
- && plane_state->src_rect.width > 3840)
+ && caps->max_video_width != 0
+ && plane_state->src_rect.width > caps->max_video_width)
return DC_FAIL_SURFACE_VALIDATE;
return DC_OK;
/* max pipe num for ASIC before check pipe fuses */
pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
+ dc->caps.max_video_width = 3840;
dc->caps.max_downscale_ratio = 200;
dc->caps.i2c_speed_in_khz = 100;
dc->caps.max_cursor_size = 256;
const struct resource_pool *pool,
struct dc_stream_state *stream);
- enum dc_status (*validate_plane)(const struct dc_plane_state *plane_state);
+ enum dc_status (*validate_plane)(const struct dc_plane_state *plane_state, struct dc_caps *caps);
enum dc_status (*add_stream_to_ctx)(
struct dc *dc,