Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4759822imu; Tue, 29 Jan 2019 07:06:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN4+T2l4WZB0hatwcLv30MXx2GwSuW2CXZ62bZhAb7raMaEg7ShoiUI3vYcNOVeR0yUKO/Ot X-Received: by 2002:a17:902:bcc7:: with SMTP id o7mr26859312pls.281.1548774367006; Tue, 29 Jan 2019 07:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548774366; cv=none; d=google.com; s=arc-20160816; b=qb4eROmvy9q5jqmGxSmn2EN+4LFmIq9N5zGasa3kC/uKTHtWB3skcB2CjzB2ln9O9V tdoTq1SgpioGDNp/8ss9yYQTqnZcpAyJVWq5iWPe1uDCJGU++sWBRUkOC1kh5smJD449 W7LaatrBUx9iGB0QZq8JiPDTN/pH8LFNxmpkbv4iWy3RzgPWes15p6HqL9pCao1RdtmL Yiqj5GXGUrTsDfhNZcgmXsnlIZTLgjj5ZpaRnKysAVZhZdEJ8sx+bF+0XxwSvgcAYw81 lO2jwn/7F1fgQV8lhdTyxNq25eNmanJ6VUuqIjSpAz0ZeFnEQ6Bh8Fw533dcStPZ1Bl3 PU5Q== 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:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=MXMFISiPlkQDpdZA8bK8+pzyO4DsYsihlwnDgdehNwA=; b=L5unaAE9pekcx9Uxc4Ybr5iVcbsX22KXVmkLpUOoQPPPZuCvTMuqHU2scHXFt7sqZp MFSh9GBS5pdEem4oCzuPoK2CiqfAF8g1D5Vk2XcHP1Vcu8PchPFpWGGuUH7xR2Wy7cpI PhPCAuJWd+BWax2U8P961RdTlA6lW2bkFTDV3F5NXxPrfoeYMxnJXM0bt+cHXVPPyCTH 0xQKwCLr8B2TYs1gs16tpFQwfuUWuiAOuJ8ehcHK76M729Sc0nw2UqYHoRGkSnvY3Muw D6KhygeZ/4VbVGI9VWeMEuy4H8IC8keqLcbZLC+0Sv67rhXxjG3qWwSgaa/ASBSPj9PN Hn9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mg3atIf1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u27si21598114pfa.103.2019.01.29.07.05.45; Tue, 29 Jan 2019 07:06:06 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mg3atIf1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729161AbfA2PEf (ORCPT + 99 others); Tue, 29 Jan 2019 10:04:35 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:43605 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728670AbfA2PEc (ORCPT ); Tue, 29 Jan 2019 10:04:32 -0500 Received: by mail-lj1-f196.google.com with SMTP id q2-v6so17755785lji.10 for ; Tue, 29 Jan 2019 07:04:31 -0800 (PST) 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=MXMFISiPlkQDpdZA8bK8+pzyO4DsYsihlwnDgdehNwA=; b=mg3atIf1mWA0C/JzN6XGSYlRPozX/Wiqzdyvy4VlQltmE0m6K0t7eYeDOgt/Ztk3+n zIK0bznrdTinPuuxXez3CTwvyAKAduIporVxRjFOPWDbQ8Jx0/QIvbqJGAuJ3B1WAywn YTuZLEK0mUM76gxz/NoIja3YRweM4m3fm0XkUgr14mpUCY4iTJ5CI2ereGBS/qoYdkVC aelVRsghlpfc2+//1jQREz3aEbCpLKm2lDRBWucf3z9Drop4bGLybfrHPHdJuXJqce3c 9bN2XcajTZLcP6zgfjEZP0IGZrvugDQQZZN7Jgon1QEybg31+DOoghFRnDEhBscmt9ET ++gg== 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=MXMFISiPlkQDpdZA8bK8+pzyO4DsYsihlwnDgdehNwA=; b=IPVno7UogLkhQmUQHafMnDcvxfVhWnW63WczxxgEYK0h7snRJGAUihgCFQ3cND/OLq wsc01Ke/H2qqIxGsHKltU7pODUinF/jvI0u/GKsZ5qTU4h0F3WLigUf7UU61mIb9DX83 1StFvHmHL1JqmIHFxLVsIJ7oN42fiiJx08mGEwpZVWzWeEpw9flan6xVrtd2VG1dvS80 urT79MkNsWxD5GX66P4LmL6ZCIGUsGGe/3G5C27zkIwFv9URe0UYr1CVaFkLE5V2ctr1 YLw6Jfj54i+d3qq3Mv6tgmng7MLedXoBHkVIzC5X4WTEez+dK1qLE0ptnlJ1gp4APGgV 6yNA== X-Gm-Message-State: AJcUukdav4UD5FM5HzqtCk+emwjbtzpZsWPv/1M36Tk7MRa2+HE9O4Vk TxyCopgQHkk+tgJJQdlbXKg= X-Received: by 2002:a2e:86ca:: with SMTP id n10-v6mr18841740ljj.49.1548774269897; Tue, 29 Jan 2019 07:04:29 -0800 (PST) Received: from a2k-HP-ProDesk-600-G2-SFF.kyiv.epam.com (ll-22.209.223.85.sovam.net.ua. [85.223.209.22]) by smtp.gmail.com with ESMTPSA id r29-v6sm3535027ljd.44.2019.01.29.07.04.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Jan 2019 07:04:29 -0800 (PST) From: Oleksandr Andrushchenko To: 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, julien.grall@arm.com Cc: andr2000@gmail.com, Oleksandr Andrushchenko Subject: [Xen-devel][PATCH] drm/xen-front: Fix mmap attributes for display buffers Date: Tue, 29 Jan 2019 17:04:22 +0200 Message-Id: <20190129150422.19867-1-andr2000@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); /* * vm_operations_struct.fault handler will be called if CPU access @@ -283,7 +282,7 @@ void *xen_drm_front_gem_prime_vmap(struct drm_gem_object *gem_obj) return NULL; return vmap(xen_obj->pages, xen_obj->num_pages, - VM_MAP, pgprot_writecombine(PAGE_KERNEL)); + VM_MAP, PAGE_KERNEL); } void xen_drm_front_gem_prime_vunmap(struct drm_gem_object *gem_obj, -- 2.20.1