Merge drm/drm-next into drm-misc-next
authorSean Paul <seanpaul@chromium.org>
Mon, 27 Aug 2018 14:00:03 +0000 (10:00 -0400)
committerSean Paul <seanpaul@chromium.org>
Mon, 27 Aug 2018 14:00:03 +0000 (10:00 -0400)
Now that 4.19-rc1 is cut, backmerge it into -misc-next.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
12 files changed:
1  2 
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crc.c
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/gma500/psb_drv.h
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_pipe_crc.c
drivers/gpu/drm/vc4/vc4_plane.c
drivers/gpu/drm/vkms/vkms_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
include/drm/drm_print.h
include/uapi/drm/drm_fourcc.h

Simple merge
index d876ed5e92655ceaadf2e5347d80bdc7ea9fab58,93d2f4000d2f90beb943539dd0bdfc0f668c7707..941b238bdcc9642067df5c95273a109bee7df3a8
  #define _PSB_DRV_H_
  
  #include <linux/kref.h>
+ #include <linux/mm_types.h>
  
  #include <drm/drmP.h>
 -#include <drm/drm_global.h>
  #include <drm/gma_drm.h>
  #include "psb_reg.h"
  #include "psb_intel_drv.h"
Simple merge
index b41515bb9a15157cc6f2e4b8ea2bbe0e3bfb4e83,8fc61e96754ff540626ce6421a275408359be6e4..5f63e1a9c25b9c31331ad87edb3ee5a5466d434f
@@@ -2149,13 -2171,9 +2171,12 @@@ void lspcon_resume(struct intel_lspcon 
  void lspcon_wait_pcon_mode(struct intel_lspcon *lspcon);
  
  /* intel_pipe_crc.c */
- int intel_pipe_crc_create(struct drm_minor *minor);
  #ifdef CONFIG_DEBUG_FS
 -int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name,
 -                            size_t *values_cnt);
 +int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name);
 +int intel_crtc_verify_crc_source(struct drm_crtc *crtc,
 +                               const char *source_name, size_t *values_cnt);
 +const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc,
 +                                            size_t *count);
  void intel_crtc_disable_pipe_crc(struct intel_crtc *crtc);
  void intel_crtc_enable_pipe_crc(struct intel_crtc *crtc);
  #else
