From patchwork Wed Sep 1 20:19:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 12470243 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, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham 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 1E3DFC43214 for ; Wed, 1 Sep 2021 20:20:57 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E5A9C6101B for ; Wed, 1 Sep 2021 20:20:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E5A9C6101B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 300E46E301; Wed, 1 Sep 2021 20:20:56 +0000 (UTC) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 905406E301 for ; Wed, 1 Sep 2021 20:20:54 +0000 (UTC) Received: by mail-pl1-x62c.google.com with SMTP id n4so366821plh.9 for ; Wed, 01 Sep 2021 13:20:54 -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=DABmu8a7wcOi+LAPS6v0nwHVY/OcrtFrk5J3lvyIla0=; b=Os0b+GnEGsF8siu+flMSW4dAYNThKDU3Ww7vE6vKTBh7r6Ux9uPPuEUWDpACEet4TB mVp83QdWqU8lPUa+HCK/0vBTS1Kinrh61IFQz72H+1ZnjVa+cEjR1BKLN1/zkW9TObfR qMT3e29jfdSpnF+/aK3xNQjTSSsJIXJqhOLNk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DABmu8a7wcOi+LAPS6v0nwHVY/OcrtFrk5J3lvyIla0=; b=BLL1jesh6lM3QpXvh9yCEKWrkYVLz1X6vfQJG/ISeZzSv8FODlFdCwNgubDIzlfWaf Gmhi2xYUu7vwxAOsfLOfsbLvK9YJaTtTpgxiSqIK7xGx8NgLU82lbbbjfJrgNDe75lBp W28Kgz0ONzju22ZMQuNypwbemZvNpNz7f5NnN/xVyYjOvpp+yDMWyBfgDqpaVQo2kIzP usgE5foHQg8dapK9F5pi/EkIddXG2FjRACCwUqXtKQxxUn1KDJtiB5K5pnYbujIGUIQX l8yw26YTXBs9/23rTIH/aapGM+98DZvOtzC1oqIBflFdozVJX5QIN7hCWagEQr+356qb htLw== X-Gm-Message-State: AOAM532TyK+dy552PQ1CkI5PeHnjgciJYzhEYTBLRDGZEFCZ8xTfrOLu Oh2rlx2BoEzSxXXaUYiaHGFNcQ== X-Google-Smtp-Source: ABdhPJxJ7qKxG2VvHK0KF5F5LrDE/YppzmHXKeC1vqvO9uwXp8XtCRHrGZoq8Mmssft1eXHGjc3fIg== X-Received: by 2002:a17:90a:5882:: with SMTP id j2mr1100326pji.169.1630527654141; Wed, 01 Sep 2021 13:20:54 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:202:201:958b:b561:a735:e774]) by smtp.gmail.com with ESMTPSA id x15sm321178pfq.31.2021.09.01.13.20.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Sep 2021 13:20:53 -0700 (PDT) From: Douglas Anderson To: Thierry Reding , Rob Herring , Sam Ravnborg Cc: Maarten Lankhorst , linux-arm-msm@vger.kernel.org, Bjorn Andersson , Linus W , Daniel Vetter , devicetree@vger.kernel.org, Steev Klimaszewski , Thomas Zimmermann , Maxime Ripard , David Airlie , dri-devel@lists.freedesktop.org, Douglas Anderson , linux-kernel@vger.kernel.org Subject: [PATCH v3 15/16] drm/panel-simple-edp: Don't re-read the EDID every time we power off the panel Date: Wed, 1 Sep 2021 13:19:33 -0700 Message-Id: <20210901131531.v3.15.Ib810fb3bebd0bd6763e4609e1a6764d06064081e@changeid> X-Mailer: git-send-email 2.33.0.259.gc128427fd7-goog In-Reply-To: <20210901201934.1084250-1-dianders@chromium.org> References: <20210901201934.1084250-1-dianders@chromium.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- Changes in v3: - ("Don't re-read the EDID every time") moved to eDP only patch. drivers/gpu/drm/panel/panel-simple-edp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-simple-edp.c b/drivers/gpu/drm/panel/panel-simple-edp.c index 5d58dc25ddf5..90ba146426e4 100644 --- a/drivers/gpu/drm/panel/panel-simple-edp.c +++ b/drivers/gpu/drm/panel/panel-simple-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; }