• Hugh Dickins's avatar
    drm/i915: use shmem_read_mapping_page · 5949eac4
    Hugh Dickins authored
    Soon tmpfs will stop supporting ->readpage and read_cache_page_gfp(): once
    "tmpfs: add shmem_read_mapping_page_gfp" has been applied, this patch can
    be applied to ease the transition.
    
    Make i915_gem_object_get_pages_gtt() use shmem_read_mapping_page_gfp() in
    the one place it's needed; elsewhere use shmem_read_mapping_page(), with
    the mapping's gfp_mask properly initialized.
    
    Forget about __GFP_COLD: since tmpfs initializes its pages with memset,
    asking for a cold page is counter-productive.
    
    Include linux/shmem_fs.h also in drm_gem.c: with shmem_file_setup() now
    declared there too, we shall remove the prototype from linux/mm.h later.
    Signed-off-by: default avatarHugh Dickins <hughd@google.com>
    Cc: Christoph Hellwig <hch@infradead.org>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Keith Packard <keithp@keithp.com>
    Cc: Dave Airlie <airlied@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    5949eac4
i915_gem.c 104 KB