From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FFE2C43603 for ; Wed, 11 Dec 2019 12:20:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5780C214D8 for ; Wed, 11 Dec 2019 12:20:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="M5luoWqU" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729177AbfLKMUI (ORCPT ); Wed, 11 Dec 2019 07:20:08 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:46850 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727365AbfLKMUG (ORCPT ); Wed, 11 Dec 2019 07:20:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576066805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UIewAyx++ktQ/Uek8hL3crFT01ZthoO/ZwsAoVP4Ej8=; b=M5luoWqUburszTX0dzw3tt03OFPZp1XV52tbTTZY1du9xL4uo+WlibZ6QAKEQRk4Xwy29O 6ZuCi96/T/mOGSzTCuL28iKuXTCfYalGoWGou3CT8YJEnizDnhFX10Q3qLTTz3I9bXpRnT KL4MfTChAvhRADsA4MlSM1X6r0Nk4QU= 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-279-VXS_jZefO9GEJcB7iAO75Q-1; Wed, 11 Dec 2019 07:20:02 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 052361005524; Wed, 11 Dec 2019 12:20:01 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-67.ams2.redhat.com [10.36.116.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D956691A0; Wed, 11 Dec 2019 12:19:58 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 746BA17536; Wed, 11 Dec 2019 13:19:57 +0100 (CET) From: Gerd Hoffmann To: dri-devel@lists.freedesktop.org Cc: tzimmermann@suse.de, gurchetansingh@chromium.org, Gerd Hoffmann , David Airlie , Daniel Vetter , virtualization@lists.linux-foundation.org (open list:VIRTIO GPU DRIVER), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 3/4] drm/virtio: fix mmap page attributes Date: Wed, 11 Dec 2019 13:19:55 +0100 Message-Id: <20191211121957.18637-4-kraxel@redhat.com> In-Reply-To: <20191211121957.18637-1-kraxel@redhat.com> References: <20191211121957.18637-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-MC-Unique: VXS_jZefO9GEJcB7iAO75Q-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org virtio-gpu uses cached mappings, set virtio_gpu_gem_funcs.pgprot accordingly. Reported-by: Gurchetan Singh Signed-off-by: Gerd Hoffmann --- 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/virt= io/virtgpu_object.c index 017a9e0fc3bb..0b754c5bbcce 100644 --- a/drivers/gpu/drm/virtio/virtgpu_object.c +++ b/drivers/gpu/drm/virtio/virtgpu_object.c @@ -87,6 +87,7 @@ static const struct drm_gem_object_funcs virtio_gpu_gem_f= uncs =3D { =09.vmap =3D drm_gem_shmem_vmap, =09.vunmap =3D drm_gem_shmem_vunmap, =09.mmap =3D &drm_gem_shmem_mmap, +=09.pgprot =3D &drm_gem_pgprot_cached, }; =20 struct drm_gem_object *virtio_gpu_create_object(struct drm_device *dev, --=20 2.18.1