From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Matthew Auld <matthew.auld@intel.com>
Cc: intel-gfx@lists.freedesktop.org,
Nirmoy Das <nirmoy.das@intel.com>,
Jianshui Yu <jianshui.yu@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 1/2] drm/i915/display: consider DG2_RC_CCS_CC when migrating buffers
Date: Fri, 30 Sep 2022 17:06:46 +0300 [thread overview]
Message-ID: <Yzb39heBapDs6XzA@intel.com> (raw)
In-Reply-To: <Yzb2iHBSFpr6i8B2@intel.com>
On Fri, Sep 30, 2022 at 05:00:40PM +0300, Ville Syrjälä wrote:
> On Fri, Sep 30, 2022 at 02:47:30PM +0100, Matthew Auld wrote:
> > For these types of display buffers, we need to able to CPU access some
> > part of the backing memory in prepare_plane_clear_colors(). As a result
> > we need to ensure we always place in the mappable part of lmem, which
> > becomes necessary on small-bar systems.
> >
> > Fixes: eb1c535f0d69 ("drm/i915: turn on small BAR support")
> > Reported-by: Jianshui Yu <jianshui.yu@intel.com>
> > Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Cc: Nirmoy Das <nirmoy.das@intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_fb_pin.c | 11 ++++--
> > drivers/gpu/drm/i915/gem/i915_gem_object.c | 37 ++++++++++++++++++-
> > drivers/gpu/drm/i915/gem/i915_gem_object.h | 4 ++
> > .../gpu/drm/i915/gem/i915_gem_object_types.h | 3 +-
> > drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 5 ++-
> > 5 files changed, 53 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_fb_pin.c b/drivers/gpu/drm/i915/display/intel_fb_pin.c
> > index c86e5d4ee016..f83cf41ddd63 100644
> > --- a/drivers/gpu/drm/i915/display/intel_fb_pin.c
> > +++ b/drivers/gpu/drm/i915/display/intel_fb_pin.c
> > @@ -139,9 +139,14 @@ intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb,
> > ret = i915_gem_object_lock(obj, &ww);
> > if (!ret && phys_cursor)
> > ret = i915_gem_object_attach_phys(obj, alignment);
> > - else if (!ret && HAS_LMEM(dev_priv))
> > - ret = i915_gem_object_migrate(obj, &ww, INTEL_REGION_LMEM_0);
> > - /* TODO: Do we need to sync when migration becomes async? */
>
> Why is the TODO being removed?
>
> > + else if (!ret && HAS_LMEM(dev_priv)) {
> > + unsigned int flags = obj->flags;
> > +
>
> It might not be super obvious what is going on here, so maybe add
> a comment stating the CPU needs to read the clear color from the bo?
>
> > + if (intel_fb_rc_ccs_cc_plane(fb) >= 0)
> > + flags &= ~I915_BO_ALLOC_GPU_ONLY;
>
> Hmm. Do we require the clear color plane to be in the same bo as the
> rest of the planes? I know we require the main and aux to be in the
> same bo, but dunno why we would require that also of the clear color
> plane (apart from being lazy perhaps).
I guess we must since we call this only once for the whole fb.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2022-09-30 14:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 13:47 [Intel-gfx] [PATCH v2 1/2] drm/i915/display: consider DG2_RC_CCS_CC when migrating buffers Matthew Auld
2022-09-30 13:47 ` [Intel-gfx] [PATCH v2 2/2] drm/i915: check memory is mappable in read_from_page Matthew Auld
2022-09-30 14:16 ` Das, Nirmoy
2022-09-30 14:00 ` [Intel-gfx] [PATCH v2 1/2] drm/i915/display: consider DG2_RC_CCS_CC when migrating buffers Ville Syrjälä
2022-09-30 14:06 ` Ville Syrjälä [this message]
2022-09-30 14:10 ` Matthew Auld
2022-09-30 14:32 ` Ville Syrjälä
2022-09-30 14:20 ` Das, Nirmoy
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=Yzb39heBapDs6XzA@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jianshui.yu@intel.com \
--cc=matthew.auld@intel.com \
--cc=nirmoy.das@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.