From patchwork Tue Oct 1 02:48:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: You-Sheng Yang X-Patchwork-Id: 1991300 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XHj776nPBz1xtg for ; Tue, 1 Oct 2024 12:48:35 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1svSw4-0004ma-OB; Tue, 01 Oct 2024 02:48:24 +0000 Received: from mail-pg1-f169.google.com ([209.85.215.169]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1svSw2-0004lw-Pb for kernel-team@lists.ubuntu.com; Tue, 01 Oct 2024 02:48:22 +0000 Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-7ae3d7222d4so4299409a12.3 for ; Mon, 30 Sep 2024 19:48:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727750900; x=1728355700; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=mwmjTYQVoriAA1COHP+dJiiK9VM+6JKXvCg41t/Xjuw=; b=E92yTccWqHHWLLJqz2EM4m7WV/+sfjWU5nToiPXHpb/KIexXau11XCIGOglm3E4VMh 7ehfjB26nKx4zktbaxWyhDGxsSooEaSigY/unJkQcl+qugzq4ZQnutSrUsf2GE/G4ZkL tfYmzrA15o4Ldfx3gSpVYcko/9vvkvEEb3EW1At7qgVg62uhRbQtdrjCyg23310hvX7u MMIRrGHgwTDH93150fb/DvIj1f8Zy1sEZixCtqAx2CLtMXKwPextuBJp6gB7zQLsAyhr 169ohUBGWNiNZB5OG7N6wiK0yI97ThJr3jIJbifNOwiEIcCbWf5SIGYFrETlu07/P1u1 UzqA== X-Gm-Message-State: AOJu0YxnsERBoAh6a0lR3ge9K7ANNXhKIQi8i+oMbtW/bK1ED8F/Tfm4 iZXhMC/X1kzu/bqrIdPvhhrAonOcsup+FuXBW5s8rd8VFnzdEfeA995DDw== X-Google-Smtp-Source: AGHT+IE6tEvXeEPzwbqnvFvmeGphMlT5VsA+eP3r1sZ2ZDOxHHEV2rcJjczusdqlKbnXoGtFyPDmhw== X-Received: by 2002:a05:6a21:78e:b0:1d2:eaea:3b4c with SMTP id adf61e73a8af0-1d4fa6c3676mr24662651637.25.1727750900024; Mon, 30 Sep 2024 19:48:20 -0700 (PDT) Received: from yewun.. (125-229-129-140.hinet-ip.hinet.net. [125.229.129.140]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7e6db2c668asm7277802a12.45.2024.09.30.19.48.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Sep 2024 19:48:19 -0700 (PDT) From: You-Sheng Yang To: kernel-team@lists.ubuntu.com Subject: [PATCH 0/3][SRU][Unstable][Oracular] Fix AMD Instinct MI300 unusable with integrated display Date: Tue, 1 Oct 2024 10:48:13 +0800 Message-ID: <20241001024816.111283-1-vicamo.yang@canonical.com> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.215.169; envelope-from=vicamo@gmail.com; helo=mail-pg1-f169.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2078773 [Impact] Missing devices nodes for AMD Instinct MI300 card when installed along with integrated display. [Fix] * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.12-rc1&id=5fbca8b48b3050ae7fb611a8b09af60012ed6de1 ("drm: Use XArray instead of IDR for minors") * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.12-rc1&id=45c4d994b82b08f0ce5eb50f8da29379c92a391e ("accel: Use XArray instead of IDR for minors") * https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v6.12-rc1&id=071d583e01c88272f6ff216d4f867f8f35e94d7d ("drm: Expand max DRM device number to full MINORBITS") [Test Case] When enabled, additional drm devices will become available: ``` root123@g593-sx1:~$ ls -l /sys/class/drm/ lrwxrwxrwx 1 root root 0 Sep 21 00:55 card10 -> ../../devices/platform/amdgpu_xcp_7/drm/card10 lrwxrwxrwx 1 root root 0 Sep 21 00:55 card11 -> ../../devices/platform/amdgpu_xcp_8/drm/card11 lrwxrwxrwx 1 root root 0 Sep 21 00:55 card12 -> ../../devices/platform/amdgpu_xcp_9/drm/card12 lrwxrwxrwx 1 root root 0 Sep 21 00:55 card13 -> ../../devices/platform/amdgpu_xcp_10/drm/card13 lrwxrwxrwx 1 root root 0 Sep 21 00:55 card14 -> ../../devices/platform/amdgpu_xcp_11/drm/card14 lrwxrwxrwx 1 root root 0 Sep 21 00:55 card15 -> ../../devices/platform/amdgpu_xcp_12/drm/card15 lrwxrwxrwx 1 root root 0 Sep 21 00:55 card16 -> ../../devices/platform/amdgpu_xcp_13/drm/card16 ... ``` [Where problems could occur] New hardware support. Expect more fixes in need. [Other Info] Targeting last supported generic/oem kernels only. Nominated for oem-6.11, generic-6.11 and unstable. MichaƂ Winiarski (3): drm: Use XArray instead of IDR for minors accel: Use XArray instead of IDR for minors drm: Expand max DRM device number to full MINORBITS drivers/accel/drm_accel.c | 110 +++------------------------------ drivers/gpu/drm/drm_drv.c | 97 ++++++++++++++--------------- drivers/gpu/drm/drm_file.c | 2 +- drivers/gpu/drm/drm_internal.h | 4 -- include/drm/drm_accel.h | 18 +----- include/drm/drm_file.h | 5 ++ 6 files changed, 62 insertions(+), 174 deletions(-)