On Tuesday 20 September 2011, Keith Packard <[email protected]> wrote:
> On Wed, 17 Aug 2011 10:52:21 +0100, Simon Farnsworth 
<[email protected]> wrote:
> >  static bool
> >  intel_sdvo_multifunc_encoder(struct intel_sdvo *intel_sdvo)
> > 
> > @@ -2062,7 +2053,10 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo,
> > int device)
> > 
> >     intel_connector = &intel_sdvo_connector->base;
> >     connector = &intel_connector->base;
> > 
> > -   connector->polled = DRM_CONNECTOR_POLL_CONNECT |
> > DRM_CONNECTOR_POLL_DISCONNECT; +    if
> > (intel_sdvo_supports_hotplug(intel_sdvo) & (1 << device))
> > +           connector->polled = DRM_CONNECTOR_POLL_HPD;
> > +   else
> > +           connector->polled = DRM_CONNECTOR_POLL_CONNECT |
> > DRM_CONNECTOR_POLL_DISCONNECT;
> > 
> >     encoder->encoder_type = DRM_MODE_ENCODER_TMDS;
> >     connector->connector_type = DRM_MODE_CONNECTOR_DVID;
> > 
> > @@ -2587,6 +2581,11 @@ bool intel_sdvo_init(struct drm_device *dev, int
> > sdvo_reg)
> > 
> >                                                 
> > &intel_sdvo->pixel_clock_max))
> >             
> >             goto err;
> > 
> > +        if (intel_sdvo_supports_hotplug(intel_sdvo)) {
> > +           intel_encoder->hot_plug = intel_sdvo_do_hotplug;
> > +           intel_sdvo_set_hotplug(intel_sdvo);
> > +   }
> > +
> 
> This all looks quite reasonable, about the only thing I would suggest is
> that you avoid calling intel_sdvo_supports_hotplug twice in
> intel_sdvo_init and simply look at connector->polled to see if the HPD
> bit is set.

V2 patch coming up - I'll check connector->polled in intel_sdvo_init, and rely 
on the call to intel_sdvo_output_setup calling a connector-specific output 
function (in my case, intel_sdvo_dvi_init) that sets it correctly.
-- 
Simon Farnsworth
Software Engineer
ONELAN Limited
http://www.onelan.com/
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to