From patchwork Thu Sep 21 17:06:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 9964421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3D176020C for ; Thu, 21 Sep 2017 17:07:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B02D1294DE for ; Thu, 21 Sep 2017 17:07:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A51FB294E4; Thu, 21 Sep 2017 17:07:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 52D8D295FF for ; Thu, 21 Sep 2017 17:07:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AAD136E12E; Thu, 21 Sep 2017 17:07:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x232.google.com (mail-pf0-x232.google.com [IPv6:2607:f8b0:400e:c00::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D0506E12E for ; Thu, 21 Sep 2017 17:07:41 +0000 (UTC) Received: by mail-pf0-x232.google.com with SMTP id g65so3501087pfe.13 for ; Thu, 21 Sep 2017 10:07:41 -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; bh=ONcpfXNWfpg3o9E8DZR2VUI9vtvJVMnt/qye6y/xcZg=; b=kioCTBwtkVxppVIv/kllgVWzKlWmxmXrd4XZe+XSyB/fQ679QRrEq4h0iDTOy8om3l NMQ827Vg6ozElTUcAkcIHdrFcxRB01IiNDZ4utYtZrDMoKMlEVdmY4wBGlp1NS7QzjzP ckGU1vgOPUQoARFaBt+yv5BQldPhxarj5Uesw= 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; bh=ONcpfXNWfpg3o9E8DZR2VUI9vtvJVMnt/qye6y/xcZg=; b=ZtBn8lsKfONTwmkpol+w/Kp6DgK7+t/5n6QdFrlT6laBsEXAL1bo0pFXctqQ/b+yr0 s01En3kKBLllljRSFf2KAdc2NTlHCLwe+COnlSkxo5ruaNFpv+TU7DSlc/dFfad3MbEk tCT1OmE+gwy4XLM2uar4uldzbIlfQckQ++49jXg55+qedassi/Q0wqay0Osuik5Bg2OT WEx7im5zU+60fyUouh+tT93emNrr+E2b/akC+IV0E56PjeL3wWcr2oq0nwwzJtkuuscm b3qVMRMNALsSJedT9FbUSnOpNbdhWBrenKIoat8QA/ejt8hFkmONlFTOzg7TCgClPwGM B2WQ== X-Gm-Message-State: AHPjjUjPjes+lWAd4I+ci7F9CyFYNVyGuW8vzU/7t0a0ZL3uQGgjYkZq pAjFcnd1L59JaFCqPxlr1RLu7yhD9LY= X-Google-Smtp-Source: AOwi7QAXl35CRUfPGpsfXIwBcBaLvv9542W9zZ+1j1zrTh1RdxZxepX6ipnxJZ212pqIiahOtqvDsQ== X-Received: by 10.98.74.74 with SMTP id x71mr6405958pfa.236.1506013660374; Thu, 21 Sep 2017 10:07:40 -0700 (PDT) Received: from trickycodes.corp.google.com ([172.19.15.95]) by smtp.gmail.com with ESMTPSA id l86sm3317481pfg.155.2017.09.21.10.07.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 10:07:39 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 09/10] drm/panel: p079zca: Remove enabled/prepared state Date: Thu, 21 Sep 2017 10:06:20 -0700 Message-Id: <20170921170638.27031-10-seanpaul@chromium.org> X-Mailer: git-send-email 2.14.1.821.g8fa685d3b7-goog In-Reply-To: <20170921170638.27031-1-seanpaul@chromium.org> References: <20170921170638.27031-1-seanpaul@chromium.org> Cc: Thierry Reding X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP They're not necessary for atomic drivers, and drm_panel will WARN if the calls are unbalanced Signed-off-by: Sean Paul --- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index 6ba93449fcfb..38b19c8de9e1 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -27,9 +27,6 @@ struct innolux_panel { struct backlight_device *backlight; struct regulator *supply; struct gpio_desc *enable_gpio; - - bool prepared; - bool enabled; }; static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel) @@ -42,9 +39,6 @@ static int innolux_panel_disable(struct drm_panel *panel) struct innolux_panel *innolux = to_innolux_panel(panel); int err; - if (!innolux->enabled) - return 0; - innolux->backlight->props.power = FB_BLANK_POWERDOWN; backlight_update_status(innolux->backlight); @@ -53,8 +47,6 @@ static int innolux_panel_disable(struct drm_panel *panel) DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n", err); - innolux->enabled = false; - return 0; } @@ -63,9 +55,6 @@ static int innolux_panel_unprepare(struct drm_panel *panel) struct innolux_panel *innolux = to_innolux_panel(panel); int err; - if (!innolux->prepared) - return 0; - err = mipi_dsi_dcs_enter_sleep_mode(innolux->link); if (err < 0) { DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n", @@ -82,8 +71,6 @@ static int innolux_panel_unprepare(struct drm_panel *panel) if (err < 0) return err; - innolux->prepared = false; - return 0; } @@ -92,9 +79,6 @@ static int innolux_panel_prepare(struct drm_panel *panel) struct innolux_panel *innolux = to_innolux_panel(panel); int err, regulator_err; - if (innolux->prepared) - return 0; - gpiod_set_value_cansleep(innolux->enable_gpio, 0); err = regulator_enable(innolux->supply); @@ -129,8 +113,6 @@ static int innolux_panel_prepare(struct drm_panel *panel) /* T7: 5ms */ usleep_range(5000, 6000); - innolux->prepared = true; - return 0; poweroff: @@ -148,9 +130,6 @@ static int innolux_panel_enable(struct drm_panel *panel) struct innolux_panel *innolux = to_innolux_panel(panel); int ret; - if (innolux->enabled) - return 0; - innolux->backlight->props.power = FB_BLANK_UNBLANK; ret = backlight_update_status(innolux->backlight); if (ret) { @@ -159,8 +138,6 @@ static int innolux_panel_enable(struct drm_panel *panel) return ret; } - innolux->enabled = true; - return 0; }