[Intel-gfx] [PATCH 2/3] drm/i915: Iterate through the initialized DDIs to prepare their buffers
Damien Lespiau
damien.lespiau at intel.com
Thu Aug 7 16:22:20 CEST 2014
On Thu, Aug 07, 2014 at 11:17:35AM -0300, Paulo Zanoni wrote:
> > +#define for_each_digital_port(dev, digital_port) \
> > + list_for_each_entry(digital_port, \
> > + &dev->mode_config.encoder_list, \
> > + base.base.head)
>
> We can't really assume that every encoder is intel_digital_port since
> we still have the CRT encoder on HSW/BDW.
>
> And we can't run this code just for the dig_ports since CRT needs it too.
Ah, missed that, of course...
> > + 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;
> > + }
>
> A comment on why we need the "visited" array is much appreciated,
> because it appears to be useless for the code reader. Why is it here?
> Will we ever have more than one encoder per port?
Because of the MST "fake" encoder.
--
Damien
More information about the Intel-gfx
mailing list