From patchwork Mon Apr 29 22:10:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chia-I Wu X-Patchwork-Id: 10922585 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 41A291390 for ; Mon, 29 Apr 2019 22:10:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3247C289EA for ; Mon, 29 Apr 2019 22:10:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2672C289ED; Mon, 29 Apr 2019 22:10:35 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 D1BBB289EA for ; Mon, 29 Apr 2019 22:10:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 14B67890C9; Mon, 29 Apr 2019 22:10:32 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by gabe.freedesktop.org (Postfix) with ESMTPS id 96B3D88AD9 for ; Mon, 29 Apr 2019 22:10:30 +0000 (UTC) Received: by mail-pl1-x642.google.com with SMTP id bi2so942592plb.13 for ; Mon, 29 Apr 2019 15:10:30 -0700 (PDT) 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:mime-version :content-transfer-encoding; bh=Yk3vy39U61vGwZYGCZuECzbhOPAwsdahcHFv7xDHLcI=; b=crVMsiKgiSnF128B9jv5634ftPL8psvg1l7Im8pXi3EX4V1N79hEZANyrNqOe7bkVQ RjmggiqvvRMI95ESJYNeU2+R9JbPFaZnrON88+yOtGYy71KsVVQuUPJKpV2RmwSAT/id 37pKEmIWnlliin9dgfZUjb4wrf+P+YG3e0T2eHdgwGmF5Jk3PuBILyDEZ75CYJZQMLN8 ILqaUJQhCcI3emmk/TatSYfSBONsuhGGG5fkvK4EUsb//80hyDCWNeHtVJjO3twFT9vQ YQcb1dq0Pul6g5IW1q+So3GV7scPxTASAuYXy+AYOtT9OlHHuaasBR8t8ixECuncE4Ry NDIQ== X-Gm-Message-State: APjAAAWiz6aJgAryfY9shw9PCKgYA6h1rE9LtDixSDOX58jLgqE+o5qu kedHw7YiYFpQkPGpSNPyaRhbkTSk X-Google-Smtp-Source: APXvYqyXBpDJwv2B77UaKzc4iFPWgZ9yWjuzc5BvVrwfMfTyN4FmFp3YaTMvwc7SptjaL0ZctJ+t0Q== X-Received: by 2002:a17:902:b403:: with SMTP id x3mr9727064plr.33.1556575829780; Mon, 29 Apr 2019 15:10:29 -0700 (PDT) Received: from olv0.mtv.corp.google.com ([2620:15c:202:201:9649:82d6:f889:b307]) by smtp.gmail.com with ESMTPSA id j7sm10787643pfh.62.2019.04.29.15.10.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 29 Apr 2019 15:10:29 -0700 (PDT) From: Chia-I Wu To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/virtio: allocate fences with GFP_KERNEL Date: Mon, 29 Apr 2019 15:10:21 -0700 Message-Id: <20190429221021.159784-1-olvaffe@gmail.com> X-Mailer: git-send-email 2.21.0.593.g511ec345e18-goog MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Yk3vy39U61vGwZYGCZuECzbhOPAwsdahcHFv7xDHLcI=; b=KgpxIRHCIZz25vJi3DSIf2jkciEaY5y341cNHCWtTnQJ0LARtCNt6zb7CjdzkjAk66 TPDH+mXQ0uv8NIC9Kd7Iaj6DmabjKY5vQ+627vc47WWglPzvcpQvNL4/na8F96DG+Pb0 Ys3Qz3WyCDT7uBU/o34RdekLwgTUQQp4jGCLfxZAzGCh82qJmnmiKuPltRFJ0haqcexl kiixLeP6eSPXhl1iGTpQBkU25HzzFeOlVGjFbJnL4niBojryQrlJayU/grKkdZ/3eesu JqiZ6rM4AAplA0Rj5i7zvlEfBYVdasgrMsmVY2Ynaok3etHNJPTUargwPBAhqPcakA2U ryKg== 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: Robert Foss , Gustavo Padovan , Gerd Hoffmann Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP It was changed to GFP_ATOMIC in commit ec2f0577c (add & use virtio_gpu_queue_fenced_ctrl_buffer) because the allocation happened with a spinlock held. That was no longer true after commit 9fdd90c0f (add virtio_gpu_alloc_fence()). Signed-off-by: Chia-I Wu Cc: Gerd Hoffmann Cc: Gustavo Padovan Cc: Robert Foss Reviewed-by: Robert Foss Reviewed-by: Emil Velikov --- drivers/gpu/drm/virtio/virtgpu_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_fence.c b/drivers/gpu/drm/virtio/virtgpu_fence.c index 87d1966192f4..b63ea4797afc 100644 --- a/drivers/gpu/drm/virtio/virtgpu_fence.c +++ b/drivers/gpu/drm/virtio/virtgpu_fence.c @@ -71,7 +71,7 @@ struct virtio_gpu_fence *virtio_gpu_fence_alloc(struct virtio_gpu_device *vgdev) { struct virtio_gpu_fence_driver *drv = &vgdev->fence_drv; struct virtio_gpu_fence *fence = kzalloc(sizeof(struct virtio_gpu_fence), - GFP_ATOMIC); + GFP_KERNEL); if (!fence) return fence;