Merge tag 'drm-misc-next-2020-09-21' of git://anongit.freedesktop.org/drm/drm-misc...
authorDave Airlie <airlied@redhat.com>
Tue, 22 Sep 2020 23:49:48 +0000 (09:49 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 22 Sep 2020 23:52:24 +0000 (09:52 +1000)
drm-misc-next for 5.10:

UAPI Changes:

Cross-subsystem Changes:
  - virtio: Merged a PR for patches that will affect drm/virtio

Core Changes:
  - dev: More devm_drm convertions and removal of drm_dev_init
  - atomic: Split out drm_atomic_helper_calc_timestamping_constants of
    drm_atomic_helper_update_legacy_modeset_state
  - ttm: More rework

Driver Changes:
  - i915: selftests improvements
  - panfrost: support for Amlogic SoC
  - vc4: one fix
  - tree-wide: conversions to devm_drm_dev_alloc,
  - ast: simplifications of the atomic modesetting code
  - panfrost: multiple fixes
  - vc4: multiple fixes
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200921152956.2gxnsdgxmwhvjyut@gilmour.lan
18 files changed:
1  2 
drivers/dma-buf/udmabuf.c
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/armada/armada_gem.c
drivers/gpu/drm/drm_dp_mst_topology.c
drivers/gpu/drm/drm_gem_shmem_helper.c
drivers/gpu/drm/drm_prime.c
drivers/gpu/drm/etnaviv/etnaviv_gem.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/selftests/mock_gem_device.c
drivers/gpu/drm/msm/msm_gem.c
drivers/gpu/drm/rockchip/rockchip_drm_gem.c
drivers/gpu/drm/tegra/gem.c
drivers/gpu/drm/virtio/virtgpu_vq.c
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
drivers/gpu/drm/xen/xen_drm_front_gem.c
include/drm/drm_prime.h

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -118,12 -116,11 +116,11 @@@ static struct dev_pm_domain pm_domain 
  
  struct drm_i915_private *mock_gem_device(void)
  {
 -      struct drm_i915_private *i915;
 -      struct pci_dev *pdev;
  #if IS_ENABLED(CONFIG_IOMMU_API) && defined(CONFIG_INTEL_IOMMU)
 -      struct dev_iommu iommu;
 +      static struct dev_iommu fake_iommu = { .priv = (void *)-1 };
  #endif
-       int err;
 +      struct drm_i915_private *i915;
 +      struct pci_dev *pdev;
  
        pdev = kzalloc(sizeof(*pdev), GFP_KERNEL);
        if (!pdev)
        dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
  
  #if IS_ENABLED(CONFIG_IOMMU_API) && defined(CONFIG_INTEL_IOMMU)
 -      /* HACK HACK HACK to disable iommu for the fake device; force identity mapping */
 -      memset(&iommu, 0, sizeof(iommu));
 -      iommu.priv = (void *)-1;
 -      pdev->dev.iommu = &iommu;
 +      /* HACK to disable iommu for the fake device; force identity mapping */
 +      pdev->dev.iommu = &fake_iommu;
  #endif
+       if (!devres_open_group(&pdev->dev, NULL, GFP_KERNEL)) {
+               put_device(&pdev->dev);
+               return NULL;
+       }
+       i915 = devm_drm_dev_alloc(&pdev->dev, &mock_driver,
+                                 struct drm_i915_private, drm);
+       if (IS_ERR(i915)) {
+               pr_err("Failed to allocate mock GEM device: err=%ld\n", PTR_ERR(i915));
+               devres_release_group(&pdev->dev, NULL);
+               put_device(&pdev->dev);
+               return NULL;
+       }
  
        pci_set_drvdata(pdev, i915);
+       i915->drm.pdev = pdev;
  
        dev_pm_domain_set(&pdev->dev, &pm_domain);
        pm_runtime_enable(&pdev->dev);
Simple merge
Simple merge
Simple merge
Simple merge