Commit 5fd9f8a1 authored by Andrew Jiang's avatar Andrew Jiang Committed by Alex Deucher

drm/amd/display: Loosen plane_info and scaling_info checks

Make it so that differing dcc and plane size fields don't necessarily
result in a full update, along with upscaling modes. This allows us to
save some unnecessary full updates.
Signed-off-by: default avatarAndrew Jiang <Andrew.Jiang@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 2a875c41
...@@ -1169,9 +1169,7 @@ static enum surface_update_type get_plane_info_update_type( ...@@ -1169,9 +1169,7 @@ static enum surface_update_type get_plane_info_update_type(
/* Full update parameters */ /* Full update parameters */
temp_plane_info.color_space = u->surface->color_space; temp_plane_info.color_space = u->surface->color_space;
temp_plane_info.input_tf = u->surface->input_tf; temp_plane_info.input_tf = u->surface->input_tf;
temp_plane_info.dcc = u->surface->dcc;
temp_plane_info.horizontal_mirror = u->surface->horizontal_mirror; temp_plane_info.horizontal_mirror = u->surface->horizontal_mirror;
temp_plane_info.plane_size = u->surface->plane_size;
temp_plane_info.rotation = u->surface->rotation; temp_plane_info.rotation = u->surface->rotation;
temp_plane_info.stereo_format = u->surface->stereo_format; temp_plane_info.stereo_format = u->surface->stereo_format;
...@@ -1214,14 +1212,23 @@ static enum surface_update_type get_scaling_info_update_type( ...@@ -1214,14 +1212,23 @@ static enum surface_update_type get_scaling_info_update_type(
if (!u->scaling_info) if (!u->scaling_info)
return UPDATE_TYPE_FAST; return UPDATE_TYPE_FAST;
if (u->scaling_info->src_rect.width != u->surface->src_rect.width if (u->scaling_info->clip_rect.width != u->surface->clip_rect.width
|| u->scaling_info->src_rect.height != u->surface->src_rect.height
|| u->scaling_info->clip_rect.width != u->surface->clip_rect.width
|| u->scaling_info->clip_rect.height != u->surface->clip_rect.height || u->scaling_info->clip_rect.height != u->surface->clip_rect.height
|| u->scaling_info->dst_rect.width != u->surface->dst_rect.width || u->scaling_info->dst_rect.width != u->surface->dst_rect.width
|| u->scaling_info->dst_rect.height != u->surface->dst_rect.height) || u->scaling_info->dst_rect.height != u->surface->dst_rect.height)
return UPDATE_TYPE_FULL; return UPDATE_TYPE_FULL;
if (u->scaling_info->src_rect.width != u->surface->src_rect.width
|| u->scaling_info->src_rect.height != u->surface->src_rect.height) {
if (u->scaling_info->src_rect.width > u->surface->src_rect.width
&& u->scaling_info->src_rect.height > u->surface->src_rect.height)
return UPDATE_TYPE_FULL;
/* Upscaling does not require a full update */
return UPDATE_TYPE_MED;
}
if (u->scaling_info->src_rect.x != u->surface->src_rect.x if (u->scaling_info->src_rect.x != u->surface->src_rect.x
|| u->scaling_info->src_rect.y != u->surface->src_rect.y || u->scaling_info->src_rect.y != u->surface->src_rect.y
|| u->scaling_info->clip_rect.x != u->surface->clip_rect.x || u->scaling_info->clip_rect.x != u->surface->clip_rect.x
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment