Merge tag 'drm-next-2019-11-27' of git://anongit.freedesktop.org/drm/drm
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Nov 2019 01:45:48 +0000 (17:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Nov 2019 01:45:48 +0000 (17:45 -0800)
Pull drm updates from Dave Airlie:
 "Lots of stuff in here, though it hasn't been too insane this merge
  apart from dealing with the security fun.

  uapi:
   - export different colorspace properties on DP vs HDMI
   - new fourcc for ARM 16x16 block format
   - syncobj: allow querying last submitted timeline value
   - DRM_FORMAT_BIG_ENDIAN defined as unsigned

  core:
   - allow using gem vma manager in ttm
   - connector/encoder/bridge doc fixes
   - allow more than 3 encoders for a connector
   - displayport mst suspend/resume reprobing support
   - vram lazy unmapping, uniform vram mm and gem vram
   - edid cleanups + AVI informframe bar info
   - displayport helpers - dpcd parser added

  dp_cec:
   - Allow a connector to be associated with a cec device

  ttm:
   - pipelining with no_gpu_wait fix
   - always keep BOs on the LRU

  sched:
   - allow free_job routine to sleep

  i915:
   - Block userptr from mappable GTT
   - i915 perf uapi versioning
   - OA stream dynamic reconfiguration
   - make context persistence optional
   - introduce DRM_I915_UNSTABLE Kconfig
   - add fake lmem testing under unstable
   - BT.2020 support for DP MSA
   - struct mutex elimination
   - Tigerlake display/PLL/power management improvements
   - Jasper Lake PCH support
   - refactor PMU for multiple GPUs
   - Icelake firmware update
   - Split out vga + switcheroo code

  amdgpu:
   - implement dma-buf import/export without helpers
   - vega20 RAS enablement
   - DC i2c over aux fixes
   - renoir GPU reset
   - DC HDCP support
   - BACO support for CI/VI asics
   - MSI-X support
   - Arcturus EEPROM support
   - Arcturus VCN encode support
   - VCN dynamic powergating on RV/RV2

  amdkfd:
   - add navi12/14/renoir support to kfd

  radeon:
   - SI dpm fix ported from amdgpu
   - fix bad DMA on ppc platforms

  gma500:
   - memory leak fixes

  qxl:
   - convert to new gem mmap

  exynos:
   - build warning fix

  komeda:
   - add aclk sysfs attribute

  v3d:
   - userspace cleanup uapi change

  i810:
   - fix for underflow in dispatch ioctls

  ast:
   - refactor show_cursor

  mgag200:
   - refactor show_cursor

  arcgpu:
   - encoder finding improvements

  mediatek:
   - mipi_tx, dsi and partial crtc support for MT8183 SoC
   - rotation support

  meson:
   - add suspend/resume support

  omap:
   - misc refactors

  tegra:
   - DisplayPort support for Tegra 210, 186 and 194.
   - IOMMU-backed DMA API fixes

  panfrost:
   - fix lockdep issue
   - simplify devfreq integration

  rcar-du:
   - R8A774B1 SoC support
   - fixes for H2 ES2.0

  sun4i:
   - vcc-dsi regulator support

  virtio-gpu:
   - vmexit vs spinlock fix
   - move to gem shmem helpers
   - handle large command buffers with cma"

* tag 'drm-next-2019-11-27' of git://anongit.freedesktop.org/drm/drm: (1855 commits)
  drm/amdgpu: invalidate mmhub semaphore workaround in gmc9/gmc10
  drm/amdgpu: initialize vm_inv_eng0_sem for gfxhub and mmhub
  drm/amd/amdgpu/sriov skip RLCG s/r list for arcturus VF.
  drm/amd/amdgpu/sriov temporarily skip ras,dtm,hdcp for arcturus VF
  drm/amdgpu/gfx10: re-init clear state buffer after gpu reset
  merge fix for "ftrace: Rework event_create_dir()"
  drm/amdgpu: Update Arcturus golden registers
  drm/amdgpu/gfx10: fix out-of-bound mqd_backup array access
  drm/amdgpu/gfx10: explicitly wait for cp idle after halt/unhalt
  Revert "drm/amd/display: enable S/G for RAVEN chip"
  drm/amdgpu: disable gfxoff on original raven
  drm/amdgpu: remove experimental flag for Navi14
  drm/amdgpu: disable gfxoff when using register read interface
  drm/amdgpu/powerplay: properly set PP_GFXOFF_MASK (v2)
  drm/amdgpu: fix bad DMA from INTERRUPT_CNTL2
  drm/radeon: fix bad DMA from INTERRUPT_CNTL2
  drm/amd/display: Fix debugfs on MST connectors
  drm/amdgpu/nv: add asic func for fetching vbios from rom directly
  drm/amdgpu: put flush_delayed_work at first
  drm/amdgpu/vcn2.5: fix the enc loop with hw fini
  ...

21 files changed:
1  2 
MAINTAINERS
drivers/gpu/drm/bridge/synopsys/dw-hdmi-i2s-audio.c
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
drivers/gpu/drm/drm_connector.c
drivers/gpu/drm/i915/Kconfig.debug
drivers/gpu/drm/i915/display/intel_display_power.c
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/gem/i915_gem_shrinker.c
drivers/gpu/drm/i915/gt/intel_engine_pm.c
drivers/gpu/drm/i915/gt/intel_engine_pool.c
drivers/gpu/drm/i915/gt/intel_mocs.c
drivers/gpu/drm/i915/gvt/dmabuf.c
drivers/gpu/drm/i915/i915_active.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/sun4i/sun4i_tcon.c
drivers/media/platform/cec-gpio/cec-gpio.c
drivers/media/platform/meson/ao-cec-g12a.c
drivers/media/platform/meson/ao-cec.c
drivers/media/platform/seco-cec/seco-cec.c
include/drm/bridge/dw_hdmi.h

diff --cc MAINTAINERS
Simple merge
index 6c2c44d0bdee3673e329f8c85004c6ce3c214b70,20f4f92dd866fe16150da42b655bb332338d9022..d7e65c8694153474f0e3818bed7761ac967a3e50
@@@ -151,18 -160,9 +160,19 @@@ static int dw_hdmi_i2s_get_dai_id(struc
        return -EINVAL;
  }
  
 +static int dw_hdmi_i2s_hook_plugged_cb(struct device *dev, void *data,
 +                                     hdmi_codec_plugged_cb fn,
 +                                     struct device *codec_dev)
 +{
 +      struct dw_hdmi_i2s_audio_data *audio = data;
 +      struct dw_hdmi *hdmi = audio->hdmi;
 +
 +      return dw_hdmi_set_plugged_cb(hdmi, fn, codec_dev);
 +}
 +
  static struct hdmi_codec_ops dw_hdmi_i2s_ops = {
        .hw_params      = dw_hdmi_i2s_hw_params,
+       .audio_startup  = dw_hdmi_i2s_audio_startup,
        .audio_shutdown = dw_hdmi_i2s_audio_shutdown,
        .get_eld        = dw_hdmi_i2s_get_eld,
        .get_dai_id     = dw_hdmi_i2s_get_dai_id,
Simple merge
index 1400fce39c589be23b3ea814f0fde07410caa85d,eea79125b3ea19432c52488e7352394f86b41dc0..0b1f786a7ce9e19fc2750639104be0a502dc4ec4
@@@ -1,33 -1,34 +1,33 @@@
  # SPDX-License-Identifier: GPL-2.0-only
  config DRM_I915_WERROR
-         bool "Force GCC to throw an error instead of a warning when compiling"
-         # As this may inadvertently break the build, only allow the user
-         # to shoot oneself in the foot iff they aim really hard
-         depends on EXPERT
-         # We use the dependency on !COMPILE_TEST to not be enabled in
-         # allmodconfig or allyesconfig configurations
-         depends on !COMPILE_TEST
+       bool "Force GCC to throw an error instead of a warning when compiling"
+       # As this may inadvertently break the build, only allow the user
+       # to shoot oneself in the foot iff they aim really hard
+       depends on EXPERT
+       # We use the dependency on !COMPILE_TEST to not be enabled in
+       # allmodconfig or allyesconfig configurations
+       depends on !COMPILE_TEST
        select HEADER_TEST
-         default n
-         help
-           Add -Werror to the build flags for (and only for) i915.ko.
-           Do not enable this unless you are writing code for the i915.ko module.
+       default n
+       help
+         Add -Werror to the build flags for (and only for) i915.ko.
+         Do not enable this unless you are writing code for the i915.ko module.
  
-           Recommended for driver developers only.
+         Recommended for driver developers only.
  
-           If in doubt, say "N".
+         If in doubt, say "N".
  
  config DRM_I915_DEBUG
-         bool "Enable additional driver debugging"
-         depends on DRM_I915
-         select DEBUG_FS
-         select PREEMPT_COUNT
-         select I2C_CHARDEV
-         select STACKDEPOT
-         select DRM_DP_AUX_CHARDEV
-         select X86_MSR # used by igt/pm_rpm
-         select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
-         select DRM_DEBUG_MM if DRM=y
+       bool "Enable additional driver debugging"
+       depends on DRM_I915
+       select DEBUG_FS
+       select PREEMPT_COUNT
 -      select REFCOUNT_FULL
+       select I2C_CHARDEV
+       select STACKDEPOT
+       select DRM_DP_AUX_CHARDEV
+       select X86_MSR # used by igt/pm_rpm
+       select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks)
+       select DRM_DEBUG_MM if DRM=y
        select DRM_DEBUG_SELFTEST
        select DMABUF_SELFTESTS
        select SW_SYNC # signaling validation framework (igt/syncobj*)
index 1a51b3598d635511d897306eef25b6b41a23c597,fd3ce6da8497d7d56743f3da4564c62dcfd17752..f2418a1cfe689b84f3eaf5f9b2b1e232958dc06b
@@@ -497,22 -436,9 +436,9 @@@ void i915_gem_shrinker_taints_mutex(str
  
        fs_reclaim_acquire(GFP_KERNEL);
  
-       /*
-        * As we invariably rely on the struct_mutex within the shrinker,
-        * but have a complicated recursion dance, taint all the mutexes used
-        * within the shrinker with the struct_mutex. For completeness, we
-        * taint with all subclass of struct_mutex, even though we should
-        * only need tainting by I915_MM_NORMAL to catch possible ABBA
-        * deadlocks from using struct_mutex inside @mutex.
-        */
-       mutex_acquire(&i915->drm.struct_mutex.dep_map,
-                     I915_MM_SHRINKER, 0, _RET_IP_);
        mutex_acquire(&mutex->dep_map, 0, 0, _RET_IP_);
 -      mutex_release(&mutex->dep_map, 0, _RET_IP_);
 +      mutex_release(&mutex->dep_map, _RET_IP_);
  
-       mutex_release(&i915->drm.struct_mutex.dep_map, _RET_IP_);
        fs_reclaim_release(GFP_KERNEL);
  
        if (unlock)
Simple merge
Simple merge
index 48e16ad93bbdd83c8a8df15dd49aa540655ad124,5448f37c81024a8210ed25809ca9f1f395033ae4..3c424cb9070275449c65bf1f3efa0fe40ecbb8d3
@@@ -337,6 -371,28 +371,28 @@@ out
        return err;
  }
  
 -      mutex_release(&ref->mutex.dep_map, 0, _THIS_IP_);
+ void i915_active_set_exclusive(struct i915_active *ref, struct dma_fence *f)
+ {
+       /* We expect the caller to manage the exclusive timeline ordering */
+       GEM_BUG_ON(i915_active_is_idle(ref));
+       /*
+        * As we don't know which mutex the caller is using, we told a small
+        * lie to the debug code that it is using the i915_active.mutex;
+        * and now we must stick to that lie.
+        */
+       mutex_acquire(&ref->mutex.dep_map, 0, 0, _THIS_IP_);
+       if (!__i915_active_fence_set(&ref->excl, f))
+               atomic_inc(&ref->count);
++      mutex_release(&ref->mutex.dep_map, _THIS_IP_);
+ }
+ bool i915_active_acquire_if_busy(struct i915_active *ref)
+ {
+       debug_active_assert(ref);
+       return atomic_add_unless(&ref->count, 1, 0);
+ }
  int i915_active_acquire(struct i915_active *ref)
  {
        int err;
index 3d717e28290860506bebf9f92274d23d0f1a817b,87e05ca3646a37d1bb8afd8921549937520d285f..3c512c571e60df3cceb35130233a6912d1ef8b95
@@@ -364,11 -297,14 +297,11 @@@ static int i915_driver_modeset_probe(st
        if (ret)
                goto cleanup_vga_client;
  
-       intel_power_domains_init_hw(dev_priv, false);
 -      /* must happen before intel_power_domains_init_hw() on VLV/CHV */
 -      intel_update_rawclk(i915);
 -
+       intel_power_domains_init_hw(i915, false);
  
-       intel_csr_ucode_init(dev_priv);
+       intel_csr_ucode_init(i915);
  
-       ret = intel_irq_install(dev_priv);
+       ret = intel_irq_install(i915);
        if (ret)
                goto cleanup_csr;
  
Simple merge
Simple merge
index 7be91e712c4ae20f18c1e66d63a952b4ff130ee0,5b17d3a3189689eb46cfab22050544640fcf76e3..42d2c2cd9a786cd0e5615a45951cf876a4b1a0c8
@@@ -239,37 -230,23 +239,37 @@@ static int cec_gpio_probe(struct platfo
                        IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
                        "v5-gpio", cec);
                if (ret)
 -                      return ret;
 +                      goto del_adap;
        }
  
 -      ret = cec_register_adapter(cec->adap, &pdev->dev);
 -      if (ret) {
 -              cec_delete_adapter(cec->adap);
 -              return ret;
 +      if (!IS_ERR(hdmi_dev)) {
 +              cec->notifier = cec_notifier_cec_adap_register(hdmi_dev, NULL,
 +                                                             cec->adap);
 +              if (!cec->notifier) {
 +                      ret = -ENOMEM;
 +                      goto del_adap;
 +              }
        }
  
 +      ret = cec_register_adapter(cec->adap, &pdev->dev);
 +      if (ret)
 +              goto unreg_notifier;
 +
        platform_set_drvdata(pdev, cec);
        return 0;
-       cec_notifier_cec_adap_unregister(cec->notifier);
 +
 +unreg_notifier:
++      cec_notifier_cec_adap_unregister(cec->notifier, cec->adap);
 +del_adap:
 +      cec_delete_adapter(cec->adap);
 +      return ret;
  }
  
  static int cec_gpio_remove(struct platform_device *pdev)
  {
        struct cec_gpio *cec = platform_get_drvdata(pdev);
  
-       cec_notifier_cec_adap_unregister(cec->notifier);
++      cec_notifier_cec_adap_unregister(cec->notifier, cec->adap);
        cec_unregister_adapter(cec->adap);
        return 0;
  }
index 3d8fe854feb0a78a43c187021e53e2daf61df4e8,70f875b4a01e0528ffea9985a3d7eef5136add21..891533060d49671fee14c24c725742ff8cffd7d0
@@@ -732,12 -732,12 +732,12 @@@ static int meson_ao_cec_g12a_probe(stru
  
        return 0;
  
 -out_probe_core_clk:
 -      clk_disable_unprepare(ao_cec->core);
 -
  out_probe_notify:
-       cec_notifier_cec_adap_unregister(ao_cec->notify);
+       cec_notifier_cec_adap_unregister(ao_cec->notify, ao_cec->adap);
  
 +out_probe_core_clk:
 +      clk_disable_unprepare(ao_cec->core);
 +
  out_probe_adapter:
        cec_delete_adapter(ao_cec->adap);
  
index 03600e8b3ef00e3d9fae08b6102164ae868a933e,92859a6d006f81b8bafe66097a1af77d01bfa0ea..09aff82c3773518268741af5d3ab36ad14a6b6cb
@@@ -684,12 -684,12 +684,12 @@@ static int meson_ao_cec_probe(struct pl
  
        return 0;
  
 -out_probe_clk:
 -      clk_disable_unprepare(ao_cec->core);
 -
  out_probe_notify:
-       cec_notifier_cec_adap_unregister(ao_cec->notify);
+       cec_notifier_cec_adap_unregister(ao_cec->notify, ao_cec->adap);
  
 +out_probe_clk:
 +      clk_disable_unprepare(ao_cec->core);
 +
  out_probe_adapter:
        cec_delete_adapter(ao_cec->adap);
  
index 9a0c8381a069063a6f46e9be3470dbceedb4642a,fbf3812c4326910259098135becd7e0495195b3a..9d4d5cc47969761b1c469e5b92dca0ff57052b80
@@@ -156,10 -155,9 +157,11 @@@ void dw_hdmi_resume(struct dw_hdmi *hdm
  
  void dw_hdmi_setup_rx_sense(struct dw_hdmi *hdmi, bool hpd, bool rx_sense);
  
 +int dw_hdmi_set_plugged_cb(struct dw_hdmi *hdmi, hdmi_codec_plugged_cb fn,
 +                         struct device *codec_dev);
  void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate);
  void dw_hdmi_set_channel_count(struct dw_hdmi *hdmi, unsigned int cnt);
+ void dw_hdmi_set_channel_status(struct dw_hdmi *hdmi, u8 *channel_status);
  void dw_hdmi_set_channel_allocation(struct dw_hdmi *hdmi, unsigned int ca);
  void dw_hdmi_audio_enable(struct dw_hdmi *hdmi);
  void dw_hdmi_audio_disable(struct dw_hdmi *hdmi);