diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2014-08-04 22:01:33 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-04-16 11:42:38 +0200 |
commit | b403745c84592b26a0713e6944c2b109f6df5c82 (patch) | |
tree | 2a9637db41a186834ebc78e0fcea9ffe1a953bd9 /drivers/gpu/drm/i915/i915_drv.h | |
parent | 503604038b739b244781904113a377385a341937 (diff) |
drm/i915: Iterate through the initialized DDIs to prepare their buffers
Not every DDIs is necessarily connected can be strapped off and, in the
future, we'll have platforms with a different number of default DDI
ports. So, let's only call intel_prepare_ddi_buffers() on DDI ports that
are actually detected.
We also use the opportunity to give a struct intel_digital_port to
intel_prepare_ddi_buffers() as we'll need it in a following patch to
query if the port supports HMDI or not.
On my HSW machine this removes the initialization of a couple of
(unused) DDIs.
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index a7049ea164e2..fd72f3f0cf84 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -251,6 +251,10 @@ enum hpd_pin { &dev->mode_config.connector_list, \ base.head) +#define for_each_digital_port(dev, digital_port) \ + list_for_each_entry(digital_port, \ + &dev->mode_config.encoder_list, \ + base.base.head) #define for_each_encoder_on_crtc(dev, __crtc, intel_encoder) \ list_for_each_entry((intel_encoder), &(dev)->mode_config.encoder_list, base.head) \ |