From: Linus Torvalds Date: Thu, 16 Nov 2017 04:42:10 +0000 (-0800) Subject: Merge tag 'drm-for-v4.15' of git://people.freedesktop.org/~airlied/linux X-Git-Tag: v4.19~2174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e60e1ee60630cafef5e430c2ae364877e061d980;p=platform%2Fkernel%2Flinux-rpi.git Merge tag 'drm-for-v4.15' of git://people.freedesktop.org/~airlied/linux Pull drm updates from Dave Airlie: "This is the main drm pull request for v4.15. Core: - Atomic object lifetime fixes - Atomic iterator improvements - Sparse/smatch fixes - Legacy kms ioctls to be interruptible - EDID override improvements - fb/gem helper cleanups - Simple outreachy patches - Documentation improvements - Fix dma-buf rcu races - DRM mode object leasing for improving VR use cases. - vgaarb improvements for non-x86 platforms. New driver: - tve200: Faraday Technology TVE200 block. This "TV Encoder" encodes a ITU-T BT.656 stream and can be found in the StorLink SL3516 (later Cortina Systems CS3516) as well as the Grain Media GM8180. New bridges: - SiI9234 support New panels: - S6E63J0X03, OTM8009A, Seiko 43WVF1G, 7" rpi touch panel, Toshiba LT089AC19000, Innolux AT043TN24 i915: - Remove Coffeelake from alpha support - Cannonlake workarounds - Infoframe refactoring for DisplayPort - VBT updates - DisplayPort vswing/emph/buffer translation refactoring - CCS fixes - Restore GPU clock boost on missed vblanks - Scatter list updates for userptr allocations - Gen9+ transition watermarks - Display IPC (Isochronous Priority Control) - Private PAT management - GVT: improved error handling and pci config sanitizing - Execlist refactoring - Transparent Huge Page support - User defined priorities support - HuC/GuC firmware refactoring - DP MST fixes - eDP power sequencing fixes - Use RCU instead of stop_machine - PSR state tracking support - Eviction fixes - BDW DP aux channel timeout fixes - LSPCON fixes - Cannonlake PLL fixes amdgpu: - Per VM BO support - Powerplay cleanups - CI powerplay support - PASID mgr for kfd - SR-IOV fixes - initial GPU reset for vega10 - Prime mmap support - TTM updates - Clock query interface for Raven - Fence to handle ioctl - UVD encode ring support on Polaris - Transparent huge page DMA support - Compute LRU pipe tweaks - BO flag to allow buffers to opt out of implicit sync - CTX priority setting API - VRAM lost infrastructure plumbing qxl: - fix flicker since atomic rework amdkfd: - Further improvements from internal AMD tree - Usermode events - Drop radeon support nouveau: - Pascal temperature sensor support - Improved BAR2 handling - MMU rework to support Pascal MMU exynos: - Improved HDMI/mixer support - HDMI audio interface support tegra: - Prep work for tegra186 - Cleanup/fixes msm: - Preemption support for a5xx - Display fixes for 8x96 (snapdragon 820) - Async cursor plane fixes - FW loading rework - GPU debugging improvements vc4: - Prep for DSI panels - fix T-format tiling scanout - New madvise ioctl Rockchip: - LVDS support omapdrm: - omap4 HDMI CEC support etnaviv: - GPU performance counters groundwork sun4i: - refactor driver load + TCON backend - HDMI improvements - A31 support - Misc fixes udl: - Probe/EDID read fixes. tilcdc: - Misc fixes. pl111: - Support more variants adv7511: - Improve EDID handling. - HDMI CEC support sii8620: - Add remote control support" * tag 'drm-for-v4.15' of git://people.freedesktop.org/~airlied/linux: (1480 commits) drm/rockchip: analogix_dp: Use mutex rather than spinlock drm/mode_object: fix documentation for object lookups. drm/i915: Reorder context-close to avoid calling i915_vma_close() under RCU drm/i915: Move init_clock_gating() back to where it was drm/i915: Prune the reservation shared fence array drm/i915: Idle the GPU before shinking everything drm/i915: Lock llist_del_first() vs llist_del_all() drm/i915: Calculate ironlake intermediate watermarks correctly, v2. drm/i915: Disable lazy PPGTT page table optimization for vGPU drm/i915/execlists: Remove the priority "optimisation" drm/i915: Filter out spurious execlists context-switch interrupts drm/amdgpu: use irq-safe lock for kiq->ring_lock drm/amdgpu: bypass lru touch for KIQ ring submission drm/amdgpu: Potential uninitialized variable in amdgpu_vm_update_directories() drm/amdgpu: potential uninitialized variable in amdgpu_vce_ring_parse_cs() drm/amd/powerplay: initialize a variable before using it drm/amd/powerplay: suppress KASAN out of bounds warning in vega10_populate_all_memory_levels drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition drm/vblank: Tune drm_crtc_accurate_vblank_count() WARN down to a debug drm/rockchip: add CONFIG_OF dependency for lvds ... --- e60e1ee60630cafef5e430c2ae364877e061d980 diff --cc Documentation/devicetree/bindings/vendor-prefixes.txt index 0f295a4,6cf1dc5..1db9dbe --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@@ -249,11 -245,10 +249,12 @@@ olimex OLIMEX Ltd onion Onion Corporation onnn ON Semiconductor Corp. ontat On Tat Industrial Company +opalkelly Opal Kelly Incorporated opencores OpenCores.org +openrisc OpenRISC.io option Option NV ORCL Oracle Corporation + orisetech Orise Technology ortustech Ortus Technology Co., Ltd. ovti OmniVision Technologies oxsemi Oxford Semiconductor, Ltd. diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index cd66483,f7fceb6..6c78623 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@@ -553,7 -562,8 +562,7 @@@ static int amdgpu_cs_parser_bos(struct * invalidated it. Free it and try again */ release_pages(e->user_pages, - e->robj->tbo.ttm->num_pages); - bo->tbo.ttm->num_pages, - false); ++ bo->tbo.ttm->num_pages); kvfree(e->user_pages); e->user_pages = NULL; } diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c index 89680d5,9ec96b9..b160b95 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace_points.c @@@ -1,5 -1,23 +1,24 @@@ +// SPDX-License-Identifier: GPL-2.0 /* Copyright Red Hat Inc 2010. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * * Author : Dave Airlie */ #include diff --cc drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index d792959,1f036af..ad5bf86 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@@ -659,7 -746,8 +746,8 @@@ int amdgpu_ttm_tt_get_user_pages(struc return 0; release_pages: - release_pages(pages, pinned, 0); + release_pages(pages, pinned); + up_read(¤t->mm->mmap_sem); return r; } diff --cc drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index 62cd16a,2581543..920910a --- a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c @@@ -93,11 -371,13 +371,17 @@@ static int uvd_v6_0_early_init(void *ha { struct amdgpu_device *adev = (struct amdgpu_device *)handle; + if (!(adev->flags & AMD_IS_APU) && + (RREG32_SMC(ixCC_HARVEST_FUSES) & CC_HARVEST_FUSES__UVD_DISABLE_MASK)) + return -ENOENT; + uvd_v6_0_set_ring_funcs(adev); + + if (uvd_v6_0_enc_support(adev)) { + adev->uvd.num_enc_rings = 2; + uvd_v6_0_set_enc_ring_funcs(adev); + } + uvd_v6_0_set_irq_funcs(adev); return 0; diff --cc drivers/gpu/drm/i915/i915_gem_context.c index 8afd2ce,e304dcb..f782cf2 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@@ -104,19 -104,12 +104,14 @@@ static void lut_close(struct i915_gem_c kmem_cache_free(ctx->i915->luts, lut); } + rcu_read_lock(); radix_tree_for_each_slot(slot, &ctx->handles_vma, &iter, 0) { struct i915_vma *vma = rcu_dereference_raw(*slot); - struct drm_i915_gem_object *obj = vma->obj; radix_tree_iter_delete(&ctx->handles_vma, &iter, slot); - - if (!i915_vma_is_ggtt(vma)) - i915_vma_close(vma); - - __i915_gem_object_release_unless_active(obj); + __i915_gem_object_release_unless_active(vma->obj); } + rcu_read_unlock(); } static void i915_gem_context_free(struct i915_gem_context *ctx) diff --cc drivers/gpu/drm/i915/i915_gem_gtt.c index 7982ad8,5eaa689..2af65ec --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@@ -933,13 -1158,24 +1158,20 @@@ static void gen8_ppgtt_insert_4lvl(stru u32 unused) { struct i915_hw_ppgtt *ppgtt = i915_vm_to_ppgtt(vm); - struct sgt_dma iter = { - .sg = vma->pages->sgl, - .dma = sg_dma_address(iter.sg), - .max = iter.dma + iter.sg->length, - }; + struct sgt_dma iter = sgt_dma(vma); struct i915_page_directory_pointer **pdps = ppgtt->pml4.pdps; - struct gen8_insert_pte idx = gen8_insert_pte(vma->node.start); - while (gen8_ppgtt_insert_pte_entries(ppgtt, pdps[idx.pml4e++], &iter, - &idx, cache_level)) - GEM_BUG_ON(idx.pml4e >= GEN8_PML4ES_PER_PML4); + if (vma->page_sizes.sg > I915_GTT_PAGE_SIZE) { + gen8_ppgtt_insert_huge_entries(vma, pdps, &iter, cache_level); + } else { + struct gen8_insert_pte idx = gen8_insert_pte(vma->node.start); + + while (gen8_ppgtt_insert_pte_entries(ppgtt, pdps[idx.pml4e++], + &iter, &idx, cache_level)) + GEM_BUG_ON(idx.pml4e >= GEN8_PML4ES_PER_PML4); + + vma->page_sizes.gtt = I915_GTT_PAGE_SIZE; + } } static void gen8_free_page_tables(struct i915_address_space *vm, diff --cc drivers/gpu/drm/i915/i915_gem_userptr.c index aa22361,e26b231..135fc75 --- a/drivers/gpu/drm/i915/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c @@@ -668,10 -660,10 +660,10 @@@ static int i915_gem_userptr_get_pages(s __i915_gem_userptr_set_active(obj, true); if (IS_ERR(pages)) - release_pages(pvec, pinned, 0); + release_pages(pvec, pinned); kvfree(pvec); - return pages; + return PTR_ERR_OR_ZERO(pages); } static void diff --cc drivers/gpu/drm/nouveau/include/nvkm/core/device.h index d7ecb65,5046e1d..560265b --- a/drivers/gpu/drm/nouveau/include/nvkm/core/device.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/device.h @@@ -1,8 -1,7 +1,8 @@@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __NVKM_DEVICE_H__ #define __NVKM_DEVICE_H__ + #include #include - #include enum nvkm_devidx { NVKM_SUBDEV_PCI, diff --cc drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h index 473ba0b,5169166..10eeaee --- a/drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/gpuobj.h @@@ -1,11 -1,7 +1,8 @@@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __NVKM_GPUOBJ_H__ #define __NVKM_GPUOBJ_H__ - #include #include #include - struct nvkm_vma; - struct nvkm_vm; #define NVOBJ_FLAG_ZERO_ALLOC 0x00000001 #define NVOBJ_FLAG_HEAP 0x00000004 diff --cc drivers/gpu/drm/nouveau/include/nvkm/core/object.h index 3f13ff1,916a4b76..270f893 --- a/drivers/gpu/drm/nouveau/include/nvkm/core/object.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/core/object.h @@@ -1,11 -1,8 +1,9 @@@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __NVKM_OBJECT_H__ #define __NVKM_OBJECT_H__ - #include - #include + #include struct nvkm_event; struct nvkm_gpuobj; - struct nvkm_oclass; struct nvkm_object { const struct nvkm_object_func *func; diff --cc drivers/gpu/drm/nouveau/nouveau_display.h index 34cd144,1411bf0..270ba56 --- a/drivers/gpu/drm/nouveau/nouveau_display.h +++ b/drivers/gpu/drm/nouveau/nouveau_display.h @@@ -1,9 -1,5 +1,6 @@@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef __NOUVEAU_DISPLAY_H__ #define __NOUVEAU_DISPLAY_H__ - - #include - #include "nouveau_drv.h" struct nouveau_framebuffer { diff --cc drivers/gpu/drm/pl111/Makefile index f2874bb,fce1453..9c5e8db --- a/drivers/gpu/drm/pl111/Makefile +++ b/drivers/gpu/drm/pl111/Makefile @@@ -1,6 -1,5 +1,6 @@@ +# SPDX-License-Identifier: GPL-2.0 - pl111_drm-y += pl111_connector.o \ - pl111_display.o \ + pl111_drm-y += pl111_display.o \ + pl111_versatile.o \ pl111_drv.o pl111_drm-$(CONFIG_DEBUG_FS) += pl111_debugfs.o diff --cc drivers/gpu/drm/sun4i/Makefile index 55b3236,301b5b1..0c2f8c7 --- a/drivers/gpu/drm/sun4i/Makefile +++ b/drivers/gpu/drm/sun4i/Makefile @@@ -1,25 -1,25 +1,26 @@@ +# SPDX-License-Identifier: GPL-2.0 - sun4i-drm-y += sun4i_drv.o - sun4i-drm-y += sun4i_framebuffer.o + sun4i-backend-y += sun4i_backend.o sun4i_layer.o - sun4i-drm-hdmi-y += sun4i_hdmi_enc.o - sun4i-drm-hdmi-y += sun4i_hdmi_i2c.o - sun4i-drm-hdmi-y += sun4i_hdmi_ddc_clk.o - sun4i-drm-hdmi-y += sun4i_hdmi_tmds_clk.o + sun4i-drm-y += sun4i_drv.o + sun4i-drm-y += sun4i_framebuffer.o - sun4i-tcon-y += sun4i_tcon.o - sun4i-tcon-y += sun4i_rgb.o - sun4i-tcon-y += sun4i_dotclock.o - sun4i-tcon-y += sun4i_crtc.o + sun4i-drm-hdmi-y += sun4i_hdmi_ddc_clk.o + sun4i-drm-hdmi-y += sun4i_hdmi_enc.o + sun4i-drm-hdmi-y += sun4i_hdmi_i2c.o + sun4i-drm-hdmi-y += sun4i_hdmi_tmds_clk.o - sun4i-backend-y += sun4i_backend.o sun4i_layer.o + sun8i-mixer-y += sun8i_mixer.o sun8i_layer.o - sun8i-mixer-y += sun8i_mixer.o sun8i_layer.o + sun4i-tcon-y += sun4i_crtc.o + sun4i-tcon-y += sun4i_dotclock.o + sun4i-tcon-y += sun4i_tcon.o + sun4i-tcon-y += sun4i_rgb.o - obj-$(CONFIG_DRM_SUN4I) += sun4i-drm.o sun4i-tcon.o - obj-$(CONFIG_DRM_SUN4I) += sun6i_drc.o + obj-$(CONFIG_DRM_SUN4I) += sun4i-drm.o + obj-$(CONFIG_DRM_SUN4I) += sun4i-tcon.o obj-$(CONFIG_DRM_SUN4I) += sun4i_tv.o + obj-$(CONFIG_DRM_SUN4I) += sun6i_drc.o - obj-$(CONFIG_DRM_SUN4I_BACKEND) += sun4i-backend.o + obj-$(CONFIG_DRM_SUN4I_BACKEND) += sun4i-backend.o obj-$(CONFIG_DRM_SUN4I_HDMI) += sun4i-drm-hdmi.o - obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o + obj-$(CONFIG_DRM_SUN8I_MIXER) += sun8i-mixer.o diff --cc drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c index 54025af,482299a..d2b9e5f --- a/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c @@@ -162,8 -163,12 +162,6 @@@ static struct device_node * __init tilc return NULL; } - of_node_set_flag(overlay, OF_DETACHED); - ret = of_resolve_phandles(overlay); - if (ret) { - pr_err("%s: Failed to resolve phandles: %d\n", __func__, ret); - return NULL; - } -- return overlay; }