From patchwork Wed Dec 18 12:56:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11300617 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5913A139A for ; Wed, 18 Dec 2019 12:56:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 37220206D7 for ; Wed, 18 Dec 2019 12:56:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="d/+idVG0" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 37220206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99B7F6E439; Wed, 18 Dec 2019 12:56:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 59AE96E43F for ; Wed, 18 Dec 2019 12:56:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576673814; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=x/cwFTyTCqoQ8pmKXw66E9tGA6IcZFP7RtbWDrGX7CM=; b=d/+idVG0ijS//2VbRWHpkkw/G+OjVL2U0iEGsDunzXUpV8ZVPRlyoYr5tcwnnHvmAjQ2sd du84QFQnak+OEe46qUnLLhZAJtYdPGjCXFlXxdlQ5ZTBAc8y64aEP2Gfx0SOM0SEw9oD76 mkTCxdHjAlr2i/aRFjVeX6r1WzXhsRM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-379-w2Zt0d07Op6_15dftIF6Lg-1; Wed, 18 Dec 2019 07:56:50 -0500 X-MC-Unique: w2Zt0d07Op6_15dftIF6Lg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1FF301883520; Wed, 18 Dec 2019 12:56:49 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-39.ams2.redhat.com [10.36.117.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 24F5026DD1; Wed, 18 Dec 2019 12:56:46 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 761291FCE8; Wed, 18 Dec 2019 13:56:45 +0100 (CET) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 2/3] drm/virtio: fix mmap page attributes Date: Wed, 18 Dec 2019 13:56:44 +0100 Message-Id: <20191218125645.9211-3-kraxel@redhat.com> In-Reply-To: <20191218125645.9211-1-kraxel@redhat.com> References: <20191218125645.9211-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tzimmermann@suse.de, David Airlie , open list , "open list:VIRTIO GPU DRIVER" , Gerd Hoffmann , gurchetansingh@chromium.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" virtio-gpu uses cached mappings, set drm_gem_shmem_object.map_cached accordingly. Reported-by: Gurchetan Singh Signed-off-by: Gerd Hoffmann virtio fixup --- drivers/gpu/drm/virtio/virtgpu_object.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/virtio/virtgpu_object.c b/drivers/gpu/drm/virtio/virtgpu_object.c index 017a9e0fc3bb..7f991e03ea2c 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -99,6 +99,7 @@ struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev, return NULL; bo->base.base.funcs = &virtio_gpu_gem_funcs; + bo->base.map_cached = true; return &bo->base.base; }