From patchwork Tue Oct 17 21:13:14 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10012885 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 30D5E600CC for ; Tue, 17 Oct 2017 21:14:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 236F828560 for ; Tue, 17 Oct 2017 21:14:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1864E286D2; Tue, 17 Oct 2017 21:14:36 +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 C8C9128560 for ; Tue, 17 Oct 2017 21:14:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 387ED6E798; Tue, 17 Oct 2017 21:14:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id 273C36E797 for ; Tue, 17 Oct 2017 21:14:22 +0000 (UTC) Received: by mail-it0-x233.google.com with SMTP id p138so4240923itp.2 for ; Tue, 17 Oct 2017 14:14:22 -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=7sr9nHyP4N3SKebGxKSUkO0Fu1Ebn7IAcYAaAghWkxU=; b=U2pXe0elXx7QlLtGTJlL2gULdTpIMKczvIUxcCCMLX8rIIJqzz8CbdKE2Wrdx2KIQ/ NhQh6Z5qut/8hZLNx+Tl3K1hAlBoSErbUDXeq81vN1v1Zr5CY+P7naaQ+3BuPabPyDgF LD/fUUNtc4eD1rtbYQ1msRibBf+JJUAoIOyEA= 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=7sr9nHyP4N3SKebGxKSUkO0Fu1Ebn7IAcYAaAghWkxU=; b=hjtvHHekSnIy8zthiJbZt0HSRE9WT9X04b+vZDhN/dwPCszU6cXyKGYCz5P/lWYSXv 4MQCot4UdOlJQrVWyddKrMsyS9kreeCcrqeI9U2iH/2JJeOJYbempahvdsi2mbqr9ILG JzGNs7A0IwtEeF3KlOrxUZM1RvgGZQR4MPeFJBt+kL8pPi4pFrJ+9x61CJUH3+MZoKZd RTD00gE4BMAZ7nhCqBqJO38uVTUodzKDwkwoefaVMr+5pTO4zh+NdeNIDZGGpuUCqIRs DowN4DsHQXpmpaLNwdCLkakCa7znwxQz0K5vmhN9lUHI10wj78rBI+uUIaO/q/45T1Su nY8w== X-Gm-Message-State: AMCzsaWJ0RHxSBUwlU0K9ttPkAvW/t15ztRfKuu/XjYqRDYrNlLcQ5ft 4iswsiN68IHfGAUV6n2+rUOuUzQKfXI= X-Google-Smtp-Source: ABhQp+TW2GYvGRy3Sv/UY1yYDPkrQNUujQpyx2Xb6jF+35Tf08bhVVvEvlpUejdzrzp8RPC62i4jKA== X-Received: by 10.36.250.4 with SMTP id v4mr7768716ith.31.1508274862039; Tue, 17 Oct 2017 14:14:22 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:0:f685:3152:9ba1:429a]) by smtp.gmail.com with ESMTPSA id f2sm5220677ioj.73.2017.10.17.14.14.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 14:14:21 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 11/12] drm/panel: p079zca: Remove enabled/prepared state Date: Tue, 17 Oct 2017 17:13:14 -0400 Message-Id: <20171017211321.7992-12-seanpaul@chromium.org> X-Mailer: git-send-email 2.15.0.rc1.287.g2b38de12cc-goog In-Reply-To: <20171017211321.7992-1-seanpaul@chromium.org> References: <20171017211321.7992-1-seanpaul@chromium.org> Cc: thierry.reding@gmail.com 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 --- No changes since v1 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; }