drm/amd/display: Add check for validating unsupported ODM plus MPO case
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / display / dc / core / dc_resource.c
index 7f12ca9..a60396d 100644 (file)
@@ -1051,6 +1051,11 @@ bool resource_build_scaling_params(struct pipe_ctx *pipe_ctx)
        /* depends on scaling ratios and recout, does not calculate offset yet */
        calculate_viewport_size(pipe_ctx);
 
+       /* Stopgap for validation of ODM + MPO on one side of screen case */
+       if (pipe_ctx->plane_res.scl_data.viewport.height < 1 ||
+                       pipe_ctx->plane_res.scl_data.viewport.width < 1)
+               return false;
+
        /*
         * LB calculations depend on vp size, h/v_active and scaling ratios
         * Setting line buffer pixel depth to 24bpp yields banding