From: Dave Airlie Date: Thu, 23 Feb 2017 02:10:12 +0000 (+1000) Subject: Merge tag 'v4.10-rc8' into drm-next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=94000cc32988a0674923309d35ab9c2405c4b39b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge tag 'v4.10-rc8' into drm-next Linux 4.10-rc8 Backmerge Linus rc8 to fix some conflicts, but also to avoid pulling it in via a fixes pull from someone. --- 94000cc32988a0674923309d35ab9c2405c4b39b diff --cc drivers/gpu/drm/i915/i915_gem_internal.c index 628699a91106,d09c74973cb3..933019e1b206 --- a/drivers/gpu/drm/i915/i915_gem_internal.c +++ b/drivers/gpu/drm/i915/i915_gem_internal.c @@@ -52,10 -52,30 +52,18 @@@ i915_gem_object_get_pages_internal(stru int max_order; gfp_t gfp; - st = kmalloc(sizeof(*st), GFP_KERNEL); - if (!st) - return ERR_PTR(-ENOMEM); - - if (sg_alloc_table(st, npages, GFP_KERNEL)) { - kfree(st); - return ERR_PTR(-ENOMEM); - } - - sg = st->sgl; - st->nents = 0; - max_order = MAX_ORDER; #ifdef CONFIG_SWIOTLB - if (swiotlb_nr_tbl()) /* minimum max swiotlb size is IO_TLB_SEGSIZE */ - max_order = min(max_order, ilog2(IO_TLB_SEGPAGES)); + if (swiotlb_nr_tbl()) { + unsigned int max_segment; + + max_segment = swiotlb_max_segment(); + if (max_segment) { + max_segment = max_t(unsigned int, max_segment, + PAGE_SIZE) >> PAGE_SHIFT; + max_order = min(max_order, ilog2(max_segment)); + } + } #endif gfp = GFP_KERNEL | __GFP_HIGHMEM | __GFP_RECLAIMABLE; diff --cc drivers/gpu/drm/nouveau/nv84_fence.c index 86360fca4b18,f0b322bec7df..bd7a8a1e4ad9 --- a/drivers/gpu/drm/nouveau/nv84_fence.c +++ b/drivers/gpu/drm/nouveau/nv84_fence.c @@@ -212,8 -216,10 +216,10 @@@ nv84_fence_create(struct nouveau_drm *d priv->base.context_base = dma_fence_context_alloc(priv->base.contexts); priv->base.uevent = true; + mutex_init(&priv->mutex); + /* Use VRAM if there is any ; otherwise fallback to system memory */ - domain = drm->device.info.ram_size != 0 ? TTM_PL_FLAG_VRAM : + domain = drm->client.device.info.ram_size != 0 ? TTM_PL_FLAG_VRAM : /* * fences created in sysmem must be non-cached or we * will lose CPU/GPU coherency! diff --cc drivers/gpu/drm/radeon/radeon_drv.c index af3bbe82fd48,30bd4a6a9d46..956c425e639e --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@@ -97,12 -97,13 +97,13 @@@ * 2.46.0 - Add PFP_SYNC_ME support on evergreen * 2.47.0 - Add UVD_NO_OP register support * 2.48.0 - TA_CS_BC_BASE_ADDR allowed on SI + * 2.49.0 - DRM_RADEON_GEM_INFO ioctl returns correct vram_size/visible values */ #define KMS_DRIVER_MAJOR 2 - #define KMS_DRIVER_MINOR 48 + #define KMS_DRIVER_MINOR 49 #define KMS_DRIVER_PATCHLEVEL 0 int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags); -int radeon_driver_unload_kms(struct drm_device *dev); +void radeon_driver_unload_kms(struct drm_device *dev); void radeon_driver_lastclose_kms(struct drm_device *dev); int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv); void radeon_driver_postclose_kms(struct drm_device *dev, diff --cc include/drm/drm_atomic.h index 2e28fdca9c3d,56814e8ae7ea..052ab161b239 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@@ -145,8 -144,7 +145,8 @@@ struct __drm_crtcs_state struct drm_crtc *ptr; struct drm_crtc_state *state; struct drm_crtc_commit *commit; - s64 __user *out_fence_ptr; + s32 __user *out_fence_ptr; + unsigned last_vblank_count; }; struct __drm_connnectors_state {