aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc_hw_types.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dc_hw_types.h122
1 files changed, 121 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
index da55d623647a..22db5682aa6c 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_hw_types.h
@@ -99,6 +99,8 @@ struct dc_plane_address {
};
union large_integer page_table_base;
+
+ uint8_t vmid;
};
struct dc_size {
@@ -194,6 +196,12 @@ enum surface_pixel_format {
/*swaped & float*/
SURFACE_PIXEL_FORMAT_GRPH_ABGR16161616F,
/*grow graphics here if necessary */
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+ SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FIX,
+ SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FIX,
+ SURFACE_PIXEL_FORMAT_GRPH_RGB111110_FLOAT,
+ SURFACE_PIXEL_FORMAT_GRPH_BGR101111_FLOAT,
+#endif
SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
SURFACE_PIXEL_FORMAT_VIDEO_420_YCbCr =
SURFACE_PIXEL_FORMAT_VIDEO_BEGIN,
@@ -201,6 +209,10 @@ enum surface_pixel_format {
SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCbCr,
SURFACE_PIXEL_FORMAT_VIDEO_420_10bpc_YCrCb,
SURFACE_PIXEL_FORMAT_SUBSAMPLE_END,
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+ SURFACE_PIXEL_FORMAT_VIDEO_ACrYCb2101010,
+ SURFACE_PIXEL_FORMAT_VIDEO_CrYCbA1010102,
+#endif
SURFACE_PIXEL_FORMAT_VIDEO_AYCrCb8888,
SURFACE_PIXEL_FORMAT_INVALID
@@ -239,6 +251,13 @@ enum tile_split_values {
DC_ROTATED_MICRO_TILING = 0x3,
};
+#ifdef CONFIG_DRM_AMD_DC_DCN2_0
+enum tripleBuffer_enable {
+ DC_TRIPLEBUFFER_DISABLE = 0x0,
+ DC_TRIPLEBUFFER_ENABLE = 0x1,
+};
+#endif
+
/* TODO: These values come from hardware spec. We need to readdress this
* if they ever change.
*/
@@ -437,6 +456,14 @@ struct dc_csc_transform {
bool enable_adjustment;
};
+#ifdef CONFIG_DRM_AMD_DC_DCN2_0
+struct dc_rgb_fixed {
+ struct fixed31_32 red;
+ struct fixed31_32 green;
+ struct fixed31_32 blue;
+};
+#endif
+
struct dc_gamma {
struct kref refcount;
enum dc_gamma_type type;
@@ -451,7 +478,11 @@ struct dc_gamma {
/* private to DC core */
struct dc_context *ctx;
+ /* is_identity is used for RGB256 gamma identity which can also be programmed in INPUT_LUT.
+ * is_logical_identity indicates the given gamma ramp regardless of type is identity.
+ */
bool is_identity;
+ bool is_logical_identity;
};
/* Used by both ipp amd opp functions*/
@@ -466,7 +497,11 @@ 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
+ CURSOR_MODE_COLOR_UN_PRE_MULTIPLIED_ALPHA,
+#if defined(CONFIG_DRM_AMD_DC_DCN2_0)
+ CURSOR_MODE_COLOR_64BIT_FP_PRE_MULTIPLIED,
+ CURSOR_MODE_COLOR_64BIT_FP_UN_PRE_MULTIPLIED
+#endif
};
/*
@@ -534,6 +569,7 @@ enum dc_color_space {
COLOR_SPACE_DOLBYVISION,
COLOR_SPACE_APPCTRL,
COLOR_SPACE_CUSTOMPOINTS,
+ COLOR_SPACE_YCBCR709_BLACK,
};
enum dc_dither_option {
@@ -611,6 +647,10 @@ enum dc_color_depth {
COLOR_DEPTH_121212,
COLOR_DEPTH_141414,
COLOR_DEPTH_161616,
+#ifdef CONFIG_DRM_AMD_DC_DCN2_0
+ COLOR_DEPTH_999,
+ COLOR_DEPTH_111111,
+#endif
COLOR_DEPTH_COUNT
};
@@ -671,6 +711,9 @@ struct dc_crtc_timing_flags {
* rates less than or equal to 340Mcsc */
uint32_t LTE_340MCSC_SCRAMBLE:1;
+#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
+ uint32_t DSC : 1; /* Use DSC with this timing */
+#endif
};
enum dc_timing_3d_format {
@@ -717,6 +760,18 @@ struct dc_crtc_timing_adjust {
uint32_t v_total_max;
};
+#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
+struct dc_dsc_config {
+ uint32_t num_slices_h; /* Number of DSC slices - horizontal */
+ uint32_t num_slices_v; /* Number of DSC slices - vertical */
+ uint32_t bits_per_pixel; /* DSC target bitrate in 1/16 of bpp (e.g. 128 -> 8bpp) */
+ bool block_pred_enable; /* DSC block prediction enable */
+ uint32_t linebuf_depth; /* DSC line buffer depth */
+ uint32_t version_minor; /* DSC minor version. Full version is formed as 1.version_minor. */
+ bool ycbcr422_simple; /* Tell DSC engine to convert YCbCr 4:2:2 to 'YCbCr 4:2:2 simple'. */
+ int32_t rc_buffer_size; /* DSC RC buffer block size in bytes */
+};
+#endif
struct dc_crtc_timing {
uint32_t h_total;
uint32_t h_border_left;
@@ -743,8 +798,73 @@ struct dc_crtc_timing {
enum scanning_type scan_type;
struct dc_crtc_timing_flags flags;
+#ifdef CONFIG_DRM_AMD_DC_DSC_SUPPORT
+ struct dc_dsc_config dsc_cfg;
+#endif
};
+/* Passed on init */
+enum vram_type {
+ VIDEO_MEMORY_TYPE_GDDR5 = 2,
+ VIDEO_MEMORY_TYPE_DDR3 = 3,
+ VIDEO_MEMORY_TYPE_DDR4 = 4,
+ VIDEO_MEMORY_TYPE_HBM = 5,
+ VIDEO_MEMORY_TYPE_GDDR6 = 6,
+};
+
+#ifdef CONFIG_DRM_AMD_DC_DCN2_0
+enum dwb_cnv_out_bpc {
+ DWB_CNV_OUT_BPC_8BPC = 0,
+ DWB_CNV_OUT_BPC_10BPC = 1,
+};
+
+enum dwb_output_depth {
+ DWB_OUTPUT_PIXEL_DEPTH_8BPC = 0,
+ DWB_OUTPUT_PIXEL_DEPTH_10BPC = 1,
+};
+
+enum dwb_capture_rate {
+ dwb_capture_rate_0 = 0, /* Every frame is captured. */
+ dwb_capture_rate_1 = 1, /* Every other frame is captured. */
+ dwb_capture_rate_2 = 2, /* Every 3rd frame is captured. */
+ dwb_capture_rate_3 = 3, /* Every 4th frame is captured. */
+};
+
+enum dwb_scaler_mode {
+ dwb_scaler_mode_bypass444 = 0,
+ dwb_scaler_mode_rgb444 = 1,
+ dwb_scaler_mode_yuv444 = 2,
+ dwb_scaler_mode_yuv420 = 3
+};
+
+enum dwb_subsample_position {
+ DWB_INTERSTITIAL_SUBSAMPLING = 0,
+ DWB_COSITED_SUBSAMPLING = 1
+};
+
+enum dwb_stereo_eye_select {
+ DWB_STEREO_EYE_LEFT = 1, /* Capture left eye only */
+ DWB_STEREO_EYE_RIGHT = 2, /* Capture right eye only */
+};
+
+enum dwb_stereo_type {
+ DWB_STEREO_TYPE_FRAME_PACKING = 0, /* Frame packing */
+ DWB_STEREO_TYPE_FRAME_SEQUENTIAL = 3, /* Frame sequential */
+};
+
+#define MCIF_BUF_COUNT 4
+
+struct mcif_buf_params {
+ unsigned long long luma_address[MCIF_BUF_COUNT];
+ unsigned long long chroma_address[MCIF_BUF_COUNT];
+ unsigned int luma_pitch;
+ unsigned int chroma_pitch;
+ unsigned int warmup_pitch;
+ unsigned int swlock;
+};
+
+#endif
+
#define MAX_TG_COLOR_VALUE 0x3FF
struct tg_color {
/* Maximum 10 bits color value */