// SPDX-License-Identifier: MIT
/*
* Copyright © 2020 Intel Corporation
*/
#include "i915_utils.h"
#include "intel_cx0_phy.h"
#include "intel_ddi.h"
#include "intel_ddi_buf_trans.h"
#include "intel_de.h"
#include "intel_display_types.h"
#include "intel_dp.h"
/* HDMI/DVI modes ignore everything but the last 2 items. So we share
* them for both DP and FDI transports, allowing those ports to
* automatically adapt to HDMI connections as well
*/
static const union intel_ddi_buf_trans_entry _hsw_trans_dp[] = {
{ .hsw = { 0 x00FFFFFF, 0 x0006000E, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x0005000A, 0 x0 } },
{ .hsw = { 0 x00C30FFF, 0 x00040006, 0 x0 } },
{ .hsw = { 0 x80AAAFFF, 0 x000B0000, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x0005000A, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x000C0004, 0 x0 } },
{ .hsw = { 0 x80C30FFF, 0 x000B0000, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x00040006, 0 x0 } },
{ .hsw = { 0 x80D75FFF, 0 x000B0000, 0 x0 } },
};
static const struct intel_ddi_buf_trans hsw_trans_dp = {
.entries = _hsw_trans_dp,
.num_entries = ARRAY_SIZE(_hsw_trans_dp),
};
static const union intel_ddi_buf_trans_entry _hsw_trans_fdi[] = {
{ .hsw = { 0 x00FFFFFF, 0 x0007000E, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x000F000A, 0 x0 } },
{ .hsw = { 0 x00C30FFF, 0 x00060006, 0 x0 } },
{ .hsw = { 0 x00AAAFFF, 0 x001E0000, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x000F000A, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x00160004, 0 x0 } },
{ .hsw = { 0 x00C30FFF, 0 x001E0000, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x00060006, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x001E0000, 0 x0 } },
};
static const struct intel_ddi_buf_trans hsw_trans_fdi = {
.entries = _hsw_trans_fdi,
.num_entries = ARRAY_SIZE(_hsw_trans_fdi),
};
static const union intel_ddi_buf_trans_entry _hsw_trans_hdmi[] = {
/* Idx NT mV d T mV d db */
{ .hsw = { 0 x00FFFFFF, 0 x0006000E, 0 x0 } }, /* 0: 400 400 0 */
{ .hsw = { 0 x00E79FFF, 0 x000E000C, 0 x0 } }, /* 1: 400 500 2 */
{ .hsw = { 0 x00D75FFF, 0 x0005000A, 0 x0 } }, /* 2: 400 600 3.5 */
{ .hsw = { 0 x00FFFFFF, 0 x0005000A, 0 x0 } }, /* 3: 600 600 0 */
{ .hsw = { 0 x00E79FFF, 0 x001D0007, 0 x0 } }, /* 4: 600 750 2 */
{ .hsw = { 0 x00D75FFF, 0 x000C0004, 0 x0 } }, /* 5: 600 900 3.5 */
{ .hsw = { 0 x00FFFFFF, 0 x00040006, 0 x0 } }, /* 6: 800 800 0 */
{ .hsw = { 0 x80E79FFF, 0 x00030002, 0 x0 } }, /* 7: 800 1000 2 */
{ .hsw = { 0 x00FFFFFF, 0 x00140005, 0 x0 } }, /* 8: 850 850 0 */
{ .hsw = { 0 x00FFFFFF, 0 x000C0004, 0 x0 } }, /* 9: 900 900 0 */
{ .hsw = { 0 x00FFFFFF, 0 x001C0003, 0 x0 } }, /* 10: 950 950 0 */
{ .hsw = { 0 x80FFFFFF, 0 x00030002, 0 x0 } }, /* 11: 1000 1000 0 */
};
static const struct intel_ddi_buf_trans hsw_trans_hdmi = {
.entries = _hsw_trans_hdmi,
.num_entries = ARRAY_SIZE(_hsw_trans_hdmi),
.hdmi_default_entry = 6 ,
};
static const union intel_ddi_buf_trans_entry _bdw_trans_edp[] = {
{ .hsw = { 0 x00FFFFFF, 0 x00000012, 0 x0 } },
{ .hsw = { 0 x00EBAFFF, 0 x00020011, 0 x0 } },
{ .hsw = { 0 x00C71FFF, 0 x0006000F, 0 x0 } },
{ .hsw = { 0 x00AAAFFF, 0 x000E000A, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x00020011, 0 x0 } },
{ .hsw = { 0 x00DB6FFF, 0 x0005000F, 0 x0 } },
{ .hsw = { 0 x00BEEFFF, 0 x000A000C, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x0005000F, 0 x0 } },
{ .hsw = { 0 x00DB6FFF, 0 x000A000C, 0 x0 } },
};
static const struct intel_ddi_buf_trans bdw_trans_edp = {
.entries = _bdw_trans_edp,
.num_entries = ARRAY_SIZE(_bdw_trans_edp),
};
static const union intel_ddi_buf_trans_entry _bdw_trans_dp[] = {
{ .hsw = { 0 x00FFFFFF, 0 x0007000E, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x000E000A, 0 x0 } },
{ .hsw = { 0 x00BEFFFF, 0 x00140006, 0 x0 } },
{ .hsw = { 0 x80B2CFFF, 0 x001B0002, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x000E000A, 0 x0 } },
{ .hsw = { 0 x00DB6FFF, 0 x00160005, 0 x0 } },
{ .hsw = { 0 x80C71FFF, 0 x001A0002, 0 x0 } },
{ .hsw = { 0 x00F7DFFF, 0 x00180004, 0 x0 } },
{ .hsw = { 0 x80D75FFF, 0 x001B0002, 0 x0 } },
};
static const struct intel_ddi_buf_trans bdw_trans_dp = {
.entries = _bdw_trans_dp,
.num_entries = ARRAY_SIZE(_bdw_trans_dp),
};
static const union intel_ddi_buf_trans_entry _bdw_trans_fdi[] = {
{ .hsw = { 0 x00FFFFFF, 0 x0001000E, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x0004000A, 0 x0 } },
{ .hsw = { 0 x00C30FFF, 0 x00070006, 0 x0 } },
{ .hsw = { 0 x00AAAFFF, 0 x000C0000, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x0004000A, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x00090004, 0 x0 } },
{ .hsw = { 0 x00C30FFF, 0 x000C0000, 0 x0 } },
{ .hsw = { 0 x00FFFFFF, 0 x00070006, 0 x0 } },
{ .hsw = { 0 x00D75FFF, 0 x000C0000, 0 x0 } },
};
static const struct intel_ddi_buf_trans bdw_trans_fdi = {
.entries = _bdw_trans_fdi,
.num_entries = ARRAY_SIZE(_bdw_trans_fdi),
};
static const union intel_ddi_buf_trans_entry _bdw_trans_hdmi[] = {
/* Idx NT mV d T mV df db */
{ .hsw = { 0 x00FFFFFF, 0 x0007000E, 0 x0 } }, /* 0: 400 400 0 */
{ .hsw = { 0 x00D75FFF, 0 x000E000A, 0 x0 } }, /* 1: 400 600 3.5 */
{ .hsw = { 0 x00BEFFFF, 0 x00140006, 0 x0 } }, /* 2: 400 800 6 */
{ .hsw = { 0 x00FFFFFF, 0 x0009000D, 0 x0 } }, /* 3: 450 450 0 */
{ .hsw = { 0 x00FFFFFF, 0 x000E000A, 0 x0 } }, /* 4: 600 600 0 */
{ .hsw = { 0 x00D7FFFF, 0 x00140006, 0 x0 } }, /* 5: 600 800 2.5 */
{ .hsw = { 0 x80CB2FFF, 0 x001B0002, 0 x0 } }, /* 6: 600 1000 4.5 */
{ .hsw = { 0 x00FFFFFF, 0 x00140006, 0 x0 } }, /* 7: 800 800 0 */
{ .hsw = { 0 x80E79FFF, 0 x001B0002, 0 x0 } }, /* 8: 800 1000 2 */
{ .hsw = { 0 x80FFFFFF, 0 x001B0002, 0 x0 } }, /* 9: 1000 1000 0 */
};
static const struct intel_ddi_buf_trans bdw_trans_hdmi = {
.entries = _bdw_trans_hdmi,
.num_entries = ARRAY_SIZE(_bdw_trans_hdmi),
.hdmi_default_entry = 7 ,
};
/* Skylake H and S */
static const union intel_ddi_buf_trans_entry _skl_trans_dp[] = {
{ .hsw = { 0 x00002016, 0 x000000A0, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x0000009B, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80009010, 0 x000000C0, 0 x1 } },
{ .hsw = { 0 x00002016, 0 x0000009B, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80007011, 0 x000000C0, 0 x1 } },
{ .hsw = { 0 x00002016, 0 x000000DF, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x1 } },
};
static const struct intel_ddi_buf_trans skl_trans_dp = {
.entries = _skl_trans_dp,
.num_entries = ARRAY_SIZE(_skl_trans_dp),
};
/* Skylake U */
static const union intel_ddi_buf_trans_entry _skl_u_trans_dp[] = {
{ .hsw = { 0 x0000201B, 0 x000000A2, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80007011, 0 x000000CD, 0 x1 } },
{ .hsw = { 0 x80009010, 0 x000000C0, 0 x1 } },
{ .hsw = { 0 x0000201B, 0 x0000009D, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x1 } },
{ .hsw = { 0 x80007011, 0 x000000C0, 0 x1 } },
{ .hsw = { 0 x00002016, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x1 } },
};
static const struct intel_ddi_buf_trans skl_u_trans_dp = {
.entries = _skl_u_trans_dp,
.num_entries = ARRAY_SIZE(_skl_u_trans_dp),
};
/* Skylake Y */
static const union intel_ddi_buf_trans_entry _skl_y_trans_dp[] = {
{ .hsw = { 0 x00000018, 0 x000000A2, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80007011, 0 x000000CD, 0 x3 } },
{ .hsw = { 0 x80009010, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x00000018, 0 x0000009D, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x80007011, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x00000018, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x3 } },
};
static const struct intel_ddi_buf_trans skl_y_trans_dp = {
.entries = _skl_y_trans_dp,
.num_entries = ARRAY_SIZE(_skl_y_trans_dp),
};
/* Kabylake H and S */
static const union intel_ddi_buf_trans_entry _kbl_trans_dp[] = {
{ .hsw = { 0 x00002016, 0 x000000A0, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x0000009B, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80009010, 0 x000000C0, 0 x1 } },
{ .hsw = { 0 x00002016, 0 x0000009B, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80007011, 0 x000000C0, 0 x1 } },
{ .hsw = { 0 x00002016, 0 x00000097, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x1 } },
};
static const struct intel_ddi_buf_trans kbl_trans_dp = {
.entries = _kbl_trans_dp,
.num_entries = ARRAY_SIZE(_kbl_trans_dp),
};
/* Kabylake U */
static const union intel_ddi_buf_trans_entry _kbl_u_trans_dp[] = {
{ .hsw = { 0 x0000201B, 0 x000000A1, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80007011, 0 x000000CD, 0 x3 } },
{ .hsw = { 0 x80009010, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x0000201B, 0 x0000009D, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x80007011, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x00002016, 0 x0000004F, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x3 } },
};
static const struct intel_ddi_buf_trans kbl_u_trans_dp = {
.entries = _kbl_u_trans_dp,
.num_entries = ARRAY_SIZE(_kbl_u_trans_dp),
};
/* Kabylake Y */
static const union intel_ddi_buf_trans_entry _kbl_y_trans_dp[] = {
{ .hsw = { 0 x00001017, 0 x000000A1, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80007011, 0 x000000CD, 0 x3 } },
{ .hsw = { 0 x8000800F, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x00001017, 0 x0000009D, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x80007011, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x00001017, 0 x0000004C, 0 x0 } },
{ .hsw = { 0 x80005012, 0 x000000C0, 0 x3 } },
};
static const struct intel_ddi_buf_trans kbl_y_trans_dp = {
.entries = _kbl_y_trans_dp,
.num_entries = ARRAY_SIZE(_kbl_y_trans_dp),
};
/*
* Skylake/Kabylake H and S
* eDP 1.4 low vswing translation parameters
*/
static const union intel_ddi_buf_trans_entry _skl_trans_edp[] = {
{ .hsw = { 0 x00000018, 0 x000000A8, 0 x0 } },
{ .hsw = { 0 x00004013, 0 x000000A9, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x000000A2, 0 x0 } },
{ .hsw = { 0 x00009010, 0 x0000009C, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x000000A9, 0 x0 } },
{ .hsw = { 0 x00006013, 0 x000000A2, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x000000A6, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x000000AB, 0 x0 } },
{ .hsw = { 0 x00007013, 0 x0000009F, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x000000DF, 0 x0 } },
};
static const struct intel_ddi_buf_trans skl_trans_edp = {
.entries = _skl_trans_edp,
.num_entries = ARRAY_SIZE(_skl_trans_edp),
};
/*
* Skylake/Kabylake U
* eDP 1.4 low vswing translation parameters
*/
static const union intel_ddi_buf_trans_entry _skl_u_trans_edp[] = {
{ .hsw = { 0 x00000018, 0 x000000A8, 0 x0 } },
{ .hsw = { 0 x00004013, 0 x000000A9, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x000000A2, 0 x0 } },
{ .hsw = { 0 x00009010, 0 x0000009C, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x000000A9, 0 x0 } },
{ .hsw = { 0 x00006013, 0 x000000A2, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x000000A6, 0 x0 } },
{ .hsw = { 0 x00002016, 0 x000000AB, 0 x0 } },
{ .hsw = { 0 x00005013, 0 x0000009F, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x000000DF, 0 x0 } },
};
static const struct intel_ddi_buf_trans skl_u_trans_edp = {
.entries = _skl_u_trans_edp,
.num_entries = ARRAY_SIZE(_skl_u_trans_edp),
};
/*
* Skylake/Kabylake Y
* eDP 1.4 low vswing translation parameters
*/
static const union intel_ddi_buf_trans_entry _skl_y_trans_edp[] = {
{ .hsw = { 0 x00000018, 0 x000000A8, 0 x0 } },
{ .hsw = { 0 x00004013, 0 x000000AB, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x000000A4, 0 x0 } },
{ .hsw = { 0 x00009010, 0 x000000DF, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x000000AA, 0 x0 } },
{ .hsw = { 0 x00006013, 0 x000000A4, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x0000009D, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x000000A0, 0 x0 } },
{ .hsw = { 0 x00006012, 0 x000000DF, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x0000008A, 0 x0 } },
};
static const struct intel_ddi_buf_trans skl_y_trans_edp = {
.entries = _skl_y_trans_edp,
.num_entries = ARRAY_SIZE(_skl_y_trans_edp),
};
/* Skylake/Kabylake U, H and S */
static const union intel_ddi_buf_trans_entry _skl_trans_hdmi[] = {
{ .hsw = { 0 x00000018, 0 x000000AC, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x0000009D, 0 x0 } },
{ .hsw = { 0 x00007011, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x000000A1, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x00000098, 0 x0 } },
{ .hsw = { 0 x00004013, 0 x00000088, 0 x0 } },
{ .hsw = { 0 x80006012, 0 x000000CD, 0 x1 } },
{ .hsw = { 0 x00000018, 0 x000000DF, 0 x0 } },
{ .hsw = { 0 x80003015, 0 x000000CD, 0 x1 } }, /* Default */
{ .hsw = { 0 x80003015, 0 x000000C0, 0 x1 } },
{ .hsw = { 0 x80000018, 0 x000000C0, 0 x1 } },
};
static const struct intel_ddi_buf_trans skl_trans_hdmi = {
.entries = _skl_trans_hdmi,
.num_entries = ARRAY_SIZE(_skl_trans_hdmi),
.hdmi_default_entry = 8 ,
};
/* Skylake/Kabylake Y */
static const union intel_ddi_buf_trans_entry _skl_y_trans_hdmi[] = {
{ .hsw = { 0 x00000018, 0 x000000A1, 0 x0 } },
{ .hsw = { 0 x00005012, 0 x000000DF, 0 x0 } },
{ .hsw = { 0 x80007011, 0 x000000CB, 0 x3 } },
{ .hsw = { 0 x00000018, 0 x000000A4, 0 x0 } },
{ .hsw = { 0 x00000018, 0 x0000009D, 0 x0 } },
{ .hsw = { 0 x00004013, 0 x00000080, 0 x0 } },
{ .hsw = { 0 x80006013, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x00000018, 0 x0000008A, 0 x0 } },
{ .hsw = { 0 x80003015, 0 x000000C0, 0 x3 } }, /* Default */
{ .hsw = { 0 x80003015, 0 x000000C0, 0 x3 } },
{ .hsw = { 0 x80000018, 0 x000000C0, 0 x3 } },
};
static const struct intel_ddi_buf_trans skl_y_trans_hdmi = {
.entries = _skl_y_trans_hdmi,
.num_entries = ARRAY_SIZE(_skl_y_trans_hdmi),
.hdmi_default_entry = 8 ,
};
static const union intel_ddi_buf_trans_entry _bxt_trans_dp[] = {
/* Idx NT mV diff db */
{ .bxt = { 52 , 0 x9A, 0 , 128 , } }, /* 0: 400 0 */
{ .bxt = { 78 , 0 x9A, 0 , 85 , } }, /* 1: 400 3.5 */
{ .bxt = { 104 , 0 x9A, 0 , 64 , } }, /* 2: 400 6 */
{ .bxt = { 154 , 0 x9A, 0 , 43 , } }, /* 3: 400 9.5 */
{ .bxt = { 77 , 0 x9A, 0 , 128 , } }, /* 4: 600 0 */
{ .bxt = { 116 , 0 x9A, 0 , 85 , } }, /* 5: 600 3.5 */
{ .bxt = { 154 , 0 x9A, 0 , 64 , } }, /* 6: 600 6 */
{ .bxt = { 102 , 0 x9A, 0 , 128 , } }, /* 7: 800 0 */
{ .bxt = { 154 , 0 x9A, 0 , 85 , } }, /* 8: 800 3.5 */
{ .bxt = { 154 , 0 x9A, 1 , 128 , } }, /* 9: 1200 0 */
};
static const struct intel_ddi_buf_trans bxt_trans_dp = {
.entries = _bxt_trans_dp,
.num_entries = ARRAY_SIZE(_bxt_trans_dp),
};
static const union intel_ddi_buf_trans_entry _bxt_trans_edp[] = {
/* Idx NT mV diff db */
{ .bxt = { 26 , 0 , 0 , 128 , } }, /* 0: 200 0 */
{ .bxt = { 38 , 0 , 0 , 112 , } }, /* 1: 200 1.5 */
{ .bxt = { 48 , 0 , 0 , 96 , } }, /* 2: 200 4 */
{ .bxt = { 54 , 0 , 0 , 69 , } }, /* 3: 200 6 */
{ .bxt = { 32 , 0 , 0 , 128 , } }, /* 4: 250 0 */
{ .bxt = { 48 , 0 , 0 , 104 , } }, /* 5: 250 1.5 */
{ .bxt = { 54 , 0 , 0 , 85 , } }, /* 6: 250 4 */
{ .bxt = { 43 , 0 , 0 , 128 , } }, /* 7: 300 0 */
{ .bxt = { 54 , 0 , 0 , 101 , } }, /* 8: 300 1.5 */
{ .bxt = { 48 , 0 , 0 , 128 , } }, /* 9: 300 0 */
};
static const struct intel_ddi_buf_trans bxt_trans_edp = {
.entries = _bxt_trans_edp,
.num_entries = ARRAY_SIZE(_bxt_trans_edp),
};
/* BSpec has 2 recommended values - entries 0 and 8.
* Using the entry with higher vswing.
*/
static const union intel_ddi_buf_trans_entry _bxt_trans_hdmi[] = {
/* Idx NT mV diff db */
{ .bxt = { 52 , 0 x9A, 0 , 128 , } }, /* 0: 400 0 */
{ .bxt = { 52 , 0 x9A, 0 , 85 , } }, /* 1: 400 3.5 */
{ .bxt = { 52 , 0 x9A, 0 , 64 , } }, /* 2: 400 6 */
{ .bxt = { 42 , 0 x9A, 0 , 43 , } }, /* 3: 400 9.5 */
{ .bxt = { 77 , 0 x9A, 0 , 128 , } }, /* 4: 600 0 */
{ .bxt = { 77 , 0 x9A, 0 , 85 , } }, /* 5: 600 3.5 */
{ .bxt = { 77 , 0 x9A, 0 , 64 , } }, /* 6: 600 6 */
{ .bxt = { 102 , 0 x9A, 0 , 128 , } }, /* 7: 800 0 */
{ .bxt = { 102 , 0 x9A, 0 , 85 , } }, /* 8: 800 3.5 */
{ .bxt = { 154 , 0 x9A, 1 , 128 , } }, /* 9: 1200 0 */
};
static const struct intel_ddi_buf_trans bxt_trans_hdmi = {
.entries = _bxt_trans_hdmi,
.num_entries = ARRAY_SIZE(_bxt_trans_hdmi),
.hdmi_default_entry = ARRAY_SIZE(_bxt_trans_hdmi) - 1 ,
};
/* icl_combo_phy_trans */
static const union intel_ddi_buf_trans_entry _icl_combo_phy_trans_dp_hbr2_edp_hbr3[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x71, 0 x2F, 0 x00, 0 x10 } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2B, 0 x00, 0 x14 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x4C, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x73, 0 x34, 0 x00, 0 x0B } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x2F, 0 x00, 0 x10 } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x6C, 0 x3C, 0 x00, 0 x03 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans icl_combo_phy_trans_dp_hbr2_edp_hbr3 = {
.entries = _icl_combo_phy_trans_dp_hbr2_edp_hbr3,
.num_entries = ARRAY_SIZE(_icl_combo_phy_trans_dp_hbr2_edp_hbr3),
};
static const union intel_ddi_buf_trans_entry _icl_combo_phy_trans_edp_hbr2[] = {
/* NT mV Trans mV db */
{ .icl = { 0 x0, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 200 200 0.0 */
{ .icl = { 0 x8, 0 x7F, 0 x38, 0 x00, 0 x07 } }, /* 200 250 1.9 */
{ .icl = { 0 x1, 0 x7F, 0 x33, 0 x00, 0 x0C } }, /* 200 300 3.5 */
{ .icl = { 0 x9, 0 x7F, 0 x31, 0 x00, 0 x0E } }, /* 200 350 4.9 */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 250 250 0.0 */
{ .icl = { 0 x1, 0 x7F, 0 x38, 0 x00, 0 x07 } }, /* 250 300 1.6 */
{ .icl = { 0 x9, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 250 350 2.9 */
{ .icl = { 0 x1, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 300 300 0.0 */
{ .icl = { 0 x9, 0 x7F, 0 x38, 0 x00, 0 x07 } }, /* 300 350 1.3 */
{ .icl = { 0 x9, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
};
static const struct intel_ddi_buf_trans icl_combo_phy_trans_edp_hbr2 = {
.entries = _icl_combo_phy_trans_edp_hbr2,
.num_entries = ARRAY_SIZE(_icl_combo_phy_trans_edp_hbr2),
};
static const union intel_ddi_buf_trans_entry _icl_combo_phy_trans_hdmi[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x60, 0 x3F, 0 x00, 0 x00 } }, /* 450 450 0.0 */
{ .icl = { 0 xB, 0 x73, 0 x36, 0 x00, 0 x09 } }, /* 450 650 3.2 */
{ .icl = { 0 x6, 0 x7F, 0 x31, 0 x00, 0 x0E } }, /* 450 850 5.5 */
{ .icl = { 0 xB, 0 x73, 0 x3F, 0 x00, 0 x00 } }, /* 650 650 0.0 ALS */
{ .icl = { 0 x6, 0 x7F, 0 x37, 0 x00, 0 x08 } }, /* 650 850 2.3 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 850 850 0.0 */
{ .icl = { 0 x6, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 600 850 3.0 */
};
static const struct intel_ddi_buf_trans icl_combo_phy_trans_hdmi = {
.entries = _icl_combo_phy_trans_hdmi,
.num_entries = ARRAY_SIZE(_icl_combo_phy_trans_hdmi),
.hdmi_default_entry = ARRAY_SIZE(_icl_combo_phy_trans_hdmi) - 1 ,
};
static const union intel_ddi_buf_trans_entry _ehl_combo_phy_trans_dp[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x33, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x47, 0 x38, 0 x00, 0 x07 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x64, 0 x33, 0 x00, 0 x0C } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2F, 0 x00, 0 x10 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x46, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x64, 0 x37, 0 x00, 0 x08 } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x32, 0 x00, 0 x0D } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x61, 0 x3F, 0 x00, 0 x00 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x37, 0 x00, 0 x08 } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans ehl_combo_phy_trans_dp = {
.entries = _ehl_combo_phy_trans_dp,
.num_entries = ARRAY_SIZE(_ehl_combo_phy_trans_dp),
};
static const union intel_ddi_buf_trans_entry _ehl_combo_phy_trans_edp_hbr2[] = {
/* NT mV Trans mV db */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 200 200 0.0 */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 200 250 1.9 */
{ .icl = { 0 x1, 0 x7F, 0 x3D, 0 x00, 0 x02 } }, /* 200 300 3.5 */
{ .icl = { 0 xA, 0 x35, 0 x39, 0 x00, 0 x06 } }, /* 200 350 4.9 */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 250 250 0.0 */
{ .icl = { 0 x1, 0 x7F, 0 x3C, 0 x00, 0 x03 } }, /* 250 300 1.6 */
{ .icl = { 0 xA, 0 x35, 0 x39, 0 x00, 0 x06 } }, /* 250 350 2.9 */
{ .icl = { 0 x1, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 300 300 0.0 */
{ .icl = { 0 xA, 0 x35, 0 x38, 0 x00, 0 x07 } }, /* 300 350 1.3 */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
};
static const struct intel_ddi_buf_trans ehl_combo_phy_trans_edp_hbr2 = {
.entries = _ehl_combo_phy_trans_edp_hbr2,
.num_entries = ARRAY_SIZE(_ehl_combo_phy_trans_edp_hbr2),
};
static const union intel_ddi_buf_trans_entry _jsl_combo_phy_trans_edp_hbr[] = {
/* NT mV Trans mV db */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 200 200 0.0 */
{ .icl = { 0 x8, 0 x7F, 0 x38, 0 x00, 0 x07 } }, /* 200 250 1.9 */
{ .icl = { 0 x1, 0 x7F, 0 x33, 0 x00, 0 x0C } }, /* 200 300 3.5 */
{ .icl = { 0 xA, 0 x35, 0 x36, 0 x00, 0 x09 } }, /* 200 350 4.9 */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 250 250 0.0 */
{ .icl = { 0 x1, 0 x7F, 0 x38, 0 x00, 0 x07 } }, /* 250 300 1.6 */
{ .icl = { 0 xA, 0 x35, 0 x35, 0 x00, 0 x0A } }, /* 250 350 2.9 */
{ .icl = { 0 x1, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 300 300 0.0 */
{ .icl = { 0 xA, 0 x35, 0 x38, 0 x00, 0 x07 } }, /* 300 350 1.3 */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
};
static const struct intel_ddi_buf_trans jsl_combo_phy_trans_edp_hbr = {
.entries = _jsl_combo_phy_trans_edp_hbr,
.num_entries = ARRAY_SIZE(_jsl_combo_phy_trans_edp_hbr),
};
static const union intel_ddi_buf_trans_entry _jsl_combo_phy_trans_edp_hbr2[] = {
/* NT mV Trans mV db */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 200 200 0.0 */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 200 250 1.9 */
{ .icl = { 0 x1, 0 x7F, 0 x3D, 0 x00, 0 x02 } }, /* 200 300 3.5 */
{ .icl = { 0 xA, 0 x35, 0 x38, 0 x00, 0 x07 } }, /* 200 350 4.9 */
{ .icl = { 0 x8, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 250 250 0.0 */
{ .icl = { 0 x1, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 250 300 1.6 */
{ .icl = { 0 xA, 0 x35, 0 x3A, 0 x00, 0 x05 } }, /* 250 350 2.9 */
{ .icl = { 0 x1, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 300 300 0.0 */
{ .icl = { 0 xA, 0 x35, 0 x38, 0 x00, 0 x07 } }, /* 300 350 1.3 */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
};
static const struct intel_ddi_buf_trans jsl_combo_phy_trans_edp_hbr2 = {
.entries = _jsl_combo_phy_trans_edp_hbr2,
.num_entries = ARRAY_SIZE(_jsl_combo_phy_trans_edp_hbr2),
};
static const union intel_ddi_buf_trans_entry _dg1_combo_phy_trans_dp_rbr_hbr[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x32, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x48, 0 x35, 0 x00, 0 x0A } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x63, 0 x2F, 0 x00, 0 x10 } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2C, 0 x00, 0 x13 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x43, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x60, 0 x36, 0 x00, 0 x09 } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x30, 0 x00, 0 x0F } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x60, 0 x3F, 0 x00, 0 x00 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x37, 0 x00, 0 x08 } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans dg1_combo_phy_trans_dp_rbr_hbr = {
.entries = _dg1_combo_phy_trans_dp_rbr_hbr,
.num_entries = ARRAY_SIZE(_dg1_combo_phy_trans_dp_rbr_hbr),
};
static const union intel_ddi_buf_trans_entry _dg1_combo_phy_trans_dp_hbr2_hbr3[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x32, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x48, 0 x35, 0 x00, 0 x0A } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x63, 0 x2F, 0 x00, 0 x10 } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2C, 0 x00, 0 x13 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x43, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x60, 0 x36, 0 x00, 0 x09 } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x30, 0 x00, 0 x0F } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x58, 0 x3F, 0 x00, 0 x00 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans dg1_combo_phy_trans_dp_hbr2_hbr3 = {
.entries = _dg1_combo_phy_trans_dp_hbr2_hbr3,
.num_entries = ARRAY_SIZE(_dg1_combo_phy_trans_dp_hbr2_hbr3),
};
static const union intel_ddi_buf_trans_entry _icl_mg_phy_trans_rbr_hbr[] = {
/* Voltage swing pre-emphasis */
{ .mg = { 0 x18, 0 x00, 0 x00 } }, /* 0 0 */
{ .mg = { 0 x1D, 0 x00, 0 x05 } }, /* 0 1 */
{ .mg = { 0 x24, 0 x00, 0 x0C } }, /* 0 2 */
{ .mg = { 0 x2B, 0 x00, 0 x14 } }, /* 0 3 */
{ .mg = { 0 x21, 0 x00, 0 x00 } }, /* 1 0 */
{ .mg = { 0 x2B, 0 x00, 0 x08 } }, /* 1 1 */
{ .mg = { 0 x30, 0 x00, 0 x0F } }, /* 1 2 */
{ .mg = { 0 x31, 0 x00, 0 x03 } }, /* 2 0 */
{ .mg = { 0 x34, 0 x00, 0 x0B } }, /* 2 1 */
{ .mg = { 0 x3F, 0 x00, 0 x00 } }, /* 3 0 */
};
static const struct intel_ddi_buf_trans icl_mg_phy_trans_rbr_hbr = {
.entries = _icl_mg_phy_trans_rbr_hbr,
.num_entries = ARRAY_SIZE(_icl_mg_phy_trans_rbr_hbr),
};
static const union intel_ddi_buf_trans_entry _icl_mg_phy_trans_hbr2_hbr3[] = {
/* Voltage swing pre-emphasis */
{ .mg = { 0 x18, 0 x00, 0 x00 } }, /* 0 0 */
{ .mg = { 0 x1D, 0 x00, 0 x05 } }, /* 0 1 */
{ .mg = { 0 x24, 0 x00, 0 x0C } }, /* 0 2 */
{ .mg = { 0 x2B, 0 x00, 0 x14 } }, /* 0 3 */
{ .mg = { 0 x26, 0 x00, 0 x00 } }, /* 1 0 */
{ .mg = { 0 x2C, 0 x00, 0 x07 } }, /* 1 1 */
{ .mg = { 0 x33, 0 x00, 0 x0C } }, /* 1 2 */
{ .mg = { 0 x2E, 0 x00, 0 x00 } }, /* 2 0 */
{ .mg = { 0 x36, 0 x00, 0 x09 } }, /* 2 1 */
{ .mg = { 0 x3F, 0 x00, 0 x00 } }, /* 3 0 */
};
static const struct intel_ddi_buf_trans icl_mg_phy_trans_hbr2_hbr3 = {
.entries = _icl_mg_phy_trans_hbr2_hbr3,
.num_entries = ARRAY_SIZE(_icl_mg_phy_trans_hbr2_hbr3),
};
static const union intel_ddi_buf_trans_entry _icl_mg_phy_trans_hdmi[] = {
/* HDMI Preset VS Pre-emph */
{ .mg = { 0 x1A, 0 x0, 0 x0 } }, /* 1 400mV 0dB */
{ .mg = { 0 x20, 0 x0, 0 x0 } }, /* 2 500mV 0dB */
{ .mg = { 0 x29, 0 x0, 0 x0 } }, /* 3 650mV 0dB */
{ .mg = { 0 x32, 0 x0, 0 x0 } }, /* 4 800mV 0dB */
{ .mg = { 0 x3F, 0 x0, 0 x0 } }, /* 5 1000mV 0dB */
{ .mg = { 0 x3A, 0 x0, 0 x5 } }, /* 6 Full -1.5 dB */
{ .mg = { 0 x39, 0 x0, 0 x6 } }, /* 7 Full -1.8 dB */
{ .mg = { 0 x38, 0 x0, 0 x7 } }, /* 8 Full -2 dB */
{ .mg = { 0 x37, 0 x0, 0 x8 } }, /* 9 Full -2.5 dB */
{ .mg = { 0 x36, 0 x0, 0 x9 } }, /* 10 Full -3 dB */
};
static const struct intel_ddi_buf_trans icl_mg_phy_trans_hdmi = {
.entries = _icl_mg_phy_trans_hdmi,
.num_entries = ARRAY_SIZE(_icl_mg_phy_trans_hdmi),
.hdmi_default_entry = ARRAY_SIZE(_icl_mg_phy_trans_hdmi) - 1 ,
};
static const union intel_ddi_buf_trans_entry _tgl_dkl_phy_trans_dp_hbr[] = {
/* VS pre-emp Non-trans mV Pre-emph dB */
{ .dkl = { 0 x7, 0 x0, 0 x00 } }, /* 0 0 400mV 0 dB */
{ .dkl = { 0 x5, 0 x0, 0 x05 } }, /* 0 1 400mV 3.5 dB */
{ .dkl = { 0 x2, 0 x0, 0 x0B } }, /* 0 2 400mV 6 dB */
{ .dkl = { 0 x0, 0 x0, 0 x18 } }, /* 0 3 400mV 9.5 dB */
{ .dkl = { 0 x5, 0 x0, 0 x00 } }, /* 1 0 600mV 0 dB */
{ .dkl = { 0 x2, 0 x0, 0 x08 } }, /* 1 1 600mV 3.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x14 } }, /* 1 2 600mV 6 dB */
{ .dkl = { 0 x2, 0 x0, 0 x00 } }, /* 2 0 800mV 0 dB */
{ .dkl = { 0 x0, 0 x0, 0 x0B } }, /* 2 1 800mV 3.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x00 } }, /* 3 0 1200mV 0 dB HDMI default */
};
static const struct intel_ddi_buf_trans tgl_dkl_phy_trans_dp_hbr = {
.entries = _tgl_dkl_phy_trans_dp_hbr,
.num_entries = ARRAY_SIZE(_tgl_dkl_phy_trans_dp_hbr),
};
static const union intel_ddi_buf_trans_entry _tgl_dkl_phy_trans_dp_hbr2[] = {
/* VS pre-emp Non-trans mV Pre-emph dB */
{ .dkl = { 0 x7, 0 x0, 0 x00 } }, /* 0 0 400mV 0 dB */
{ .dkl = { 0 x5, 0 x0, 0 x05 } }, /* 0 1 400mV 3.5 dB */
{ .dkl = { 0 x2, 0 x0, 0 x0B } }, /* 0 2 400mV 6 dB */
{ .dkl = { 0 x0, 0 x0, 0 x19 } }, /* 0 3 400mV 9.5 dB */
{ .dkl = { 0 x5, 0 x0, 0 x00 } }, /* 1 0 600mV 0 dB */
{ .dkl = { 0 x2, 0 x0, 0 x08 } }, /* 1 1 600mV 3.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x14 } }, /* 1 2 600mV 6 dB */
{ .dkl = { 0 x2, 0 x0, 0 x00 } }, /* 2 0 800mV 0 dB */
{ .dkl = { 0 x0, 0 x0, 0 x0B } }, /* 2 1 800mV 3.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x00 } }, /* 3 0 1200mV 0 dB HDMI default */
};
static const struct intel_ddi_buf_trans tgl_dkl_phy_trans_dp_hbr2 = {
.entries = _tgl_dkl_phy_trans_dp_hbr2,
.num_entries = ARRAY_SIZE(_tgl_dkl_phy_trans_dp_hbr2),
};
static const union intel_ddi_buf_trans_entry _tgl_dkl_phy_trans_hdmi[] = {
/* HDMI Preset VS Pre-emph */
{ .dkl = { 0 x7, 0 x0, 0 x0 } }, /* 1 400mV 0dB */
{ .dkl = { 0 x6, 0 x0, 0 x0 } }, /* 2 500mV 0dB */
{ .dkl = { 0 x4, 0 x0, 0 x0 } }, /* 3 650mV 0dB */
{ .dkl = { 0 x2, 0 x0, 0 x0 } }, /* 4 800mV 0dB */
{ .dkl = { 0 x0, 0 x0, 0 x0 } }, /* 5 1000mV 0dB */
{ .dkl = { 0 x0, 0 x0, 0 x5 } }, /* 6 Full -1.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x6 } }, /* 7 Full -1.8 dB */
{ .dkl = { 0 x0, 0 x0, 0 x7 } }, /* 8 Full -2 dB */
{ .dkl = { 0 x0, 0 x0, 0 x8 } }, /* 9 Full -2.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 xA } }, /* 10 Full -3 dB */
};
static const struct intel_ddi_buf_trans tgl_dkl_phy_trans_hdmi = {
.entries = _tgl_dkl_phy_trans_hdmi,
.num_entries = ARRAY_SIZE(_tgl_dkl_phy_trans_hdmi),
.hdmi_default_entry = ARRAY_SIZE(_tgl_dkl_phy_trans_hdmi) - 1 ,
};
static const union intel_ddi_buf_trans_entry _tgl_combo_phy_trans_dp_hbr[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x32, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x71, 0 x2F, 0 x00, 0 x10 } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7D, 0 x2B, 0 x00, 0 x14 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x4C, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x73, 0 x34, 0 x00, 0 x0B } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x2F, 0 x00, 0 x10 } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x6C, 0 x3C, 0 x00, 0 x03 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans tgl_combo_phy_trans_dp_hbr = {
.entries = _tgl_combo_phy_trans_dp_hbr,
.num_entries = ARRAY_SIZE(_tgl_combo_phy_trans_dp_hbr),
};
static const union intel_ddi_buf_trans_entry _tgl_combo_phy_trans_dp_hbr2[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x63, 0 x2F, 0 x00, 0 x10 } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2B, 0 x00, 0 x14 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x47, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x63, 0 x34, 0 x00, 0 x0B } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x2F, 0 x00, 0 x10 } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x61, 0 x3C, 0 x00, 0 x03 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7B, 0 x35, 0 x00, 0 x0A } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans tgl_combo_phy_trans_dp_hbr2 = {
.entries = _tgl_combo_phy_trans_dp_hbr2,
.num_entries = ARRAY_SIZE(_tgl_combo_phy_trans_dp_hbr2),
};
static const union intel_ddi_buf_trans_entry _tgl_uy_combo_phy_trans_dp_hbr2[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x36, 0 x00, 0 x09 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x60, 0 x32, 0 x00, 0 x0D } }, /* 350 700 6.0 */
{ .icl = { 0 xC, 0 x7F, 0 x2D, 0 x00, 0 x12 } }, /* 350 900 8.2 */
{ .icl = { 0 xC, 0 x47, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x6F, 0 x36, 0 x00, 0 x09 } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7D, 0 x32, 0 x00, 0 x0D } }, /* 500 900 5.1 */
{ .icl = { 0 x6, 0 x60, 0 x3C, 0 x00, 0 x03 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x34, 0 x00, 0 x0B } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans tgl_uy_combo_phy_trans_dp_hbr2 = {
.entries = _tgl_uy_combo_phy_trans_dp_hbr2,
.num_entries = ARRAY_SIZE(_tgl_uy_combo_phy_trans_dp_hbr2),
};
/*
* Cloned the HOBL entry to comply with the voltage and pre-emphasis entries
* that DisplayPort specification requires
*/
static const union intel_ddi_buf_trans_entry _tgl_combo_phy_trans_edp_hbr2_hobl[] = {
/* VS pre-emp */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 0 0 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 0 1 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 0 2 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 0 3 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 1 0 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 1 1 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 1 2 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 2 0 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 2 1 */
};
static const struct intel_ddi_buf_trans tgl_combo_phy_trans_edp_hbr2_hobl = {
.entries = _tgl_combo_phy_trans_edp_hbr2_hobl,
.num_entries = ARRAY_SIZE(_tgl_combo_phy_trans_edp_hbr2_hobl),
};
static const union intel_ddi_buf_trans_entry _rkl_combo_phy_trans_dp_hbr[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x2F, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x63, 0 x2F, 0 x00, 0 x10 } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7D, 0 x2A, 0 x00, 0 x15 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x4C, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x73, 0 x34, 0 x00, 0 x0B } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x2F, 0 x00, 0 x10 } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x6E, 0 x3E, 0 x00, 0 x01 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans rkl_combo_phy_trans_dp_hbr = {
.entries = _rkl_combo_phy_trans_dp_hbr,
.num_entries = ARRAY_SIZE(_rkl_combo_phy_trans_dp_hbr),
};
static const union intel_ddi_buf_trans_entry _rkl_combo_phy_trans_dp_hbr2_hbr3[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x50, 0 x38, 0 x00, 0 x07 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x61, 0 x33, 0 x00, 0 x0C } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2E, 0 x00, 0 x11 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x47, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x5F, 0 x38, 0 x00, 0 x07 } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x2F, 0 x00, 0 x10 } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x5F, 0 x3F, 0 x00, 0 x00 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7E, 0 x36, 0 x00, 0 x09 } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans rkl_combo_phy_trans_dp_hbr2_hbr3 = {
.entries = _rkl_combo_phy_trans_dp_hbr2_hbr3,
.num_entries = ARRAY_SIZE(_rkl_combo_phy_trans_dp_hbr2_hbr3),
};
static const union intel_ddi_buf_trans_entry _adls_combo_phy_trans_dp_hbr2_hbr3[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x63, 0 x31, 0 x00, 0 x0E } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2C, 0 x00, 0 x13 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x47, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x63, 0 x37, 0 x00, 0 x08 } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x73, 0 x32, 0 x00, 0 x0D } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x58, 0 x3F, 0 x00, 0 x00 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans adls_combo_phy_trans_dp_hbr2_hbr3 = {
.entries = _adls_combo_phy_trans_dp_hbr2_hbr3,
.num_entries = ARRAY_SIZE(_adls_combo_phy_trans_dp_hbr2_hbr3),
};
static const union intel_ddi_buf_trans_entry _adls_combo_phy_trans_edp_hbr2[] = {
/* NT mV Trans mV db */
{ .icl = { 0 x9, 0 x73, 0 x3D, 0 x00, 0 x02 } }, /* 200 200 0.0 */
{ .icl = { 0 x9, 0 x7A, 0 x3C, 0 x00, 0 x03 } }, /* 200 250 1.9 */
{ .icl = { 0 x9, 0 x7F, 0 x3B, 0 x00, 0 x04 } }, /* 200 300 3.5 */
{ .icl = { 0 x4, 0 x6C, 0 x33, 0 x00, 0 x0C } }, /* 200 350 4.9 */
{ .icl = { 0 x2, 0 x73, 0 x3A, 0 x00, 0 x05 } }, /* 250 250 0.0 */
{ .icl = { 0 x2, 0 x7C, 0 x38, 0 x00, 0 x07 } }, /* 250 300 1.6 */
{ .icl = { 0 x4, 0 x5A, 0 x36, 0 x00, 0 x09 } }, /* 250 350 2.9 */
{ .icl = { 0 x4, 0 x57, 0 x3D, 0 x00, 0 x02 } }, /* 300 300 0.0 */
{ .icl = { 0 x4, 0 x65, 0 x38, 0 x00, 0 x07 } }, /* 300 350 1.3 */
{ .icl = { 0 x4, 0 x6C, 0 x3A, 0 x00, 0 x05 } }, /* 350 350 0.0 */
};
static const struct intel_ddi_buf_trans adls_combo_phy_trans_edp_hbr2 = {
.entries = _adls_combo_phy_trans_edp_hbr2,
.num_entries = ARRAY_SIZE(_adls_combo_phy_trans_edp_hbr2),
};
static const union intel_ddi_buf_trans_entry _adls_combo_phy_trans_edp_hbr3[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x63, 0 x31, 0 x00, 0 x0E } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2C, 0 x00, 0 x13 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x47, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x63, 0 x37, 0 x00, 0 x08 } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x73, 0 x32, 0 x00, 0 x0D } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x58, 0 x3F, 0 x00, 0 x00 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans adls_combo_phy_trans_edp_hbr3 = {
.entries = _adls_combo_phy_trans_edp_hbr3,
.num_entries = ARRAY_SIZE(_adls_combo_phy_trans_edp_hbr3),
};
static const union intel_ddi_buf_trans_entry _adlp_combo_phy_trans_dp_hbr[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x71, 0 x31, 0 x00, 0 x0E } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2C, 0 x00, 0 x13 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x4C, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x73, 0 x34, 0 x00, 0 x0B } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x2F, 0 x00, 0 x10 } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x7C, 0 x3C, 0 x00, 0 x03 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x35, 0 x00, 0 x0A } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans adlp_combo_phy_trans_dp_hbr = {
.entries = _adlp_combo_phy_trans_dp_hbr,
.num_entries = ARRAY_SIZE(_adlp_combo_phy_trans_dp_hbr),
};
static const union intel_ddi_buf_trans_entry _adlp_combo_phy_trans_dp_hbr2_hbr3[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x71, 0 x30, 0 x00, 0 x0F } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2B, 0 x00, 0 x14 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x4C, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x73, 0 x34, 0 x00, 0 x0B } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x30, 0 x00, 0 x0F } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x63, 0 x3F, 0 x00, 0 x00 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x38, 0 x00, 0 x07 } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const union intel_ddi_buf_trans_entry _adlp_combo_phy_trans_edp_hbr2[] = {
/* NT mV Trans mV db */
{ .icl = { 0 x4, 0 x50, 0 x38, 0 x00, 0 x07 } }, /* 200 200 0.0 */
{ .icl = { 0 x4, 0 x58, 0 x35, 0 x00, 0 x0A } }, /* 200 250 1.9 */
{ .icl = { 0 x4, 0 x60, 0 x34, 0 x00, 0 x0B } }, /* 200 300 3.5 */
{ .icl = { 0 x4, 0 x6A, 0 x32, 0 x00, 0 x0D } }, /* 200 350 4.9 */
{ .icl = { 0 x4, 0 x5E, 0 x38, 0 x00, 0 x07 } }, /* 250 250 0.0 */
{ .icl = { 0 x4, 0 x61, 0 x36, 0 x00, 0 x09 } }, /* 250 300 1.6 */
{ .icl = { 0 x4, 0 x6B, 0 x34, 0 x00, 0 x0B } }, /* 250 350 2.9 */
{ .icl = { 0 x4, 0 x69, 0 x39, 0 x00, 0 x06 } }, /* 300 300 0.0 */
{ .icl = { 0 x4, 0 x73, 0 x37, 0 x00, 0 x08 } }, /* 300 350 1.3 */
{ .icl = { 0 x4, 0 x7A, 0 x38, 0 x00, 0 x07 } }, /* 350 350 0.0 */
};
static const union intel_ddi_buf_trans_entry _adlp_combo_phy_trans_dp_hbr2_edp_hbr3[] = {
/* NT mV Trans mV db */
{ .icl = { 0 xA, 0 x35, 0 x3F, 0 x00, 0 x00 } }, /* 350 350 0.0 */
{ .icl = { 0 xA, 0 x4F, 0 x37, 0 x00, 0 x08 } }, /* 350 500 3.1 */
{ .icl = { 0 xC, 0 x71, 0 x30, 0 x00, 0 x0f } }, /* 350 700 6.0 */
{ .icl = { 0 x6, 0 x7F, 0 x2B, 0 x00, 0 x14 } }, /* 350 900 8.2 */
{ .icl = { 0 xA, 0 x4C, 0 x3F, 0 x00, 0 x00 } }, /* 500 500 0.0 */
{ .icl = { 0 xC, 0 x73, 0 x34, 0 x00, 0 x0B } }, /* 500 700 2.9 */
{ .icl = { 0 x6, 0 x7F, 0 x30, 0 x00, 0 x0F } }, /* 500 900 5.1 */
{ .icl = { 0 xC, 0 x63, 0 x3F, 0 x00, 0 x00 } }, /* 650 700 0.6 */
{ .icl = { 0 x6, 0 x7F, 0 x38, 0 x00, 0 x07 } }, /* 600 900 3.5 */
{ .icl = { 0 x6, 0 x7F, 0 x3F, 0 x00, 0 x00 } }, /* 900 900 0.0 */
};
static const struct intel_ddi_buf_trans adlp_combo_phy_trans_dp_hbr2_hbr3 = {
.entries = _adlp_combo_phy_trans_dp_hbr2_hbr3,
.num_entries = ARRAY_SIZE(_adlp_combo_phy_trans_dp_hbr2_hbr3),
};
static const struct intel_ddi_buf_trans adlp_combo_phy_trans_edp_hbr3 = {
.entries = _adlp_combo_phy_trans_dp_hbr2_edp_hbr3,
.num_entries = ARRAY_SIZE(_adlp_combo_phy_trans_dp_hbr2_edp_hbr3),
};
static const struct intel_ddi_buf_trans adlp_combo_phy_trans_edp_up_to_hbr2 = {
.entries = _adlp_combo_phy_trans_edp_hbr2,
.num_entries = ARRAY_SIZE(_adlp_combo_phy_trans_edp_hbr2),
};
static const union intel_ddi_buf_trans_entry _adlp_dkl_phy_trans_dp_hbr[] = {
/* VS pre-emp Non-trans mV Pre-emph dB */
{ .dkl = { 0 x7, 0 x0, 0 x01 } }, /* 0 0 400mV 0 dB */
{ .dkl = { 0 x5, 0 x0, 0 x06 } }, /* 0 1 400mV 3.5 dB */
{ .dkl = { 0 x2, 0 x0, 0 x0B } }, /* 0 2 400mV 6 dB */
{ .dkl = { 0 x0, 0 x0, 0 x17 } }, /* 0 3 400mV 9.5 dB */
{ .dkl = { 0 x5, 0 x0, 0 x00 } }, /* 1 0 600mV 0 dB */
{ .dkl = { 0 x2, 0 x0, 0 x08 } }, /* 1 1 600mV 3.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x14 } }, /* 1 2 600mV 6 dB */
{ .dkl = { 0 x2, 0 x0, 0 x00 } }, /* 2 0 800mV 0 dB */
{ .dkl = { 0 x0, 0 x0, 0 x0B } }, /* 2 1 800mV 3.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x00 } }, /* 3 0 1200mV 0 dB */
};
static const struct intel_ddi_buf_trans adlp_dkl_phy_trans_dp_hbr = {
.entries = _adlp_dkl_phy_trans_dp_hbr,
.num_entries = ARRAY_SIZE(_adlp_dkl_phy_trans_dp_hbr),
};
static const union intel_ddi_buf_trans_entry _adlp_dkl_phy_trans_dp_hbr2_hbr3[] = {
/* VS pre-emp Non-trans mV Pre-emph dB */
{ .dkl = { 0 x7, 0 x0, 0 x00 } }, /* 0 0 400mV 0 dB */
{ .dkl = { 0 x5, 0 x0, 0 x04 } }, /* 0 1 400mV 3.5 dB */
{ .dkl = { 0 x2, 0 x0, 0 x0A } }, /* 0 2 400mV 6 dB */
{ .dkl = { 0 x0, 0 x0, 0 x18 } }, /* 0 3 400mV 9.5 dB */
{ .dkl = { 0 x5, 0 x0, 0 x00 } }, /* 1 0 600mV 0 dB */
{ .dkl = { 0 x2, 0 x0, 0 x06 } }, /* 1 1 600mV 3.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x14 } }, /* 1 2 600mV 6 dB */
{ .dkl = { 0 x2, 0 x0, 0 x00 } }, /* 2 0 800mV 0 dB */
{ .dkl = { 0 x0, 0 x0, 0 x09 } }, /* 2 1 800mV 3.5 dB */
{ .dkl = { 0 x0, 0 x0, 0 x00 } }, /* 3 0 1200mV 0 dB */
};
static const struct intel_ddi_buf_trans adlp_dkl_phy_trans_dp_hbr2_hbr3 = {
.entries = _adlp_dkl_phy_trans_dp_hbr2_hbr3,
.num_entries = ARRAY_SIZE(_adlp_dkl_phy_trans_dp_hbr2_hbr3),
};
static const union intel_ddi_buf_trans_entry _dg2_snps_trans[] = {
{ .snps = { 25 , 0 , 0 } }, /* VS 0, pre-emph 0 */
{ .snps = { 32 , 0 , 6 } }, /* VS 0, pre-emph 1 */
{ .snps = { 35 , 0 , 10 } }, /* VS 0, pre-emph 2 */
{ .snps = { 43 , 0 , 17 } }, /* VS 0, pre-emph 3 */
{ .snps = { 35 , 0 , 0 } }, /* VS 1, pre-emph 0 */
{ .snps = { 45 , 0 , 8 } }, /* VS 1, pre-emph 1 */
{ .snps = { 48 , 0 , 14 } }, /* VS 1, pre-emph 2 */
{ .snps = { 47 , 0 , 0 } }, /* VS 2, pre-emph 0 */
{ .snps = { 55 , 0 , 7 } }, /* VS 2, pre-emph 1 */
{ .snps = { 62 , 0 , 0 } }, /* VS 3, pre-emph 0 */
};
static const struct intel_ddi_buf_trans dg2_snps_trans = {
.entries = _dg2_snps_trans,
.num_entries = ARRAY_SIZE(_dg2_snps_trans),
.hdmi_default_entry = ARRAY_SIZE(_dg2_snps_trans) - 1 ,
};
static const union intel_ddi_buf_trans_entry _dg2_snps_trans_uhbr[] = {
{ .snps = { 62 , 0 , 0 } }, /* preset 0 */
{ .snps = { 55 , 0 , 7 } }, /* preset 1 */
{ .snps = { 50 , 0 , 12 } }, /* preset 2 */
{ .snps = { 44 , 0 , 18 } }, /* preset 3 */
{ .snps = { 35 , 0 , 21 } }, /* preset 4 */
{ .snps = { 59 , 3 , 0 } }, /* preset 5 */
{ .snps = { 53 , 3 , 6 } }, /* preset 6 */
{ .snps = { 48 , 3 , 11 } }, /* preset 7 */
{ .snps = { 42 , 5 , 15 } }, /* preset 8 */
{ .snps = { 37 , 5 , 20 } }, /* preset 9 */
{ .snps = { 56 , 6 , 0 } }, /* preset 10 */
{ .snps = { 48 , 7 , 7 } }, /* preset 11 */
{ .snps = { 45 , 7 , 10 } }, /* preset 12 */
{ .snps = { 39 , 8 , 15 } }, /* preset 13 */
{ .snps = { 48 , 14 , 0 } }, /* preset 14 */
{ .snps = { 45 , 4 , 4 } }, /* preset 15 */
};
static const struct intel_ddi_buf_trans dg2_snps_trans_uhbr = {
.entries = _dg2_snps_trans_uhbr,
.num_entries = ARRAY_SIZE(_dg2_snps_trans_uhbr),
};
static const union intel_ddi_buf_trans_entry _mtl_c10_trans_dp14[] = {
{ .snps = { 26 , 0 , 0 } }, /* preset 0 */
{ .snps = { 33 , 0 , 6 } }, /* preset 1 */
{ .snps = { 38 , 0 , 11 } }, /* preset 2 */
{ .snps = { 43 , 0 , 19 } }, /* preset 3 */
{ .snps = { 39 , 0 , 0 } }, /* preset 4 */
{ .snps = { 45 , 0 , 7 } }, /* preset 5 */
{ .snps = { 46 , 0 , 13 } }, /* preset 6 */
{ .snps = { 46 , 0 , 0 } }, /* preset 7 */
{ .snps = { 55 , 0 , 7 } }, /* preset 8 */
{ .snps = { 62 , 0 , 0 } }, /* preset 9 */
};
static const struct intel_ddi_buf_trans mtl_c10_trans_dp14 = {
.entries = _mtl_c10_trans_dp14,
.num_entries = ARRAY_SIZE(_mtl_c10_trans_dp14),
.hdmi_default_entry = ARRAY_SIZE(_mtl_c10_trans_dp14) - 1 ,
};
/* DP1.4 */
static const union intel_ddi_buf_trans_entry _mtl_c20_trans_dp14[] = {
{ .snps = { 20 , 0 , 0 } }, /* preset 0 */
{ .snps = { 24 , 0 , 4 } }, /* preset 1 */
{ .snps = { 30 , 0 , 9 } }, /* preset 2 */
{ .snps = { 34 , 0 , 14 } }, /* preset 3 */
{ .snps = { 29 , 0 , 0 } }, /* preset 4 */
{ .snps = { 34 , 0 , 5 } }, /* preset 5 */
{ .snps = { 38 , 0 , 10 } }, /* preset 6 */
{ .snps = { 36 , 0 , 0 } }, /* preset 7 */
{ .snps = { 40 , 0 , 6 } }, /* preset 8 */
{ .snps = { 48 , 0 , 0 } }, /* preset 9 */
};
/* DP2.0 */
static const union intel_ddi_buf_trans_entry _mtl_c20_trans_uhbr[] = {
{ .snps = { 48 , 0 , 0 } }, /* preset 0 */
{ .snps = { 43 , 0 , 5 } }, /* preset 1 */
{ .snps = { 40 , 0 , 8 } }, /* preset 2 */
{ .snps = { 37 , 0 , 11 } }, /* preset 3 */
{ .snps = { 33 , 0 , 15 } }, /* preset 4 */
{ .snps = { 46 , 2 , 0 } }, /* preset 5 */
{ .snps = { 42 , 2 , 4 } }, /* preset 6 */
{ .snps = { 38 , 2 , 8 } }, /* preset 7 */
{ .snps = { 35 , 2 , 11 } }, /* preset 8 */
{ .snps = { 33 , 2 , 13 } }, /* preset 9 */
{ .snps = { 44 , 4 , 0 } }, /* preset 10 */
{ .snps = { 40 , 4 , 4 } }, /* preset 11 */
{ .snps = { 37 , 4 , 7 } }, /* preset 12 */
{ .snps = { 33 , 4 , 11 } }, /* preset 13 */
{ .snps = { 40 , 8 , 0 } }, /* preset 14 */
{ .snps = { 30 , 2 , 2 } }, /* preset 15 */
};
/* HDMI2.0 */
static const union intel_ddi_buf_trans_entry _mtl_c20_trans_hdmi[] = {
{ .snps = { 48 , 0 , 0 } }, /* preset 0 */
{ .snps = { 38 , 4 , 6 } }, /* preset 1 */
{ .snps = { 36 , 4 , 8 } }, /* preset 2 */
{ .snps = { 34 , 4 , 10 } }, /* preset 3 */
{ .snps = { 32 , 4 , 12 } }, /* preset 4 */
};
static const struct intel_ddi_buf_trans mtl_c20_trans_hdmi = {
.entries = _mtl_c20_trans_hdmi,
.num_entries = ARRAY_SIZE(_mtl_c20_trans_hdmi),
.hdmi_default_entry = 0 ,
};
static const struct intel_ddi_buf_trans mtl_c20_trans_dp14 = {
.entries = _mtl_c20_trans_dp14,
.num_entries = ARRAY_SIZE(_mtl_c20_trans_dp14),
.hdmi_default_entry = ARRAY_SIZE(_mtl_c20_trans_dp14) - 1 ,
};
static const struct intel_ddi_buf_trans mtl_c20_trans_uhbr = {
.entries = _mtl_c20_trans_uhbr,
.num_entries = ARRAY_SIZE(_mtl_c20_trans_uhbr),
};
bool is_hobl_buf_trans(const struct intel_ddi_buf_trans *table)
{
return table == &tgl_combo_phy_trans_edp_hbr2_hobl;
}
static bool use_edp_hobl(struct intel_encoder *encoder)
{
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
struct intel_connector *connector = intel_dp->attached_connector;
return connector->panel.vbt.edp.hobl && !intel_dp->hobl_failed;
}
static bool use_edp_low_vswing(struct intel_encoder *encoder)
{
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
struct intel_connector *connector = intel_dp->attached_connector;
return connector->panel.vbt.edp.low_vswing;
}
static const struct intel_ddi_buf_trans *
intel_get_buf_trans(const struct intel_ddi_buf_trans *trans, int *num_entries)
{
*num_entries = trans->num_entries;
return trans;
}
static const struct intel_ddi_buf_trans *
hsw_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_ANALOG))
return intel_get_buf_trans(&hsw_trans_fdi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&hsw_trans_hdmi, n_entries);
else
return intel_get_buf_trans(&hsw_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
bdw_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_ANALOG))
return intel_get_buf_trans(&bdw_trans_fdi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&bdw_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return intel_get_buf_trans(&bdw_trans_edp, n_entries);
else
return intel_get_buf_trans(&bdw_trans_dp, n_entries);
}
static int skl_buf_trans_num_entries(enum port port, int n_entries)
{
/* Only DDIA and DDIE can select the 10th register with DP */
if (port == PORT_A || port == PORT_E)
return min(n_entries, 10 );
else
return min(n_entries, 9 );
}
static const struct intel_ddi_buf_trans *
_skl_get_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_ddi_buf_trans *trans,
int *n_entries)
{
trans = intel_get_buf_trans(trans, n_entries);
*n_entries = skl_buf_trans_num_entries(encoder->port, *n_entries);
return trans;
}
static const struct intel_ddi_buf_trans *
skl_y_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&skl_y_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return _skl_get_buf_trans_dp(encoder, &skl_y_trans_edp, n_entries);
else
return _skl_get_buf_trans_dp(encoder, &skl_y_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
skl_u_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&skl_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return _skl_get_buf_trans_dp(encoder, &skl_u_trans_edp, n_entries);
else
return _skl_get_buf_trans_dp(encoder, &skl_u_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
skl_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&skl_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return _skl_get_buf_trans_dp(encoder, &skl_trans_edp, n_entries);
else
return _skl_get_buf_trans_dp(encoder, &skl_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
kbl_y_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&skl_y_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return _skl_get_buf_trans_dp(encoder, &skl_y_trans_edp, n_entries);
else
return _skl_get_buf_trans_dp(encoder, &kbl_y_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
kbl_u_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&skl_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return _skl_get_buf_trans_dp(encoder, &skl_u_trans_edp, n_entries);
else
return _skl_get_buf_trans_dp(encoder, &kbl_u_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
kbl_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&skl_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return _skl_get_buf_trans_dp(encoder, &skl_trans_edp, n_entries);
else
return _skl_get_buf_trans_dp(encoder, &kbl_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
bxt_get_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&bxt_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return intel_get_buf_trans(&bxt_trans_edp, n_entries);
else
return intel_get_buf_trans(&bxt_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
icl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
n_entries);
}
static const struct intel_ddi_buf_trans *
icl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 540000 ) {
return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
n_entries);
} else if (use_edp_low_vswing(encoder)) {
return intel_get_buf_trans(&icl_combo_phy_trans_edp_hbr2,
n_entries);
}
return icl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
icl_get_combo_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_combo_phy_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return icl_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return icl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
icl_get_mg_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 ) {
return intel_get_buf_trans(&icl_mg_phy_trans_hbr2_hbr3,
n_entries);
} else {
return intel_get_buf_trans(&icl_mg_phy_trans_rbr_hbr,
n_entries);
}
}
static const struct intel_ddi_buf_trans *
icl_get_mg_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_mg_phy_trans_hdmi, n_entries);
else
return icl_get_mg_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
ehl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 )
return intel_get_buf_trans(&ehl_combo_phy_trans_edp_hbr2, n_entries);
else
return intel_get_buf_trans(&icl_combo_phy_trans_edp_hbr2, n_entries);
}
static const struct intel_ddi_buf_trans *
ehl_get_combo_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_combo_phy_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return ehl_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return intel_get_buf_trans(&ehl_combo_phy_trans_dp, n_entries);
}
static const struct intel_ddi_buf_trans *
jsl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 )
return intel_get_buf_trans(&jsl_combo_phy_trans_edp_hbr2, n_entries);
else
return intel_get_buf_trans(&jsl_combo_phy_trans_edp_hbr, n_entries);
}
static const struct intel_ddi_buf_trans *
jsl_get_combo_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_combo_phy_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP) &&
use_edp_low_vswing(encoder))
return jsl_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3, n_entries);
}
static const struct intel_ddi_buf_trans *
tgl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
struct intel_display *display = to_intel_display(encoder);
if (crtc_state->port_clock > 270000 ) {
if (display->platform.tigerlake_uy) {
return intel_get_buf_trans(&tgl_uy_combo_phy_trans_dp_hbr2,
n_entries);
} else {
return intel_get_buf_trans(&tgl_combo_phy_trans_dp_hbr2,
n_entries);
}
} else {
return intel_get_buf_trans(&tgl_combo_phy_trans_dp_hbr,
n_entries);
}
}
static const struct intel_ddi_buf_trans *
tgl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 540000 ) {
return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
n_entries);
} else if (use_edp_hobl(encoder)) {
return intel_get_buf_trans(&tgl_combo_phy_trans_edp_hbr2_hobl,
n_entries);
} else if (use_edp_low_vswing(encoder)) {
return intel_get_buf_trans(&icl_combo_phy_trans_edp_hbr2,
n_entries);
}
return tgl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
tgl_get_combo_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_combo_phy_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return tgl_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return tgl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
dg1_get_combo_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 )
return intel_get_buf_trans(&dg1_combo_phy_trans_dp_hbr2_hbr3,
n_entries);
else
return intel_get_buf_trans(&dg1_combo_phy_trans_dp_rbr_hbr,
n_entries);
}
static const struct intel_ddi_buf_trans *
dg1_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 540000 )
return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
n_entries);
else if (use_edp_hobl(encoder))
return intel_get_buf_trans(&tgl_combo_phy_trans_edp_hbr2_hobl,
n_entries);
else if (use_edp_low_vswing(encoder))
return intel_get_buf_trans(&icl_combo_phy_trans_edp_hbr2,
n_entries);
else
return dg1_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
dg1_get_combo_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_combo_phy_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return dg1_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return dg1_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
rkl_get_combo_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 )
return intel_get_buf_trans(&rkl_combo_phy_trans_dp_hbr2_hbr3, n_entries);
else
return intel_get_buf_trans(&rkl_combo_phy_trans_dp_hbr, n_entries);
}
static const struct intel_ddi_buf_trans *
rkl_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 540000 ) {
return intel_get_buf_trans(&icl_combo_phy_trans_dp_hbr2_edp_hbr3,
n_entries);
} else if (use_edp_hobl(encoder)) {
return intel_get_buf_trans(&tgl_combo_phy_trans_edp_hbr2_hobl,
n_entries);
} else if (use_edp_low_vswing(encoder)) {
return intel_get_buf_trans(&icl_combo_phy_trans_edp_hbr2,
n_entries);
}
return rkl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
rkl_get_combo_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_combo_phy_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return rkl_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return rkl_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
adls_get_combo_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 )
return intel_get_buf_trans(&adls_combo_phy_trans_dp_hbr2_hbr3, n_entries);
else
return intel_get_buf_trans(&tgl_combo_phy_trans_dp_hbr, n_entries);
}
static const struct intel_ddi_buf_trans *
adls_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 540000 )
return intel_get_buf_trans(&adls_combo_phy_trans_edp_hbr3, n_entries);
else if (use_edp_hobl(encoder))
return intel_get_buf_trans(&tgl_combo_phy_trans_edp_hbr2_hobl, n_entries);
else if (use_edp_low_vswing(encoder))
return intel_get_buf_trans(&adls_combo_phy_trans_edp_hbr2, n_entries);
else
return adls_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
adls_get_combo_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_combo_phy_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return adls_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return adls_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
adlp_get_combo_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 )
return intel_get_buf_trans(&adlp_combo_phy_trans_dp_hbr2_hbr3, n_entries);
else
return intel_get_buf_trans(&adlp_combo_phy_trans_dp_hbr, n_entries);
}
static const struct intel_ddi_buf_trans *
adlp_get_combo_buf_trans_edp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 540000 ) {
return intel_get_buf_trans(&adlp_combo_phy_trans_edp_hbr3,
n_entries);
} else if (use_edp_hobl(encoder)) {
return intel_get_buf_trans(&tgl_combo_phy_trans_edp_hbr2_hobl,
n_entries);
} else if (use_edp_low_vswing(encoder)) {
return intel_get_buf_trans(&adlp_combo_phy_trans_edp_up_to_hbr2,
n_entries);
}
return adlp_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
adlp_get_combo_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&icl_combo_phy_trans_hdmi, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP))
return adlp_get_combo_buf_trans_edp(encoder, crtc_state, n_entries);
else
return adlp_get_combo_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
tgl_get_dkl_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 ) {
return intel_get_buf_trans(&tgl_dkl_phy_trans_dp_hbr2,
n_entries);
} else {
return intel_get_buf_trans(&tgl_dkl_phy_trans_dp_hbr,
n_entries);
}
}
static const struct intel_ddi_buf_trans *
tgl_get_dkl_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&tgl_dkl_phy_trans_hdmi, n_entries);
else
return tgl_get_dkl_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
adlp_get_dkl_buf_trans_dp(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (crtc_state->port_clock > 270000 ) {
return intel_get_buf_trans(&adlp_dkl_phy_trans_dp_hbr2_hbr3,
n_entries);
} else {
return intel_get_buf_trans(&adlp_dkl_phy_trans_dp_hbr,
n_entries);
}
}
static const struct intel_ddi_buf_trans *
adlp_get_dkl_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&tgl_dkl_phy_trans_hdmi, n_entries);
else
return adlp_get_dkl_buf_trans_dp(encoder, crtc_state, n_entries);
}
static const struct intel_ddi_buf_trans *
dg2_get_snps_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_dp_encoder(crtc_state) &&
intel_dp_is_uhbr(crtc_state))
return intel_get_buf_trans(&dg2_snps_trans_uhbr, n_entries);
else
return intel_get_buf_trans(&dg2_snps_trans, n_entries);
}
static const struct intel_ddi_buf_trans *
mtl_get_c10_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
return intel_get_buf_trans(&mtl_c10_trans_dp14, n_entries);
}
static const struct intel_ddi_buf_trans *
mtl_get_c20_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state,
int *n_entries)
{
if (intel_crtc_has_dp_encoder(crtc_state) && intel_dp_is_uhbr(crtc_state))
return intel_get_buf_trans(&mtl_c20_trans_uhbr, n_entries);
else if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI))
return intel_get_buf_trans(&mtl_c20_trans_hdmi, n_entries);
else
return intel_get_buf_trans(&mtl_c20_trans_dp14, n_entries);
}
void intel_ddi_buf_trans_init(struct intel_encoder *encoder)
{
struct intel_display *display = to_intel_display(encoder);
if (DISPLAY_VER(display) >= 14 ) {
if (intel_encoder_is_c10phy(encoder))
encoder->get_buf_trans = mtl_get_c10_buf_trans;
else
encoder->get_buf_trans = mtl_get_c20_buf_trans;
} else if (display->platform.dg2) {
encoder->get_buf_trans = dg2_get_snps_buf_trans;
} else if (display->platform.alderlake_p) {
if (intel_encoder_is_combo(encoder))
encoder->get_buf_trans = adlp_get_combo_buf_trans;
else
encoder->get_buf_trans = adlp_get_dkl_buf_trans;
} else if (display->platform.alderlake_s) {
encoder->get_buf_trans = adls_get_combo_buf_trans;
} else if (display->platform.rocketlake) {
encoder->get_buf_trans = rkl_get_combo_buf_trans;
} else if (display->platform.dg1) {
encoder->get_buf_trans = dg1_get_combo_buf_trans;
} else if (DISPLAY_VER(display) >= 12 ) {
if (intel_encoder_is_combo(encoder))
encoder->get_buf_trans = tgl_get_combo_buf_trans;
else
encoder->get_buf_trans = tgl_get_dkl_buf_trans;
} else if (DISPLAY_VER(display) == 11 ) {
if (display->platform.jasperlake)
encoder->get_buf_trans = jsl_get_combo_buf_trans;
else if (display->platform.elkhartlake)
encoder->get_buf_trans = ehl_get_combo_buf_trans;
else if (intel_encoder_is_combo(encoder))
encoder->get_buf_trans = icl_get_combo_buf_trans;
else
encoder->get_buf_trans = icl_get_mg_buf_trans;
} else if (display->platform.geminilake || display->platform.broxton) {
encoder->get_buf_trans = bxt_get_buf_trans;
} else if (display->platform.cometlake_ulx ||
display->platform.coffeelake_ulx ||
display->platform.kabylake_ulx) {
encoder->get_buf_trans = kbl_y_get_buf_trans;
} else if (display->platform.cometlake_ult ||
display->platform.coffeelake_ult ||
display->platform.kabylake_ult) {
encoder->get_buf_trans = kbl_u_get_buf_trans;
} else if (display->platform.cometlake ||
display->platform.coffeelake ||
display->platform.kabylake) {
encoder->get_buf_trans = kbl_get_buf_trans;
} else if (display->platform.skylake_ulx) {
encoder->get_buf_trans = skl_y_get_buf_trans;
} else if (display->platform.skylake_ult) {
encoder->get_buf_trans = skl_u_get_buf_trans;
} else if (display->platform.skylake) {
encoder->get_buf_trans = skl_get_buf_trans;
} else if (display->platform.broadwell) {
encoder->get_buf_trans = bdw_get_buf_trans;
} else if (display->platform.haswell) {
encoder->get_buf_trans = hsw_get_buf_trans;
} else {
struct pci_dev *pdev = to_pci_dev(display->drm->dev);
MISSING_CASE(pdev->device);
}
}
Messung V0.5 in Prozent C=95 H=92 G=93
¤ Dauer der Verarbeitung: 0.33 Sekunden
(vorverarbeitet am 2026-06-08)
¤
*© Formatika GbR, Deutschland