Merge airlied/drm-next into drm-misc-next
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 26 Jul 2017 11:23:10 +0000 (13:23 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 26 Jul 2017 11:43:33 +0000 (13:43 +0200)
I need this to be able to apply the deferred fbdev setup patches, I
need the relevant prep work that landed through the drm-intel tree.

Also squash in conflict fixup from Laurent Pinchart.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
20 files changed:
1  2 
Documentation/devicetree/bindings/vendor-prefixes.txt
MAINTAINERS
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/bridge/panel.c
drivers/gpu/drm/drm_framebuffer.c
drivers/gpu/drm/drm_internal.h
drivers/gpu/drm/drm_ioc32.c
drivers/gpu/drm/drm_ioctl.c
drivers/gpu/drm/drm_syncobj.c
drivers/gpu/drm/drm_vblank.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_fbdev.c
drivers/gpu/drm/i915/intel_sdvo.c
drivers/gpu/drm/mediatek/mtk_drm_crtc.c
drivers/gpu/drm/mediatek/mtk_drm_drv.c
drivers/gpu/drm/mediatek/mtk_hdmi.c
drivers/gpu/drm/radeon/radeon_drv.c

diff --cc MAINTAINERS
Simple merge
index 65ab28cc2946c8fc22a319906031ad6bde7d0a79,67fe19e5a9c6e65777c528e9a333e2c2247233fd..685c1a480201f101a282f70d60119fcab0543c7e
@@@ -158,9 -158,10 +158,9 @@@ struct drm_bridge *drm_panel_bridge_add
                                        u32 connector_type)
  {
        struct panel_bridge *panel_bridge;
 -      int ret;
  
        if (!panel)
-               return ERR_PTR(EINVAL);
+               return ERR_PTR(-EINVAL);
  
        panel_bridge = devm_kzalloc(panel->dev, sizeof(*panel_bridge),
                                    GFP_KERNEL);
Simple merge
Simple merge
index ae386783e3eab859e6de7ee8621c7ab8ab48800c,d1f2028520288261e4ad7c6344ea94e80178f3db..f8e96e648acfd17985f740afe4abd43022b762e5
@@@ -991,14 -839,10 +839,10 @@@ static int compat_drm_wait_vblank(struc
        if (copy_from_user(&req32, argp, sizeof(req32)))
                return -EFAULT;
  
-       request = compat_alloc_user_space(sizeof(*request));
-       if (!request
-           || __put_user(req32.request.type, &request->request.type)
-           || __put_user(req32.request.sequence, &request->request.sequence)
-           || __put_user(req32.request.signal, &request->request.signal))
-               return -EFAULT;
-       err = drm_ioctl(file, DRM_IOCTL_WAIT_VBLANK, (unsigned long)request);
+       req.request.type = req32.request.type;
+       req.request.sequence = req32.request.sequence;
+       req.request.signal = req32.request.signal;
 -      err = drm_ioctl_kernel(file, drm_wait_vblank, &req, DRM_UNLOCKED);
++      err = drm_ioctl_kernel(file, drm_wait_vblank_ioctl, &req, DRM_UNLOCKED);
        if (err)
                return err;
  
index f7f150e4a0c01eae21976a182daea8d3e1a9e40e,f1eb326524cf573852fb1d6fc2a4153669ac76ab..8bfeb32f8a10177dc80b3e6b1581b1e61752e165
@@@ -704,11 -704,35 +704,38 @@@ static const struct drm_ioctl_desc drm_
   *
   * And then assign this to the &drm_driver.ioctls field in your driver
   * structure.
 + *
 + * See the separate chapter on :ref:`file operations<drm_driver_fops>` for how
 + * the driver-specific IOCTLs are wired up.
   */
  
+ long drm_ioctl_kernel(struct file *file, drm_ioctl_t *func, void *kdata,
+                     u32 flags)
+ {
+       struct drm_file *file_priv = file->private_data;
+       struct drm_device *dev = file_priv->minor->dev;
+       int retcode;
+       if (drm_device_is_unplugged(dev))
+               return -ENODEV;
+       retcode = drm_ioctl_permit(flags, file_priv);
+       if (unlikely(retcode))
+               return retcode;
+       /* Enforce sane locking for modern driver ioctls. */
+       if (!drm_core_check_feature(dev, DRIVER_LEGACY) ||
+           (flags & DRM_UNLOCKED))
+               retcode = func(dev, kdata, file_priv);
+       else {
+               mutex_lock(&drm_global_mutex);
+               retcode = func(dev, kdata, file_priv);
+               mutex_unlock(&drm_global_mutex);
+       }
+       return retcode;
+ }
+ EXPORT_SYMBOL(drm_ioctl_kernel);
  /**
   * drm_ioctl - ioctl callback implementation for DRM drivers
   * @filp: file this ioctl is called on
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge