From: Douglas Anderson Date: Tue, 14 Sep 2021 20:22:01 +0000 (-0700) Subject: drm/panel-edp: Don't re-read the EDID every time we power off the panel X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=24e27de115608b04160d1d113b25f8a9f7e59416;p=linux.git drm/panel-edp: Don't re-read the EDID every time we power off the panel The simple-panel driver is for panels that are not hot-pluggable at runtime. Let's keep our cached EDID around until driver unload. Signed-off-by: Douglas Anderson Acked-by: Sam Ravnborg Acked-by: Linus Walleij Link: https://patchwork.freedesktop.org/patch/msgid/20210914132020.v5.14.Ib810fb3bebd0bd6763e4609e1a6764d06064081e@changeid --- diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index 3e53be63cf2a2..f01497d1a8c7f 100644 --- a/drivers/gpu/drm/panel/panel-edp.c +++ b/drivers/gpu/drm/panel/panel-edp.c @@ -362,9 +362,6 @@ static int panel_edp_suspend(struct device *dev) regulator_disable(p->supply); p->unprepared_time = ktime_get(); - kfree(p->edid); - p->edid = NULL; - return 0; } @@ -758,6 +755,9 @@ static int panel_edp_remove(struct device *dev) if (panel->ddc && (!panel->aux || panel->ddc != &panel->aux->ddc)) put_device(&panel->ddc->dev); + kfree(panel->edid); + panel->edid = NULL; + return 0; }