diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2023-10-09 20:48:37 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2023-10-09 11:31:30 -0700 |
commit | a2ab5d5bb6b1dedef7b6c2711a7a53cbf9f508f4 (patch) | |
tree | b4a233bfacf631bb2b95d423a4048e48121fe513 /drivers/gpu/drm/msm/msm_drv.c | |
parent | 1d5245715853f50d9e17489e4d6ef4aa50c60484 (diff) | |
download | lwn-a2ab5d5bb6b1dedef7b6c2711a7a53cbf9f508f4.tar.gz lwn-a2ab5d5bb6b1dedef7b6c2711a7a53cbf9f508f4.zip |
drm/msm: allow passing struct msm_kms to msm_drv_probe()
In preparation of moving resource allocation to the probe time, allow
MSM KMS drivers to pass struct msm_kms pointer via msm_drv_probe().
Reviewed-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/561627/
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_drv.c')
-rw-r--r-- | drivers/gpu/drm/msm/msm_drv.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 4bd028fa7500..002c50125f40 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -1230,7 +1230,8 @@ const struct component_master_ops msm_drm_ops = { }; int msm_drv_probe(struct device *master_dev, - int (*kms_init)(struct drm_device *dev)) + int (*kms_init)(struct drm_device *dev), + struct msm_kms *kms) { struct msm_drm_private *priv; struct component_match *match = NULL; @@ -1240,6 +1241,7 @@ int msm_drv_probe(struct device *master_dev, if (!priv) return -ENOMEM; + priv->kms = kms; priv->kms_init = kms_init; dev_set_drvdata(master_dev, priv); @@ -1275,7 +1277,7 @@ int msm_drv_probe(struct device *master_dev, static int msm_pdev_probe(struct platform_device *pdev) { - return msm_drv_probe(&pdev->dev, NULL); + return msm_drv_probe(&pdev->dev, NULL, NULL); } static int msm_pdev_remove(struct platform_device *pdev) |