drm/i915/display: Rename for_each_intel_encoder.*_can_psr to for_each_intel_encoder.*_with_psr

for_each_intel_encoder.*_"can_psr" sounds strange, in my opinion
"with_psr" is better.

Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Reviewed-by: default avatarGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210209181439.215104-1-jose.souza@intel.com
parent ffe9aa48
......@@ -418,7 +418,7 @@ enum phy_fia {
for_each_if((encoder_mask) & \
drm_encoder_mask(&intel_encoder->base))
#define for_each_intel_encoder_mask_can_psr(dev, intel_encoder, encoder_mask) \
#define for_each_intel_encoder_mask_with_psr(dev, intel_encoder, encoder_mask) \
list_for_each_entry((intel_encoder), &(dev)->mode_config.encoder_list, base.head) \
for_each_if(((encoder_mask) & drm_encoder_mask(&(intel_encoder)->base)) && \
intel_encoder_can_psr(intel_encoder))
......@@ -427,7 +427,7 @@ enum phy_fia {
for_each_intel_encoder(dev, intel_encoder) \
for_each_if(intel_encoder_is_dp(intel_encoder))
#define for_each_intel_encoder_can_psr(dev, intel_encoder) \
#define for_each_intel_encoder_with_psr(dev, intel_encoder) \
for_each_intel_encoder((dev), (intel_encoder)) \
for_each_if(intel_encoder_can_psr(intel_encoder))
......
......@@ -437,7 +437,7 @@ static int i915_edp_psr_status(struct seq_file *m, void *data)
return -ENODEV;
/* Find the first EDP which supports PSR */
for_each_intel_encoder_can_psr(&dev_priv->drm, encoder) {
for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
intel_dp = enc_to_intel_dp(encoder);
break;
}
......@@ -459,7 +459,7 @@ i915_edp_psr_debug_set(void *data, u64 val)
if (!HAS_PSR(dev_priv))
return ret;
for_each_intel_encoder_can_psr(&dev_priv->drm, encoder) {
for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
drm_dbg_kms(&dev_priv->drm, "Setting PSR debug to %llx\n", val);
......@@ -484,7 +484,7 @@ i915_edp_psr_debug_get(void *data, u64 *val)
if (!HAS_PSR(dev_priv))
return -ENODEV;
for_each_intel_encoder_can_psr(&dev_priv->drm, encoder) {
for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
// TODO: split to each transcoder's PSR debug state
......
......@@ -1233,7 +1233,7 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_st
!crtc_state->enable_psr2_sel_fetch)
return;
for_each_intel_encoder_mask_can_psr(&dev_priv->drm, encoder,
for_each_intel_encoder_mask_with_psr(&dev_priv->drm, encoder,
crtc_state->uapi.encoder_mask) {
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
......@@ -1517,7 +1517,7 @@ void intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state)
if (!new_crtc_state->has_psr)
return;
for_each_intel_encoder_mask_can_psr(&dev_priv->drm, encoder,
for_each_intel_encoder_mask_with_psr(&dev_priv->drm, encoder,
new_crtc_state->uapi.encoder_mask) {
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
u32 psr_status;
......@@ -1732,7 +1732,7 @@ void intel_psr_invalidate(struct drm_i915_private *dev_priv,
if (origin == ORIGIN_FLIP)
return;
for_each_intel_encoder_can_psr(&dev_priv->drm, encoder) {
for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
unsigned int pipe_frontbuffer_bits = frontbuffer_bits;
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
......@@ -1804,7 +1804,7 @@ void intel_psr_flush(struct drm_i915_private *dev_priv,
{
struct intel_encoder *encoder;
for_each_intel_encoder_can_psr(&dev_priv->drm, encoder) {
for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
unsigned int pipe_frontbuffer_bits = frontbuffer_bits;
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
......
......@@ -2096,7 +2096,7 @@ static void ivb_display_irq_handler(struct drm_i915_private *dev_priv,
if (de_iir & DE_EDP_PSR_INT_HSW) {
struct intel_encoder *encoder;
for_each_intel_encoder_can_psr(&dev_priv->drm, encoder) {
for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
u32 psr_iir = intel_uncore_read(&dev_priv->uncore,
......@@ -2323,7 +2323,7 @@ gen8_de_misc_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
u32 psr_iir;
i915_reg_t iir_reg;
for_each_intel_encoder_can_psr(&dev_priv->drm, encoder) {
for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
if (INTEL_GEN(dev_priv) >= 12)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment