drm/amd/display: Add APU cap in dc_caps
authorAnthony Koo <Anthony.Koo@amd.com>
Mon, 16 Oct 2017 14:43:59 +0000 (10:43 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Dec 2017 21:33:20 +0000 (16:33 -0500)
Some features should only be enabled on APUs or should not
be enabled on APUs.

Signed-off-by: Anthony Koo <anthony.koo@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>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h
drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c

index 7240db2e6f095ebde8d2b685c0dd17b281c8e6d3..e8894ad3adf42209082f21b9c8055230fad78ca2 100644 (file)
@@ -558,6 +558,7 @@ static bool construct(struct dc *dc,
 
        dc_version = resource_parse_asic_id(init_params->asic_id);
        dc->ctx->dce_version = dc_version;
+
 #if defined(CONFIG_DRM_AMD_DC_FBC)
        dc->ctx->fbc_gpu_addr = init_params->fbc_gpu_addr;
 #endif
index 9d8f4a55c74e98c9c6c1e0a424bf00b00397a9b7..9ca838b3c4d7b0f4a62b2e7ba38da46c3b45efd4 100644 (file)
@@ -60,6 +60,7 @@ struct dc_caps {
        unsigned int max_video_width;
        bool dcc_const_color;
        bool dynamic_audio;
+       bool is_apu;
 };
 
 struct dc_dcc_surface_param {
index 61adb8174ce09f8be177a4a2e300cdcb2327cf1f..5228ee78f7e6dc38384cb96f0bc733531c5cce68 100644 (file)
@@ -1156,6 +1156,7 @@ static bool construct(
        dc->caps.max_downscale_ratio = 150;
        dc->caps.i2c_speed_in_khz = 100;
        dc->caps.max_cursor_size = 128;
+       dc->caps.is_apu = true;
 
        /*************************************************
         *  Create resources                             *
index 9c18efd3446f502b1669a3f8fd69346cbf44c31b..8f2bd56f3461d665e8dd7c15e6280b32b0f135c1 100644 (file)
@@ -957,6 +957,7 @@ static bool dce81_construct(
        dc->caps.max_downscale_ratio = 200;
        dc->caps.i2c_speed_in_khz = 40;
        dc->caps.max_cursor_size = 128;
+       dc->caps.is_apu = true;
 
        /*************************************************
         *  Create resources                             *
@@ -1121,6 +1122,7 @@ static bool dce83_construct(
        dc->caps.max_downscale_ratio = 200;
        dc->caps.i2c_speed_in_khz = 40;
        dc->caps.max_cursor_size = 128;
+       dc->caps.is_apu = true;
 
        /*************************************************
         *  Create resources                             *
index 9fc8f827f2a187f0f72dbc888a1ca25d85986205..f59b2ab6c1345a511d79926da4af353f74b28041 100644 (file)
@@ -1235,6 +1235,7 @@ static bool construct(
        dc->caps.max_cursor_size = 256;
 
        dc->caps.max_slave_planes = 1;
+       dc->caps.is_apu = true;
 
        if (dc->ctx->dce_environment == DCE_ENV_PRODUCTION_DRV)
                dc->debug = debug_defaults_drv;