diff mbox series

[v2,1/4] drm/i915/panelreplay: HAS_PR() macro added for panel replay

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

Commit Message

Manna, Animesh Oct. 7, 2021, 3:57 p.m. UTC
Platforms having Display 13 and above will support panel
replay feature of DP 2.0 monitor. Added a HAS_PR() macro
to check for panel replay capability.

v1: Initial version.
v2: DISPLAY_VER macro used instead of has_pr flag. [Jose]

Signed-off-by: Animesh Manna <animesh.manna@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 1 +
 1 file changed, 1 insertion(+)

Comments

Ville Syrjala Oct. 7, 2021, 4:39 p.m. UTC | #1
On Thu, Oct 07, 2021 at 09:27:26PM +0530, Animesh Manna wrote:
> Platforms having Display 13 and above will support panel
> replay feature of DP 2.0 monitor. Added a HAS_PR() macro
> to check for panel replay capability.
> 
> v1: Initial version.
> v2: DISPLAY_VER macro used instead of has_pr flag. [Jose]
> 
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> ---
>  drivers/gpu/drm/i915/i915_drv.h | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 12256218634f..8db0626337e3 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1693,6 +1693,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
>  #define HAS_DDI(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_ddi)
>  #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) (INTEL_INFO(dev_priv)->display.has_fpga_dbg)
>  #define HAS_PSR(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_psr)
> +#define HAS_PR(dev_priv)		 (DISPLAY_VER(dev_priv) >= 13)

Public relations?

>  #define HAS_PSR_HW_TRACKING(dev_priv) \
>  	(INTEL_INFO(dev_priv)->display.has_psr_hw_tracking)
>  #define HAS_PSR2_SEL_FETCH(dev_priv)	 (GRAPHICS_VER(dev_priv) >= 12)
> -- 
> 2.29.0
Manna, Animesh Oct. 7, 2021, 4:56 p.m. UTC | #2
> -----Original Message-----
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Sent: Thursday, October 7, 2021 10:10 PM
> To: Manna, Animesh <animesh.manna@intel.com>
> Cc: intel-gfx@lists.freedesktop.org; Mun, Gwan-gyeong <gwan-
> gyeong.mun@intel.com>; Kahola, Mika <mika.kahola@intel.com>; Nikula, Jani
> <jani.nikula@intel.com>; Navare, Manasi D <manasi.d.navare@intel.com>;
> Souza, Jose <jose.souza@intel.com>
> Subject: Re: [Intel-gfx] [PATCH v2 1/4] drm/i915/panelreplay: HAS_PR() macro
> added for panel replay
> 
> On Thu, Oct 07, 2021 at 09:27:26PM +0530, Animesh Manna wrote:
> > Platforms having Display 13 and above will support panel replay
> > feature of DP 2.0 monitor. Added a HAS_PR() macro to check for panel
> > replay capability.
> >
> > v1: Initial version.
> > v2: DISPLAY_VER macro used instead of has_pr flag. [Jose]
> >
> > Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h
> > b/drivers/gpu/drm/i915/i915_drv.h index 12256218634f..8db0626337e3
> > 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1693,6 +1693,7 @@ IS_SUBPLATFORM(const struct drm_i915_private
> *i915,
> >  #define HAS_DDI(dev_priv)		 (INTEL_INFO(dev_priv)-
> >display.has_ddi)
> >  #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) (INTEL_INFO(dev_priv)-
> >display.has_fpga_dbg)
> >  #define HAS_PSR(dev_priv)		 (INTEL_INFO(dev_priv)-
> >display.has_psr)
> > +#define HAS_PR(dev_priv)		 (DISPLAY_VER(dev_priv) >= 13)
> 
> Public relations?

Want to have a flag to enable/disable overall feature and useful in future to check power improvement with and without panel replay.
Initial had a feature flag in device_info structure like other features and later make a relation with DISPLAY_VER as per feedback.
https://patchwork.freedesktop.org/patch/452817/?series=94470&rev=1
Should we go back with feature flag or can go ahead with DISPLAY_VER relation?

Regards,
Animesh

> 
> >  #define HAS_PSR_HW_TRACKING(dev_priv) \
> >  	(INTEL_INFO(dev_priv)->display.has_psr_hw_tracking)
> >  #define HAS_PSR2_SEL_FETCH(dev_priv)	 (GRAPHICS_VER(dev_priv) >=
> 12)
> > --
> > 2.29.0
> 
> --
> Ville Syrjälä
> Intel
Jani Nikula Oct. 7, 2021, 4:59 p.m. UTC | #3
On Thu, 07 Oct 2021, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> On Thu, Oct 07, 2021 at 09:27:26PM +0530, Animesh Manna wrote:
>> Platforms having Display 13 and above will support panel
>> replay feature of DP 2.0 monitor. Added a HAS_PR() macro
>> to check for panel replay capability.
>> 
>> v1: Initial version.
>> v2: DISPLAY_VER macro used instead of has_pr flag. [Jose]
>> 
>> Signed-off-by: Animesh Manna <animesh.manna@intel.com>
>> ---
>>  drivers/gpu/drm/i915/i915_drv.h | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
>> index 12256218634f..8db0626337e3 100644
>> --- a/drivers/gpu/drm/i915/i915_drv.h
>> +++ b/drivers/gpu/drm/i915/i915_drv.h
>> @@ -1693,6 +1693,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
>>  #define HAS_DDI(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_ddi)
>>  #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) (INTEL_INFO(dev_priv)->display.has_fpga_dbg)
>>  #define HAS_PSR(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_psr)
>> +#define HAS_PR(dev_priv)		 (DISPLAY_VER(dev_priv) >= 13)
>
> Public relations?

Yeah, HAS_PANEL_REPLAY() sounds more like it. Also wondering why this
doesn't depend on HAS_DP20() which is what effectively gets done in
patch 2. Sure, it's more restrictive at the moment, but IIUC that's the
dependency.

BR,
Jani.

>
>>  #define HAS_PSR_HW_TRACKING(dev_priv) \
>>  	(INTEL_INFO(dev_priv)->display.has_psr_hw_tracking)
>>  #define HAS_PSR2_SEL_FETCH(dev_priv)	 (GRAPHICS_VER(dev_priv) >= 12)
>> -- 
>> 2.29.0
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 12256218634f..8db0626337e3 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -1693,6 +1693,7 @@  IS_SUBPLATFORM(const struct drm_i915_private *i915,
 #define HAS_DDI(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_ddi)
 #define HAS_FPGA_DBG_UNCLAIMED(dev_priv) (INTEL_INFO(dev_priv)->display.has_fpga_dbg)
 #define HAS_PSR(dev_priv)		 (INTEL_INFO(dev_priv)->display.has_psr)
+#define HAS_PR(dev_priv)		 (DISPLAY_VER(dev_priv) >= 13)
 #define HAS_PSR_HW_TRACKING(dev_priv) \
 	(INTEL_INFO(dev_priv)->display.has_psr_hw_tracking)
 #define HAS_PSR2_SEL_FETCH(dev_priv)	 (GRAPHICS_VER(dev_priv) >= 12)