From patchwork Fri Jul 1 11:41:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 12903211 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 17EC6C43334 for ; Fri, 1 Jul 2022 11:42:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2805D16B5; Fri, 1 Jul 2022 13:42:05 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2805D16B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1656675775; bh=jc//w8rK9SzkxI6XxOVuEn6YDSvQM2TA0rlByecrjAw=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BJiqmgJU7KURjDcuwTLX8xx3ZhShDw//6Xd2WtF8W8g+ozsArN/zA04wRUpgICt2f ekfdVpZxron5HTUCHbCaOJyQL6aSRx+oLeGZyomuMDQbnEDOL12MXEK0UxCqQ9ZzUB jKLwtzWRmCAxRJv3AATb0a6z9oOcDMaYjCW9pK9k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 54E0BF8047C; Fri, 1 Jul 2022 13:41:44 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DFDB9F804E2; Fri, 1 Jul 2022 13:41:42 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2042.outbound.protection.outlook.com [40.107.93.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BCFD0F8014E for ; Fri, 1 Jul 2022 13:41:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BCFD0F8014E Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="SEKyj3aR" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hI7HdpW3zfzTVWyfv9ZEOjGjabBgdH2n9k5VO9eF8ig5oub/nP/R6k9BTEJXh++FHUN9KIt46ENHEOoyTRth19826pBdnmck/CRR8Lh12ix1z2hnfaJ7APg5JNmeVJz+g2gttF6/cRNubyuGex73bp7M4nnzZdsb+X0Y9Z6Y0a252VuH5ddigoB82K7pq/M/hgqMspUGDO8K41p8UH2lRmF0gSdTx4MFpQioB1qwXzx5Mq00H6TMgzvd5UkN3IxShf8SwXEgdurZrLKIGkLXywliiIQofuz2Sfhf6lJe3gzWb1xROLrI4KuxMvEgvGTkUXTRwzSx0WnqYyHj3jO4gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yDWay7Sj9Pa2Pe+w6/x8ULZbYx0ciSj9DA01e1E9MnM=; b=crfRtvfG4QHRLkdojv08qh+sDCewjJcofMrpMkl9WZyJJIeVW6LkROfsTADK9Hf5b2/Ww0i7isTo2tG1u5o17AheJ8fSbXAbWAbCloIlVtbgaa+tvz3Gs6UqjIUQ+99eKtDKNTyFq/zfEqN8Lvo3fOup1TolUXIIG1nTHItfkXpV2Klzr4KImvWcN8G0yjgmOiGDMSNuS5YF72waCWlAINw9SfukK3ad7YP1JR7XAsJ+F+rtUX3anyd0OmwdvCRuY4Sl4cZAle9nRvPH73MTEtioM3jUDY0+CzzzwWtKzM4Xbq91k88mjGKAIuPEPJf0YzgOAILgGFSI/9dHjHTEZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yDWay7Sj9Pa2Pe+w6/x8ULZbYx0ciSj9DA01e1E9MnM=; b=SEKyj3aRZfxGCpGgCGvbhyQxQXPAsJKHz+rN/KjzARC8RxxuVasP0igm9apMJ27hQ4ALafNo6NZSxq3tX4IEwGKDWO81erZrShtcXNSf4p58kLg24LUFv+oRYKxAu7fJccfoFPLmgkGl34Kz+pYV3Efs9JKBIuh3bfXugJVqDl8= Received: from DM6PR06CA0096.namprd06.prod.outlook.com (2603:10b6:5:336::29) by BN6PR1201MB0242.namprd12.prod.outlook.com (2603:10b6:405:57::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.15; Fri, 1 Jul 2022 11:41:31 +0000 Received: from DM6NAM11FT041.eop-nam11.prod.protection.outlook.com (2603:10b6:5:336:cafe::bf) by DM6PR06CA0096.outlook.office365.com (2603:10b6:5:336::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.14 via Frontend Transport; Fri, 1 Jul 2022 11:41:30 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DM6NAM11FT041.mail.protection.outlook.com (10.13.172.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5395.14 via Frontend Transport; Fri, 1 Jul 2022 11:41:30 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 1 Jul 2022 06:41:30 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Fri, 1 Jul 2022 06:41:29 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2375.28 via Frontend Transport; Fri, 1 Jul 2022 06:41:20 -0500 From: Vijendar Mukunda To: , , , Subject: [PATCH V2 1/5] drm/amdgpu: add dmi check for jadeite platform Date: Fri, 1 Jul 2022 17:11:03 +0530 Message-ID: <20220701114107.1105948-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220701114107.1105948-1-Vijendar.Mukunda@amd.com> References: <20220701114107.1105948-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7d42f8eb-f666-4f6e-5d71-08da5b56a451 X-MS-TrafficTypeDiagnostic: BN6PR1201MB0242:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bi2Idy+coIwmuZrBlkTGEjLmau7z3+gAS+nJYfXYhzChEOb4sHMhkgnoBx5DQGeTTq7VWyVNZUYxliEDDfydBCaeFERYWQokCSJGwt6UCOR+hvTsuJb7pj7DZT/QKK0A4zOID6YGzkEGZMBJ8dj5tW8QuXHRJC6QNSdrAAW6duNM5UIMGwhTB2mIRuRshP3fV+UolIXMZscC2YzpXIl3Y65dVon4hJ1fyb92ksh5ijlAkLy7XTvtKKU3b3zVrAI0Khk/SCLz83aVb9aLJ8FI17+DOXAVuDfmObSAnV7HvMcUH7Y0i3q02uN9vtb0W/vMoS7pjI1VjrZt0COfBzIpfs9q1V1qVdcyeveOtY4mdN8zFSbNuiopaYAag4d+2TrS4Zn8pyK1jml7dSNf723DPnbdQEH82ce2aWTms/SFQ2bFI8Ruz4czyE/cwXciXJGe/pEMZZAEHsLjKvi1ikr6ukCbX/1EDyIqyWHtxQH6apVWaZp7EezxsGTlMCMRxjEV8eM9N9A6XK4LFD+K3uAjSxSjqXSlzYs7miFodDrjHZdNh3v8ZSCfwRo5i+zx2qbVef4a4d+NFKL3g1BbqBk/q2U7z/We6yuPI0zcoNBLd/Clrt8As8u0FjTfGLzX2bVMco2RZMvrVSdRVabTqDFgRpqIU8RYjwUSbbdmRHEX1dmyJohOEePCi0P+9LGKWaIIHi6i87Ej6MeC1zTo1yilpAQfL3dUs11BmkKNPGFgVmbUSk2cqerpYKUcTNqOoAaJHj8PLF+T6C/GJZDYhZ2RCsy0YDJ4PkdNLR9JFX6WFmjpDMzNbw9lPU3jYuOcol+b8Oz2MmO+TygggGSH0OBBLNjswc2dS/yv6gVI3bVIuQQ= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230016)(4636009)(396003)(376002)(39860400002)(346002)(136003)(36840700001)(40470700004)(46966006)(186003)(110136005)(6666004)(47076005)(426003)(478600001)(336012)(41300700001)(2906002)(81166007)(82740400003)(40480700001)(316002)(36756003)(26005)(86362001)(2616005)(54906003)(1076003)(8936002)(82310400005)(70586007)(8676002)(4326008)(40460700003)(83380400001)(356005)(5660300002)(70206006)(7696005)(36860700001)(36900700001); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jul 2022 11:41:30.7519 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7d42f8eb-f666-4f6e-5d71-08da5b56a451 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT041.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1201MB0242 Cc: Sunil-kumar.Dommati@amd.com, David Airlie , Basavaraj.Hiregoudar@amd.com, "Pan, Xinhui" , open list , Kai-Heng Feng , Daniel Vetter , Vijendar Mukunda , Alex Deucher , zhuning@everest-semi.com, =?utf-8?q?Christian_K=C3=B6nig?= X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" DMI check is required to distinguish Jadeite platform from Stoney base variant. Add DMI check logic for Jadeite platform. Signed-off-by: Vijendar Mukunda Acked-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c index ba1605ff521f..af7b42056a89 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c @@ -29,6 +29,8 @@ #include #include #include +#include +#include #include "amdgpu.h" #include "atom.h" @@ -36,6 +38,7 @@ #include "acp_gfx_if.h" +#define ST_JADEITE 1 #define ACP_TILE_ON_MASK 0x03 #define ACP_TILE_OFF_MASK 0x02 #define ACP_TILE_ON_RETAIN_REG_MASK 0x1f @@ -85,6 +88,8 @@ #define ACP_DEVS 4 #define ACP_SRC_ID 162 +static unsigned long acp_machine_id; + enum { ACP_TILE_P1 = 0, ACP_TILE_P2, @@ -184,6 +189,37 @@ static int acp_genpd_remove_device(struct device *dev, void *data) return 0; } +static int acp_quirk_cb(const struct dmi_system_id *id) +{ + acp_machine_id = ST_JADEITE; + return 1; +} + +static const struct dmi_system_id acp_quirk_table[] = { + { + .callback = acp_quirk_cb, + .matches = { + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMD"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Jadeite"), + } + }, + { + .callback = acp_quirk_cb, + .matches = { + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "IP3 Technology CO.,Ltd."), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ASN1D"), + }, + }, + { + .callback = acp_quirk_cb, + .matches = { + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "Standard"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "ASN10"), + }, + }, + {} +}; + /** * acp_hw_init - start and test ACP block *