mi0283qt driver issues
Noralf Trønnes
noralf at tronnes.org
Thu Apr 19 19:49:07 UTC 2018
Den 18.04.2018 17.52, skrev Tom Callaway:
>
> On 04/18/2018 06:22 AM, Noralf Trønnes wrote:
>> It turns out that the reason for this is that the pitft has a hw reset
>> circuit that resets only on power-on and not on each reboot through a
>> gpio like rpi-display does.
>>
>> When the driver is enabling the display pipeline it checks if the
>> controller is already initialized, and skips setup if it is. This means
>> that the rotation value is only applied after power-on on the pitft and
>> not on each reboot.
>>
>> Turning off the "display" before rebooting should also work:
>>
>> $ # change rotation value
>> $ echo "28" | sudo tee /sys/kernel/debug/dri/0/command
>> $ sudo reboot
>>
>> Rotation/mirror/flip/bgr is controlled by commmand 0x36. The current
>> value is returned by command 0x0b:
>>
>> $ sudo cat /sys/kernel/debug/dri/0/command | grep "0b:"
>> 0b: f8
>>
>> So to fix this in the driver the rotation value has to always be applied
>> regardless of display "on" state. This can be done by moving the rotation
>> code in mi0283qt_enable() down after the out: label.
> Confirmed, turning off the display before rebooting works, thanks.
>
> To fix this correctly, it seems like there are two paths:
>
> * If it is always safe to apply the rotation value regardless of display
> state, move the rotation code down after out: in the mi0283qt driver.
This is fine, it's reset, sleep in/out and display on/off that's disruptive.
>
> * If this fix is only safe on the pitft (and not on the other panels
> driven by the mi0283qt driver), either conditionalizing this behavior
> somehow, or making a separate ili9340 driver with this change.
>
> I'm willing to make patches if necessary here, but it is not clear which
> path is the correct one.
Thanks, a patch a much appreciated.
Noralf.
>
> ~tom
More information about the dri-devel
mailing list