Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5008257imu; Tue, 29 Jan 2019 11:10:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN5gnfO4x1ocXBYo1ismSpqi1eLq+CBnKxNI1jBnYxLeYJL1gwqnfum4wCaM2G1P3iA6h4Rs X-Received: by 2002:a63:5922:: with SMTP id n34mr18141185pgb.435.1548789003118; Tue, 29 Jan 2019 11:10:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548789003; cv=none; d=google.com; s=arc-20160816; b=PUTtwdSNZkgUc2hanr8uu7PUrVw+q25CuAXimhalMyWxpumxIpyop5k2AbYbC0JnZh 05maHNKQs4CLiqTrV34BHJvUI9tM+NvbYK3c3xYYB9wpzRWGqXl/29gNxgv2a3qLFi+A n6cLUCyNv2uqtf8LS+7V6Cq+4KRwRD63Wz1WGV55Vt1G00K//p1aKMjopc4wnIKWRWV5 hI+3UH6KKXoExPtK8vtjs0RKh9JtPW4ZRfLOljcv/aombsDEkxYOiNUHT9271xRYHYph YcYRu04iy8oOEXrjL8UVZ67z3EmIKT+8XDmRYNLESvpfhBocHcjmNfDvG5w+eO4tRndO qvaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=ACLODNKZ/7y7fHFG589Qd1DlcGOa8SlPQLu/JW8wdZY=; b=b+jMcSL2FMzzENdX3KyGR2WIfwOTaqV0cw3lNKImTluk8iuyZqQsXtprxaNC+5b0gs HUcoio9kEfly8LcO/8c+Dz+XFKdoIjsQPsbzloyzyh22d40eoHjWqvQWuom8k9/yKanR N7OztZ+jPHJeiIGkAQufOyzHcC0zaDwK04K71q+kbI0GFkk+ypakSrnRoj5rZASEwLjc Kyi5VSJyNkfQplIIfcz9xrR6jAX7YjPCbzfbQSemByoa6yHUnIOT2TuPQ67yL1MIGd/1 7Dba86LklUhUXVXLvrE+Pofpb+v95Iaxak1rUB/91Q8CNBQInNPMtAk0OtRAdgUpKq09 +daQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z9si16725515pgf.54.2019.01.29.11.09.46; Tue, 29 Jan 2019 11:10:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729242AbfA2THq (ORCPT + 99 others); Tue, 29 Jan 2019 14:07:46 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:43006 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726984AbfA2THp (ORCPT ); Tue, 29 Jan 2019 14:07:45 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4BE87A78; Tue, 29 Jan 2019 11:07:45 -0800 (PST) Received: from [10.1.35.17] (e110479-lin.cambridge.arm.com [10.1.35.17]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C2C883F557; Tue, 29 Jan 2019 11:07:42 -0800 (PST) Subject: Re: [Xen-devel][PATCH] drm/xen-front: Fix mmap attributes for display buffers To: Oleksandr Andrushchenko , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, daniel.vetter@intel.com, jgross@suse.com, boris.ostrovsky@oracle.com, kraxel@redhat.com, noralf@tronnes.org, hch@infradead.org Cc: Oleksandr Andrushchenko References: <20190129150422.19867-1-andr2000@gmail.com> From: Julien Grall Message-ID: Date: Tue, 29 Jan 2019 19:07:41 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190129150422.19867-1-andr2000@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Oleksandr, On 1/29/19 3:04 PM, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > When GEM backing storage is allocated those are normal pages, > so there is no point using pgprot_writecombine while mmaping. > This fixes mismatch of buffer pages' memory attributes between > the frontend and backend which may cause screen artifacts. > > Fixes: c575b7eeb89f ("drm/xen-front: Add support for Xen PV display frontend") > > Signed-off-by: Oleksandr Andrushchenko > Suggested-by: Julien Grall > --- > drivers/gpu/drm/xen/xen_drm_front_gem.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/xen/xen_drm_front_gem.c b/drivers/gpu/drm/xen/xen_drm_front_gem.c > index d303a2e17f5e..9d5c03d7668d 100644 > --- a/drivers/gpu/drm/xen/xen_drm_front_gem.c > +++ b/drivers/gpu/drm/xen/xen_drm_front_gem.c > @@ -235,8 +235,7 @@ static int gem_mmap_obj(struct xen_gem_object *xen_obj, > vma->vm_flags &= ~VM_PFNMAP; > vma->vm_flags |= VM_MIXEDMAP; > vma->vm_pgoff = 0; > - vma->vm_page_prot = > - pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); > + vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); The patch looks good to me. It would be worth expanding the comment a bit before to explain that we overwrite vm_page_prot to use cacheable attribute as required by the Xen ABI. With the comment updated: Acked-by: Julien Grall Cheers, -- Julien Grall