OSDN Git Service

drm/panel: panel-simple: Power the panel when reading the EDID
authorDouglas Anderson <dianders@chromium.org>
Fri, 23 Apr 2021 16:59:03 +0000 (09:59 -0700)
committerDouglas Anderson <dianders@chromium.org>
Mon, 3 May 2021 20:21:09 +0000 (13:21 -0700)
commit31e25395d8b7d271a1ab92a97239c1e5fb1b792b
treec07acf03e0fa96f32e269179b52c6db3cad39f03
parent4318ea406e02a7c928e26926bc421b9bcf883fbc
drm/panel: panel-simple: Power the panel when reading the EDID

I don't believe that it ever makes sense to read the EDID when a panel
is not powered and the powering on of the panel is the job of
prepare(). Let's make sure that this happens before we try to read the
EDID. We use the pm_runtime functions directly rather than directly
calling the normal prepare() function because the pm_runtime functions
are definitely refcounted whereas it's less clear if the prepare() one
is.

NOTE: I'm not 100% sure how EDID reading was working for folks in the
past, but I can only assume that it was failing on the initial attempt
and then working only later. This patch, presumably, will fix that. If
some panel out there really can read the EDID without powering up and
it's a big advantage to preserve the old behavior we can add a
per-panel flag. It appears that providing the DDC bus to the panel in
the past was somewhat uncommon in any case.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210423095743.v5.17.Ibd31b8f7c73255d68c5c9f5b611b4bfaa036f727@changeid
drivers/gpu/drm/panel/panel-simple.c