Message ID | 1695848028-18023-5-git-send-email-quic_khsieh@quicinc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | incorporate pm runtime framework and eDP clean up | expand |
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh <quic_khsieh@quicinc.com> wrote: > > Move parser->parse() and dp_power_client_init() from dp_display_bind() > to dp_display_probe() in preparation of adding pm_runtime framework > at next patch. This describes what the patch does, not why it is done. Could you please rewrite it to describe the reason for the change? > > Changes in v4: > -- split this patch out of "incorporate pm_runtime framework into DP driver" patch > > Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com> > --- > drivers/gpu/drm/msm/dp/dp_display.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c > index 7ae3b8b..3ef141c 100644 > --- a/drivers/gpu/drm/msm/dp/dp_display.c > +++ b/drivers/gpu/drm/msm/dp/dp_display.c > @@ -276,11 +276,6 @@ static int dp_display_bind(struct device *dev, struct device *master, > dp->dp_display.drm_dev = drm; > priv->dp[dp->id] = &dp->dp_display; > > - rc = dp->parser->parse(dp->parser); > - if (rc) { > - DRM_ERROR("device tree parsing failed\n"); > - goto end; > - } > > > dp->drm_dev = drm; > @@ -291,11 +286,6 @@ static int dp_display_bind(struct device *dev, struct device *master, > goto end; > } > > - rc = dp_power_client_init(dp->power); > - if (rc) { > - DRM_ERROR("Power client create failed\n"); > - goto end; > - } > > rc = dp_register_audio_driver(dev, dp->audio); > if (rc) { > @@ -1249,6 +1239,18 @@ static int dp_display_probe(struct platform_device *pdev) > return -EPROBE_DEFER; > } > > + rc = dp->parser->parse(dp->parser); > + if (rc) { > + DRM_ERROR("device tree parsing failed\n"); > + return -EPROBE_DEFER; > + } > + > + rc = dp_power_client_init(dp->power); > + if (rc) { > + DRM_ERROR("Power client create failed\n"); > + return -EPROBE_DEFER; > + } > + > /* setup event q */ > mutex_init(&dp->event_mutex); > init_waitqueue_head(&dp->event_q); > -- > 2.7.4 >
On Wed, 27 Sept 2023 at 23:54, Kuogee Hsieh <quic_khsieh@quicinc.com> wrote: > > Move parser->parse() and dp_power_client_init() from dp_display_bind() > to dp_display_probe() in preparation of adding pm_runtime framework > at next patch. > > Changes in v4: > -- split this patch out of "incorporate pm_runtime framework into DP driver" patch > > Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com> > --- > drivers/gpu/drm/msm/dp/dp_display.c | 22 ++++++++++++---------- > 1 file changed, 12 insertions(+), 10 deletions(-) > > diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c > index 7ae3b8b..3ef141c 100644 > --- a/drivers/gpu/drm/msm/dp/dp_display.c > +++ b/drivers/gpu/drm/msm/dp/dp_display.c > @@ -276,11 +276,6 @@ static int dp_display_bind(struct device *dev, struct device *master, > dp->dp_display.drm_dev = drm; > priv->dp[dp->id] = &dp->dp_display; > > - rc = dp->parser->parse(dp->parser); > - if (rc) { > - DRM_ERROR("device tree parsing failed\n"); > - goto end; > - } > > > dp->drm_dev = drm; > @@ -291,11 +286,6 @@ static int dp_display_bind(struct device *dev, struct device *master, > goto end; > } > > - rc = dp_power_client_init(dp->power); > - if (rc) { > - DRM_ERROR("Power client create failed\n"); > - goto end; > - } > > rc = dp_register_audio_driver(dev, dp->audio); > if (rc) { > @@ -1249,6 +1239,18 @@ static int dp_display_probe(struct platform_device *pdev) > return -EPROBE_DEFER; > } > > + rc = dp->parser->parse(dp->parser); > + if (rc) { > + DRM_ERROR("device tree parsing failed\n"); > + return -EPROBE_DEFER; > + } > + > + rc = dp_power_client_init(dp->power); > + if (rc) { > + DRM_ERROR("Power client create failed\n"); > + return -EPROBE_DEFER; > + } Hit enter too soon. No submodules teardown, so NAK. Also please propagate returned error codes instead of inventing EPROBE_DEFER on your own. > + > /* setup event q */ > mutex_init(&dp->event_mutex); > init_waitqueue_head(&dp->event_q); > -- > 2.7.4 >
diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 7ae3b8b..3ef141c 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -276,11 +276,6 @@ static int dp_display_bind(struct device *dev, struct device *master, dp->dp_display.drm_dev = drm; priv->dp[dp->id] = &dp->dp_display; - rc = dp->parser->parse(dp->parser); - if (rc) { - DRM_ERROR("device tree parsing failed\n"); - goto end; - } dp->drm_dev = drm; @@ -291,11 +286,6 @@ static int dp_display_bind(struct device *dev, struct device *master, goto end; } - rc = dp_power_client_init(dp->power); - if (rc) { - DRM_ERROR("Power client create failed\n"); - goto end; - } rc = dp_register_audio_driver(dev, dp->audio); if (rc) { @@ -1249,6 +1239,18 @@ static int dp_display_probe(struct platform_device *pdev) return -EPROBE_DEFER; } + rc = dp->parser->parse(dp->parser); + if (rc) { + DRM_ERROR("device tree parsing failed\n"); + return -EPROBE_DEFER; + } + + rc = dp_power_client_init(dp->power); + if (rc) { + DRM_ERROR("Power client create failed\n"); + return -EPROBE_DEFER; + } + /* setup event q */ mutex_init(&dp->event_mutex); init_waitqueue_head(&dp->event_q);
Move parser->parse() and dp_power_client_init() from dp_display_bind() to dp_display_probe() in preparation of adding pm_runtime framework at next patch. Changes in v4: -- split this patch out of "incorporate pm_runtime framework into DP driver" patch Signed-off-by: Kuogee Hsieh <quic_khsieh@quicinc.com> --- drivers/gpu/drm/msm/dp/dp_display.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-)