diff options
author | Enric Balletbo i Serra <enric.balletbo@collabora.com> | 2020-08-27 10:59:11 +0200 |
---|---|---|
committer | Neil Armstrong <narmstrong@baylibre.com> | 2020-09-15 15:12:24 +0200 |
commit | 46f206304db0311b0920479f42accaa7cb472fdc (patch) | |
tree | 245da170922b1f178504853919919fdca8f26adb /drivers/gpu/drm/nouveau/nouveau_ttm.c | |
parent | 9fe6bda9823ea90c22ad47436293413d5fd58991 (diff) | |
download | linux-46f206304db0311b0920479f42accaa7cb472fdc.tar.bz2 |
drm/bridge: ps8640: Rework power state handling
The get_edid() callback can be triggered anytime by an ioctl, i.e
drm_mode_getconnector (ioctl)
-> drm_helper_probe_single_connector_modes
-> drm_bridge_connector_get_modes
-> ps8640_bridge_get_edid
Actually if the bridge pre_enable() function was not called before
get_edid(), the driver will not be able to get the EDID properly and
display will not work until a second get_edid() call is issued and if
pre_enable() is called before. The side effect of this, for example, is
that you see anything when `Frecon` starts, neither the splash screen,
until the graphical session manager starts.
To fix this we need to make sure that all we need is enabled before
reading the EDID. This means the following:
1. If get_edid() is called before having the device powered we need to
power on the device. In such case, the driver will power off again the
device.
2. If get_edid() is called after having the device powered, all should
just work. We added a powered flag in order to avoid recurrent calls
to ps8640_bridge_poweron() and unneeded delays.
3. This seems to be specific for this device, but we need to make sure
the panel is powered on before do a power on cycle on this device.
Otherwise the device fails to retrieve the EDID.
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Bilal Wasim <bwasim.lkml@gmail.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200827085911.944899-2-enric.balletbo@collabora.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_ttm.c')
0 files changed, 0 insertions, 0 deletions