From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915/display: Use dma_fence interfaces instead of i915_sw_fence
Date: Wed, 25 Oct 2023 18:00:53 +0300 [thread overview]
Message-ID: <ZTktpQ0OjgbcpdVA@intel.com> (raw)
In-Reply-To: <ZTkjmKO8BBdkk25d@intel.com>
On Wed, Oct 25, 2023 at 05:18:00PM +0300, Ville Syrjälä wrote:
> On Fri, Oct 20, 2023 at 12:41:03PM +0300, Jouni Högander wrote:
> > We are preparing for Xe driver. Xe driver doesn't have i915_sw_fence
> > implementation. Lets drop i915_sw_fence usage from display code and
> > use dma_fence interfaces directly.
> >
> > For this purpose stack dma fences from related objects into new plane
> > state. Drm_gem_plane_helper_prepare_fb can be used for fences in new
> > fb. Separate local implementation is used for Stacking fences from old fb
> > into new plane state. Then wait for these stacked fences during atomic
> > commit. There is no be need for separate GPU reset handling in
> > intel_atomic_commit_fence_wait as the fences are signaled when GPU hang is
> > detected and GPU is being reset.
> >
> > v2:
> > - Add fences from old fb into new_plane_state->uapi.fence rather than
> > into old_plane_state->uapi.fence
> >
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> >
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_atomic.c | 3 -
> > .../gpu/drm/i915/display/intel_atomic_plane.c | 89 +++++++++++--------
> > drivers/gpu/drm/i915/display/intel_display.c | 78 ++++++----------
> > .../drm/i915/display/intel_display_types.h | 2 -
> > 4 files changed, 77 insertions(+), 95 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c
> > index 5d18145da279..ec0d5168b503 100644
> > --- a/drivers/gpu/drm/i915/display/intel_atomic.c
> > +++ b/drivers/gpu/drm/i915/display/intel_atomic.c
> > @@ -331,9 +331,6 @@ void intel_atomic_state_free(struct drm_atomic_state *_state)
> >
> > drm_atomic_state_default_release(&state->base);
> > kfree(state->global_objs);
> > -
> > - i915_sw_fence_fini(&state->commit_ready);
> > -
> > kfree(state);
> > }
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > index b1074350616c..20fd12df6850 100644
> > --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> > @@ -31,7 +31,10 @@
> > * prepare/check/commit/cleanup steps.
> > */
> >
> > +#include <linux/dma-fence-chain.h>
> > +
> > #include <drm/drm_atomic_helper.h>
> > +#include <drm/drm_gem_atomic_helper.h>
> > #include <drm/drm_blend.h>
> > #include <drm/drm_fourcc.h>
> >
> > @@ -1012,6 +1015,44 @@ int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state)
> > return 0;
> > }
> >
> > +static int add_fences(struct dma_resv *obj,
> > + struct drm_plane_state *dst)
>
> I would name things differently:
> s/obj/resv/
> s/dst/plane_state/
Probably should be "new_plane_state" to make it clear what
must be passed in.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-10-25 15:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 9:41 [Intel-gfx] [PATCH v2] drm/i915/display: Use dma_fence interfaces instead of i915_sw_fence Jouni Högander
2023-10-24 12:53 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Use dma_fence interfaces instead of i915_sw_fence (rev2) Patchwork
2023-10-24 21:35 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-10-25 14:18 ` [Intel-gfx] [PATCH v2] drm/i915/display: Use dma_fence interfaces instead of i915_sw_fence Ville Syrjälä
2023-10-25 15:00 ` Ville Syrjälä [this message]
2023-10-26 9:40 ` Hogander, Jouni
2023-10-26 12:46 ` Ville Syrjälä
2023-10-26 13:14 ` Hogander, Jouni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZTktpQ0OjgbcpdVA@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jouni.hogander@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.