diff mbox series

[v3,2/6] drm/i915/panelreplay: Added HAS_PANEL_REPLAY() macro

Message ID 20230728124609.2911830-3-animesh.manna@intel.com (mailing list archive)
State New, archived
Headers show
Series Panel replay phase1 implementation | expand

Commit Message

Animesh Manna July 28, 2023, 12:46 p.m. UTC
Platforms having Display 13 and above will support panel
replay feature of DP 2.0 monitor. Added a HAS_PANEL_REPLAY()
macro to check for panel replay capability.

v1: Initial version.
v2: DISPLAY_VER() removed as HAS_DP20() is having platform check. [Jouni]

Cc: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display_device.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Hogander, Jouni July 31, 2023, 6:26 a.m. UTC | #1
On Fri, 2023-07-28 at 18:16 +0530, Animesh Manna wrote:
> Platforms having Display 13 and above will support panel
> replay feature of DP 2.0 monitor. Added a HAS_PANEL_REPLAY()
> macro to check for panel replay capability.
> 
> v1: Initial version.
> v2: DISPLAY_VER() removed as HAS_DP20() is having platform check.
> [Jouni]
> 
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display_device.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h
> b/drivers/gpu/drm/i915/display/intel_display_device.h
> index 3324bd453ca7..53bc8f972a26 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> @@ -60,6 +60,7 @@ struct drm_printer;
>  #define HAS_MSO(i915)                  (DISPLAY_VER(i915) >= 12)
>  #define HAS_OVERLAY(i915)              (DISPLAY_INFO(i915)-
> >has_overlay)
>  #define HAS_PSR(i915)                  (DISPLAY_INFO(i915)->has_psr)
> +#define HAS_PANEL_REPLAY(dev_priv)     (HAS_DP20(dev_priv))

I'm beginning to think this macro is not needed at all. DP PR is part
of DP20 specification -> you can use HAS_DP20 directly?

BR,

Jouni Högander

>  #define HAS_PSR_HW_TRACKING(i915)      (DISPLAY_INFO(i915)-
> >has_psr_hw_tracking)
>  #define HAS_PSR2_SEL_FETCH(i915)       (DISPLAY_VER(i915) >= 12)
>  #define HAS_SAGV(i915)                 (DISPLAY_VER(i915) >= 9 &&
> !IS_LP(i915))
Animesh Manna Aug. 1, 2023, 6:38 a.m. UTC | #2
> -----Original Message-----
> From: Hogander, Jouni <jouni.hogander@intel.com>
> Sent: Monday, July 31, 2023 11:57 AM
> To: Manna, Animesh <animesh.manna@intel.com>; intel-
> gfx@lists.freedesktop.org
> Cc: Murthy, Arun R <arun.r.murthy@intel.com>
> Subject: Re: [PATCH v3 2/6] drm/i915/panelreplay: Added
> HAS_PANEL_REPLAY() macro
> 
> On Fri, 2023-07-28 at 18:16 +0530, Animesh Manna wrote:
> > Platforms having Display 13 and above will support panel replay
> > feature of DP 2.0 monitor. Added a HAS_PANEL_REPLAY() macro to check
> > for panel replay capability.
> >
> > v1: Initial version.
> > v2: DISPLAY_VER() removed as HAS_DP20() is having platform check.
> > [Jouni]
> >
> > Cc: Jouni Högander <jouni.hogander@intel.com>
> > Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display_device.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h
> > b/drivers/gpu/drm/i915/display/intel_display_device.h
> > index 3324bd453ca7..53bc8f972a26 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_device.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_device.h
> > @@ -60,6 +60,7 @@ struct drm_printer;
> >  #define HAS_MSO(i915)                  (DISPLAY_VER(i915) >= 12)
> >  #define HAS_OVERLAY(i915)              (DISPLAY_INFO(i915)-
> > >has_overlay)
> >  #define HAS_PSR(i915)                  (DISPLAY_INFO(i915)->has_psr)
> > +#define HAS_PANEL_REPLAY(dev_priv)     (HAS_DP20(dev_priv))
> 
> I'm beginning to think this macro is not needed at all. DP PR is part of DP20
> specification -> you can use HAS_DP20 directly?

Yes, I tried to follow how things are done for PSR. We may need a feature flag to enable/disable from source side.
Please let me know your view on this.

Regards,
Animesh

> 
> BR,
> 
> Jouni Högander
> 
> >  #define HAS_PSR_HW_TRACKING(i915)      (DISPLAY_INFO(i915)-
> > >has_psr_hw_tracking)
> >  #define HAS_PSR2_SEL_FETCH(i915)       (DISPLAY_VER(i915) >= 12)
> >  #define HAS_SAGV(i915)                 (DISPLAY_VER(i915) >= 9 &&
> > !IS_LP(i915))
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_display_device.h b/drivers/gpu/drm/i915/display/intel_display_device.h
index 3324bd453ca7..53bc8f972a26 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.h
+++ b/drivers/gpu/drm/i915/display/intel_display_device.h
@@ -60,6 +60,7 @@  struct drm_printer;
 #define HAS_MSO(i915)			(DISPLAY_VER(i915) >= 12)
 #define HAS_OVERLAY(i915)		(DISPLAY_INFO(i915)->has_overlay)
 #define HAS_PSR(i915)			(DISPLAY_INFO(i915)->has_psr)
+#define HAS_PANEL_REPLAY(dev_priv)	(HAS_DP20(dev_priv))
 #define HAS_PSR_HW_TRACKING(i915)	(DISPLAY_INFO(i915)->has_psr_hw_tracking)
 #define HAS_PSR2_SEL_FETCH(i915)	(DISPLAY_VER(i915) >= 12)
 #define HAS_SAGV(i915)			(DISPLAY_VER(i915) >= 9 && !IS_LP(i915))