drm/amd/display: remove dead dc vbios code
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> Reviewed-by: Charlene Liu <Charlene.Liu@amd.com> Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
61ea4c6f70
commit
5a8132b9f6
3 changed files with 39 additions and 1514 deletions
File diff suppressed because it is too large
Load diff
|
@ -166,21 +166,6 @@ static uint8_t bios_parser_get_connectors_number(struct dc_bios *dcb)
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct graphics_object_id bios_parser_get_encoder_id(
|
|
||||||
struct dc_bios *dcb,
|
|
||||||
uint32_t i)
|
|
||||||
{
|
|
||||||
struct bios_parser *bp = BP_FROM_DCB(dcb);
|
|
||||||
struct graphics_object_id object_id = dal_graphics_object_id_init(
|
|
||||||
0, ENUM_ID_UNKNOWN, OBJECT_TYPE_UNKNOWN);
|
|
||||||
|
|
||||||
if (bp->object_info_tbl.v1_4->number_of_path > i)
|
|
||||||
object_id = object_id_from_bios_object_id(
|
|
||||||
bp->object_info_tbl.v1_4->display_path[i].encoderobjid);
|
|
||||||
|
|
||||||
return object_id;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct graphics_object_id bios_parser_get_connector_id(
|
static struct graphics_object_id bios_parser_get_connector_id(
|
||||||
struct dc_bios *dcb,
|
struct dc_bios *dcb,
|
||||||
uint8_t i)
|
uint8_t i)
|
||||||
|
@ -204,26 +189,6 @@ static struct graphics_object_id bios_parser_get_connector_id(
|
||||||
return object_id;
|
return object_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* TODO: GetNumberOfSrc*/
|
|
||||||
|
|
||||||
static uint32_t bios_parser_get_dst_number(struct dc_bios *dcb,
|
|
||||||
struct graphics_object_id id)
|
|
||||||
{
|
|
||||||
/* connector has 1 Dest, encoder has 0 Dest */
|
|
||||||
switch (id.type) {
|
|
||||||
case OBJECT_TYPE_ENCODER:
|
|
||||||
return 0;
|
|
||||||
case OBJECT_TYPE_CONNECTOR:
|
|
||||||
return 1;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* removed getSrcObjList, getDestObjList*/
|
|
||||||
|
|
||||||
|
|
||||||
static enum bp_result bios_parser_get_src_obj(struct dc_bios *dcb,
|
static enum bp_result bios_parser_get_src_obj(struct dc_bios *dcb,
|
||||||
struct graphics_object_id object_id, uint32_t index,
|
struct graphics_object_id object_id, uint32_t index,
|
||||||
struct graphics_object_id *src_object_id)
|
struct graphics_object_id *src_object_id)
|
||||||
|
@ -283,52 +248,10 @@ static enum bp_result bios_parser_get_src_obj(struct dc_bios *dcb,
|
||||||
return bp_result;
|
return bp_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum bp_result bios_parser_get_dst_obj(struct dc_bios *dcb,
|
|
||||||
struct graphics_object_id object_id, uint32_t index,
|
|
||||||
struct graphics_object_id *dest_object_id)
|
|
||||||
{
|
|
||||||
struct bios_parser *bp = BP_FROM_DCB(dcb);
|
|
||||||
unsigned int i;
|
|
||||||
enum bp_result bp_result = BP_RESULT_BADINPUT;
|
|
||||||
struct graphics_object_id obj_id = {0};
|
|
||||||
struct object_info_table *tbl = &bp->object_info_tbl;
|
|
||||||
|
|
||||||
if (!dest_object_id)
|
|
||||||
return BP_RESULT_BADINPUT;
|
|
||||||
|
|
||||||
switch (object_id.type) {
|
|
||||||
case OBJECT_TYPE_ENCODER:
|
|
||||||
/* TODO: since num of src must be less than 2.
|
|
||||||
* If found in for loop, should break.
|
|
||||||
* DAL2 implementation may be changed too
|
|
||||||
*/
|
|
||||||
for (i = 0; i < tbl->v1_4->number_of_path; i++) {
|
|
||||||
obj_id = object_id_from_bios_object_id(
|
|
||||||
tbl->v1_4->display_path[i].encoderobjid);
|
|
||||||
if (object_id.type == obj_id.type &&
|
|
||||||
object_id.id == obj_id.id &&
|
|
||||||
object_id.enum_id ==
|
|
||||||
obj_id.enum_id) {
|
|
||||||
*dest_object_id =
|
|
||||||
object_id_from_bios_object_id(
|
|
||||||
tbl->v1_4->display_path[i].display_objid);
|
|
||||||
/* break; */
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bp_result = BP_RESULT_OK;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return bp_result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* from graphics_object_id, find display path which includes the object_id */
|
/* from graphics_object_id, find display path which includes the object_id */
|
||||||
static struct atom_display_object_path_v2 *get_bios_object(
|
static struct atom_display_object_path_v2 *get_bios_object(
|
||||||
struct bios_parser *bp,
|
struct bios_parser *bp,
|
||||||
struct graphics_object_id id)
|
struct graphics_object_id id)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
struct graphics_object_id obj_id = {0};
|
struct graphics_object_id obj_id = {0};
|
||||||
|
@ -337,27 +260,22 @@ static struct atom_display_object_path_v2 *get_bios_object(
|
||||||
case OBJECT_TYPE_ENCODER:
|
case OBJECT_TYPE_ENCODER:
|
||||||
for (i = 0; i < bp->object_info_tbl.v1_4->number_of_path; i++) {
|
for (i = 0; i < bp->object_info_tbl.v1_4->number_of_path; i++) {
|
||||||
obj_id = object_id_from_bios_object_id(
|
obj_id = object_id_from_bios_object_id(
|
||||||
bp->object_info_tbl.v1_4->display_path[i].encoderobjid);
|
bp->object_info_tbl.v1_4->display_path[i].encoderobjid);
|
||||||
if (id.type == obj_id.type &&
|
if (id.type == obj_id.type && id.id == obj_id.id
|
||||||
id.id == obj_id.id &&
|
&& id.enum_id == obj_id.enum_id)
|
||||||
id.enum_id == obj_id.enum_id)
|
return &bp->object_info_tbl.v1_4->display_path[i];
|
||||||
return
|
|
||||||
&bp->object_info_tbl.v1_4->display_path[i];
|
|
||||||
}
|
}
|
||||||
case OBJECT_TYPE_CONNECTOR:
|
case OBJECT_TYPE_CONNECTOR:
|
||||||
case OBJECT_TYPE_GENERIC:
|
case OBJECT_TYPE_GENERIC:
|
||||||
/* Both Generic and Connector Object ID
|
/* Both Generic and Connector Object ID
|
||||||
* will be stored on display_objid
|
* will be stored on display_objid
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < bp->object_info_tbl.v1_4->number_of_path; i++) {
|
for (i = 0; i < bp->object_info_tbl.v1_4->number_of_path; i++) {
|
||||||
obj_id = object_id_from_bios_object_id(
|
obj_id = object_id_from_bios_object_id(
|
||||||
bp->object_info_tbl.v1_4->display_path[i].display_objid
|
bp->object_info_tbl.v1_4->display_path[i].display_objid);
|
||||||
);
|
if (id.type == obj_id.type && id.id == obj_id.id
|
||||||
if (id.type == obj_id.type &&
|
&& id.enum_id == obj_id.enum_id)
|
||||||
id.id == obj_id.id &&
|
return &bp->object_info_tbl.v1_4->display_path[i];
|
||||||
id.enum_id == obj_id.enum_id)
|
|
||||||
return
|
|
||||||
&bp->object_info_tbl.v1_4->display_path[i];
|
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -489,99 +407,6 @@ static enum bp_result get_gpio_i2c_info(
|
||||||
return BP_RESULT_OK;
|
return BP_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum bp_result get_voltage_ddc_info_v4(
|
|
||||||
uint8_t *i2c_line,
|
|
||||||
uint32_t index,
|
|
||||||
struct atom_common_table_header *header,
|
|
||||||
uint8_t *address)
|
|
||||||
{
|
|
||||||
enum bp_result result = BP_RESULT_NORECORD;
|
|
||||||
struct atom_voltage_objects_info_v4_1 *info =
|
|
||||||
(struct atom_voltage_objects_info_v4_1 *) address;
|
|
||||||
|
|
||||||
uint8_t *voltage_current_object =
|
|
||||||
(uint8_t *) (&(info->voltage_object[0]));
|
|
||||||
|
|
||||||
while ((address + le16_to_cpu(header->structuresize)) >
|
|
||||||
voltage_current_object) {
|
|
||||||
struct atom_i2c_voltage_object_v4 *object =
|
|
||||||
(struct atom_i2c_voltage_object_v4 *)
|
|
||||||
voltage_current_object;
|
|
||||||
|
|
||||||
if (object->header.voltage_mode ==
|
|
||||||
ATOM_INIT_VOLTAGE_REGULATOR) {
|
|
||||||
if (object->header.voltage_type == index) {
|
|
||||||
*i2c_line = object->i2c_id ^ 0x90;
|
|
||||||
result = BP_RESULT_OK;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
voltage_current_object +=
|
|
||||||
le16_to_cpu(object->header.object_size);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static enum bp_result bios_parser_get_thermal_ddc_info(
|
|
||||||
struct dc_bios *dcb,
|
|
||||||
uint32_t i2c_channel_id,
|
|
||||||
struct graphics_object_i2c_info *info)
|
|
||||||
{
|
|
||||||
struct bios_parser *bp = BP_FROM_DCB(dcb);
|
|
||||||
struct i2c_id_config_access *config;
|
|
||||||
struct atom_i2c_record record;
|
|
||||||
|
|
||||||
if (!info)
|
|
||||||
return BP_RESULT_BADINPUT;
|
|
||||||
|
|
||||||
config = (struct i2c_id_config_access *) &i2c_channel_id;
|
|
||||||
|
|
||||||
record.i2c_id = config->bfHW_Capable;
|
|
||||||
record.i2c_id |= config->bfI2C_LineMux;
|
|
||||||
record.i2c_id |= config->bfHW_EngineID;
|
|
||||||
|
|
||||||
return get_gpio_i2c_info(bp, &record, info);
|
|
||||||
}
|
|
||||||
|
|
||||||
static enum bp_result bios_parser_get_voltage_ddc_info(struct dc_bios *dcb,
|
|
||||||
uint32_t index,
|
|
||||||
struct graphics_object_i2c_info *info)
|
|
||||||
{
|
|
||||||
uint8_t i2c_line = 0;
|
|
||||||
enum bp_result result = BP_RESULT_NORECORD;
|
|
||||||
uint8_t *voltage_info_address;
|
|
||||||
struct atom_common_table_header *header;
|
|
||||||
struct atom_data_revision revision = {0};
|
|
||||||
struct bios_parser *bp = BP_FROM_DCB(dcb);
|
|
||||||
|
|
||||||
if (!DATA_TABLES(voltageobject_info))
|
|
||||||
return result;
|
|
||||||
|
|
||||||
voltage_info_address = bios_get_image(&bp->base,
|
|
||||||
DATA_TABLES(voltageobject_info),
|
|
||||||
sizeof(struct atom_common_table_header));
|
|
||||||
|
|
||||||
header = (struct atom_common_table_header *) voltage_info_address;
|
|
||||||
|
|
||||||
get_atom_data_table_revision(header, &revision);
|
|
||||||
|
|
||||||
switch (revision.major) {
|
|
||||||
case 4:
|
|
||||||
if (revision.minor != 1)
|
|
||||||
break;
|
|
||||||
result = get_voltage_ddc_info_v4(&i2c_line, index, header,
|
|
||||||
voltage_info_address);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result == BP_RESULT_OK)
|
|
||||||
result = bios_parser_get_thermal_ddc_info(dcb,
|
|
||||||
i2c_line, info);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
static enum bp_result bios_parser_get_hpd_info(
|
static enum bp_result bios_parser_get_hpd_info(
|
||||||
struct dc_bios *dcb,
|
struct dc_bios *dcb,
|
||||||
struct graphics_object_id id,
|
struct graphics_object_id id,
|
||||||
|
@ -997,8 +822,8 @@ static enum bp_result bios_parser_get_spread_spectrum_info(
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum bp_result get_embedded_panel_info_v2_1(
|
static enum bp_result get_embedded_panel_info_v2_1(
|
||||||
struct bios_parser *bp,
|
struct bios_parser *bp,
|
||||||
struct embedded_panel_info *info)
|
struct embedded_panel_info *info)
|
||||||
{
|
{
|
||||||
struct lcd_info_v2_1 *lvds;
|
struct lcd_info_v2_1 *lvds;
|
||||||
|
|
||||||
|
@ -1021,92 +846,78 @@ static enum bp_result get_embedded_panel_info_v2_1(
|
||||||
memset(info, 0, sizeof(struct embedded_panel_info));
|
memset(info, 0, sizeof(struct embedded_panel_info));
|
||||||
|
|
||||||
/* We need to convert from 10KHz units into KHz units */
|
/* We need to convert from 10KHz units into KHz units */
|
||||||
info->lcd_timing.pixel_clk =
|
info->lcd_timing.pixel_clk = le16_to_cpu(lvds->lcd_timing.pixclk) * 10;
|
||||||
le16_to_cpu(lvds->lcd_timing.pixclk) * 10;
|
|
||||||
/* usHActive does not include borders, according to VBIOS team */
|
/* usHActive does not include borders, according to VBIOS team */
|
||||||
info->lcd_timing.horizontal_addressable =
|
info->lcd_timing.horizontal_addressable = le16_to_cpu(lvds->lcd_timing.h_active);
|
||||||
le16_to_cpu(lvds->lcd_timing.h_active);
|
|
||||||
/* usHBlanking_Time includes borders, so we should really be
|
/* usHBlanking_Time includes borders, so we should really be
|
||||||
* subtractingborders duing this translation, but LVDS generally
|
* subtractingborders duing this translation, but LVDS generally
|
||||||
* doesn't have borders, so we should be okay leaving this as is for
|
* doesn't have borders, so we should be okay leaving this as is for
|
||||||
* now. May need to revisit if we ever have LVDS with borders
|
* now. May need to revisit if we ever have LVDS with borders
|
||||||
*/
|
*/
|
||||||
info->lcd_timing.horizontal_blanking_time =
|
info->lcd_timing.horizontal_blanking_time = le16_to_cpu(lvds->lcd_timing.h_blanking_time);
|
||||||
le16_to_cpu(lvds->lcd_timing.h_blanking_time);
|
|
||||||
/* usVActive does not include borders, according to VBIOS team*/
|
/* usVActive does not include borders, according to VBIOS team*/
|
||||||
info->lcd_timing.vertical_addressable =
|
info->lcd_timing.vertical_addressable = le16_to_cpu(lvds->lcd_timing.v_active);
|
||||||
le16_to_cpu(lvds->lcd_timing.v_active);
|
|
||||||
/* usVBlanking_Time includes borders, so we should really be
|
/* usVBlanking_Time includes borders, so we should really be
|
||||||
* subtracting borders duing this translation, but LVDS generally
|
* subtracting borders duing this translation, but LVDS generally
|
||||||
* doesn't have borders, so we should be okay leaving this as is for
|
* doesn't have borders, so we should be okay leaving this as is for
|
||||||
* now. May need to revisit if we ever have LVDS with borders
|
* now. May need to revisit if we ever have LVDS with borders
|
||||||
*/
|
*/
|
||||||
info->lcd_timing.vertical_blanking_time =
|
info->lcd_timing.vertical_blanking_time = le16_to_cpu(lvds->lcd_timing.v_blanking_time);
|
||||||
le16_to_cpu(lvds->lcd_timing.v_blanking_time);
|
info->lcd_timing.horizontal_sync_offset = le16_to_cpu(lvds->lcd_timing.h_sync_offset);
|
||||||
info->lcd_timing.horizontal_sync_offset =
|
info->lcd_timing.horizontal_sync_width = le16_to_cpu(lvds->lcd_timing.h_sync_width);
|
||||||
le16_to_cpu(lvds->lcd_timing.h_sync_offset);
|
info->lcd_timing.vertical_sync_offset = le16_to_cpu(lvds->lcd_timing.v_sync_offset);
|
||||||
info->lcd_timing.horizontal_sync_width =
|
info->lcd_timing.vertical_sync_width = le16_to_cpu(lvds->lcd_timing.v_syncwidth);
|
||||||
le16_to_cpu(lvds->lcd_timing.h_sync_width);
|
|
||||||
info->lcd_timing.vertical_sync_offset =
|
|
||||||
le16_to_cpu(lvds->lcd_timing.v_sync_offset);
|
|
||||||
info->lcd_timing.vertical_sync_width =
|
|
||||||
le16_to_cpu(lvds->lcd_timing.v_syncwidth);
|
|
||||||
info->lcd_timing.horizontal_border = lvds->lcd_timing.h_border;
|
info->lcd_timing.horizontal_border = lvds->lcd_timing.h_border;
|
||||||
info->lcd_timing.vertical_border = lvds->lcd_timing.v_border;
|
info->lcd_timing.vertical_border = lvds->lcd_timing.v_border;
|
||||||
|
|
||||||
/* not provided by VBIOS */
|
/* not provided by VBIOS */
|
||||||
info->lcd_timing.misc_info.HORIZONTAL_CUT_OFF = 0;
|
info->lcd_timing.misc_info.HORIZONTAL_CUT_OFF = 0;
|
||||||
|
|
||||||
info->lcd_timing.misc_info.H_SYNC_POLARITY =
|
info->lcd_timing.misc_info.H_SYNC_POLARITY = ~(uint32_t) (lvds->lcd_timing.miscinfo
|
||||||
~(uint32_t)
|
& ATOM_HSYNC_POLARITY);
|
||||||
(lvds->lcd_timing.miscinfo & ATOM_HSYNC_POLARITY);
|
info->lcd_timing.misc_info.V_SYNC_POLARITY = ~(uint32_t) (lvds->lcd_timing.miscinfo
|
||||||
info->lcd_timing.misc_info.V_SYNC_POLARITY =
|
& ATOM_VSYNC_POLARITY);
|
||||||
~(uint32_t)
|
|
||||||
(lvds->lcd_timing.miscinfo & ATOM_VSYNC_POLARITY);
|
|
||||||
|
|
||||||
/* not provided by VBIOS */
|
/* not provided by VBIOS */
|
||||||
info->lcd_timing.misc_info.VERTICAL_CUT_OFF = 0;
|
info->lcd_timing.misc_info.VERTICAL_CUT_OFF = 0;
|
||||||
|
|
||||||
info->lcd_timing.misc_info.H_REPLICATION_BY2 =
|
info->lcd_timing.misc_info.H_REPLICATION_BY2 = !!(lvds->lcd_timing.miscinfo
|
||||||
!!(lvds->lcd_timing.miscinfo & ATOM_H_REPLICATIONBY2);
|
& ATOM_H_REPLICATIONBY2);
|
||||||
info->lcd_timing.misc_info.V_REPLICATION_BY2 =
|
info->lcd_timing.misc_info.V_REPLICATION_BY2 = !!(lvds->lcd_timing.miscinfo
|
||||||
!!(lvds->lcd_timing.miscinfo & ATOM_V_REPLICATIONBY2);
|
& ATOM_V_REPLICATIONBY2);
|
||||||
info->lcd_timing.misc_info.COMPOSITE_SYNC =
|
info->lcd_timing.misc_info.COMPOSITE_SYNC = !!(lvds->lcd_timing.miscinfo
|
||||||
!!(lvds->lcd_timing.miscinfo & ATOM_COMPOSITESYNC);
|
& ATOM_COMPOSITESYNC);
|
||||||
info->lcd_timing.misc_info.INTERLACE =
|
info->lcd_timing.misc_info.INTERLACE = !!(lvds->lcd_timing.miscinfo & ATOM_INTERLACE);
|
||||||
!!(lvds->lcd_timing.miscinfo & ATOM_INTERLACE);
|
|
||||||
|
|
||||||
/* not provided by VBIOS*/
|
/* not provided by VBIOS*/
|
||||||
info->lcd_timing.misc_info.DOUBLE_CLOCK = 0;
|
info->lcd_timing.misc_info.DOUBLE_CLOCK = 0;
|
||||||
/* not provided by VBIOS*/
|
/* not provided by VBIOS*/
|
||||||
info->ss_id = 0;
|
info->ss_id = 0;
|
||||||
|
|
||||||
info->realtek_eDPToLVDS =
|
info->realtek_eDPToLVDS = !!(lvds->dplvdsrxid == eDP_TO_LVDS_REALTEK_ID);
|
||||||
!!(lvds->dplvdsrxid == eDP_TO_LVDS_REALTEK_ID);
|
|
||||||
|
|
||||||
return BP_RESULT_OK;
|
return BP_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum bp_result bios_parser_get_embedded_panel_info(
|
static enum bp_result bios_parser_get_embedded_panel_info(
|
||||||
struct dc_bios *dcb,
|
struct dc_bios *dcb,
|
||||||
struct embedded_panel_info *info)
|
struct embedded_panel_info *info)
|
||||||
{
|
{
|
||||||
struct bios_parser *bp = BP_FROM_DCB(dcb);
|
struct bios_parser
|
||||||
|
*bp = BP_FROM_DCB(dcb);
|
||||||
struct atom_common_table_header *header;
|
struct atom_common_table_header *header;
|
||||||
struct atom_data_revision tbl_revision;
|
struct atom_data_revision tbl_revision;
|
||||||
|
|
||||||
if (!DATA_TABLES(lcd_info))
|
if (!DATA_TABLES(lcd_info))
|
||||||
return BP_RESULT_FAILURE;
|
return BP_RESULT_FAILURE;
|
||||||
|
|
||||||
header = GET_IMAGE(struct atom_common_table_header,
|
header = GET_IMAGE(struct atom_common_table_header, DATA_TABLES(lcd_info));
|
||||||
DATA_TABLES(lcd_info));
|
|
||||||
|
|
||||||
if (!header)
|
if (!header)
|
||||||
return BP_RESULT_BADBIOSTABLE;
|
return BP_RESULT_BADBIOSTABLE;
|
||||||
|
|
||||||
get_atom_data_table_revision(header, &tbl_revision);
|
get_atom_data_table_revision(header, &tbl_revision);
|
||||||
|
|
||||||
|
|
||||||
switch (tbl_revision.major) {
|
switch (tbl_revision.major) {
|
||||||
case 2:
|
case 2:
|
||||||
switch (tbl_revision.minor) {
|
switch (tbl_revision.minor) {
|
||||||
|
@ -1174,12 +985,6 @@ static bool bios_parser_is_device_id_supported(
|
||||||
mask) != 0;
|
mask) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void bios_parser_post_init(
|
|
||||||
struct dc_bios *dcb)
|
|
||||||
{
|
|
||||||
/* TODO for OPM module. Need implement later */
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint32_t bios_parser_get_ss_entry_number(
|
static uint32_t bios_parser_get_ss_entry_number(
|
||||||
struct dc_bios *dcb,
|
struct dc_bios *dcb,
|
||||||
enum as_signal_type signal)
|
enum as_signal_type signal)
|
||||||
|
@ -1238,17 +1043,6 @@ static enum bp_result bios_parser_set_dce_clock(
|
||||||
return bp->cmd_tbl.set_dce_clock(bp, bp_params);
|
return bp->cmd_tbl.set_dce_clock(bp, bp_params);
|
||||||
}
|
}
|
||||||
|
|
||||||
static unsigned int bios_parser_get_smu_clock_info(
|
|
||||||
struct dc_bios *dcb)
|
|
||||||
{
|
|
||||||
struct bios_parser *bp = BP_FROM_DCB(dcb);
|
|
||||||
|
|
||||||
if (!bp->cmd_tbl.get_smu_clock_info)
|
|
||||||
return BP_RESULT_FAILURE;
|
|
||||||
|
|
||||||
return bp->cmd_tbl.get_smu_clock_info(bp, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static enum bp_result bios_parser_program_crtc_timing(
|
static enum bp_result bios_parser_program_crtc_timing(
|
||||||
struct dc_bios *dcb,
|
struct dc_bios *dcb,
|
||||||
struct bp_hw_crtc_timing_parameters *bp_params)
|
struct bp_hw_crtc_timing_parameters *bp_params)
|
||||||
|
@ -1306,13 +1100,6 @@ static bool bios_parser_is_accelerated_mode(
|
||||||
return bios_is_accelerated_mode(dcb);
|
return bios_is_accelerated_mode(dcb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint32_t bios_parser_get_vga_enabled_displays(
|
|
||||||
struct dc_bios *bios)
|
|
||||||
{
|
|
||||||
return bios_get_vga_enabled_displays(bios);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bios_parser_set_scratch_critical_state
|
* bios_parser_set_scratch_critical_state
|
||||||
*
|
*
|
||||||
|
@ -2071,22 +1858,12 @@ static enum bp_result bios_get_board_layout_info(
|
||||||
static const struct dc_vbios_funcs vbios_funcs = {
|
static const struct dc_vbios_funcs vbios_funcs = {
|
||||||
.get_connectors_number = bios_parser_get_connectors_number,
|
.get_connectors_number = bios_parser_get_connectors_number,
|
||||||
|
|
||||||
.get_encoder_id = bios_parser_get_encoder_id,
|
|
||||||
|
|
||||||
.get_connector_id = bios_parser_get_connector_id,
|
.get_connector_id = bios_parser_get_connector_id,
|
||||||
|
|
||||||
.get_dst_number = bios_parser_get_dst_number,
|
|
||||||
|
|
||||||
.get_src_obj = bios_parser_get_src_obj,
|
.get_src_obj = bios_parser_get_src_obj,
|
||||||
|
|
||||||
.get_dst_obj = bios_parser_get_dst_obj,
|
|
||||||
|
|
||||||
.get_i2c_info = bios_parser_get_i2c_info,
|
.get_i2c_info = bios_parser_get_i2c_info,
|
||||||
|
|
||||||
.get_voltage_ddc_info = bios_parser_get_voltage_ddc_info,
|
|
||||||
|
|
||||||
.get_thermal_ddc_info = bios_parser_get_thermal_ddc_info,
|
|
||||||
|
|
||||||
.get_hpd_info = bios_parser_get_hpd_info,
|
.get_hpd_info = bios_parser_get_hpd_info,
|
||||||
|
|
||||||
.get_device_tag = bios_parser_get_device_tag,
|
.get_device_tag = bios_parser_get_device_tag,
|
||||||
|
@ -2105,10 +1882,7 @@ static const struct dc_vbios_funcs vbios_funcs = {
|
||||||
|
|
||||||
.is_device_id_supported = bios_parser_is_device_id_supported,
|
.is_device_id_supported = bios_parser_is_device_id_supported,
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.is_accelerated_mode = bios_parser_is_accelerated_mode,
|
.is_accelerated_mode = bios_parser_is_accelerated_mode,
|
||||||
.get_vga_enabled_displays = bios_parser_get_vga_enabled_displays,
|
|
||||||
|
|
||||||
.set_scratch_critical_state = bios_parser_set_scratch_critical_state,
|
.set_scratch_critical_state = bios_parser_set_scratch_critical_state,
|
||||||
|
|
||||||
|
@ -2126,20 +1900,12 @@ static const struct dc_vbios_funcs vbios_funcs = {
|
||||||
|
|
||||||
.program_crtc_timing = bios_parser_program_crtc_timing,
|
.program_crtc_timing = bios_parser_program_crtc_timing,
|
||||||
|
|
||||||
/* .blank_crtc = bios_parser_blank_crtc, */
|
|
||||||
|
|
||||||
.crtc_source_select = bios_parser_crtc_source_select,
|
.crtc_source_select = bios_parser_crtc_source_select,
|
||||||
|
|
||||||
/* .external_encoder_control = bios_parser_external_encoder_control, */
|
|
||||||
|
|
||||||
.enable_disp_power_gating = bios_parser_enable_disp_power_gating,
|
.enable_disp_power_gating = bios_parser_enable_disp_power_gating,
|
||||||
|
|
||||||
.post_init = bios_parser_post_init,
|
|
||||||
|
|
||||||
.bios_parser_destroy = firmware_parser_destroy,
|
.bios_parser_destroy = firmware_parser_destroy,
|
||||||
|
|
||||||
.get_smu_clock_info = bios_parser_get_smu_clock_info,
|
|
||||||
|
|
||||||
.get_board_layout_info = bios_get_board_layout_info,
|
.get_board_layout_info = bios_get_board_layout_info,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -41,38 +41,17 @@
|
||||||
struct dc_vbios_funcs {
|
struct dc_vbios_funcs {
|
||||||
uint8_t (*get_connectors_number)(struct dc_bios *bios);
|
uint8_t (*get_connectors_number)(struct dc_bios *bios);
|
||||||
|
|
||||||
struct graphics_object_id (*get_encoder_id)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
uint32_t i);
|
|
||||||
struct graphics_object_id (*get_connector_id)(
|
struct graphics_object_id (*get_connector_id)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
uint8_t connector_index);
|
uint8_t connector_index);
|
||||||
uint32_t (*get_dst_number)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
struct graphics_object_id id);
|
|
||||||
|
|
||||||
enum bp_result (*get_src_obj)(
|
enum bp_result (*get_src_obj)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
struct graphics_object_id object_id, uint32_t index,
|
struct graphics_object_id object_id, uint32_t index,
|
||||||
struct graphics_object_id *src_object_id);
|
struct graphics_object_id *src_object_id);
|
||||||
enum bp_result (*get_dst_obj)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
struct graphics_object_id object_id, uint32_t index,
|
|
||||||
struct graphics_object_id *dest_object_id);
|
|
||||||
|
|
||||||
enum bp_result (*get_i2c_info)(
|
enum bp_result (*get_i2c_info)(
|
||||||
struct dc_bios *dcb,
|
struct dc_bios *dcb,
|
||||||
struct graphics_object_id id,
|
struct graphics_object_id id,
|
||||||
struct graphics_object_i2c_info *info);
|
struct graphics_object_i2c_info *info);
|
||||||
|
|
||||||
enum bp_result (*get_voltage_ddc_info)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
uint32_t index,
|
|
||||||
struct graphics_object_i2c_info *info);
|
|
||||||
enum bp_result (*get_thermal_ddc_info)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
uint32_t i2c_channel_id,
|
|
||||||
struct graphics_object_i2c_info *info);
|
|
||||||
enum bp_result (*get_hpd_info)(
|
enum bp_result (*get_hpd_info)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
struct graphics_object_id id,
|
struct graphics_object_id id,
|
||||||
|
@ -105,35 +84,8 @@ struct dc_vbios_funcs {
|
||||||
struct graphics_object_id object_id,
|
struct graphics_object_id object_id,
|
||||||
struct bp_encoder_cap_info *info);
|
struct bp_encoder_cap_info *info);
|
||||||
|
|
||||||
bool (*is_lid_status_changed)(
|
|
||||||
struct dc_bios *bios);
|
|
||||||
bool (*is_display_config_changed)(
|
|
||||||
struct dc_bios *bios);
|
|
||||||
bool (*is_accelerated_mode)(
|
bool (*is_accelerated_mode)(
|
||||||
struct dc_bios *bios);
|
struct dc_bios *bios);
|
||||||
uint32_t (*get_vga_enabled_displays)(
|
|
||||||
struct dc_bios *bios);
|
|
||||||
void (*get_bios_event_info)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
struct bios_event_info *info);
|
|
||||||
void (*update_requested_backlight_level)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
uint32_t backlight_8bit);
|
|
||||||
uint32_t (*get_requested_backlight_level)(
|
|
||||||
struct dc_bios *bios);
|
|
||||||
void (*take_backlight_control)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
bool cntl);
|
|
||||||
|
|
||||||
bool (*is_active_display)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
enum signal_type signal,
|
|
||||||
const struct connector_device_tag_info *device_tag);
|
|
||||||
enum controller_id (*get_embedded_display_controller_id)(
|
|
||||||
struct dc_bios *bios);
|
|
||||||
uint32_t (*get_embedded_display_refresh_rate)(
|
|
||||||
struct dc_bios *bios);
|
|
||||||
|
|
||||||
void (*set_scratch_critical_state)(
|
void (*set_scratch_critical_state)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
bool state);
|
bool state);
|
||||||
|
@ -149,11 +101,6 @@ struct dc_vbios_funcs {
|
||||||
enum bp_result (*transmitter_control)(
|
enum bp_result (*transmitter_control)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
struct bp_transmitter_control *cntl);
|
struct bp_transmitter_control *cntl);
|
||||||
enum bp_result (*crt_control)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
enum engine_id engine_id,
|
|
||||||
bool enable,
|
|
||||||
uint32_t pixel_clock);
|
|
||||||
enum bp_result (*enable_crtc)(
|
enum bp_result (*enable_crtc)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
enum controller_id id,
|
enum controller_id id,
|
||||||
|
@ -167,8 +114,6 @@ struct dc_vbios_funcs {
|
||||||
enum bp_result (*set_dce_clock)(
|
enum bp_result (*set_dce_clock)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
struct bp_set_dce_clock_parameters *bp_params);
|
struct bp_set_dce_clock_parameters *bp_params);
|
||||||
unsigned int (*get_smu_clock_info)(
|
|
||||||
struct dc_bios *bios);
|
|
||||||
enum bp_result (*enable_spread_spectrum_on_ppll)(
|
enum bp_result (*enable_spread_spectrum_on_ppll)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
struct bp_spread_spectrum_parameters *bp_params,
|
struct bp_spread_spectrum_parameters *bp_params,
|
||||||
|
@ -183,20 +128,11 @@ struct dc_vbios_funcs {
|
||||||
enum bp_result (*program_display_engine_pll)(
|
enum bp_result (*program_display_engine_pll)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
struct bp_pixel_clock_parameters *bp_params);
|
struct bp_pixel_clock_parameters *bp_params);
|
||||||
|
|
||||||
enum signal_type (*dac_load_detect)(
|
|
||||||
struct dc_bios *bios,
|
|
||||||
struct graphics_object_id encoder,
|
|
||||||
struct graphics_object_id connector,
|
|
||||||
enum signal_type display_signal);
|
|
||||||
|
|
||||||
enum bp_result (*enable_disp_power_gating)(
|
enum bp_result (*enable_disp_power_gating)(
|
||||||
struct dc_bios *bios,
|
struct dc_bios *bios,
|
||||||
enum controller_id controller_id,
|
enum controller_id controller_id,
|
||||||
enum bp_pipe_control_action action);
|
enum bp_pipe_control_action action);
|
||||||
|
|
||||||
void (*post_init)(struct dc_bios *bios);
|
|
||||||
|
|
||||||
void (*bios_parser_destroy)(struct dc_bios **dcb);
|
void (*bios_parser_destroy)(struct dc_bios **dcb);
|
||||||
|
|
||||||
enum bp_result (*get_board_layout_info)(
|
enum bp_result (*get_board_layout_info)(
|
||||||
|
|
Loading…
Add table
Reference in a new issue