drm/amdgpu/display/dce11: only enable FBC when selected
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Nov 2018 15:54:27 +0000 (10:54 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 6 Nov 2018 21:46:12 +0000 (16:46 -0500)
Causes a black screen on a Stoney laptop.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=108577
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c

index e3624ca..7c9fd90 100644 (file)
@@ -1362,7 +1362,8 @@ static bool construct(
                pool->base.sw_i2cs[i] = NULL;
        }
 
-       dc->fbc_compressor = dce110_compressor_create(ctx);
+       if (dc->config.fbc_support)
+               dc->fbc_compressor = dce110_compressor_create(ctx);
 
        if (!underlay_create(ctx, &pool->base))
                goto res_create_fail;