From patchwork Tue Sep 14 20:22:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 12494631 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A508BC433F5 for ; Tue, 14 Sep 2021 20:23:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 87A6061184 for ; Tue, 14 Sep 2021 20:23:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234701AbhINUYj (ORCPT ); Tue, 14 Sep 2021 16:24:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234833AbhINUY3 (ORCPT ); Tue, 14 Sep 2021 16:24:29 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DA7BC0613DE for ; Tue, 14 Sep 2021 13:22:42 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id b7so435078pfo.11 for ; Tue, 14 Sep 2021 13:22:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dJXTwqS7PuPIT9CX0XVjRt+gK42F+FHMqbBg2Uj5BR4=; b=TqWvXeuyHuOSheemL0zyn3JHr5nZAS/bX+S2paShRs7l85FXpUjcDkt+1hQOqYJpwi Y5Pc8CsKF9F/Z3fUcl0iqJM4OIkeo1KmeN5dAWId8xYA37vSflKYmLAll37niHOfXqGS PN/VU9P8n26x9bxoXaxT8PyNNp5eteYT3LZqo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dJXTwqS7PuPIT9CX0XVjRt+gK42F+FHMqbBg2Uj5BR4=; b=CN/RL9wwBgaSJfVjyBQmjnnjc02fVSy2SOmyezjRlZTiuzot/y2m+T6TJPWWtRV+8R bNFtL0L1Ki22ts21qWOuLwG8R8Ci3uEx9UL4q/VYsRfT25eCXWmSvdedM1FdN/jAy8MD bk5VQNXYHNdE78JU5tmBhSHCZlGolwI/YMQJsU8H3jO2Yr2e0LMNgeCE1dU3gOh3ltDw 0yEjW+fcHr6CHKw2o58Ln1D9kBN6dQiC0MhL00NfbpV0Joo6Meueejn3hCv1IwHFLGXe vvJS2vStvHw7RoNLIlzQnr/oojaGF8s74uEln97dtpHl+KGQPXsjK+sMoidM+M2/JpYA Gj2w== X-Gm-Message-State: AOAM5301GkgSNpMHiIhVAwqI3lVOKzJI5dKFQelSY3eKBUgABh0ra6aB q7MKF1qk2MEJPUM5SKcXWK916A== X-Google-Smtp-Source: ABdhPJyDGeNjSKE64qgG3//L1RREy4RmX89o+nEgvz2C87yHljnSuXQt+fd9GBedSnhIztUqyUoGfA== X-Received: by 2002:a63:6d89:: with SMTP id i131mr16955280pgc.235.1631650961596; Tue, 14 Sep 2021 13:22:41 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:f38f:9d0f:3eba:f8c4]) by smtp.gmail.com with ESMTPSA id 141sm12185393pgg.16.2021.09.14.13.22.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Sep 2021 13:22:41 -0700 (PDT) From: Douglas Anderson To: Thierry Reding , Rob Herring , Sam Ravnborg Cc: devicetree@vger.kernel.org, Steev Klimaszewski , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, David Airlie , Maarten Lankhorst , Thomas Zimmermann , Linus W , Bjorn Andersson , Daniel Vetter , Maxime Ripard , Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH v5 14/15] drm/panel-edp: Don't re-read the EDID every time we power off the panel Date: Tue, 14 Sep 2021 13:22:01 -0700 Message-Id: <20210914132020.v5.14.Ib810fb3bebd0bd6763e4609e1a6764d06064081e@changeid> X-Mailer: git-send-email 2.33.0.309.g3052b89438-goog In-Reply-To: <20210914202202.1702601-1-dianders@chromium.org> References: <20210914202202.1702601-1-dianders@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 --- (no changes since v4) Changes in v4: - panel-simple-edp => panel-edp Changes in v3: - ("Don't re-read the EDID every time") moved to eDP only patch. drivers/gpu/drm/panel/panel-edp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-edp.c b/drivers/gpu/drm/panel/panel-edp.c index a83ef9905ea7..817c60858ef8 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; }