tree: git://anongit.freedesktop.org/drm-intel for-linux-next head: 62e0fb880123c98793e5c3ba8355501b0305e92e commit: 85cb48a1651ee7cbc49468776d3078418f7827c5 [14/16] drm/i915: Convert intel_dp to use atomic state reproduce: make htmldocs All warnings (new ones prefixed by >>): drivers/gpu/drm/drm_modes.c:693: warning: No description found for parameter 'bus_flags' drivers/gpu/drm/drm_plane_helper.c:248: warning: No description found for parameter 'dst' drivers/gpu/drm/drm_plane_helper.c:248: warning: Excess function parameter 'dest' description in 'drm_plane_helper_check_update' drivers/gpu/drm/drm_plane_helper.c:247: warning: No description found for parameter 'dst' drivers/gpu/drm/drm_plane_helper.c:247: warning: Excess function parameter 'dest' description in 'drm_plane_helper_check_update' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'dev_priv' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: Excess function parameter 'dev' description in 'intel_dp_set_drrs_state' drivers/gpu/drm/i915/intel_dp.c:5158: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5188: warning: No description found for parameter 'old_crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'dev_priv' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: Excess function parameter 'dev' description in 'intel_dp_set_drrs_state' drivers/gpu/drm/i915/intel_dp.c:5158: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5188: warning: No description found for parameter 'old_crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'dev_priv' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: Excess function parameter 'dev' description in 'intel_dp_set_drrs_state' drivers/gpu/drm/i915/intel_dp.c:5158: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5188: warning: No description found for parameter 'old_crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'dev_priv' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: Excess function parameter 'dev' description in 'intel_dp_set_drrs_state' drivers/gpu/drm/i915/intel_dp.c:5158: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5188: warning: No description found for parameter 'old_crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'dev_priv' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5063: warning: Excess function parameter 'dev' description in 'intel_dp_set_drrs_state' drivers/gpu/drm/i915/intel_dp.c:5158: warning: No description found for parameter 'crtc_state' >> drivers/gpu/drm/i915/intel_dp.c:5188: warning: No description found for parameter 'old_crtc_state' vim +/dev_priv +5063 drivers/gpu/drm/i915/intel_dp.c b33a2815 Vandana Kannan 2015-02-13 5057 * b33a2815 Vandana Kannan 2015-02-13 5058 * The caller of this function needs to take a lock on dev_priv->drrs. b33a2815 Vandana Kannan 2015-02-13 5059 */ 85cb48a1 Maarten Lankhorst 2016-08-09 5060 static void intel_dp_set_drrs_state(struct drm_i915_private *dev_priv, 85cb48a1 Maarten Lankhorst 2016-08-09 5061 struct intel_crtc_state *crtc_state, 85cb48a1 Maarten Lankhorst 2016-08-09 5062 int refresh_rate) 439d7ac0 Pradeep Bhat 2014-04-05 @5063 { 439d7ac0 Pradeep Bhat 2014-04-05 5064 struct intel_encoder *encoder; 96178eeb Vandana Kannan 2015-01-10 5065 struct intel_digital_port *dig_port = NULL; 96178eeb Vandana Kannan 2015-01-10 5066 struct intel_dp *intel_dp = dev_priv->drrs.dp; 85cb48a1 Maarten Lankhorst 2016-08-09 5067 struct intel_crtc *intel_crtc = to_intel_crtc(crtc_state->base.crtc); 96178eeb Vandana Kannan 2015-01-10 5068 enum drrs_refresh_rate_type index = DRRS_HIGH_RR; 439d7ac0 Pradeep Bhat 2014-04-05 5069 439d7ac0 Pradeep Bhat 2014-04-05 5070 if (refresh_rate <= 0) { 439d7ac0 Pradeep Bhat 2014-04-05 5071 DRM_DEBUG_KMS("Refresh rate should be positive non-zero.\n"); 439d7ac0 Pradeep Bhat 2014-04-05 5072 return; 439d7ac0 Pradeep Bhat 2014-04-05 5073 } 439d7ac0 Pradeep Bhat 2014-04-05 5074 96178eeb Vandana Kannan 2015-01-10 5075 if (intel_dp == NULL) { 96178eeb Vandana Kannan 2015-01-10 5076 DRM_DEBUG_KMS("DRRS not supported.\n"); 439d7ac0 Pradeep Bhat 2014-04-05 5077 return; 439d7ac0 Pradeep Bhat 2014-04-05 5078 } 439d7ac0 Pradeep Bhat 2014-04-05 5079 1fcc9d1c Daniel Vetter 2014-07-11 5080 /* e4d59f6b Rodrigo Vivi 2014-11-20 5081 * FIXME: This needs proper synchronization with psr state for some e4d59f6b Rodrigo Vivi 2014-11-20 5082 * platforms that cannot have PSR and DRRS enabled at the same time. 1fcc9d1c Daniel Vetter 2014-07-11 5083 */ 439d7ac0 Pradeep Bhat 2014-04-05 5084 96178eeb Vandana Kannan 2015-01-10 5085 dig_port = dp_to_dig_port(intel_dp); 96178eeb Vandana Kannan 2015-01-10 5086 encoder = &dig_port->base; 723f9aab Ander Conselvan de Oliveira 2015-03-20 5087 intel_crtc = to_intel_crtc(encoder->base.crtc); 439d7ac0 Pradeep Bhat 2014-04-05 5088 439d7ac0 Pradeep Bhat 2014-04-05 5089 if (!intel_crtc) { 439d7ac0 Pradeep Bhat 2014-04-05 5090 DRM_DEBUG_KMS("DRRS: intel_crtc not initialized\n"); 439d7ac0 Pradeep Bhat 2014-04-05 5091 return; 439d7ac0 Pradeep Bhat 2014-04-05 5092 } 439d7ac0 Pradeep Bhat 2014-04-05 5093 96178eeb Vandana Kannan 2015-01-10 5094 if (dev_priv->drrs.type < SEAMLESS_DRRS_SUPPORT) { 439d7ac0 Pradeep Bhat 2014-04-05 5095 DRM_DEBUG_KMS("Only Seamless DRRS supported.\n"); 439d7ac0 Pradeep Bhat 2014-04-05 5096 return; 439d7ac0 Pradeep Bhat 2014-04-05 5097 } 439d7ac0 Pradeep Bhat 2014-04-05 5098 96178eeb Vandana Kannan 2015-01-10 5099 if (intel_dp->attached_connector->panel.downclock_mode->vrefresh == 96178eeb Vandana Kannan 2015-01-10 5100 refresh_rate) 439d7ac0 Pradeep Bhat 2014-04-05 5101 index = DRRS_LOW_RR; 439d7ac0 Pradeep Bhat 2014-04-05 5102 96178eeb Vandana Kannan 2015-01-10 5103 if (index == dev_priv->drrs.refresh_rate_type) { 439d7ac0 Pradeep Bhat 2014-04-05 5104 DRM_DEBUG_KMS( 439d7ac0 Pradeep Bhat 2014-04-05 5105 "DRRS requested for previously set RR...ignoring\n"); 439d7ac0 Pradeep Bhat 2014-04-05 5106 return; 439d7ac0 Pradeep Bhat 2014-04-05 5107 } 439d7ac0 Pradeep Bhat 2014-04-05 5108 85cb48a1 Maarten Lankhorst 2016-08-09 5109 if (!crtc_state->base.active) { 439d7ac0 Pradeep Bhat 2014-04-05 5110 DRM_DEBUG_KMS("eDP encoder disabled. CRTC not Active\n"); 439d7ac0 Pradeep Bhat 2014-04-05 5111 return; 439d7ac0 Pradeep Bhat 2014-04-05 5112 } 439d7ac0 Pradeep Bhat 2014-04-05 5113 85cb48a1 Maarten Lankhorst 2016-08-09 5114 if (INTEL_GEN(dev_priv) >= 8 && !IS_CHERRYVIEW(dev_priv)) { a4c30b1d Vandana Kannan 2015-02-13 5115 switch (index) { a4c30b1d Vandana Kannan 2015-02-13 5116 case DRRS_HIGH_RR: a4c30b1d Vandana Kannan 2015-02-13 5117 intel_dp_set_m_n(intel_crtc, M1_N1); a4c30b1d Vandana Kannan 2015-02-13 5118 break; a4c30b1d Vandana Kannan 2015-02-13 5119 case DRRS_LOW_RR: a4c30b1d Vandana Kannan 2015-02-13 5120 intel_dp_set_m_n(intel_crtc, M2_N2); a4c30b1d Vandana Kannan 2015-02-13 5121 break; a4c30b1d Vandana Kannan 2015-02-13 5122 case DRRS_MAX_RR: a4c30b1d Vandana Kannan 2015-02-13 5123 default: a4c30b1d Vandana Kannan 2015-02-13 5124 DRM_ERROR("Unsupported refreshrate type\n"); a4c30b1d Vandana Kannan 2015-02-13 5125 } 85cb48a1 Maarten Lankhorst 2016-08-09 5126 } else if (INTEL_GEN(dev_priv) > 6) { 85cb48a1 Maarten Lankhorst 2016-08-09 5127 i915_reg_t reg = PIPECONF(crtc_state->cpu_transcoder); 649636ef Ville Syrjälä 2015-09-22 5128 u32 val; a4c30b1d Vandana Kannan 2015-02-13 5129 649636ef Ville Syrjälä 2015-09-22 5130 val = I915_READ(reg); 439d7ac0 Pradeep Bhat 2014-04-05 5131 if (index > DRRS_HIGH_RR) { 85cb48a1 Maarten Lankhorst 2016-08-09 5132 if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) 6fa7aec1 Vandana Kannan 2015-02-13 5133 val |= PIPECONF_EDP_RR_MODE_SWITCH_VLV; 6fa7aec1 Vandana Kannan 2015-02-13 5134 else 439d7ac0 Pradeep Bhat 2014-04-05 5135 val |= PIPECONF_EDP_RR_MODE_SWITCH; 439d7ac0 Pradeep Bhat 2014-04-05 5136 } else { 85cb48a1 Maarten Lankhorst 2016-08-09 5137 if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) 6fa7aec1 Vandana Kannan 2015-02-13 5138 val &= ~PIPECONF_EDP_RR_MODE_SWITCH_VLV; 6fa7aec1 Vandana Kannan 2015-02-13 5139 else 439d7ac0 Pradeep Bhat 2014-04-05 5140 val &= ~PIPECONF_EDP_RR_MODE_SWITCH; 439d7ac0 Pradeep Bhat 2014-04-05 5141 } 439d7ac0 Pradeep Bhat 2014-04-05 5142 I915_WRITE(reg, val); 439d7ac0 Pradeep Bhat 2014-04-05 5143 } 439d7ac0 Pradeep Bhat 2014-04-05 5144 4e9ac947 Vandana Kannan 2015-01-22 5145 dev_priv->drrs.refresh_rate_type = index; 4e9ac947 Vandana Kannan 2015-01-22 5146 4e9ac947 Vandana Kannan 2015-01-22 5147 DRM_DEBUG_KMS("eDP Refresh Rate set to : %dHz\n", refresh_rate); 4e9ac947 Vandana Kannan 2015-01-22 5148 } 4e9ac947 Vandana Kannan 2015-01-22 5149 b33a2815 Vandana Kannan 2015-02-13 5150 /** b33a2815 Vandana Kannan 2015-02-13 5151 * intel_edp_drrs_enable - init drrs struct if supported b33a2815 Vandana Kannan 2015-02-13 5152 * @intel_dp: DP struct b33a2815 Vandana Kannan 2015-02-13 5153 * b33a2815 Vandana Kannan 2015-02-13 5154 * Initializes frontbuffer_bits and drrs.dp b33a2815 Vandana Kannan 2015-02-13 5155 */ 85cb48a1 Maarten Lankhorst 2016-08-09 5156 void intel_edp_drrs_enable(struct intel_dp *intel_dp, 85cb48a1 Maarten Lankhorst 2016-08-09 5157 struct intel_crtc_state *crtc_state) c395578e Vandana Kannan 2015-01-22 5158 { c395578e Vandana Kannan 2015-01-22 5159 struct drm_device *dev = intel_dp_to_dev(intel_dp); fac5e23e Chris Wilson 2016-07-04 5160 struct drm_i915_private *dev_priv = to_i915(dev); c395578e Vandana Kannan 2015-01-22 5161 85cb48a1 Maarten Lankhorst 2016-08-09 5162 if (!crtc_state->has_drrs) { c395578e Vandana Kannan 2015-01-22 5163 DRM_DEBUG_KMS("Panel doesn't support DRRS\n"); c395578e Vandana Kannan 2015-01-22 5164 return; c395578e Vandana Kannan 2015-01-22 5165 } c395578e Vandana Kannan 2015-01-22 5166 c395578e Vandana Kannan 2015-01-22 5167 mutex_lock(&dev_priv->drrs.mutex); c395578e Vandana Kannan 2015-01-22 5168 if (WARN_ON(dev_priv->drrs.dp)) { c395578e Vandana Kannan 2015-01-22 5169 DRM_ERROR("DRRS already enabled\n"); c395578e Vandana Kannan 2015-01-22 5170 goto unlock; c395578e Vandana Kannan 2015-01-22 5171 } c395578e Vandana Kannan 2015-01-22 5172 c395578e Vandana Kannan 2015-01-22 5173 dev_priv->drrs.busy_frontbuffer_bits = 0; c395578e Vandana Kannan 2015-01-22 5174 c395578e Vandana Kannan 2015-01-22 5175 dev_priv->drrs.dp = intel_dp; c395578e Vandana Kannan 2015-01-22 5176 c395578e Vandana Kannan 2015-01-22 5177 unlock: c395578e Vandana Kannan 2015-01-22 5178 mutex_unlock(&dev_priv->drrs.mutex); c395578e Vandana Kannan 2015-01-22 5179 } c395578e Vandana Kannan 2015-01-22 5180 b33a2815 Vandana Kannan 2015-02-13 5181 /** b33a2815 Vandana Kannan 2015-02-13 5182 * intel_edp_drrs_disable - Disable DRRS b33a2815 Vandana Kannan 2015-02-13 5183 * @intel_dp: DP struct b33a2815 Vandana Kannan 2015-02-13 5184 * b33a2815 Vandana Kannan 2015-02-13 5185 */ 85cb48a1 Maarten Lankhorst 2016-08-09 5186 void intel_edp_drrs_disable(struct intel_dp *intel_dp, 85cb48a1 Maarten Lankhorst 2016-08-09 5187 struct intel_crtc_state *old_crtc_state) c395578e Vandana Kannan 2015-01-22 @5188 { c395578e Vandana Kannan 2015-01-22 5189 struct drm_device *dev = intel_dp_to_dev(intel_dp); fac5e23e Chris Wilson 2016-07-04 5190 struct drm_i915_private *dev_priv = to_i915(dev); c395578e Vandana Kannan 2015-01-22 5191 :::::: The code at line 5063 was first introduced by commit :::::: 439d7ac0879f9fd4c56f212e03477f358133c56c drm/i915: Add support for DRRS to switch RR :::::: TO: Pradeep Bhat <pradeep.bhat@xxxxxxxxx> :::::: CC: Daniel Vetter <daniel.vetter@xxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data
_______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx