From patchwork Tue Jul 16 17:43:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 11046561 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 5056E138D for ; Tue, 16 Jul 2019 17:45:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37B6228676 for ; Tue, 16 Jul 2019 17:45:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2779F28694; Tue, 16 Jul 2019 17:45:52 +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 D932328676 for ; Tue, 16 Jul 2019 17:45:51 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01DA36E11C; Tue, 16 Jul 2019 17:45:51 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pl1-x644.google.com (mail-pl1-x644.google.com [IPv6:2607:f8b0:4864:20::644]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2E6636E11C; Tue, 16 Jul 2019 17:45:50 +0000 (UTC) Received: by mail-pl1-x644.google.com with SMTP id ay6so10477738plb.9; Tue, 16 Jul 2019 10:45:50 -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=Xhvxxodyt4FVnA+Q4PptUiZxNmKTKZXnvXrsa2hJq/o=; b=RgZPr2vOgz0bzB7QvnTeSrBToqw/XDWpsx1O7tNGtEkW51en7iaOMXkgsuLg7+z+My o67DPI2+yRpIqSUBAWqowcHElo7DMqMYPP655rtkMcX7IZbtJL93lk9vWU22l72j2ore 9BiwzUFWyMI2YG9bAwzggSM1mQy67BuRg9fiTqORBRjfwHgeI715sZxt+8hnT0+OvXD9 bBCIht46LCLPLErFnstmmeABDWSn1ktaQmynzFnX2n2lnrP7CTfYCjSGYxBOvuPmrqYl 3W04bbrQ2GH7xoN1ZXa9GfmYnD6eWT8Fk8wslukLUDIL1i76g9SJmtGDjvG+OcGUbb+F DtPA== X-Gm-Message-State: APjAAAV8+7IYNxlHbu0ryviUlNExylKbmLyCDpVnWJffI1JNlqYVTQXR 3I0VGKhxHIAeIiERRXHMcDYIMojOMHk= X-Google-Smtp-Source: APXvYqyvLxSlL5GDt6wdl98KfA3lI5LIyr/lONf5ccilGqUx3VHCMUUVQyBqHX3SfEBLwglwuoop9A== X-Received: by 2002:a17:902:3081:: with SMTP id v1mr38149628plb.169.1563299149369; Tue, 16 Jul 2019 10:45:49 -0700 (PDT) Received: from localhost ([100.118.89.203]) by smtp.gmail.com with ESMTPSA id g62sm21681297pje.11.2019.07.16.10.45.48 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 16 Jul 2019 10:45:48 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Date: Tue, 16 Jul 2019 10:43:21 -0700 Message-Id: <20190716174331.7371-1-robdclark@gmail.com> X-Mailer: git-send-email 2.21.0 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=Xhvxxodyt4FVnA+Q4PptUiZxNmKTKZXnvXrsa2hJq/o=; b=mlimn4TLRvW/lqjE5coN8thyz8i9X1tiCMaNdAFPB/0qvOyooTYEfXXXG4+yFGsgDW +YfqxLFliWAsIcSE14CkOb6NQYkgIreCHQOSuiTEVluUu6oZgsfO4ZxXxNpA0Nob9avD Ts1pCcQaQMALo0p6x0WOMlXoEKAIlo/vxHCbaOs5UjJQYEx/S402jWpC5JAjchqkbIMn 1+gGiHhCvzyfPrVegyPK/FEhwzEUfWClX2kBC/vQZOkWuXUbqI/s2WUZcvJRwBfbfANO xiOeWvdsPLkBhRbiKEVwmjyWo5D1Xb5+McYTgNjFX0aMeZyJp0XPn0UQNqRpGtg8UwLM V3zQ== Subject: [Intel-gfx] [PATCH v2 1/3] drm/gem: don't force writecombine mmap'ing X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Maxime Ripard , Intel Graphics Development , linux-kernel@vger.kernel.org, David Airlie Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Rob Clark The driver should be in control of this. Signed-off-by: Rob Clark --- It is possible that this was masking bugs (ie. not setting appropriate pgprot) in drivers. I don't have a particularly good idea for tracking those down (since I don't have the hw for most drivers). Unless someone has a better idea, maybe land this and let driver maintainers fix any potential fallout in their drivers? This is necessary for the last patch to fix VGEM brokenness on arm. drivers/gpu/drm/drm_gem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 8a55f71325b1..7d6242cc69f2 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -1110,7 +1110,7 @@ int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size, vma->vm_flags |= VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP; vma->vm_private_data = obj; - vma->vm_page_prot = pgprot_writecombine(vm_get_page_prot(vma->vm_flags)); + vma->vm_page_prot = vm_get_page_prot(vma->vm_flags); vma->vm_page_prot = pgprot_decrypted(vma->vm_page_prot); /* Take a ref for this mapping of the object, so that the fault