From patchwork Wed Mar 28 01:24:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 10311977 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DA6096037D for ; Wed, 28 Mar 2018 01:31:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC2232915B for ; Wed, 28 Mar 2018 01:31:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D071C29E61; Wed, 28 Mar 2018 01:31:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B1752915B for ; Wed, 28 Mar 2018 01:31:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CBB1D6E218; Wed, 28 Mar 2018 01:31:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x241.google.com (mail-wm0-x241.google.com [IPv6:2a00:1450:400c:c09::241]) by gabe.freedesktop.org (Postfix) with ESMTPS id C28716E216 for ; Wed, 28 Mar 2018 01:30:58 +0000 (UTC) Received: by mail-wm0-x241.google.com with SMTP id l9so1931384wmh.2 for ; Tue, 27 Mar 2018 18:30:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oKcgkHMVBcedTb7LqUQd+DRZG86vzQ0YKR/HqTlDz1M=; b=utrvQDy0cPq56oNRGp39zCE9BM3I8tpauBYptqDRmN5GeLguVHLlTreYFTYg6+1H3E eyerBUDDx8RrlgeM5pu5wMWPRWuaPDyAmkqVL6oCnCL7wjXaNwxkUkB78DPIIMkj3vqg oOu7SJqkyIr0AURDEs+G7OgY7aDUt2Ijl5dhU4TlJebLzbdAumGQJH2k2fCIcCGF8dtU l9ZwYpF9OiKnYwheVe4EeN99CX5M1xZlc3qNPFWsytJ5hh5dFnLeR+0KKX4SIfH93JmI v9hs1jhkdUT0fDy8r7vj/KNPLlcUpNQF5Bti3jbIAUAqlvBQwqkVEqymOe6dahjMexiu W4uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=oKcgkHMVBcedTb7LqUQd+DRZG86vzQ0YKR/HqTlDz1M=; b=AbAtorJkQFKitIDZQCbklKEVjai3kzpTqmlGXfaf0rI24tTNXFcT42+cPXniHg5x06 9EIELrebFKz5IMiC1s/miTLFFVVldFk4PSXiiWyycj4TPSkYhjVcHEv3+PmM93Eeabi3 LQ9FDPbcXAEg7bx/7tviiMrsPr2Zw9/9L52nSSU8HoxTc6bb2OVBTyFRplE+HaHvnN98 t7Ilh1eT43AuHdWVVa/kWmeBT7rRrZNHNi7F09mbGHsr2EqcoXELUPXHCYpiatNvDhc+ sR8e45SqC9w2cJ6u0KVQQcX8s1ho/2uGzZXYDhEEiGVKvU+6wJLkyrOI6kHZA1x7xqfn Vv6A== X-Gm-Message-State: AElRT7EVlDE3G0BHsCRJlMeYKQVS7fL1NdADdApD07VChC+0bIiN98NX Pp9VNsrjseL4krsVf7ME3EXfDg== X-Google-Smtp-Source: AIpwx48l84wsGNgNyn8h/8gtqgxazM5Xf2PM6erbWx/zLKPqPq9Sjs8Hpo7hJzjFC5ECRPNT6AiJoQ== X-Received: by 10.28.51.6 with SMTP id z6mr931709wmz.63.1522200657114; Tue, 27 Mar 2018 18:30:57 -0700 (PDT) Received: from localhost.localdomain (cpc91192-cmbg18-2-0-cust374.5-4.cable.virginm.net. [80.6.113.119]) by smtp.gmail.com with ESMTPSA id m9sm2641005wrf.13.2018.03.27.18.30.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 18:30:56 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/4] drm/virtio: remove drm_dev_set_unique workaround Date: Wed, 28 Mar 2018 02:24:50 +0100 Message-Id: <20180328012451.31479-3-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.16.0 In-Reply-To: <20180328012451.31479-1-emil.l.velikov@gmail.com> References: <20180328012451.31479-1-emil.l.velikov@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , emil.l.velikov@gmail.com, Gerd Hoffmann , Laszlo Ersek , Hans de Goede MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Emil Velikov Ealier commit a325725633c26aa66ab940f762a6b0778edf76c0 did not attribute that virtio can be either PCI or a platform device and removed the .set_busid hook. Whereas only the "platform" instance should have been removed. Since then, two things have happened: - the driver manually calls drm_dev_set_unique, addressing the Xserver regression - see commit 9785b4321b0bd701f8d21d3d3c676a7739a5cf22 - core itself calls drm_pci_set_busid, on drm_set_busid IOCTL setting the busid, so we don't need to fallback to dev->unique - see commit 5c484cee7ef9c4fd29fa0ba09640d55960977145 With that in place we can remove the local workaround. Cc: Daniel Vetter Cc: Gerd Hoffmann Cc: Hans de Goede Cc: Laszlo Ersek Signed-off-by: Emil Velikov Reviewed-by: Daniel Vetter --- Gents, can someone double-check this please? Just in case. --- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c index 7df8d0c9026a..19fd7c661b8a 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c +++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c @@ -62,7 +62,6 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev) struct pci_dev *pdev = to_pci_dev(vdev->dev.parent); const char *pname = dev_name(&pdev->dev); bool vga = (pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA; - char unique[20]; DRM_INFO("pci: %s detected at %s\n", vga ? "virtio-vga" : "virtio-gpu-pci", @@ -70,12 +69,6 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev) dev->pdev = pdev; if (vga) virtio_pci_kick_out_firmware_fb(pdev); - - snprintf(unique, sizeof(unique), "pci:%s", pname); - ret = drm_dev_set_unique(dev, unique); - if (ret) - goto err_free; - } ret = drm_dev_register(dev, 0);