Skip to content

Commit 7f1d1c2

Browse files
Timur Kristófalexdeucher
authored andcommitted
drm/amd/display: Make get_support_mask_for_device_id reusable
This will be reused by DAC load detection. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 2debe0e commit 7f1d1c2

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

drivers/gpu/drm/amd/display/dc/bios/bios_parser.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@ static ATOM_HPD_INT_RECORD *get_hpd_record(struct bios_parser *bp,
6767
ATOM_OBJECT *object);
6868
static struct device_id device_type_from_device_id(uint16_t device_id);
6969
static uint32_t signal_to_ss_id(enum as_signal_type signal);
70-
static uint32_t get_support_mask_for_device_id(struct device_id device_id);
70+
static uint32_t get_support_mask_for_device_id(
71+
enum dal_device_type device_type,
72+
uint32_t enum_id);
7173
static ATOM_ENCODER_CAP_RECORD_V2 *get_encoder_cap_record(
7274
struct bios_parser *bp,
7375
ATOM_OBJECT *object);
@@ -888,7 +890,7 @@ static bool bios_parser_is_device_id_supported(
888890
{
889891
struct bios_parser *bp = BP_FROM_DCB(dcb);
890892

891-
uint32_t mask = get_support_mask_for_device_id(id);
893+
uint32_t mask = get_support_mask_for_device_id(id.device_type, id.enum_id);
892894

893895
return (le16_to_cpu(bp->object_info_tbl.v1_1->usDeviceSupport) & mask) != 0;
894896
}
@@ -2179,11 +2181,10 @@ static uint32_t signal_to_ss_id(enum as_signal_type signal)
21792181
return clk_id_ss;
21802182
}
21812183

2182-
static uint32_t get_support_mask_for_device_id(struct device_id device_id)
2184+
static uint32_t get_support_mask_for_device_id(
2185+
enum dal_device_type device_type,
2186+
uint32_t enum_id)
21832187
{
2184-
enum dal_device_type device_type = device_id.device_type;
2185-
uint32_t enum_id = device_id.enum_id;
2186-
21872188
switch (device_type) {
21882189
case DEVICE_TYPE_LCD:
21892190
switch (enum_id) {

0 commit comments

Comments
 (0)