drm/amd/display: remove surface validation against stream rect
authorReza Amini <reza.amini@amd.com>
Fri, 17 Mar 2017 19:24:09 +0000 (15:24 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:21:52 +0000 (17:21 -0400)
Surface information is by default copied from old context in dc_commit_stream.
Thus unchange streams will not be affected. For new streams, we shouldn't
validate the new mode against the surface configuration of old_context.

Signed-off-by: Reza Amini <reza.amini@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c

index d1685df09815bca3607fdbafebc96d5b8606cc4e..7fae8537e18af065beaf8edf323be4ac7cdea28d 100644 (file)
@@ -788,11 +788,6 @@ static bool dce100_validate_surface_sets(
                if (set[i].surface_count > 1)
                        return false;
 
-               if (set[i].surfaces[0]->clip_rect.width
-                               < set[i].stream->src.width
-                               || set[i].surfaces[0]->clip_rect.height
-                               < set[i].stream->src.height)
-                       return false;
                if (set[i].surfaces[0]->format
                                >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
                        return false;
index 065a2986b666661d75c29dcf34fb3d1cd1caaa57..b4ab438e1c9729460d8601bf89df7389eed253c5 100644 (file)
@@ -1007,11 +1007,6 @@ static bool dce110_validate_surface_sets(
                if (set[i].surface_count > 2)
                        return false;
 
-               if (set[i].surfaces[0]->clip_rect.width
-                               > set[i].stream->src.width
-                               || set[i].surfaces[0]->clip_rect.height
-                               > set[i].stream->src.height)
-                       return false;
                if (set[i].surfaces[0]->format
                                >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
                        return false;
index ece3ec72363d56bd8c0a713ab2daaed9626baa04..0a1ad2808129a454f35b5b046f08672d7ed45647 100644 (file)
@@ -972,11 +972,6 @@ static bool dce112_validate_surface_sets(
                if (set[i].surface_count > 1)
                        return false;
 
-               if (set[i].surfaces[0]->clip_rect.width
-                               > set[i].stream->src.width
-                               || set[i].surfaces[0]->clip_rect.height
-                               > set[i].stream->src.height)
-                       return false;
                if (set[i].surfaces[0]->format
                                >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
                        return false;
index 752e0e7579b90c963a7262f3a0da07c26e3b3828..ab8cee3e734e8db73f03311807b141230b0d3108 100644 (file)
@@ -804,11 +804,6 @@ static bool dce80_validate_surface_sets(
                if (set[i].surface_count > 1)
                        return false;
 
-               if (set[i].surfaces[0]->clip_rect.width
-                               > set[i].stream->src.width
-                               || set[i].surfaces[0]->clip_rect.height
-                               > set[i].stream->src.height)
-                       return false;
                if (set[i].surfaces[0]->format
                                >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN)
                        return false;