[Intel-gfx] [PATCH 46/49] drm/i915: Iterate through the initialized DDIs to prepare their buffers

Damien Lespiau damien.lespiau at intel.com
Wed Mar 25 08:04:39 PDT 2015


On Mon, Mar 23, 2015 at 04:21:07PM +0530, Sivakumar Thulasimani wrote:
> >  void intel_prepare_ddi(struct drm_device *dev)
> >  {
> >-	int port;
> >+	struct intel_digital_port *intel_dig_port;
> >+	bool visited[I915_MAX_PORTS] = { 0, };
> >  	if (!HAS_DDI(dev))
> >  		return;
> >-	for (port = PORT_A; port <= PORT_E; port++)
> >-		intel_prepare_ddi_buffers(dev, port);
> >+	for_each_digital_port(dev, intel_dig_port) {
> >+		if (visited[intel_dig_port->port])
> >+			continue;
> >+
> >+		intel_prepare_ddi_buffers(dev, intel_dig_port);
> >+		visited[intel_dig_port->port] = true;
> >+	}
> >  }
> >  static void intel_wait_ddi_buf_idle(struct drm_i915_private *dev_priv,
> is visited[] for handling MST scenarios ?if so looks good to me.

Yes visited[] is to make sure we don't re-init the DDI for the MST
encoders.

Paulo had another review comment I never had time to address though:

https://freedesktop.org/patch/31026/

-- 
Damien


More information about the Intel-gfx mailing list