<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - [GLK DSI] Black screen after grub - Ubuntu 18.04 - kernel latest tip 21.11.2018"
href="https://bugs.freedesktop.org/show_bug.cgi?id=108826#c126">Comment # 126</a>
on <a class="bz_bug_link
bz_status_NEEDINFO "
title="NEEDINFO - [GLK DSI] Black screen after grub - Ubuntu 18.04 - kernel latest tip 21.11.2018"
href="https://bugs.freedesktop.org/show_bug.cgi?id=108826">bug 108826</a>
from <span class="vcard"><a class="email" href="mailto:markwynngarcia@outlook.com" title="Mark Wynn Garcia <markwynngarcia@outlook.com>"> <span class="fn">Mark Wynn Garcia</span></a>
</span></b>
<pre>Stani. I think I know the problem. I'm still at work so I couldn't test it.
I think it's because of the call to devm_gpiod_get_index() is only done once,
with the first call's value.
gpio_desc = devm_gpiod_get_index(dev_priv->drm.dev,
NULL, gpio_index,
value ? GPIOD_OUT_LOW :
GPIOD_OUT_HIGH);
The look at gpiod_set_value() -> gpiod_set_value_nocheck()
(<a href="https://github.com/torvalds/linux/blob/master/drivers/gpio/gpiolib.c#L3335">https://github.com/torvalds/linux/blob/master/drivers/gpio/gpiolib.c#L3335</a>).
It flips the value if it's flagged as low. See also gpiod_configure_flags(). So
if it happens that the initial call sets the GPIOD_OUT_LOW flag, then every
subsequent calls will have the value flipped. So it can never set the GPIO to
1/true!</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>