Message ID | 1645455086-9359-4-git-send-email-quic_vpolimer@quicinc.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Add PSR support for eDP | expand |
On Mon, 21 Feb 2022 at 17:52, Vinod Polimera <quic_vpolimer@quicinc.com> wrote: > > Use atomic variants for encoder callback functions such that > certain states like self-refresh can be accessed as part of > enable/disable sequence. > > Signed-off-by: Kalyan Thota <quic_kalyant@quicinc.com> > Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> > > Changes in v2: > - As per review suggestion by Dmitry. > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > index 1e648db..6eac417 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > @@ -1138,7 +1138,8 @@ void dpu_encoder_virt_runtime_resume(struct drm_encoder *drm_enc) > mutex_unlock(&dpu_enc->enc_lock); > } > > -static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) > +static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc, > + struct drm_atomic_state *state) > { > struct dpu_encoder_virt *dpu_enc = NULL; > int ret = 0; > @@ -1176,7 +1177,8 @@ static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) > mutex_unlock(&dpu_enc->enc_lock); > } > > -static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) > +static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc, > + struct drm_atomic_state *state) > { > struct dpu_encoder_virt *dpu_enc = NULL; > struct msm_drm_private *priv; > @@ -2094,8 +2096,8 @@ static void dpu_encoder_frame_done_timeout(struct timer_list *t) > > static const struct drm_encoder_helper_funcs dpu_encoder_helper_funcs = { > .mode_set = dpu_encoder_virt_mode_set, > - .disable = dpu_encoder_virt_disable, > - .enable = dpu_encoder_virt_enable, > + .atomic_disable = dpu_encoder_virt_disable, > + .atomic_enable = dpu_encoder_virt_enable, > .atomic_check = dpu_encoder_virt_atomic_check, > }; > > -- > 2.7.4 >
On 21/02/2022 17:51, Vinod Polimera wrote: > Use atomic variants for encoder callback functions such that > certain states like self-refresh can be accessed as part of > enable/disable sequence. > > Signed-off-by: Kalyan Thota <quic_kalyant@quicinc.com> > Signed-off-by: Vinod Polimera <quic_vpolimer@quicinc.com> > > Changes in v2: > - As per review suggestion by Dmitry. > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > index 1e648db..6eac417 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > @@ -1138,7 +1138,8 @@ void dpu_encoder_virt_runtime_resume(struct drm_encoder *drm_enc) > mutex_unlock(&dpu_enc->enc_lock); > } > > -static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) > +static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc, > + struct drm_atomic_state *state) > { > struct dpu_encoder_virt *dpu_enc = NULL; > int ret = 0; > @@ -1176,7 +1177,8 @@ static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) > mutex_unlock(&dpu_enc->enc_lock); > } > > -static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) > +static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc, > + struct drm_atomic_state *state) > { > struct dpu_encoder_virt *dpu_enc = NULL; > struct msm_drm_private *priv; > @@ -2094,8 +2096,8 @@ static void dpu_encoder_frame_done_timeout(struct timer_list *t) > > static const struct drm_encoder_helper_funcs dpu_encoder_helper_funcs = { > .mode_set = dpu_encoder_virt_mode_set, > - .disable = dpu_encoder_virt_disable, > - .enable = dpu_encoder_virt_enable, > + .atomic_disable = dpu_encoder_virt_disable, > + .atomic_enable = dpu_encoder_virt_enable, A small nit before you post the next iteration of PSR: Please rename these functions to follow atomic_enable/atomic_disable names. > .atomic_check = dpu_encoder_virt_atomic_check, > }; >
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 1e648db..6eac417 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1138,7 +1138,8 @@ void dpu_encoder_virt_runtime_resume(struct drm_encoder *drm_enc) mutex_unlock(&dpu_enc->enc_lock); } -static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) +static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc, + struct drm_atomic_state *state) { struct dpu_encoder_virt *dpu_enc = NULL; int ret = 0; @@ -1176,7 +1177,8 @@ static void dpu_encoder_virt_enable(struct drm_encoder *drm_enc) mutex_unlock(&dpu_enc->enc_lock); } -static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc) +static void dpu_encoder_virt_disable(struct drm_encoder *drm_enc, + struct drm_atomic_state *state) { struct dpu_encoder_virt *dpu_enc = NULL; struct msm_drm_private *priv; @@ -2094,8 +2096,8 @@ static void dpu_encoder_frame_done_timeout(struct timer_list *t) static const struct drm_encoder_helper_funcs dpu_encoder_helper_funcs = { .mode_set = dpu_encoder_virt_mode_set, - .disable = dpu_encoder_virt_disable, - .enable = dpu_encoder_virt_enable, + .atomic_disable = dpu_encoder_virt_disable, + .atomic_enable = dpu_encoder_virt_enable, .atomic_check = dpu_encoder_virt_atomic_check, };