diff mbox series

[v2] drm/i915: Support Async Flip on Linear buffers

Message ID 20220601042411.3299122-1-arun.r.murthy@intel.com (mailing list archive)
State New, archived
Headers show
Series [v2] drm/i915: Support Async Flip on Linear buffers | expand

Commit Message

Murthy, Arun R June 1, 2022, 4:24 a.m. UTC
Starting from Gen12 Async Flip is supported on linear buffers.
This patch enables support for async on linear buffer.

UseCase: In Hybrid graphics, for harware unsupported pixel formats it
will be converted to linear memory and then composed.

v2: Added use case

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Murthy, Arun R June 14, 2022, 9:40 a.m. UTC | #1
Any comments?

Thanks and Regards,
Arun R Murthy
--------------------

> -----Original Message-----
> From: Murthy, Arun R <arun.r.murthy@intel.com>
> Sent: Wednesday, June 1, 2022 9:54 AM
> To: intel-gfx@lists.freedesktop.org
> Cc: ville.syrjala@linux.intel.com; B S, Karthik <karthik.b.s@intel.com>;
> Murthy, Arun R <arun.r.murthy@intel.com>
> Subject: [PATCH v2] drm/i915: Support Async Flip on Linear buffers
> 
> Starting from Gen12 Async Flip is supported on linear buffers.
> This patch enables support for async on linear buffer.
> 
> UseCase: In Hybrid graphics, for harware unsupported pixel formats it will be
> converted to linear memory and then composed.
> 
> v2: Added use case
> 
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index e71b69425309..da2df7239353 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -7524,6 +7524,13 @@ static int intel_async_flip_check_hw(struct
> intel_atomic_state *state, struct in
>  		 * this selectively if required.
>  		 */
>  		switch (new_plane_state->hw.fb->modifier) {
> +		case DRM_FORMAT_MOD_LINEAR:
> +			if (DISPLAY_VER(i915) < 12) {
> +				drm_dbg_kms(&i915->drm,
> +					"[PLANE:%d:%s] Modifier does not
> support async flips\n",
> +					plane->base.base.id, plane-
> >base.name);
> +				return -EINVAL;
> +			}
>  		case I915_FORMAT_MOD_X_TILED:
>  		case I915_FORMAT_MOD_Y_TILED:
>  		case I915_FORMAT_MOD_Yf_TILED:
> --
> 2.25.1
Murthy, Arun R June 30, 2022, 11:57 a.m. UTC | #2
Gentle reminder!
Any review comments?

Thanks and Regards,
Arun R Murthy
--------------------

> -----Original Message-----
> From: Murthy, Arun R
> Sent: Tuesday, June 14, 2022 3:11 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: ville.syrjala@linux.intel.com; B S, Karthik <Karthik.B.S@intel.com>
> Subject: RE: [PATCH v2] drm/i915: Support Async Flip on Linear buffers
> 
> Any comments?
> 
> Thanks and Regards,
> Arun R Murthy
> --------------------
> 
> > -----Original Message-----
> > From: Murthy, Arun R <arun.r.murthy@intel.com>
> > Sent: Wednesday, June 1, 2022 9:54 AM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: ville.syrjala@linux.intel.com; B S, Karthik
> > <karthik.b.s@intel.com>; Murthy, Arun R <arun.r.murthy@intel.com>
> > Subject: [PATCH v2] drm/i915: Support Async Flip on Linear buffers
> >
> > Starting from Gen12 Async Flip is supported on linear buffers.
> > This patch enables support for async on linear buffer.
> >
> > UseCase: In Hybrid graphics, for harware unsupported pixel formats it
> > will be converted to linear memory and then composed.
> >
> > v2: Added use case
> >
> > Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> > b/drivers/gpu/drm/i915/display/intel_display.c
> > index e71b69425309..da2df7239353 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -7524,6 +7524,13 @@ static int intel_async_flip_check_hw(struct
> > intel_atomic_state *state, struct in
> >  		 * this selectively if required.
> >  		 */
> >  		switch (new_plane_state->hw.fb->modifier) {
> > +		case DRM_FORMAT_MOD_LINEAR:
> > +			if (DISPLAY_VER(i915) < 12) {
> > +				drm_dbg_kms(&i915->drm,
> > +					"[PLANE:%d:%s] Modifier does not
> > support async flips\n",
> > +					plane->base.base.id, plane-
> > >base.name);
> > +				return -EINVAL;
> > +			}
> >  		case I915_FORMAT_MOD_X_TILED:
> >  		case I915_FORMAT_MOD_Y_TILED:
> >  		case I915_FORMAT_MOD_Yf_TILED:
> > --
> > 2.25.1
Ville Syrjala June 30, 2022, 12:25 p.m. UTC | #3
On Wed, Jun 01, 2022 at 09:54:11AM +0530, Arun R Murthy wrote:
> Starting from Gen12 Async Flip is supported on linear buffers.

I was asking for justification for the gen12+ approach. Why not
expose it on earlier platforms?

> This patch enables support for async on linear buffer.
> 
> UseCase: In Hybrid graphics, for harware unsupported pixel formats it
> will be converted to linear memory and then composed.
> 
> v2: Added use case
> 
> Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index e71b69425309..da2df7239353 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -7524,6 +7524,13 @@ static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
>  		 * this selectively if required.
>  		 */
>  		switch (new_plane_state->hw.fb->modifier) {
> +		case DRM_FORMAT_MOD_LINEAR:
> +			if (DISPLAY_VER(i915) < 12) {
> +				drm_dbg_kms(&i915->drm,
> +					"[PLANE:%d:%s] Modifier does not support async flips\n",
> +					plane->base.base.id, plane->base.name);
> +				return -EINVAL;
> +			}
>  		case I915_FORMAT_MOD_X_TILED:
>  		case I915_FORMAT_MOD_Y_TILED:
>  		case I915_FORMAT_MOD_Yf_TILED:
> -- 
> 2.25.1
Murthy, Arun R June 30, 2022, 12:41 p.m. UTC | #4
> On Wed, Jun 01, 2022 at 09:54:11AM +0530, Arun R Murthy wrote:
> > Starting from Gen12 Async Flip is supported on linear buffers.
> 
> I was asking for justification for the gen12+ approach. Why not expose it on
> earlier platforms?
> 
Even Gen12- platforms do support async on linear, but the requirement for
this is on Gen12+ platforms.
I can modify the patch as to enable in pre Gen12 as well since hardware supports.

Thanks and Regards,
Arun R Murthy
--------------------
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index e71b69425309..da2df7239353 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7524,6 +7524,13 @@  static int intel_async_flip_check_hw(struct intel_atomic_state *state, struct in
 		 * this selectively if required.
 		 */
 		switch (new_plane_state->hw.fb->modifier) {
+		case DRM_FORMAT_MOD_LINEAR:
+			if (DISPLAY_VER(i915) < 12) {
+				drm_dbg_kms(&i915->drm,
+					"[PLANE:%d:%s] Modifier does not support async flips\n",
+					plane->base.base.id, plane->base.name);
+				return -EINVAL;
+			}
 		case I915_FORMAT_MOD_X_TILED:
 		case I915_FORMAT_MOD_Y_TILED:
 		case I915_FORMAT_MOD_Yf_TILED: