From patchwork Sun May 25 12:34:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Herrmann X-Patchwork-Id: 4238361 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9222E9F32B for ; Sun, 25 May 2014 12:34:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D66D82025A for ; Sun, 25 May 2014 12:34:22 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 6D80120259 for ; Sun, 25 May 2014 12:34:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7574D6E4B8; Sun, 25 May 2014 05:34:20 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-we0-f170.google.com (mail-we0-f170.google.com [74.125.82.170]) by gabe.freedesktop.org (Postfix) with ESMTP id 3EE5F6E4C0 for ; Sun, 25 May 2014 05:34:19 -0700 (PDT) Received: by mail-we0-f170.google.com with SMTP id u57so7002290wes.1 for ; Sun, 25 May 2014 05:34:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eofvJqRWIbxTM9EE4uJ0NeB6GAHnLkwwICH2bEh+0D4=; b=C1othP18T//D94k4Mgq2jXzafhZbMJ69HxgybrCoUbce/n6VZppVgUhTyr65t5zcvW eQrEMjfyPT1I8ooNu3PMhBgSMS8C22kYe3L6qPl7J9NEHlmL9QpkloJaAlZUoZVe9hvs wMYJXVykNJtK81dVttgRx/spHHU8n8BWUkS23bquAyKsv+bBeSJBJIDo5gAhumXVvB+1 JdjH5lYNaaS+WQ8PEGB/Yvhlii1a+9HVnbg6esQOQd71hWPDtaeEMGqOPE3AnkqwkfAs vKHVZn8aipgSw/ImS/ruQ15noyDk+FSlKDzZ87qnagHFHw2teTruqjhqB3/8zcSU9eYE 6dPw== X-Received: by 10.180.12.135 with SMTP id y7mr18757611wib.39.1401021258142; Sun, 25 May 2014 05:34:18 -0700 (PDT) Received: from david-tp.localdomain (stgt-5f728b13.pool.mediaWays.net. [95.114.139.19]) by mx.google.com with ESMTPSA id w6sm18246933wjq.29.2014.05.25.05.34.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 25 May 2014 05:34:17 -0700 (PDT) From: David Herrmann To: dri-devel@lists.freedesktop.org Subject: [PATCH 2/5] drm/armada: use shmem helpers if possible Date: Sun, 25 May 2014 14:34:09 +0200 Message-Id: <1401021252-29006-2-git-send-email-dh.herrmann@gmail.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1401021252-29006-1-git-send-email-dh.herrmann@gmail.com> References: <1401021252-29006-1-git-send-email-dh.herrmann@gmail.com> Cc: Daniel Vetter , Russell King X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP shmem_read_mapping_page() uses mapping_gfp_mask(mapping) as default gfp mask. No reason to use shmem_read_mapping_page_gfp() directly if we want the default behavior. Cc: Russell King Signed-off-by: David Herrmann Acked-by: Russell King --- drivers/gpu/drm/armada/armada_gem.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_gem.c b/drivers/gpu/drm/armada/armada_gem.c index 887816f..bb9b642 100644 --- a/drivers/gpu/drm/armada/armada_gem.c +++ b/drivers/gpu/drm/armada/armada_gem.c @@ -433,7 +433,6 @@ armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, if (dobj->obj.filp) { struct address_space *mapping; - gfp_t gfp; int count; count = dobj->obj.size / PAGE_SIZE; @@ -441,12 +440,11 @@ armada_gem_prime_map_dma_buf(struct dma_buf_attachment *attach, goto free_sgt; mapping = file_inode(dobj->obj.filp)->i_mapping; - gfp = mapping_gfp_mask(mapping); for_each_sg(sgt->sgl, sg, count, i) { struct page *page; - page = shmem_read_mapping_page_gfp(mapping, i, gfp); + page = shmem_read_mapping_page(mapping, i); if (IS_ERR(page)) { num = i; goto release;