diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0811-drm-amd-dal-refactor-ipp-header-for-HW-pseudo-code.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0811-drm-amd-dal-refactor-ipp-header-for-HW-pseudo-code.patch | 241 |
1 files changed, 241 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0811-drm-amd-dal-refactor-ipp-header-for-HW-pseudo-code.patch b/common/recipes-kernel/linux/files/0811-drm-amd-dal-refactor-ipp-header-for-HW-pseudo-code.patch new file mode 100644 index 00000000..6c24383d --- /dev/null +++ b/common/recipes-kernel/linux/files/0811-drm-amd-dal-refactor-ipp-header-for-HW-pseudo-code.patch @@ -0,0 +1,241 @@ +From 0fbec3793881bf34bebbb67ab2f71bbaaa630b92 Mon Sep 17 00:00:00 2001 +From: Eric Yang <eric.yang2@amd.com> +Date: Thu, 18 Feb 2016 12:37:30 -0500 +Subject: [PATCH 0811/1110] drm/amd/dal: refactor ipp header for HW pseudo code + +Make sure all types used in ipp.h are either in the file +itself or in dc_hw_types.h so that they are visible for +HW diag team when then write their pseudo code + +Signed-off-by: Eric Yang <eric.yang2@amd.com> +Acked-by: Harry Wentland <harry.wentland@amd.com> +--- + drivers/gpu/drm/amd/dal/dc/dc_hw_types.h | 87 +++++++++++++++++++++++ + drivers/gpu/drm/amd/dal/dc/dc_types.h | 71 ------------------ + drivers/gpu/drm/amd/dal/dc/inc/gamma_types.h | 5 -- + drivers/gpu/drm/amd/dal/include/video_csc_types.h | 7 -- + 4 files changed, 87 insertions(+), 83 deletions(-) + +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 71d6301..2a9ec19 100644 +--- a/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h ++++ b/drivers/gpu/drm/amd/dal/dc/dc_hw_types.h +@@ -278,5 +278,92 @@ struct dc_cursor_position { + bool hot_spot_enable; + }; + ++/* IPP related types */ ++ ++/* Used by both ipp amd opp functions*/ ++/* TODO: to be consolidated with enum color_space */ ++enum ovl_color_space { ++ OVL_COLOR_SPACE_UNKNOWN = 0, ++ OVL_COLOR_SPACE_RGB, ++ OVL_COLOR_SPACE_YUV601, ++ OVL_COLOR_SPACE_YUV709 ++}; ++ ++/* ++ * This enum is for programming CURSOR_MODE register field. What this register ++ * should be programmed to depends on OS requested cursor shape flags and what ++ * we stored in the cursor surface. ++ */ ++enum dc_cursor_color_format { ++ CURSOR_MODE_MONO, ++ CURSOR_MODE_COLOR_1BIT_AND, ++ CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA, ++ CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA ++}; ++ ++/* ++ * This is all the parameters required by DAL in order to update the cursor ++ * attributes, including the new cursor image surface address, size, hotspot ++ * location, color format, etc. ++ */ ++ ++union dc_cursor_attribute_flags { ++ struct { ++ uint32_t ENABLE_MAGNIFICATION:1; ++ uint32_t INVERSE_TRANSPARENT_CLAMPING:1; ++ uint32_t HORIZONTAL_MIRROR:1; ++ uint32_t VERTICAL_MIRROR:1; ++ uint32_t RESERVED:28; ++ } bits; ++ uint32_t value; ++}; ++ ++struct dc_cursor_attributes { ++ PHYSICAL_ADDRESS_LOC address; ++ ++ /* Width and height should correspond to cursor surface width x heigh */ ++ uint32_t width; ++ uint32_t height; ++ uint32_t x_hot; ++ uint32_t y_hot; ++ ++ enum dc_cursor_color_format color_format; ++ ++ /* In case we support HW Cursor rotation in the future */ ++ enum dc_rotation_angle rotation_angle; ++ ++ union dc_cursor_attribute_flags attribute_flags; ++}; ++ ++/* Pixel format */ ++enum pixel_format { ++ /*graph*/ ++ PIXEL_FORMAT_UNINITIALIZED, ++ PIXEL_FORMAT_INDEX8, ++ PIXEL_FORMAT_RGB565, ++ PIXEL_FORMAT_ARGB8888, ++ PIXEL_FORMAT_ARGB2101010, ++ PIXEL_FORMAT_ARGB2101010_XRBIAS, ++ PIXEL_FORMAT_FP16, ++ /*video*/ ++ PIXEL_FORMAT_420BPP12, ++ PIXEL_FORMAT_422BPP16, ++ PIXEL_FORMAT_444BPP16, ++ PIXEL_FORMAT_444BPP32, ++ /*end of pixel format definition*/ ++ PIXEL_FORMAT_INVALID, ++ ++ PIXEL_FORMAT_GRPH_BEGIN = PIXEL_FORMAT_INDEX8, ++ PIXEL_FORMAT_GRPH_END = PIXEL_FORMAT_FP16, ++ PIXEL_FORMAT_VIDEO_BEGIN = PIXEL_FORMAT_420BPP12, ++ PIXEL_FORMAT_VIDEO_END = PIXEL_FORMAT_444BPP32, ++ PIXEL_FORMAT_UNKNOWN ++}; ++ ++struct dev_c_lut { ++ uint8_t red; ++ uint8_t green; ++ uint8_t blue; ++}; + #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 863443b..4e36b85 100644 +--- a/drivers/gpu/drm/amd/dal/dc/dc_types.h ++++ b/drivers/gpu/drm/amd/dal/dc/dc_types.h +@@ -80,33 +80,6 @@ enum color_space { + COLOR_SPACE_N_MVPU_SUPER_AA, + }; + +- +- +-/* Pixel format */ +-enum pixel_format { +- /*graph*/ +- PIXEL_FORMAT_UNINITIALIZED, +- PIXEL_FORMAT_INDEX8, +- PIXEL_FORMAT_RGB565, +- PIXEL_FORMAT_ARGB8888, +- PIXEL_FORMAT_ARGB2101010, +- PIXEL_FORMAT_ARGB2101010_XRBIAS, +- PIXEL_FORMAT_FP16, +- /*video*/ +- PIXEL_FORMAT_420BPP12, +- PIXEL_FORMAT_422BPP16, +- PIXEL_FORMAT_444BPP16, +- PIXEL_FORMAT_444BPP32, +- /*end of pixel format definition*/ +- PIXEL_FORMAT_INVALID, +- +- PIXEL_FORMAT_GRPH_BEGIN = PIXEL_FORMAT_INDEX8, +- PIXEL_FORMAT_GRPH_END = PIXEL_FORMAT_FP16, +- PIXEL_FORMAT_VIDEO_BEGIN = PIXEL_FORMAT_420BPP12, +- PIXEL_FORMAT_VIDEO_END = PIXEL_FORMAT_444BPP32, +- PIXEL_FORMAT_UNKNOWN +-}; +- + enum tiling_mode { + TILING_MODE_INVALID, + TILING_MODE_LINEAR, +@@ -472,50 +445,6 @@ struct dc_mode_timing { + struct dc_crtc_timing crtc_timing; + }; + +-/* This enum is for programming CURSOR_MODE register field. */ +-/* What this register should be programmed to depends on */ +-/* OS requested cursor shape flags */ +-/* and what we stored in the cursor surface. */ +-enum dc_cursor_color_format { +- CURSOR_MODE_MONO, +- CURSOR_MODE_COLOR_1BIT_AND, +- CURSOR_MODE_COLOR_PRE_MULTIPLIED_ALPHA, +- CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA +-}; +- +-union dc_cursor_attribute_flags { +- struct { +- uint32_t ENABLE_MAGNIFICATION:1; +- uint32_t INVERSE_TRANSPARENT_CLAMPING:1; +- uint32_t HORIZONTAL_MIRROR:1; +- uint32_t VERTICAL_MIRROR:1; +- uint32_t RESERVED:28; +- } bits; +- uint32_t value; +-}; +- +-/* This is all the parameters required by DAL in order to */ +-/* update the cursor attributes, */ +-/* including the new cursor image surface address, size, */ +-/* hotspot location, color format, etc. */ +-struct dc_cursor_attributes { +- PHYSICAL_ADDRESS_LOC address; +- +- /* Width and height should correspond to cursor surface width x heigh */ +- uint32_t width; +- uint32_t height; +- uint32_t x_hot; +- uint32_t y_hot; +- +- enum dc_cursor_color_format color_format; +- +- /* In case we support HW Cursor rotation in the future */ +- enum dc_rotation_angle rotation_angle; +- +- union dc_cursor_attribute_flags attribute_flags; +- +-}; +- + enum dc_power_state { + DC_POWER_STATE_ON = 1, + DC_POWER_STATE_STANDBY, +diff --git a/drivers/gpu/drm/amd/dal/dc/inc/gamma_types.h b/drivers/gpu/drm/amd/dal/dc/inc/gamma_types.h +index ca23e1b..f1cdce8 100644 +--- a/drivers/gpu/drm/amd/dal/dc/inc/gamma_types.h ++++ b/drivers/gpu/drm/amd/dal/dc/inc/gamma_types.h +@@ -29,11 +29,6 @@ + #include "dc_types.h" + + /* TODO: Used in IPP and OPP */ +-struct dev_c_lut { +- uint8_t red; +- uint8_t green; +- uint8_t blue; +-}; + + struct dev_c_lut16 { + uint16_t red; +diff --git a/drivers/gpu/drm/amd/dal/include/video_csc_types.h b/drivers/gpu/drm/amd/dal/include/video_csc_types.h +index e2a9343..354a01b 100644 +--- a/drivers/gpu/drm/amd/dal/include/video_csc_types.h ++++ b/drivers/gpu/drm/amd/dal/include/video_csc_types.h +@@ -33,13 +33,6 @@ enum ovl_alpha_blending_mode { + OVL_ALPHA_PER_PIXEL_OVL_ALPHA_MODE + }; + +-enum ovl_color_space { +- OVL_COLOR_SPACE_UNKNOWN = 0, +- OVL_COLOR_SPACE_RGB, +- OVL_COLOR_SPACE_YUV601, +- OVL_COLOR_SPACE_YUV709 +-}; +- + enum ovl_surface_format { + OVL_SURFACE_FORMAT_UNKNOWN = 0, + OVL_SURFACE_FORMAT_YUY2, +-- +2.7.4 + |