]> Git Repo - J-linux.git/commitdiff
Merge tag 'drm-msm-fixes-2022-04-13' of https://gitlab.freedesktop.org/drm/msm into...
authorDave Airlie <[email protected]>
Thu, 14 Apr 2022 05:06:21 +0000 (15:06 +1000)
committerDave Airlie <[email protected]>
Thu, 14 Apr 2022 05:06:21 +0000 (15:06 +1000)
Some msm fixes for v5.18.

kzalloc return checks, display fix, misc locking and scheduler bug, iommu present removal.

Signed-off-by: Dave Airlie <[email protected]>
From: Rob Clark <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/CAF6AEGvuTwx09MKwK68KWXqi4o7LxDGMUz1=Z7xOS+i=OV84Ug@mail.gmail.com
1  2 
drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c
drivers/gpu/drm/msm/msm_drv.c

index 1ee824600995805c96fc777f6d793440d75eef90,85ef10b888e906bae7ac1204b83b5fcd77429c9f..c478d25f7825a8a9d48293086bdbcc90731a8200
@@@ -49,8 -49,6 +49,8 @@@ static void mdp5_plane_destroy(struct d
  static void mdp5_plane_install_properties(struct drm_plane *plane,
                struct drm_mode_object *obj)
  {
 +      unsigned int zpos;
 +
        drm_plane_create_rotation_property(plane,
                                           DRM_MODE_ROTATE_0,
                                           DRM_MODE_ROTATE_0 |
                        BIT(DRM_MODE_BLEND_PIXEL_NONE) |
                        BIT(DRM_MODE_BLEND_PREMULTI) |
                        BIT(DRM_MODE_BLEND_COVERAGE));
 -      drm_plane_create_zpos_property(plane, 1, 1, 255);
 +
 +      if (plane->type == DRM_PLANE_TYPE_PRIMARY)
 +              zpos = STAGE_BASE;
 +      else
 +              zpos = STAGE0 + drm_plane_index(plane);
 +      drm_plane_create_zpos_property(plane, zpos, 1, 255);
  }
  
  static void
@@@ -98,7 -91,17 +98,10 @@@ static void mdp5_plane_reset(struct drm
                __drm_atomic_helper_plane_destroy_state(plane->state);
  
        kfree(to_mdp5_plane_state(plane->state));
+       plane->state = NULL;
        mdp5_state = kzalloc(sizeof(*mdp5_state), GFP_KERNEL);
 -
 -      if (plane->type == DRM_PLANE_TYPE_PRIMARY)
 -              mdp5_state->base.zpos = STAGE_BASE;
 -      else
 -              mdp5_state->base.zpos = STAGE0 + drm_plane_index(plane);
 -      mdp5_state->base.normalized_zpos = mdp5_state->base.zpos;
 -
+       if (!mdp5_state)
+               return;
        __drm_atomic_helper_plane_reset(plane, &mdp5_state->base);
  }
  
index affa95eb05fcda3fe114dfcb24272de6bc22d388,2905b82a9de3ddd7833295037b4a57cfc408067d..9c36b505daab93fd1f4476451985ee3dffb8d3e2
@@@ -274,7 -274,7 +274,7 @@@ bool msm_use_mmu(struct drm_device *dev
        struct msm_drm_private *priv = dev->dev_private;
  
        /* a2xx comes with its own MMU */
-       return priv->is_a2xx || iommu_present(&platform_bus_type);
+       return priv->is_a2xx || device_iommu_mapped(dev->dev);
  }
  
  static int msm_init_vram(struct drm_device *dev)
@@@ -359,9 -359,6 +359,9 @@@ static int msm_drm_init(struct device *
        struct msm_kms *kms;
        int ret, i;
  
 +      if (drm_firmware_drivers_only())
 +              return -ENODEV;
 +
        ddev = drm_dev_alloc(drv, dev);
        if (IS_ERR(ddev)) {
                DRM_DEV_ERROR(dev, "failed to allocate drm_device\n");
@@@ -1049,6 -1046,15 +1049,6 @@@ static const struct dev_pm_ops msm_pm_o
   * Componentized driver support:
   */
  
 -/*
 - * NOTE: duplication of the same code as exynos or imx (or probably any other).
 - * so probably some room for some helpers
 - */
 -static int compare_of(struct device *dev, void *data)
 -{
 -      return dev->of_node == data;
 -}
 -
  /*
   * Identify what components need to be added by parsing what remote-endpoints
   * our MDP output ports are connected to. In the case of LVDS on MDP4, there
@@@ -1106,7 -1112,7 +1106,7 @@@ static int add_components_mdp(struct de
  
                if (of_device_is_available(intf))
                        drm_of_component_match_add(master_dev, matchptr,
 -                                                 compare_of, intf);
 +                                                 component_compare_of, intf);
  
                of_node_put(intf);
        }
@@@ -1152,7 -1158,7 +1152,7 @@@ static int add_display_components(struc
                put_device(mdp_dev);
  
                /* add the MDP component itself */
 -              drm_of_component_match_add(dev, matchptr, compare_of,
 +              drm_of_component_match_add(dev, matchptr, component_compare_of,
                                           mdp_dev->of_node);
                break;
        case KMS_MDP4:
@@@ -1191,7 -1197,7 +1191,7 @@@ static int add_gpu_components(struct de
                return 0;
  
        if (of_device_is_available(np))
 -              drm_of_component_match_add(dev, matchptr, compare_of, np);
 +              drm_of_component_match_add(dev, matchptr, component_compare_of, np);
  
        of_node_put(np);
  
This page took 0.070349 seconds and 4 git commands to generate.