diff options
author | Corbin McElhanney <corbin.mcelhanney@amd.com> | 2017-06-01 15:40:04 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-26 18:07:46 -0400 |
commit | e7b1322e15ea66c135ff98c1eb15fc542ef79c89 (patch) | |
tree | d997d62c6dab667df9762ac7a60dcee1c4e8c35b /drivers/gpu/drm | |
parent | 9c42df59e44fd44cd84fe9ccd64f9f2942164d0f (diff) | |
download | linux-e7b1322e15ea66c135ff98c1eb15fc542ef79c89.tar.bz2 |
drm/amd/display: Don't update surface if dimensions are 0
Signed-off-by: Corbin McElhanney <corbin.mcelhanney@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 323a5e706908..976229eb2492 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -1250,8 +1250,15 @@ void dc_update_surfaces_and_stream(struct dc *dc, } } - /* only proceed if we need to make a surface update */ - if (!srf_updates) + /* do not perform surface update if surface has invalid dimensions + * (all zero) and no scaling_info is provided + */ + if (surface_count > 0 && + srf_updates->surface->src_rect.width == 0 && + srf_updates->surface->src_rect.height == 0 && + srf_updates->surface->dst_rect.width == 0 && + srf_updates->surface->dst_rect.height == 0 && + !srf_updates->scaling_info) return; update_type = dc_check_update_surfaces_for_stream( |