get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2194939/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2194939,
    "url": "http://patchwork.ozlabs.org/api/patches/2194939/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20260210091856.12037-2-aaron.ma@canonical.com/",
    "project": {
        "id": 15,
        "url": "http://patchwork.ozlabs.org/api/projects/15/?format=api",
        "name": "Ubuntu Kernel",
        "link_name": "ubuntu-kernel",
        "list_id": "kernel-team.lists.ubuntu.com",
        "list_email": "kernel-team@lists.ubuntu.com",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260210091856.12037-2-aaron.ma@canonical.com>",
    "list_archive_url": null,
    "date": "2026-02-10T09:18:56",
    "name": "[SRU,Q] drm/xe: make xe_gt_idle_disable_c6() handle the forcewake internally",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "64752d7424b38f756ea3e72a200e3b15324a15d7",
    "submitter": {
        "id": 72035,
        "url": "http://patchwork.ozlabs.org/api/people/72035/?format=api",
        "name": "Aaron Ma",
        "email": "aaron.ma@canonical.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20260210091856.12037-2-aaron.ma@canonical.com/mbox/",
    "series": [
        {
            "id": 491627,
            "url": "http://patchwork.ozlabs.org/api/series/491627/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=491627",
            "date": "2026-02-10T09:18:56",
            "name": "[SRU,Q] drm/xe: make xe_gt_idle_disable_c6() handle the forcewake internally",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/491627/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2194939/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2194939/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<kernel-team-bounces@lists.ubuntu.com>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (4096-bit key;\n unprotected) header.d=canonical.com header.i=@canonical.com\n header.a=rsa-sha256 header.s=20251003 header.b=jbHdxBDu;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com\n (client-ip=185.125.189.65; helo=lists.ubuntu.com;\n envelope-from=kernel-team-bounces@lists.ubuntu.com;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4f9GGn2MWlz1xvb\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 10 Feb 2026 20:19:28 +1100 (AEDT)",
            "from localhost ([127.0.0.1] helo=lists.ubuntu.com)\n\tby lists.ubuntu.com with esmtp (Exim 4.86_2)\n\t(envelope-from <kernel-team-bounces@lists.ubuntu.com>)\n\tid 1vpjto-0004GT-IV; Tue, 10 Feb 2026 09:19:12 +0000",
            "from smtp-relay-internal-0.internal ([10.131.114.225]\n helo=smtp-relay-internal-0.canonical.com)\n by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.86_2) (envelope-from <aaron.ma@canonical.com>)\n id 1vpjtn-0004G6-3F\n for kernel-team@lists.ubuntu.com; Tue, 10 Feb 2026 09:19:11 +0000",
            "from mail-qt1-f199.google.com (mail-qt1-f199.google.com\n [209.85.160.199])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id DE8C63F427\n for <kernel-team@lists.ubuntu.com>; Tue, 10 Feb 2026 09:19:10 +0000 (UTC)",
            "by mail-qt1-f199.google.com with SMTP id\n d75a77b69052e-506549eb4b7so82198851cf.3\n for <kernel-team@lists.ubuntu.com>; Tue, 10 Feb 2026 01:19:10 -0800 (PST)",
            "from localhost.localdomain ([103.155.100.4])\n by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-5064e7825d9sm65778911cf.23.2026.02.10.01.19.07\n for <kernel-team@lists.ubuntu.com>\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 10 Feb 2026 01:19:08 -0800 (PST)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com;\n s=20251003; t=1770715150;\n bh=5yYYI3dxpqHsqyinvSQ0pMk+cExJWGjlreFUFl9oHrs=;\n h=From:To:Subject:Date:Message-ID:In-Reply-To:References:\n MIME-Version;\n b=jbHdxBDugT73ygGMhgyXyiUzq01vAlrFw71u8IpOF1pqRj0capu/JdARD59hfWyVI\n R8a5QMXJIOkQAbAbnEb/JxKOZzwxGDjqhYA1SE4nwXKcORtgmqFibx14givKHZtjGX\n qSc1quaJKYqi7n89ipfPgGu94A6JRzwxKsclwu3LjXHVnOLnrh+nCfkpD3DZP1ILm8\n eOKj9S5f7x52GvwIoEHntvyHP0Z9aRFfSTw/pNcVtZ7wRL8gExXVlrthPE5Q3HboU8\n Gt/KYlTotIvbWgLVUJutk0fatmVdyClxrgHQbOXlWvvpW+rmFregsXNZaMXCpbkOyH\n VpwIS1IDPFZu2a26cYFPTsLZXCVA4P3gS7p3G3nyfA4GSO2kzibe/6KCzLzC8SmJtv\n hX6xV+IPh8rJRDU3nQbpqjX4mgjKIzdml5ZG6hq4ocNYYQ9M3jxLK+coAQx4Hj2LGd\n e5uUT0gEUSo9mxx7iv2Kt7i91xz0ooY/ZzLZfYu/S8RDLAlNS7eUg/aT7XWM/iQ/zi\n Ejof2yKr+cmuMZbtIkOLFUfcJfHwc2vUd31167RRuESQbdDrIIAbCQg8Wz+bFfQXfJ\n 6Zl//qKP6IZsQuJmqn+FU3k/hiHGzuzr0+9Qu7ImKB7Bc8L9DQfeYkk6bxC+zqhXmr\n G/4R7HbKzEY/cVhB+IB5ij7I=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20230601; t=1770715149; x=1771319949;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to\n :cc:subject:date:message-id:reply-to;\n bh=5yYYI3dxpqHsqyinvSQ0pMk+cExJWGjlreFUFl9oHrs=;\n b=PBFkZbs3B+Xsubzz+Rqxb1V6kWJfu6vacBzS9rhruWQSSSWMfKil/QX1gCwHVvVO9O\n /7izDzSQDaKh67qi7q6AEK0TIZUFkfZcikB65lOitIFaxa3lkNWMvooq9DZoO1BuYZst\n yXBH/Ta9paY6g0qByrph9qsx1dBLak7sxv82MDgSeJ3IpiCSJ0iTD8mmlvWDP+SoIVYF\n bJsO7gzqgWyMUw34W1Zw+3xxyaLQ0SAMr7TfmBvX5QQe3wPQiIJgt9e8mei1iZjEzvt8\n Jz1OnjCaofH2erTjkAA0XYk3Vyj6Y/sPhJOcgX4nd58OuxweV2vNex1hkF+ED6AKUnLs\n xChA==",
        "X-Gm-Message-State": "AOJu0Yz2eN3IE7hEGXiKMQfMMZmOMcQUdcQeV02eWbmlVkhLsvAGFV+X\n 80xmPxpcaAHKR7bxkgdIgFoeCEMlUB+Ru+kl7WF7nF3vVXrSYFP1ehpnGMXb5SJ/tqNySrvhgTK\n E2vHfb2szGiTeajzF6DnkSJzlV4myVgCsyXs5GBRzRMJP2lb6e++VA11Jg44NVnA4sx8HW18ckJ\n 5f5E++hPYQkesky36J",
        "X-Gm-Gg": "AZuq6aLmvt9KBnKSI+aDw90G5p71Sa8tgAVNf6+sl0BPyNRHFOkZujuvDk7zcKWY54F\n QnZMhu4xJNkylxjiurQv/t/FYGGrWeacpN/srKQP0VJh83w1tY/k39jt1ClrA5Qhl9PBjtVzaNp\n cN1ul7cFFCaPrQZf4LBiRkERwg8iwu0hEFwz6u3LlfClBYr7JD2LJsF6K2uM5VrTMUxpr+MHk5X\n Wmq5jlZWwQJz0EHU81ix1UpT7v63djQgXuY7MVqM6rpre6hWLG9O3+nCsB2BuCnxfEUE34p5wc9\n BG3F7wCf/Z7zOEPJgWpZLaT926kj/1aySVxsfpZsKS8VgEt2iKruDtCLGWDgAwv531Tu4Gc2jMg\n X0MJ6k1dbuaFG4iDRbiC6F2bmc08t4wl8ZDgY",
        "X-Received": [
            "by 2002:ac8:7d8d:0:b0:506:6ec8:835 with SMTP id\n d75a77b69052e-50673d564b0mr14146661cf.54.1770715149641;\n Tue, 10 Feb 2026 01:19:09 -0800 (PST)",
            "by 2002:ac8:7d8d:0:b0:506:6ec8:835 with SMTP id\n d75a77b69052e-50673d564b0mr14146471cf.54.1770715149306;\n Tue, 10 Feb 2026 01:19:09 -0800 (PST)"
        ],
        "From": "Aaron Ma <aaron.ma@canonical.com>",
        "To": "kernel-team@lists.ubuntu.com",
        "Subject": "[SRU][Q][PATCH] drm/xe: make xe_gt_idle_disable_c6() handle the\n forcewake internally",
        "Date": "Tue, 10 Feb 2026 17:18:56 +0800",
        "Message-ID": "<20260210091856.12037-2-aaron.ma@canonical.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260210091856.12037-1-aaron.ma@canonical.com>",
        "References": "<20260210091856.12037-1-aaron.ma@canonical.com>",
        "MIME-Version": "1.0",
        "X-BeenThere": "kernel-team@lists.ubuntu.com",
        "X-Mailman-Version": "2.1.20",
        "Precedence": "list",
        "List-Id": "Kernel team discussions <kernel-team.lists.ubuntu.com>",
        "List-Unsubscribe": "<https://lists.ubuntu.com/mailman/options/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe>",
        "List-Archive": "<https://lists.ubuntu.com/archives/kernel-team>",
        "List-Post": "<mailto:kernel-team@lists.ubuntu.com>",
        "List-Help": "<mailto:kernel-team-request@lists.ubuntu.com?subject=help>",
        "List-Subscribe": "<https://lists.ubuntu.com/mailman/listinfo/kernel-team>,\n <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Errors-To": "kernel-team-bounces@lists.ubuntu.com",
        "Sender": "\"kernel-team\" <kernel-team-bounces@lists.ubuntu.com>"
    },
    "content": "From: Xin Wang <x.wang@intel.com>\n\nBugLink: https://bugs.launchpad.net/bugs/2141377\n\nMove forcewake_get() into xe_gt_idle_enable_c6() to streamline the\ncode and make it easier to use.\n\nSuggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>\nSigned-off-by: Xin Wang <x.wang@intel.com>\nReviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>\nLink: https://lore.kernel.org/r/20250827000633.1369890-2-x.wang@intel.com\nSigned-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>\n(cherry picked from commit 1313351e71181a4818afeb8dfe202e4162091ef6)\nSigned-off-by: Aaron Ma <aaron.ma@canonical.com>\n---\n drivers/gpu/drm/xe/xe_gt_idle.c | 21 +++++++++++++--------\n drivers/gpu/drm/xe/xe_gt_idle.h |  2 +-\n drivers/gpu/drm/xe/xe_guc_pc.c  | 13 +------------\n 3 files changed, 15 insertions(+), 21 deletions(-)",
    "diff": "diff --git a/drivers/gpu/drm/xe/xe_gt_idle.c b/drivers/gpu/drm/xe/xe_gt_idle.c\nindex 9bd197da60279..bdc9d9877ec49 100644\n--- a/drivers/gpu/drm/xe/xe_gt_idle.c\n+++ b/drivers/gpu/drm/xe/xe_gt_idle.c\n@@ -330,15 +330,11 @@ static void gt_idle_fini(void *arg)\n {\n \tstruct kobject *kobj = arg;\n \tstruct xe_gt *gt = kobj_to_gt(kobj->parent);\n-\tunsigned int fw_ref;\n \n \txe_gt_idle_disable_pg(gt);\n \n-\tif (gt_to_xe(gt)->info.skip_guc_pc) {\n-\t\tfw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);\n+\tif (gt_to_xe(gt)->info.skip_guc_pc)\n \t\txe_gt_idle_disable_c6(gt);\n-\t\txe_force_wake_put(gt_to_fw(gt), fw_ref);\n-\t}\n \n \tsysfs_remove_files(kobj, gt_idle_attrs);\n \tkobject_put(kobj);\n@@ -398,14 +394,23 @@ void xe_gt_idle_enable_c6(struct xe_gt *gt)\n \t\t\tRC_CTL_HW_ENABLE | RC_CTL_TO_MODE | RC_CTL_RC6_ENABLE);\n }\n \n-void xe_gt_idle_disable_c6(struct xe_gt *gt)\n+int xe_gt_idle_disable_c6(struct xe_gt *gt)\n {\n+\tunsigned int fw_ref;\n+\n \txe_device_assert_mem_access(gt_to_xe(gt));\n-\txe_force_wake_assert_held(gt_to_fw(gt), XE_FW_GT);\n \n \tif (IS_SRIOV_VF(gt_to_xe(gt)))\n-\t\treturn;\n+\t\treturn 0;\n+\n+\tfw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FW_GT);\n+\tif (!fw_ref)\n+\t\treturn -ETIMEDOUT;\n \n \txe_mmio_write32(&gt->mmio, RC_CONTROL, 0);\n \txe_mmio_write32(&gt->mmio, RC_STATE, 0);\n+\n+\txe_force_wake_put(gt_to_fw(gt), fw_ref);\n+\n+\treturn 0;\n }\ndiff --git a/drivers/gpu/drm/xe/xe_gt_idle.h b/drivers/gpu/drm/xe/xe_gt_idle.h\nindex 591a01e181bcc..9c34a155e1024 100644\n--- a/drivers/gpu/drm/xe/xe_gt_idle.h\n+++ b/drivers/gpu/drm/xe/xe_gt_idle.h\n@@ -13,7 +13,7 @@ struct xe_gt;\n \n int xe_gt_idle_init(struct xe_gt_idle *gtidle);\n void xe_gt_idle_enable_c6(struct xe_gt *gt);\n-void xe_gt_idle_disable_c6(struct xe_gt *gt);\n+int xe_gt_idle_disable_c6(struct xe_gt *gt);\n void xe_gt_idle_enable_pg(struct xe_gt *gt);\n void xe_gt_idle_disable_pg(struct xe_gt *gt);\n int xe_gt_idle_pg_print(struct xe_gt *gt, struct drm_printer *p);\ndiff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c\nindex 68b192fe3b32e..6b1c27d865b1b 100644\n--- a/drivers/gpu/drm/xe/xe_guc_pc.c\n+++ b/drivers/gpu/drm/xe/xe_guc_pc.c\n@@ -1076,7 +1076,6 @@ int xe_guc_pc_gucrc_disable(struct xe_guc_pc *pc)\n {\n \tstruct xe_device *xe = pc_to_xe(pc);\n \tstruct xe_gt *gt = pc_to_gt(pc);\n-\tunsigned int fw_ref;\n \tint ret = 0;\n \n \tif (xe->info.skip_guc_pc)\n@@ -1086,17 +1085,7 @@ int xe_guc_pc_gucrc_disable(struct xe_guc_pc *pc)\n \tif (ret)\n \t\treturn ret;\n \n-\tfw_ref = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);\n-\tif (!xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL)) {\n-\t\txe_force_wake_put(gt_to_fw(gt), fw_ref);\n-\t\treturn -ETIMEDOUT;\n-\t}\n-\n-\txe_gt_idle_disable_c6(gt);\n-\n-\txe_force_wake_put(gt_to_fw(gt), fw_ref);\n-\n-\treturn 0;\n+\treturn xe_gt_idle_disable_c6(gt);\n }\n \n /**\n",
    "prefixes": [
        "SRU",
        "Q"
    ]
}