intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "B S, Karthik" <karthik.b.s@intel.com>
To: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [RFC 2/7] drm/i915: Add support for async flips in I915
Date: Tue, 10 Mar 2020 10:54:00 +0000	[thread overview]
Message-ID: <7138C0D2D3905F4CB0CD9B8757DFA969274B4B77@BGSMSX104.gar.corp.intel.com> (raw)
In-Reply-To: <e5087cc40055ec596cfe195fecc06630fe4cbff6.camel@intel.com>

> -----Original Message-----
> From: Zanoni, Paulo R <paulo.r.zanoni@intel.com>
> Sent: Tuesday, March 10, 2020 4:48 AM
> To: B S, Karthik <karthik.b.s@intel.com>; intel-gfx@lists.freedesktop.org
> Cc: ville.syrjala@linux.intel.com; Kulkarni, Vandita
> <vandita.kulkarni@intel.com>; Shankar, Uma <uma.shankar@intel.com>
> Subject: Re: [RFC 2/7] drm/i915: Add support for async flips in I915
> 
> Em sex, 2020-03-06 às 17:09 +0530, Karthik B S escreveu:
> > Enable support for async flips in I915.
> > Set the Async Address Update Enable bit in plane ctl when async flip
> > is requested.
> >
> > Signed-off-by: Karthik B S <karthik.b.s@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 4 ++++
> >  drivers/gpu/drm/i915/i915_reg.h              | 1 +
> >  2 files changed, 5 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> > b/drivers/gpu/drm/i915/display/intel_display.c
> > index dd47eb65b563..4ce9897f5c58 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -4756,6 +4756,9 @@ u32 skl_plane_ctl(const struct intel_crtc_state
> *crtc_state,
> >  			plane_ctl |=
> PLANE_CTL_YUV_RANGE_CORRECTION_DISABLE;
> >  	}
> >
> > +	if (crtc_state->uapi.async_flip)
> > +		plane_ctl |= PLANE_CTL_ASYNC_FLIP;
> > +
> >  	plane_ctl |= skl_plane_ctl_format(fb->format->format);
> >  	plane_ctl |= skl_plane_ctl_tiling(fb->modifier);
> >  	plane_ctl |= skl_plane_ctl_rotate(rotation &
> DRM_MODE_ROTATE_MASK);
> > @@ -17738,6 +17741,7 @@ static void intel_mode_config_init(struct
> > drm_i915_private *i915)
> >
> >  	mode_config->funcs = &intel_mode_funcs;
> >
> > +	mode_config->async_page_flip = true;
> 
> We should only enable the feature to user space after it has been fully
> implemented inside the Kernel. Think about the case where git-bisect
> decides to land at exactly this commit when someone is debugging a failure
> unrelated to async vblanks.
> 
> Also, when features have trivial on/off switches like the line above, it's
> better if the patch that enables the feature only contains the line that toggles
> the on/off switch. This way, if a revert is needed, we can just switch it to off
> without removing more code. Also, it enables us to land the rest of the code
> while keeping the feature off for stabilization.
> 
> Also, the line above is enabling the feature for every platform, which is
> probably not a goal of this series.

Agreed. Will make the on/off part a separate patch and also add a gen check for it.
> 
> 
> >  	/*
> >  	 * Maximum framebuffer dimensions, chosen to match
> >  	 * the maximum render engine surface size on gen4+.
> > diff --git a/drivers/gpu/drm/i915/i915_reg.h
> > b/drivers/gpu/drm/i915/i915_reg.h index 80cf02a6eec1..42037aee9b78
> > 100644
> > --- a/drivers/gpu/drm/i915/i915_reg.h
> > +++ b/drivers/gpu/drm/i915/i915_reg.h
> > @@ -6794,6 +6794,7 @@ enum {
> >  #define   PLANE_CTL_TILED_X			(1 << 10)
> >  #define   PLANE_CTL_TILED_Y			(4 << 10)
> >  #define   PLANE_CTL_TILED_YF			(5 << 10)
> > +#define   PLANE_CTL_ASYNC_FLIP			(1 << 9)
> >  #define   PLANE_CTL_FLIP_HORIZONTAL		(1 << 8)
> >  #define   PLANE_CTL_MEDIA_DECOMPRESSION_ENABLE	(1 << 4) /*
> TGL+ */
> >  #define   PLANE_CTL_ALPHA_MASK			(0x3 << 4) /* Pre-GLK
> */

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-03-10 10:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 11:39 [Intel-gfx] [RFC 0/7] Asynchronous flip implementation for i915 Karthik B S
2020-03-06 11:39 ` [Intel-gfx] [RFC 1/7] drm/i915: Define flip done functions and enable IER Karthik B S
2020-03-09 23:17   ` Paulo Zanoni
2020-03-10 10:51     ` B S, Karthik
2020-03-06 11:39 ` [Intel-gfx] [RFC 2/7] drm/i915: Add support for async flips in I915 Karthik B S
2020-03-09 23:18   ` Paulo Zanoni
2020-03-10 10:54     ` B S, Karthik [this message]
2020-03-06 11:39 ` [Intel-gfx] [RFC 3/7] drm/i915: Make commit call blocking in case of async flips Karthik B S
2020-03-06 11:39 ` [Intel-gfx] [RFC 4/7] drm/i915: Add checks specific to " Karthik B S
2020-03-09 23:19   ` Paulo Zanoni
2020-03-10 12:51     ` B S, Karthik
2020-03-06 11:39 ` [Intel-gfx] [RFC 5/7] drm/i915: Add flip_done_handler definition Karthik B S
2020-03-09 23:19   ` Paulo Zanoni
2020-03-10 12:52     ` B S, Karthik
2020-03-06 11:39 ` [Intel-gfx] [RFC 6/7] drm/i915: Enable and handle flip done interrupt Karthik B S
2020-03-06 11:39 ` [Intel-gfx] [RFC 7/7] drm/i915: Do not call drm_crtc_arm_vblank_event in async flips Karthik B S
2020-03-06 19:40 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Asynchronous flip implementation for i915 Patchwork
2020-03-06 19:43 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2020-03-06 19:58 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2020-03-06 20:10 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2020-03-10  0:04 ` [Intel-gfx] [RFC 0/7] " Paulo Zanoni
2020-03-10 10:07   ` B S, Karthik

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=7138C0D2D3905F4CB0CD9B8757DFA969274B4B77@BGSMSX104.gar.corp.intel.com \
    --to=karthik.b.s@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).