Merge branch 'linux-4.15' of git://github.com/skeggsb/linux into drm-fixes
authorDave Airlie <airlied@redhat.com>
Tue, 19 Dec 2017 03:21:11 +0000 (13:21 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 19 Dec 2017 03:21:11 +0000 (13:21 +1000)
nouveau regression fixes, and some minor fixes.

* 'linux-4.15' of git://github.com/skeggsb/linux:
  drm/nouveau: use alternate memory type for system-memory buffers with kind != 0
  drm/nouveau: avoid GPU page sizes > PAGE_SIZE for buffer objects in host memory
  drm/nouveau/mmu/gp10b: use correct implementation
  drm/nouveau/pci: do a msi rearm on init
  drm/nouveau/imem/nv50: fix refcount_t warning
  drm/nouveau/bios/dp: support DP Info Table 2.0
  drm/nouveau/fbcon: fix NULL pointer access in nouveau_fbcon_destroy

1  2 
drivers/gpu/drm/nouveau/nouveau_drv.h

@@@ -1,4 -1,3 +1,4 @@@
 +/* SPDX-License-Identifier: GPL-2.0 */
  #ifndef __NOUVEAU_DRV_H__
  #define __NOUVEAU_DRV_H__
  
@@@ -157,8 -156,8 +157,8 @@@ struct nouveau_drm 
                struct nvif_object copy;
                int mtrr;
                int type_vram;
-               int type_host;
-               int type_ncoh;
+               int type_host[2];
+               int type_ncoh[2];
        } ttm;
  
        /* GEM interface support */
@@@ -217,6 -216,13 +217,13 @@@ nouveau_drm(struct drm_device *dev
        return dev->dev_private;
  }
  
+ static inline bool
+ nouveau_drm_use_coherent_gpu_mapping(struct nouveau_drm *drm)
+ {
+       struct nvif_mmu *mmu = &drm->client.mmu;
+       return !(mmu->type[drm->ttm.type_host[0]].type & NVIF_MEM_UNCACHED);
+ }
  int nouveau_pmops_suspend(struct device *);
  int nouveau_pmops_resume(struct device *);
  bool nouveau_pmops_runtime(void);