dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 3/5] drm/i915: use shmem helpers if possible
Date: Mon, 2 Jun 2014 17:00:03 +0200	[thread overview]
Message-ID: <20140602150003.GR19050@phenom.ffwll.local> (raw)
In-Reply-To: <1401021252-29006-3-git-send-email-dh.herrmann@gmail.com>

On Sun, May 25, 2014 at 02:34:10PM +0200, David Herrmann wrote:
> Instead of shuffling gfp-masks all the time, use the
> shmem_read_mapping_page() helper. Note that __GFP_IO and __GFP_WAIT are
> set in mapping_gfp_mask() for i915, so the behavior is still the same.
> 
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Signed-off-by: David Herrmann <dh.herrmann@gmail.com>

Queued for -next, thanks for the patch.
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index e1fa919..1a72aad 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -1925,16 +1925,10 @@ i915_gem_object_get_pages_gtt(struct drm_i915_gem_object *obj)
>  			 * our own buffer, now let the real VM do its job and
>  			 * go down in flames if truly OOM.
>  			 */
> -			gfp &= ~(__GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD);
> -			gfp |= __GFP_IO | __GFP_WAIT;
> -
>  			i915_gem_shrink_all(dev_priv);
> -			page = shmem_read_mapping_page_gfp(mapping, i, gfp);
> +			page = shmem_read_mapping_page(mapping, i);
>  			if (IS_ERR(page))
>  				goto err_pages;
> -
> -			gfp |= __GFP_NORETRY | __GFP_NOWARN | __GFP_NO_KSWAPD;
> -			gfp &= ~(__GFP_IO | __GFP_WAIT);
>  		}
>  #ifdef CONFIG_SWIOTLB
>  		if (swiotlb_nr_tbl()) {
> -- 
> 1.9.3
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-06-02 15:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-25 12:34 [PATCH v2 1/5] drm/gem: replace misleading comment David Herrmann
2014-05-25 12:34 ` [PATCH 2/5] drm/armada: use shmem helpers if possible David Herrmann
2014-05-25 22:56   ` Russell King - ARM Linux
2014-05-25 12:34 ` [PATCH 3/5] drm/i915: " David Herrmann
2014-06-02 15:00   ` Daniel Vetter [this message]
2014-05-25 12:34 ` [PATCH 4/5] drm/omap: use __GFP_DMA32 for shmem-backed gem David Herrmann
2014-06-02 13:03   ` David Herrmann
2014-06-05 13:52     ` Tomi Valkeinen
2014-06-05 14:04       ` Rob Clark
2014-06-05 14:05         ` David Herrmann
2014-05-25 12:34 ` [PATCH 5/5] drm/gem: remove misleading gfp parameter to get_pages() David Herrmann
2014-05-25 21:53 ` [PATCH v2 1/5] drm/gem: replace misleading comment Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140602150003.GR19050@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dh.herrmann@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox