Merge drm-upstream/drm-next into drm-misc-next
authorGustavo Padovan <gustavo.padovan@collabora.com>
Wed, 20 Jun 2018 16:22:22 +0000 (13:22 -0300)
committerGustavo Padovan <gustavo.padovan@collabora.com>
Wed, 20 Jun 2018 16:22:22 +0000 (13:22 -0300)
We got a few conflicts in drm_atomic.c after merging the DRM writeback support,
now we need a backmerge to unlock develop development on drm-misc-next.

Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
20 files changed:
1  2 
drivers/gpu/drm/amd/amdgpu/amdgpu_prime.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/bridge/Kconfig
drivers/gpu/drm/drm_atomic.c
drivers/gpu/drm/exynos/exynos_drm_plane.c
drivers/gpu/drm/i2c/tda998x_drv.c
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/intel_atomic_plane.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/intel_sprite.c
drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
drivers/gpu/drm/tegra/gem.c
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_plane.c
drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c

index 5cc4a51e1e9235413be282dacfee19c3799d29f4,fa2c7997e2fdf977253ff365fe7fe2a12d5637b4..bf6cad6c9178b10eda1e639ac0d785631d1f6518
@@@ -82,10 -82,9 +82,11 @@@ config DRM_PARADE_PS862
  
  config DRM_SIL_SII8620
        tristate "Silicon Image SII8620 HDMI/MHL bridge"
 -      depends on OF && RC_CORE
 +      depends on OF
        select DRM_KMS_HELPER
+       imply EXTCON
 +      select INPUT
 +      select RC_CORE
        help
          Silicon Image SII8620 HDMI/MHL bridge chip driver.
  
index 11571905943425b9a1f2f0aabb58e8e5497638c2,895741e9cd7db291c099a69df24bb5d184eb0691..178842380f75847ae3666c4bec261ed5d57299d1
@@@ -1931,20 -1724,15 +1939,24 @@@ int drm_atomic_check_only(struct drm_at
                }
        }
  
-       if (config->funcs->atomic_check)
 +      for_each_new_connector_in_state(state, conn, conn_state, i) {
 +              ret = drm_atomic_connector_check(conn, conn_state);
 +              if (ret) {
 +                      DRM_DEBUG_ATOMIC("[CONNECTOR:%d:%s] atomic core check failed\n",
 +                                       conn->base.id, conn->name);
 +                      return ret;
 +              }
 +      }
 +
+       if (config->funcs->atomic_check) {
                ret = config->funcs->atomic_check(state->dev, state);
  
-       if (ret)
-               return ret;
+               if (ret) {
+                       DRM_DEBUG_ATOMIC("atomic driver check for %p failed: %d\n",
+                                        state, ret);
+                       return ret;
+               }
+       }
  
        if (!state->allow_modeset) {
                for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
Simple merge
Simple merge
index 91eb47a1c9225c4a9e4f2dd43829c073040b47df,dee3a8e659f1d6c9dbe2040abd6e2ba42020070a..dfd14b09f52ccc798b981036968154228424ad5e
@@@ -13416,13 -13521,15 +13555,18 @@@ intel_primary_plane_create(struct drm_i
        primary->check_plane = intel_check_primary_plane;
  
        if (INTEL_GEN(dev_priv) >= 9) {
-               intel_primary_formats = skl_primary_formats;
-               num_formats = ARRAY_SIZE(skl_primary_formats);
 +              primary->has_ccs = skl_plane_has_ccs(dev_priv, pipe,
 +                                                   PLANE_PRIMARY);
 +
+               if (skl_plane_has_planar(dev_priv, pipe, PLANE_PRIMARY)) {
+                       intel_primary_formats = skl_pri_planar_formats;
+                       num_formats = ARRAY_SIZE(skl_pri_planar_formats);
+               } else {
+                       intel_primary_formats = skl_primary_formats;
+                       num_formats = ARRAY_SIZE(skl_primary_formats);
+               }
  
 -              if (skl_plane_has_ccs(dev_priv, pipe, PLANE_PRIMARY))
 +              if (primary->has_ccs)
                        modifiers = skl_format_modifiers_ccs;
                else
                        modifiers = skl_format_modifiers_noccs;
Simple merge
index 04428cea8f3b631a8b301d6d780457e0ea368e6a,ee23613f9fd4fcf4723a5bfaaa05ca27a6e2ebf0..214cc730642cbdd4c6a45958da927262227611ee
@@@ -1431,10 -1387,16 +1446,16 @@@ intel_sprite_plane_create(struct drm_i9
                intel_plane->disable_plane = skl_disable_plane;
                intel_plane->get_hw_state = skl_plane_get_hw_state;
  
-               plane_formats = skl_plane_formats;
-               num_plane_formats = ARRAY_SIZE(skl_plane_formats);
+               if (skl_plane_has_planar(dev_priv, pipe,
+                                        PLANE_SPRITE0 + plane)) {
+                       plane_formats = skl_planar_formats;
+                       num_plane_formats = ARRAY_SIZE(skl_planar_formats);
+               } else {
+                       plane_formats = skl_plane_formats;
+                       num_plane_formats = ARRAY_SIZE(skl_plane_formats);
+               }
  
 -              if (skl_plane_has_ccs(dev_priv, pipe, PLANE_SPRITE0 + plane))
 +              if (intel_plane->has_ccs)
                        modifiers = skl_plane_format_modifiers_ccs;
                else
                        modifiers = skl_plane_format_modifiers_noccs;
Simple merge
Simple merge
Simple merge
index 3c5935f3d49e95652e5d0290790802f425fff025,ba0cdb743c3e50d664848c021a0f63bc72953aa2..aaac8d11e705d0140a7662324a4208c0f9fd0a08
@@@ -439,27 -439,41 +439,16 @@@ static int vmw_fb_compute_depth(struct 
  static int vmwgfx_set_config_internal(struct drm_mode_set *set)
  {
        struct drm_crtc *crtc = set->crtc;
-       struct drm_modeset_acquire_ctx *ctx;
 -      struct drm_framebuffer *fb;
 -      struct drm_crtc *tmp;
--      struct drm_device *dev = set->crtc->dev;
+       struct drm_modeset_acquire_ctx ctx;
        int ret;
  
-       ctx = dev->mode_config.acquire_ctx;
+       drm_modeset_acquire_init(&ctx, 0);
  
  restart:
-       ret = crtc->funcs->set_config(set, ctx);
 -      /*
 -       * NOTE: ->set_config can also disable other crtcs (if we steal all
 -       * connectors from it), hence we need to refcount the fbs across all
 -       * crtcs. Atomic modeset will have saner semantics ...
 -       */
 -      drm_for_each_crtc(tmp, dev)
 -              tmp->primary->old_fb = tmp->primary->fb;
 -
 -      fb = set->fb;
 -
+       ret = crtc->funcs->set_config(set, &ctx);
 -      if (ret == 0) {
 -              crtc->primary->crtc = crtc;
 -              crtc->primary->fb = fb;
 -      }
 -
 -      drm_for_each_crtc(tmp, dev) {
 -              if (tmp->primary->fb)
 -                      drm_framebuffer_get(tmp->primary->fb);
 -              if (tmp->primary->old_fb)
 -                      drm_framebuffer_put(tmp->primary->old_fb);
 -              tmp->primary->old_fb = NULL;
 -      }
  
        if (ret == -EDEADLK) {
-               dev->mode_config.acquire_ctx = NULL;
- retry_locking:
-               drm_modeset_backoff(ctx);
-               ret = drm_modeset_lock_all_ctx(dev, ctx);
-               if (ret)
-                       goto retry_locking;
-               dev->mode_config.acquire_ctx = ctx;
+               drm_modeset_backoff(&ctx);
                goto restart;
        }
  
Simple merge