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

drm/amdgpu: add dmi check for jadeite platform

DMI check is required to distinguish Jadeite platform from
Stoney base variant.
Add DMI check logic for Jadeite platform.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Vijendar Mukunda and committed by
Alex Deucher
49062ee3 748262eb

+36
+36
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
··· 29 29 #include <linux/platform_device.h> 30 30 #include <sound/designware_i2s.h> 31 31 #include <sound/pcm.h> 32 + #include <linux/acpi.h> 33 + #include <linux/dmi.h> 32 34 33 35 #include "amdgpu.h" 34 36 #include "atom.h" ··· 38 36 39 37 #include "acp_gfx_if.h" 40 38 39 + #define ST_JADEITE 1 41 40 #define ACP_TILE_ON_MASK 0x03 42 41 #define ACP_TILE_OFF_MASK 0x02 43 42 #define ACP_TILE_ON_RETAIN_REG_MASK 0x1f ··· 87 84 #define ACP_TIMEOUT_LOOP 0x000000FF 88 85 #define ACP_DEVS 4 89 86 #define ACP_SRC_ID 162 87 + 88 + static unsigned long acp_machine_id; 90 89 91 90 enum { 92 91 ACP_TILE_P1 = 0, ··· 184 179 /* Continue to remove */ 185 180 return 0; 186 181 } 182 + 183 + static int acp_quirk_cb(const struct dmi_system_id *id) 184 + { 185 + acp_machine_id = ST_JADEITE; 186 + return 1; 187 + } 188 + 189 + static const struct dmi_system_id acp_quirk_table[] = { 190 + { 191 + .callback = acp_quirk_cb, 192 + .matches = { 193 + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMD"), 194 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Jadeite"), 195 + } 196 + }, 197 + { 198 + .callback = acp_quirk_cb, 199 + .matches = { 200 + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "IP3 Technology CO.,Ltd."), 201 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ASN1D"), 202 + }, 203 + }, 204 + { 205 + .callback = acp_quirk_cb, 206 + .matches = { 207 + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Standard"), 208 + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ASN10"), 209 + }, 210 + }, 211 + {} 212 + }; 187 213 188 214 /** 189 215 * acp_hw_init - start and test ACP block