Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Timur Kristóf and committed by
Alex Deucher
7f1d1c2f 2debe0ec

+7 -6
+7 -6
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
··· 67 67 ATOM_OBJECT *object); 68 68 static struct device_id device_type_from_device_id(uint16_t device_id); 69 69 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); 71 73 static ATOM_ENCODER_CAP_RECORD_V2 *get_encoder_cap_record( 72 74 struct bios_parser *bp, 73 75 ATOM_OBJECT *object); ··· 890 888 { 891 889 struct bios_parser *bp = BP_FROM_DCB(dcb); 892 890 893 - uint32_t mask = get_support_mask_for_device_id(id); 891 + uint32_t mask = get_support_mask_for_device_id(id.device_type, id.enum_id); 894 892 895 893 return (le16_to_cpu(bp->object_info_tbl.v1_1->usDeviceSupport) & mask) != 0; 896 894 } ··· 2181 2179 return clk_id_ss; 2182 2180 } 2183 2181 2184 - static uint32_t get_support_mask_for_device_id(struct device_id device_id) 2182 + static uint32_t get_support_mask_for_device_id( 2183 + enum dal_device_type device_type, 2184 + uint32_t enum_id) 2185 2185 { 2186 - enum dal_device_type device_type = device_id.device_type; 2187 - uint32_t enum_id = device_id.enum_id; 2188 - 2189 2186 switch (device_type) { 2190 2187 case DEVICE_TYPE_LCD: 2191 2188 switch (enum_id) {