From e36522a24e9c8e8bb6e9505b9993077560636804 Mon Sep 17 00:00:00 2001 From: Eric Yang Date: Fri, 19 Feb 2016 15:55:51 -0500 Subject: [PATCH 0822/1110] drm/amd/dal: refactor transform header for HW pseudocode Make transform.h self contained, meaning all types used in this file are defined in the file itself or in dc_hw_types.h, this way HW team can see everything they need from the HW headers Signed-off-by: Eric Yang Acked-by: Harry Wentland --- drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c | 1 - drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h | 2 -- drivers/gpu/drm/amd/dal/dc/dc_hw_types.h | 10 ++++++++++ drivers/gpu/drm/amd/dal/dc/dc_types.h | 14 ------------- drivers/gpu/drm/amd/dal/dc/inc/core_types.h | 1 + drivers/gpu/drm/amd/dal/dc/inc/transform.h | 25 +++++++++++++++++++++++- drivers/gpu/drm/amd/dal/include/scaler_types.h | 17 ---------------- 7 files changed, 35 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c b/drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c index 2fc1809..6f0f64a 100644 --- a/drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c +++ b/drivers/gpu/drm/amd/dal/dc/calcs/gamma_calcs.c @@ -25,7 +25,6 @@ #include "dm_services.h" #include "gamma_calcs.h" -#include "core_types.h" struct curve_config { uint32_t offset; diff --git a/drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h b/drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h index 668691d..220b736 100644 --- a/drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h +++ b/drivers/gpu/drm/amd/dal/dc/calcs/scaler_filter.h @@ -38,8 +38,6 @@ struct scaler_filter_params { } flags; }; -struct q31_32; - struct scaler_filter { struct scaler_filter_params params; uint32_t src_size; diff --git a/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h b/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h index f11a78d..d1d2f57 100644 --- a/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h +++ b/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h @@ -373,5 +373,15 @@ enum dc_color_depth { COLOR_DEPTH_COUNT }; +/* XFM */ + +/* used in struct dc_surface */ +struct scaling_taps { + uint32_t v_taps; + uint32_t h_taps; + uint32_t v_taps_c; + uint32_t h_taps_c; +}; + #endif /* DC_HW_TYPES_H */ diff --git a/drivers/gpu/drm/amd/dal/dc/dc_types.h b/drivers/gpu/drm/amd/dal/dc/dc_types.h index bcbb911..219fe77 100644 --- a/drivers/gpu/drm/amd/dal/dc/dc_types.h +++ b/drivers/gpu/drm/amd/dal/dc/dc_types.h @@ -172,20 +172,6 @@ struct dc_edid_caps { uint8_t lte_340mcsc_scramble; }; -struct scaling_taps { - uint32_t v_taps; - uint32_t h_taps; - uint32_t v_taps_c; - uint32_t h_taps_c; -}; - -struct scaling_ratios { - struct fixed31_32 horz; - struct fixed31_32 vert; - struct fixed31_32 horz_c; - struct fixed31_32 vert_c; -}; - struct view { uint32_t width; uint32_t height; diff --git a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h index d638054..ff34292 100644 --- a/drivers/gpu/drm/amd/dal/dc/inc/core_types.h +++ b/drivers/gpu/drm/amd/dal/dc/inc/core_types.h @@ -231,6 +231,7 @@ void core_link_disable_stream(struct pipe_ctx *pipe_ctx); /********** DAL Core*********************/ #include "display_clock_interface.h" +#include "transform.h" struct resource_pool; struct validate_context; diff --git a/drivers/gpu/drm/amd/dal/dc/inc/transform.h b/drivers/gpu/drm/amd/dal/dc/inc/transform.h index 47adc1d..87dbff3 100644 --- a/drivers/gpu/drm/amd/dal/dc/inc/transform.h +++ b/drivers/gpu/drm/amd/dal/dc/inc/transform.h @@ -28,7 +28,6 @@ #include "include/scaler_types.h" #include "calcs/scaler_filter.h" -#include "grph_object_id.h" struct bit_depth_reduction_params; @@ -135,6 +134,30 @@ struct xfm_grph_csc_adjustment { enum graphics_gamut_adjust_type gamut_adjust_type; }; +/*overscan or window*/ +struct overscan_info { + uint32_t left; + uint32_t right; + uint32_t top; + uint32_t bottom; +}; + +struct scaling_ratios { + struct fixed31_32 horz; + struct fixed31_32 vert; + struct fixed31_32 horz_c; + struct fixed31_32 vert_c; +}; + +struct scaler_data { + struct overscan_info overscan; + struct scaling_taps taps; + struct rect viewport; + struct scaling_ratios ratios; + + enum pixel_format format; +}; + struct transform_funcs { bool (*transform_power_up)( struct transform *xfm); diff --git a/drivers/gpu/drm/amd/dal/include/scaler_types.h b/drivers/gpu/drm/amd/dal/include/scaler_types.h index 3947776..0a31277 100644 --- a/drivers/gpu/drm/amd/dal/include/scaler_types.h +++ b/drivers/gpu/drm/amd/dal/include/scaler_types.h @@ -28,23 +28,6 @@ #include "dc_types.h" -/*overscan or window*/ -struct overscan_info { - uint32_t left; - uint32_t right; - uint32_t top; - uint32_t bottom; -}; - -struct scaler_data { - struct overscan_info overscan; - struct scaling_taps taps; - struct rect viewport; - struct scaling_ratios ratios; - - enum pixel_format format; -}; - struct init_int_and_frac { uint32_t integer; uint32_t fraction; -- 2.7.4