drm/amd/display: Don't reserve pipe for underlay on ASIC without underlay
authorHarry Wentland <harry.wentland@amd.com>
Mon, 23 Jan 2017 16:49:24 +0000 (11:49 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 21:11:28 +0000 (17:11 -0400)
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Jordan Lazare <Jordan.Lazare@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/core/dc.c
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c
drivers/gpu/drm/amd/display/dc/dce112/dce112_resource.c
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
drivers/gpu/drm/amd/display/dc/inc/core_types.h

index f9b7fc85d71ac81c1d478aa06dd879298a49a323..270f8c5cfeda6ea0cbaeaa38763ae327a08c104d 100644 (file)
@@ -621,7 +621,7 @@ struct dc *dc_create(const struct dc_init_data *init_params)
        core_dc->hwss.init_hw(core_dc);
 
        full_pipe_count = core_dc->res_pool->pipe_count;
-       if (core_dc->res_pool->underlay_pipe_index >= 0)
+       if (core_dc->res_pool->underlay_pipe_index != NO_UNDERLAY_PIPE)
                full_pipe_count--;
        core_dc->public.caps.max_streams = min(
                        full_pipe_count,
index ae0e7eac2c9de867efd62cd72672fb17173c749d..dc4f270ae44adfd8b8095b53bfdc5dc1512d7fad 100644 (file)
@@ -934,7 +934,7 @@ static bool construct(
 
        pool->base.res_cap = &res_cap;
        pool->base.funcs = &dce100_res_pool_funcs;
-       pool->base.underlay_pipe_index = -1;
+       pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
 
        bp = ctx->dc_bios;
 
@@ -1004,7 +1004,7 @@ static bool construct(
        /*************************************************
        *  Resource + asic cap harcoding                *
        *************************************************/
-       pool->base.underlay_pipe_index = -1;
+       pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
        pool->base.pipe_count = res_cap.num_timing_generator;
        dc->public.caps.max_downscale_ratio = 200;
        dc->public.caps.i2c_speed_in_khz = 40;
index 64fae91dd5ebe6680515a31eda59442ec2c97574..fa8699d3b9efd6fb82c750e53f35066406467f11 100644 (file)
@@ -1243,7 +1243,7 @@ static bool construct(
        /*************************************************
         *  Resource + asic cap harcoding                *
         *************************************************/
-       pool->base.underlay_pipe_index = -1;
+       pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
        pool->base.pipe_count = pool->base.res_cap->num_timing_generator;
        dc->public.caps.max_downscale_ratio = 200;
        dc->public.caps.i2c_speed_in_khz = 100;
index bee3a41ffe9f7ea17bd58085a04cc230bc625a56..fea60aa5d297df41ded9065ffff0beec8940f26a 100644 (file)
@@ -931,7 +931,7 @@ static bool construct(
        /*************************************************
         *  Resource + asic cap harcoding                *
         *************************************************/
-       pool->base.underlay_pipe_index = -1;
+       pool->base.underlay_pipe_index = NO_UNDERLAY_PIPE;
        pool->base.pipe_count = res_cap.num_timing_generator;
        dc->public.caps.max_downscale_ratio = 200;
        dc->public.caps.i2c_speed_in_khz = 40;
index 66bfcdb57c4c5fff684de7df9d69dd3ea8eb4926..b349b5768b6e859bbd962dff96274b1b03ab5a44 100644 (file)
@@ -230,6 +230,8 @@ struct audio_support{
        bool hdmi_audio_native;
 };
 
+#define NO_UNDERLAY_PIPE -1
+
 struct resource_pool {
        struct mem_input *mis[MAX_PIPES];
        struct input_pixel_processor *ipps[MAX_PIPES];