Message ID | 20181112214713.69826-1-sean@poorly.run (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] drm/msm: dpu: Grab the modeset locks in frame_event | expand |
On Mon, Nov 12, 2018 at 04:47:03PM -0500, Sean Paul wrote: > From: Sean Paul <seanpaul@chromium.org> > > This patch wraps dpu_core_perf_crtc_release_bw() with modeset locks > since it digs into the state objects. > > Signed-off-by: Sean Paul <seanpaul@chromium.org> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > index ed84cf44a222..6e636f373950 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > @@ -338,7 +338,9 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work) > /* release bandwidth and other resources */ > trace_dpu_crtc_frame_event_done(DRMID(crtc), > fevent->event); > + drm_modeset_lock_all(crtc->dev); From the kerneldoc: "This function is deprecated" Please don't use it in new code :-) For locking all the state you want lock_all_ctx. -Daniel > dpu_core_perf_crtc_release_bw(crtc); > + drm_modeset_unlock_all(crtc->dev); > } else { > trace_dpu_crtc_frame_event_more_pending(DRMID(crtc), > fevent->event); > -- > Sean Paul, Software Engineer, Google / Chromium OS > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Wed, Nov 21, 2018 at 10:29:57AM +0100, Daniel Vetter wrote: > On Mon, Nov 12, 2018 at 04:47:03PM -0500, Sean Paul wrote: > > From: Sean Paul <seanpaul@chromium.org> > > > > This patch wraps dpu_core_perf_crtc_release_bw() with modeset locks > > since it digs into the state objects. > > > > Signed-off-by: Sean Paul <seanpaul@chromium.org> > > --- > > drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > > index ed84cf44a222..6e636f373950 100644 > > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c > > @@ -338,7 +338,9 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work) > > /* release bandwidth and other resources */ > > trace_dpu_crtc_frame_event_done(DRMID(crtc), > > fevent->event); > > + drm_modeset_lock_all(crtc->dev); > > From the kerneldoc: "This function is deprecated" Please don't use it in > new code :-) > > For locking all the state you want lock_all_ctx. If you're looking for me, I'll be in my (frequently used) cone of shame :( Thanks for catching this, v2 incoming! Sean > -Daniel > > > dpu_core_perf_crtc_release_bw(crtc); > > + drm_modeset_unlock_all(crtc->dev); > > } else { > > trace_dpu_crtc_frame_event_more_pending(DRMID(crtc), > > fevent->event); > > -- > > Sean Paul, Software Engineer, Google / Chromium OS > > > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > -- > Daniel Vetter > Software Engineer, Intel Corporation > http://blog.ffwll.ch
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index ed84cf44a222..6e636f373950 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -338,7 +338,9 @@ static void dpu_crtc_frame_event_work(struct kthread_work *work) /* release bandwidth and other resources */ trace_dpu_crtc_frame_event_done(DRMID(crtc), fevent->event); + drm_modeset_lock_all(crtc->dev); dpu_core_perf_crtc_release_bw(crtc); + drm_modeset_unlock_all(crtc->dev); } else { trace_dpu_crtc_frame_event_more_pending(DRMID(crtc), fevent->event);