aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0877-drm-amd-dal-Return-dc_version-directly-from-parse_as.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/files/0877-drm-amd-dal-Return-dc_version-directly-from-parse_as.patch')
-rw-r--r--common/recipes-kernel/linux/files/0877-drm-amd-dal-Return-dc_version-directly-from-parse_as.patch157
1 files changed, 157 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0877-drm-amd-dal-Return-dc_version-directly-from-parse_as.patch b/common/recipes-kernel/linux/files/0877-drm-amd-dal-Return-dc_version-directly-from-parse_as.patch
new file mode 100644
index 00000000..1f28c0ac
--- /dev/null
+++ b/common/recipes-kernel/linux/files/0877-drm-amd-dal-Return-dc_version-directly-from-parse_as.patch
@@ -0,0 +1,157 @@
+From 2eb80bad732ca2e939df6e0699859016d059b8ab Mon Sep 17 00:00:00 2001
+From: Jordan Lazare <Jordan.Lazare@amd.com>
+Date: Wed, 2 Mar 2016 15:14:18 -0500
+Subject: [PATCH 0877/1110] drm/amd/dal: Return dc_version directly from
+ parse_asic_id
+
+No need to pass the output as a parameter.
+
+Signed-off-by: Jordan Lazare <Jordan.Lazare@amd.com>
+Acked-by: Harry Wentland <harry.wentland@amd.com>
+---
+ drivers/gpu/drm/amd/dal/dc/core/dc.c | 2 +-
+ drivers/gpu/drm/amd/dal/dc/core/dc_resource.c | 20 +++++++-------
+ drivers/gpu/drm/amd/dal/dc/inc/resource.h | 38 +++++++++++++--------------
+ 3 files changed, 30 insertions(+), 30 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc.c b/drivers/gpu/drm/amd/dal/dc/core/dc.c
+index b533b59..a25741d 100644
+--- a/drivers/gpu/drm/amd/dal/dc/core/dc.c
++++ b/drivers/gpu/drm/amd/dal/dc/core/dc.c
+@@ -327,7 +327,7 @@ static bool construct(struct core_dc *dc, const struct dc_init_data *init_params
+ dc->ctx->dce_environment = init_params->dce_environment;
+
+
+- resource_parse_asic_id(dc, init_params->asic_id, &dc_version);
++ dc_version = resource_parse_asic_id(init_params->asic_id);
+
+
+ /* TODO: Refactor DCE code to remove AS and asic caps */
+diff --git a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
+index 2229699..ba163c3 100644
+--- a/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
++++ b/drivers/gpu/drm/amd/dal/dc/core/dc_resource.c
+@@ -42,21 +42,21 @@
+ #include "dce110/dce110_resource.h"
+ #endif
+
+-bool resource_parse_asic_id(struct core_dc *dc,
+- struct hw_asic_id asic_id,
+- enum dce_version *dc_version)
+-{
++enum dce_version resource_parse_asic_id(struct hw_asic_id asic_id)
++ {
++ enum dce_version dc_version = DCE_VERSION_UNKNOWN;
++
+ switch (asic_id.chip_family) {
+
+ #if defined(CONFIG_DRM_AMD_DAL_DCE8_0)
+ case FAMILY_CI:
+ case FAMILY_KV:
+- *dc_version = DCE_VERSION_8_0;
++ dc_version = DCE_VERSION_8_0;
+ break;
+ #endif
+ #if defined(CONFIG_DRM_AMD_DAL_DCE11_0)
+ case FAMILY_CZ:
+- *dc_version = DCE_VERSION_11_0;
++ dc_version = DCE_VERSION_11_0;
+ break;
+ #endif
+
+@@ -64,16 +64,16 @@ bool resource_parse_asic_id(struct core_dc *dc,
+ #if defined(CONFIG_DRM_AMD_DAL_DCE10_0)
+ if (ASIC_REV_IS_TONGA_P(asic_id.hw_internal_rev) ||
+ ASIC_REV_IS_FIJI_P(asic_id.hw_internal_rev)) {
+- *dc_version = DCE_VERSION_10_0;
++ dc_version = DCE_VERSION_10_0;
+ break;
+ }
+ #endif
+ break;
+ default:
+- *dc_version = DCE_VERSION_UNKNOWN;
+- return false;
++ dc_version = DCE_VERSION_UNKNOWN;
++ break;
+ }
+- return true;
++ return dc_version;
+ }
+
+ bool dc_construct_resource_pool(struct adapter_service *adapter_serv,
+diff --git a/drivers/gpu/drm/amd/dal/dc/inc/resource.h b/drivers/gpu/drm/amd/dal/dc/inc/resource.h
+index 9aefe9e..45ee324 100644
+--- a/drivers/gpu/drm/amd/dal/dc/inc/resource.h
++++ b/drivers/gpu/drm/amd/dal/dc/inc/resource.h
+@@ -34,26 +34,26 @@
+ #define MEMORY_TYPE_MULTIPLIER 4
+ #define DCE110_UNDERLAY_IDX 3
+
+-bool resource_parse_asic_id(struct core_dc *dc,
+- struct hw_asic_id asic_id,
+- enum dce_version *dc_version);
++enum dce_version resource_parse_asic_id(
++ struct hw_asic_id asic_id);
+
+-bool dc_construct_resource_pool(struct adapter_service *adapter_serv,
+- struct core_dc *dc,
+- uint8_t num_virtual_links,
+- enum dce_version dc_version);
++bool dc_construct_resource_pool(
++ struct adapter_service *adapter_serv,
++ struct core_dc *dc,
++ uint8_t num_virtual_links,
++ enum dce_version dc_version);
+
+ enum dc_status resource_map_pool_resources(
+- const struct core_dc *dc,
+- struct validate_context *context);
++ const struct core_dc *dc,
++ struct validate_context *context);
+
+ void resource_build_scaling_params(
+- const struct dc_surface *surface,
+- struct pipe_ctx *pipe_ctx);
++ const struct dc_surface *surface,
++ struct pipe_ctx *pipe_ctx);
+
+ void resource_build_scaling_params_for_context(
+- const struct core_dc *dc,
+- struct validate_context *context);
++ const struct core_dc *dc,
++ struct validate_context *context);
+
+ void resource_build_info_frame(struct pipe_ctx *pipe_ctx);
+
+@@ -66,12 +66,12 @@ void resource_reference_clock_source(
+ struct clock_source *clock_source);
+
+ bool resource_is_same_timing(
+- const struct dc_crtc_timing *timing1,
+- const struct dc_crtc_timing *timing2);
++ const struct dc_crtc_timing *timing1,
++ const struct dc_crtc_timing *timing2);
+
+ struct clock_source *resource_find_used_clk_src_for_sharing(
+- struct resource_context *res_ctx,
+- struct pipe_ctx *pipe_ctx);
++ struct resource_context *res_ctx,
++ struct pipe_ctx *pipe_ctx);
+
+ struct clock_source *dc_resource_find_first_free_pll(
+ struct resource_context *res_ctx);
+@@ -83,8 +83,8 @@ bool resource_attach_surfaces_to_context(
+ struct validate_context *context);
+
+ void resource_validate_ctx_copy_construct(
+- const struct validate_context *src_ctx,
+- struct validate_context *dst_ctx);
++ const struct validate_context *src_ctx,
++ struct validate_context *dst_ctx);
+
+ void resource_validate_ctx_destruct(struct validate_context *context);
+
+--
+2.7.4
+