index 27d560f7a817c5e305e95c7dca888469163f0cf6,849e1b69ba739e9fd61407313582cde5461820a9..f3c9010e332a0eab4a7ca440e547307431dc0bb5
@@@ -887,148 -464,12 +464,126 @@@ void intel_display_crc_init(struct drm_
        for_each_pipe(dev_priv, pipe) {
                struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe];
  
-               pipe_crc->opened = false;
                spin_lock_init(&pipe_crc->lock);
-               init_waitqueue_head(&pipe_crc->wq);
-       }
- }
- int intel_pipe_crc_create(struct drm_minor *minor)
- {
-       struct drm_i915_private *dev_priv = to_i915(minor->dev);
-       struct dentry *ent;
-       int i;
-       for (i = 0; i < ARRAY_SIZE(i915_pipe_crc_data); i++) {
-               struct pipe_crc_info *info = &i915_pipe_crc_data[i];
-               info->dev_priv = dev_priv;
-               ent = debugfs_create_file(info->name, S_IRUGO,
-                                         minor->debugfs_root, info,
-                                         &i915_pipe_crc_fops);
-               if (!ent)
-                       return -ENOMEM;
        }
-       return 0;
  }
  
 -int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name,
 -                            size_t *values_cnt)
 +static int i8xx_crc_source_valid(struct drm_i915_private *dev_priv,
 +                               const enum intel_pipe_crc_source source)
 +{
 +      switch (source) {
 +      case INTEL_PIPE_CRC_SOURCE_PIPE:
 +      case INTEL_PIPE_CRC_SOURCE_NONE:
 +              return 0;
 +      default:
 +              return -EINVAL;
 +      }
 +}
 +
 +static int i9xx_crc_source_valid(struct drm_i915_private *dev_priv,
 +                               const enum intel_pipe_crc_source source)
 +{
 +      switch (source) {
 +      case INTEL_PIPE_CRC_SOURCE_PIPE:
 +      case INTEL_PIPE_CRC_SOURCE_TV:
 +      case INTEL_PIPE_CRC_SOURCE_DP_B:
 +      case INTEL_PIPE_CRC_SOURCE_DP_C:
 +      case INTEL_PIPE_CRC_SOURCE_DP_D:
 +      case INTEL_PIPE_CRC_SOURCE_NONE:
 +              return 0;
 +      default:
 +              return -EINVAL;
 +      }
 +}
 +
 +static int vlv_crc_source_valid(struct drm_i915_private *dev_priv,
 +                              const enum intel_pipe_crc_source source)
 +{
 +      switch (source) {
 +      case INTEL_PIPE_CRC_SOURCE_PIPE:
 +      case INTEL_PIPE_CRC_SOURCE_DP_B:
 +      case INTEL_PIPE_CRC_SOURCE_DP_C:
 +      case INTEL_PIPE_CRC_SOURCE_DP_D:
 +      case INTEL_PIPE_CRC_SOURCE_NONE:
 +              return 0;
 +      default:
 +              return -EINVAL;
 +      }
 +}
 +
 +static int ilk_crc_source_valid(struct drm_i915_private *dev_priv,
 +                              const enum intel_pipe_crc_source source)
 +{
 +      switch (source) {
 +      case INTEL_PIPE_CRC_SOURCE_PIPE:
 +      case INTEL_PIPE_CRC_SOURCE_PLANE1:
 +      case INTEL_PIPE_CRC_SOURCE_PLANE2:
 +      case INTEL_PIPE_CRC_SOURCE_NONE:
 +              return 0;
 +      default:
 +              return -EINVAL;
 +      }
 +}
 +
 +static int ivb_crc_source_valid(struct drm_i915_private *dev_priv,
 +                              const enum intel_pipe_crc_source source)
 +{
 +      switch (source) {
 +      case INTEL_PIPE_CRC_SOURCE_PIPE:
 +      case INTEL_PIPE_CRC_SOURCE_PLANE1:
 +      case INTEL_PIPE_CRC_SOURCE_PLANE2:
 +      case INTEL_PIPE_CRC_SOURCE_PF:
 +      case INTEL_PIPE_CRC_SOURCE_NONE:
 +              return 0;
 +      default:
 +              return -EINVAL;
 +      }
 +}
 +
 +static int
 +intel_is_valid_crc_source(struct drm_i915_private *dev_priv,
 +                        const enum intel_pipe_crc_source source)
 +{
 +      if (IS_GEN2(dev_priv))
 +              return i8xx_crc_source_valid(dev_priv, source);
 +      else if (INTEL_GEN(dev_priv) < 5)
 +              return i9xx_crc_source_valid(dev_priv, source);
 +      else if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv))
 +              return vlv_crc_source_valid(dev_priv, source);
 +      else if (IS_GEN5(dev_priv) || IS_GEN6(dev_priv))
 +              return ilk_crc_source_valid(dev_priv, source);
 +      else
 +              return ivb_crc_source_valid(dev_priv, source);
 +}
 +
 +const char *const *intel_crtc_get_crc_sources(struct drm_crtc *crtc,
 +                                            size_t *count)
 +{
 +      *count = ARRAY_SIZE(pipe_crc_sources);
 +      return pipe_crc_sources;
 +}
 +
 +int intel_crtc_verify_crc_source(struct drm_crtc *crtc, const char *source_name,
 +                               size_t *values_cnt)
 +{
 +      struct drm_i915_private *dev_priv = to_i915(crtc->dev);
 +      enum intel_pipe_crc_source source;
 +
 +      if (display_crc_ctl_parse_source(source_name, &source) < 0) {
 +              DRM_DEBUG_DRIVER("unknown source %s\n", source_name);
 +              return -EINVAL;
 +      }
 +
 +      if (source == INTEL_PIPE_CRC_SOURCE_AUTO ||
 +          intel_is_valid_crc_source(dev_priv, source) == 0) {
 +              *values_cnt = 5;
 +              return 0;
 +      }
 +
 +      return -EINVAL;
 +}
 +
 +int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name)
  {
        struct drm_i915_private *dev_priv = to_i915(crtc->dev);
        struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[crtc->index];
Simple merge
index 5d78bd97e69c0e6fd2aad98dac4628de8dd2f022,6e728b8252596e02745831eee0a5351f698d8c11..bd9d4b2389bd9ee085b08888dc084aac37867e6e
@@@ -44,9 -44,9 +44,10 @@@ static void vkms_release(struct drm_dev
        struct vkms_device *vkms = container_of(dev, struct vkms_device, drm);
  
        platform_device_unregister(vkms->platform);
+       drm_atomic_helper_shutdown(&vkms->drm);
        drm_mode_config_cleanup(&vkms->drm);
        drm_dev_fini(&vkms->drm);
 +      destroy_workqueue(vkms->output.crc_workq);
  }
  
  static struct drm_driver vkms_driver = {
Simple merge
Simple merge
Simple merge