[Intel-gfx] Solving vlv hpd issues by holding power wells?

Lyude cpaul at redhat.com
Tue Apr 5 22:01:54 UTC 2016


Hi. Currently I'm working on a bug in the i915 driver where hotplugging seems to
break if we power on the machine without any connectors attached:

https://bugzilla.redhat.com/show_bug.cgi?id=1277863

So the main cause of the issue seems to be that we're not keeping the right
power wells on for HPD to work. Booting with say, HDMI, seems to result in the
POWER_DOMAIN_AUDIO domain getting ref'd (even when it's unplugged, which seems
to be another bug in the driver I've seen on a few systems at this point), which
stops the entire display domain from being shut off and subsequently keeps hpd
working. Without anything plugged in nothing turns on any power wells and the
hpd is non-functional.

Of course my first thought was to just keep the power wells required for HPD on
for as long as we have HPD enabled in the driver. I'm not entirely sure of how
this can be done though, as disabling hotplugging interrupts is done in a
context where IRQs are disabled and as such it's impossible to grab a reference
to the power domain we need since that requires us to grab a mutex. I don't see
any pre/post uninstall hooks for this either, so just having the power well
turned on and off whenever hpd is toggled doesn't seem very easy.

On top of this, after talking to a few coworkers I'm not sure if holding a power
ref as long as hpd interrupts are enabled is the right solution either, since it
could be costly in terms of power usage. He suggested that I enable polling for
each connector in the situation where all the power domains are disabled, but
having hotplugging disabled doesn't sound right to me either.

So I guess my questions are:
   1. Should we be falling back to polling when the required power wells for
      hotplug detection aren't enabled, instead of keeping them enabled to make
      hotplugging work?
   2. If polling isn't the right way to go, what is the best way to go about
      keeping a ref to the required power wells and dropping it whenever
      hotplugging is disabled?

-- 
Cheers,
	Lyude



More information about the Intel-gfx mailing list