]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/msm/msm_drv.c
Merge tag 'drm-msm-fixes-2022-04-13' of https://gitlab.freedesktop.org/drm/msm into...
[linux.git] / drivers / gpu / drm / msm / msm_drv.c
index 2905b82a9de3ddd7833295037b4a57cfc408067d..9c36b505daab93fd1f4476451985ee3dffb8d3e2 100644 (file)
@@ -359,6 +359,9 @@ static int msm_drm_init(struct device *dev, const struct drm_driver *drv)
        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");
@@ -1046,15 +1049,6 @@ static const struct dev_pm_ops msm_pm_ops = {
  * 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
@@ -1112,7 +1106,7 @@ static int add_components_mdp(struct device *mdp_dev,
 
                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);
        }
@@ -1158,7 +1152,7 @@ static int add_display_components(struct platform_device *pdev,
                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:
@@ -1197,7 +1191,7 @@ static int add_gpu_components(struct device *dev,
                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.036581 seconds and 4 git commands to generate.