Re: A wrong DDI encoder override from HDMI to DP at hotplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 18, 2015 at 04:23:06PM +0100, Takashi Iwai wrote:
> Hi,
> 
> currently a DDI port may register both DP and HDMI and it shares the
> same encoder.  The bug we've got a report is about this encoder type:
> namely, a machine using DDI port D for HDMI is screwed up because the
> encoder is switched to DP suddently.  The details are found in:
>   http://bugzilla.opensuse.org/show_bug.cgi?id=955190
> 
> The problem happens in intel_dp_hpd_pulse().  Since the machine
> declares both DP and HDMI, the driver registers this callback.  And at
> a hotplug event, the function changes the encoder type like:
> 
> 	if (intel_dig_port->base.type != INTEL_OUTPUT_EDP)
> 		intel_dig_port->base.type = INTEL_OUTPUT_DISPLAYPORT;
> 
> After this point, the encoder is handled as DP although the same HDMI
> monitor is connected.
> 
> Changing this to exclude INTEL_OUTPUT_HDMI makes the thing working in
> the bug report above, but I'm not sure what's the right fix.
> 
> Any suggestions?

The right fix is to adjust the encoder type in the modeset code and stop
frobbing it in the detect functions. Userspace tells us at modeset time
which connector it wants to us, so it's very well defined. Trying to
autodetect it will just result in bugs like the above.

Problem is a bit that encoder->type should be tracked in the
intel_crtc_config structure (since it can change). I though Maarten is
working on this ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux