get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 797728,
    "url": "http://patchwork.ozlabs.org/api/patches/797728/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170804102033.27731-2-dja@axtens.net/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20170804102033.27731-2-dja@axtens.net>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170804102033.27731-2-dja@axtens.net/",
    "date": "2017-08-04T10:20:31",
    "name": "[1/3] powerpc: simplify and fix VGA default device behaviour",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "0717e7e481034a9121226510b1ff728f859efa73",
    "submitter": {
        "id": 65792,
        "url": "http://patchwork.ozlabs.org/api/people/65792/?format=api",
        "name": "Daniel Axtens",
        "email": "dja@axtens.net"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170804102033.27731-2-dja@axtens.net/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/797728/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/797728/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xP32518nnz9s8P\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  4 Aug 2017 20:24:29 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xP32500TYzDqhp\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  4 Aug 2017 20:24:29 +1000 (AEST)",
            "from mail-wr0-x244.google.com (mail-wr0-x244.google.com\n\t[IPv6:2a00:1450:400c:c0c::244])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xP2yf42mXzDqjK\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  4 Aug 2017 20:21:30 +1000 (AEST)",
            "by mail-wr0-x244.google.com with SMTP id g32so2692315wrd.5\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri, 04 Aug 2017 03:21:30 -0700 (PDT)",
            "from localhost.localdomain (uk.sesame.canonical.com.\n\t[91.189.88.154]) by smtp.gmail.com with ESMTPSA id\n\tg93sm4037467wrd.11.2017.08.04.03.21.18\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 04 Aug 2017 03:21:27 -0700 (PDT)"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=\"fNZl8CLj\"; dkim-atps=neutral",
            "lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=\"fNZl8CLj\"; dkim-atps=neutral",
            "lists.ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=axtens.net header.i=@axtens.net\n\theader.b=\"fNZl8CLj\"; dkim-atps=neutral"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=axtens.net; s=google;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=Scsd74WtFBJpi4iyYSxTjztxbXvT9tnVa+uNXrMItY8=;\n\tb=fNZl8CLjV6udUxC8TAo7er1TCwA/c0ZGMl6aQGyunLFIVP80tjPY99cFJW7RbahI6x\n\tFIGiqNACaopOK46loeo6vOwsMvPArRD7PDEIzqtbsE/TlnrUiFrdcmVt6806LSRkBv7P\n\txPzTtglbk8WUc/nDvOSyr6bi7W4of84JWWDQU=",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=Scsd74WtFBJpi4iyYSxTjztxbXvT9tnVa+uNXrMItY8=;\n\tb=JJL9v976Ecfb0Xh2gPdQ4KK1/E1lMAacwHyPrSrfB3x6j6LOd+a6FlFWT3y3uu9q/u\n\t0xW+c29WzWYCV73U4ae0RELh1E7CMtJshNSPbTG8kNWhrdoYJitl7YA7/1/7pcKPthp9\n\tHlQm+xFZ9IuM93Mb3vjYA89RHzNA0JP66rrv9qUfO/Yll0f05jHpZK5Y6BXGVFICMo6X\n\tBGYf/hkaSRlpv3SdmO4T56ORcJmp4ZdzTApt8ImL/T4tf/+KCnJ/Acddkcd2MQ5KV0lJ\n\thXys/icdQu1i2yRuUeSbfARntoroV/ZgmRv1m0EnKuTFq6PMhFHWm3XNXLJXGJgEsfEs\n\tdsmg==",
        "X-Gm-Message-State": "AIVw111ZoQrdZonF6ZYodSsJ/s+C2RXEx3+Yczo7bC4QlIsa4cRAcIx8\n\thHFd6h5oFfu9r6VH",
        "X-Received": "by 10.223.175.5 with SMTP id z5mr1217531wrc.11.1501842087950;\n\tFri, 04 Aug 2017 03:21:27 -0700 (PDT)",
        "From": "Daniel Axtens <dja@axtens.net>",
        "To": "linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,\n\tlinux-arm-kernel@lists.infradead.org",
        "Subject": "[PATCH 1/3] powerpc: simplify and fix VGA default device behaviour",
        "Date": "Fri,  4 Aug 2017 20:20:31 +1000",
        "Message-Id": "<20170804102033.27731-2-dja@axtens.net>",
        "X-Mailer": "git-send-email 2.11.0",
        "In-Reply-To": "<20170804102033.27731-1-dja@axtens.net>",
        "References": "<20170804102033.27731-1-dja@axtens.net>",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "gabriele.paoloni@huawei.com, airlied@linux.ie,\n\tBrian King <brking@linux.vnet.ibm.com>, will.deacon@arm.com,\n\tz.liuxinliang@hisilicon.com, bhelgaas@google.com,\n\talex.williamson@redhat.com, \n\tcatalin.marinas@arm.com, zourongrong@gmail.com, daniel.vetter@intel.com, \n\tDaniel Axtens <dja@axtens.net>",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "Some powerpc devices provide a PCI display that isn't picked up by\nthe VGA arbiter, presumably because it doesn't support the PCI\nlegacy VGA ranges.\n\nCommit c2e1d84523ad (\"powerpc: Set default VGA device\") introduced\nan arch quirk to mark these devices as default to fix X autoconfig.\n\nThe commit message stated that the patch:\n\n    Ensures a default VGA is always set if a graphics adapter is present,\n    even if firmware did not initialize it. If more than one graphics\n    adapter is present, ensure the one initialized by firmware is set\n    as the default VGA device.\n\nThe patch used the following test to decide whether or not to mark\na device as default:\n\n  pci_read_config_word(pdev, PCI_COMMAND, &cmd);\n  if ((cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) || !vga_default_device())\n          vga_set_default_device(pdev);\n\nThis doesn't seem like it works quite as intended. Because of the\nlogical OR, the default device will be set in 2 cases:\n\n 1) if there is no default device\nOR\n 2) if this device has normal memory/IO decoding turned on\n\nThis will work as intended if there is only one device, but if\nthere are multiple devices, we may override the device the VGA\narbiter picked.\n\nInstead, set a device as default if there is no default device AND\nthis device decodes.\n\nThis will not change behaviour on single-headed systems.\n\nCc: Brian King <brking@linux.vnet.ibm.com>\nSigned-off-by: Daniel Axtens <dja@axtens.net>\n\n---\n\nTested in TCG (the card provided by qemu doesn't automatically\nregister with vgaarb, so the relevant code path has been tested)\nbut I would appreciate any tests on real hardware.\n\nInformal benh ack: https://patchwork.kernel.org/patch/9850235/\n---\n arch/powerpc/kernel/pci-common.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c\nindex 341a7469cab8..c95fdda3a2dc 100644\n--- a/arch/powerpc/kernel/pci-common.c\n+++ b/arch/powerpc/kernel/pci-common.c\n@@ -1746,8 +1746,11 @@ static void fixup_vga(struct pci_dev *pdev)\n {\n \tu16 cmd;\n \n+\tif (vga_default_device())\n+\t\treturn;\n+\n \tpci_read_config_word(pdev, PCI_COMMAND, &cmd);\n-\tif ((cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) || !vga_default_device())\n+\tif (cmd & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY))\n \t\tvga_set_default_device(pdev);\n \n }\n",
    "prefixes": [
        "1/3"
    ]
}