diff mbox series

[2/2] drm/i915/psr: CAN_PSR and CAN_PANEL_REPLAY can be now local defines

Message ID 20240109100517.1947414-3-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series Allow PSR mode changes without full modeset | expand

Commit Message

Hogander, Jouni Jan. 9, 2024, 10:05 a.m. UTC
CAN_PSR and CAN_PANEL_REPLAY are not used outside intel_psr.c anymore. Make
them as intel_psr.c local defines.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 6 ++++++
 drivers/gpu/drm/i915/display/intel_psr.h | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)

Comments

Stanislav Lisovskiy Jan. 10, 2024, 12:55 p.m. UTC | #1
On Tue, Jan 09, 2024 at 12:05:17PM +0200, Jouni Högander wrote:
> CAN_PSR and CAN_PANEL_REPLAY are not used outside intel_psr.c anymore. Make
> them as intel_psr.c local defines.
> 
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>

Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 6 ++++++
>  drivers/gpu/drm/i915/display/intel_psr.h | 6 ------
>  2 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 54120b45958b..34c0a5a14455 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -173,6 +173,12 @@
>   * irrelevant for normal operation.
>   */
>  
> +#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
> +			   (intel_dp)->psr.source_support)
> +
> +#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
> +				    (intel_dp)->psr.source_panel_replay_support)
> +
>  bool intel_encoder_can_psr(struct intel_encoder *encoder)
>  {
>  	if (intel_encoder_is_dp(encoder) || encoder->type == INTEL_OUTPUT_DP_MST)
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
> index 143e0595c097..cde781df84d5 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.h
> +++ b/drivers/gpu/drm/i915/display/intel_psr.h
> @@ -21,12 +21,6 @@ struct intel_encoder;
>  struct intel_plane;
>  struct intel_plane_state;
>  
> -#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
> -			   (intel_dp)->psr.source_support)
> -
> -#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
> -				    (intel_dp)->psr.source_panel_replay_support)
> -
>  bool intel_encoder_can_psr(struct intel_encoder *encoder);
>  void intel_psr_init_dpcd(struct intel_dp *intel_dp);
>  void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> -- 
> 2.34.1
>
Hogander, Jouni Jan. 15, 2024, 5:57 a.m. UTC | #2
On Wed, 2024-01-10 at 14:55 +0200, Lisovskiy, Stanislav wrote:
> On Tue, Jan 09, 2024 at 12:05:17PM +0200, Jouni Högander wrote:
> > CAN_PSR and CAN_PANEL_REPLAY are not used outside intel_psr.c
> > anymore. Make
> > them as intel_psr.c local defines.
> > 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> 
> Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>

Thank you Stan for checking my patches. These are now pushed to drm-
intel-next.

BR,

Jouni Högander

> 
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 6 ++++++
> >  drivers/gpu/drm/i915/display/intel_psr.h | 6 ------
> >  2 files changed, 6 insertions(+), 6 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 54120b45958b..34c0a5a14455 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -173,6 +173,12 @@
> >   * irrelevant for normal operation.
> >   */
> >  
> > +#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
> > +                          (intel_dp)->psr.source_support)
> > +
> > +#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)-
> > >psr.sink_panel_replay_support && \
> > +                                   (intel_dp)-
> > >psr.source_panel_replay_support)
> > +
> >  bool intel_encoder_can_psr(struct intel_encoder *encoder)
> >  {
> >         if (intel_encoder_is_dp(encoder) || encoder->type ==
> > INTEL_OUTPUT_DP_MST)
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.h
> > b/drivers/gpu/drm/i915/display/intel_psr.h
> > index 143e0595c097..cde781df84d5 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.h
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.h
> > @@ -21,12 +21,6 @@ struct intel_encoder;
> >  struct intel_plane;
> >  struct intel_plane_state;
> >  
> > -#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
> > -                          (intel_dp)->psr.source_support)
> > -
> > -#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)-
> > >psr.sink_panel_replay_support && \
> > -                                   (intel_dp)-
> > >psr.source_panel_replay_support)
> > -
> >  bool intel_encoder_can_psr(struct intel_encoder *encoder);
> >  void intel_psr_init_dpcd(struct intel_dp *intel_dp);
> >  void intel_psr_pre_plane_update(struct intel_atomic_state *state,
> > -- 
> > 2.34.1
> >
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 54120b45958b..34c0a5a14455 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -173,6 +173,12 @@ 
  * irrelevant for normal operation.
  */
 
+#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
+			   (intel_dp)->psr.source_support)
+
+#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
+				    (intel_dp)->psr.source_panel_replay_support)
+
 bool intel_encoder_can_psr(struct intel_encoder *encoder)
 {
 	if (intel_encoder_is_dp(encoder) || encoder->type == INTEL_OUTPUT_DP_MST)
diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h
index 143e0595c097..cde781df84d5 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.h
+++ b/drivers/gpu/drm/i915/display/intel_psr.h
@@ -21,12 +21,6 @@  struct intel_encoder;
 struct intel_plane;
 struct intel_plane_state;
 
-#define CAN_PSR(intel_dp) ((intel_dp)->psr.sink_support && \
-			   (intel_dp)->psr.source_support)
-
-#define CAN_PANEL_REPLAY(intel_dp) ((intel_dp)->psr.sink_panel_replay_support && \
-				    (intel_dp)->psr.source_panel_replay_support)
-
 bool intel_encoder_can_psr(struct intel_encoder *encoder);
 void intel_psr_init_dpcd(struct intel_dp *intel_dp);
 void intel_psr_pre_plane_update(struct intel_atomic_state *state,