From patchwork Thu Oct 12 17:55:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10002473 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 72C4860216 for ; Thu, 12 Oct 2017 17:56:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6663428E5B for ; Thu, 12 Oct 2017 17:56:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5B0F728E5D; Thu, 12 Oct 2017 17:56:58 +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 860D828E61 for ; Thu, 12 Oct 2017 17:56:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DC0F66E908; Thu, 12 Oct 2017 17:56:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) by gabe.freedesktop.org (Postfix) with ESMTPS id E125F6E908 for ; Thu, 12 Oct 2017 17:56:46 +0000 (UTC) Received: by mail-qt0-x233.google.com with SMTP id f8so15156373qta.5 for ; Thu, 12 Oct 2017 10:56:46 -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=VjWizWvZUXW/zXRUOQLo3vtAZ9mGhz3qCtxCb4a4ddg=; b=BhQyFpRhxBqnSbaaYCFjJnBreCJBLW6DAO+zEDGzPXA45RHuwoR0/KgP7M4/CrrrOV ivTqCqGsi719UZmAeuUy8Jdg3SRNP8iwEWf2lpR1QvHgdoseCNmmQrrlifzY1sKQSPC3 u/0fz20uWO1Y6MlN7hZ3uJJ9qfqFhq7eAVvSY= 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=VjWizWvZUXW/zXRUOQLo3vtAZ9mGhz3qCtxCb4a4ddg=; b=c9zPQi2lLojMPH8iE4CRnwFfN39yWeVTBeiDlgCUNosudJvMZqtY348XqQM/BRzpYT PckYYxMxwJnHVqXDQlmUa4P9jgrJcvUwmTWyhEXj8sqGWah9wzzAgBnHewgNzuYTrjqC FtVXxdxVvGYBm53AdiAX7s21o8AItPa9LWUofYKLBxVbipO5CvLTNN8IzPAee8yW2A+p mjdCZEXsg4jojmG2S463YYOTSi/q5eowLbS7En9GLk4/Vs5CYbLucBmvY9pwahxfvWZr 4qRl6Tckhn3Sf/yaomogwYk3QTERr42ltAf8ww3e+NT5HnV7iCYK7mzFopQQ71pfhHS6 HHwA== X-Gm-Message-State: AMCzsaV+jfPKGpxLSiBmhD+QZUlRfGL5mbUAeVxLHACXTtkNLYmXZfWj Xfqg9Zm3wF7z603g3PQz2K+gFJB80qQ= X-Google-Smtp-Source: AOwi7QBhevEcbx62vhCMJLZRsQiK+3PTApXD354foHpGN5jzjykvJdkQjOUgaxGSeTbz52IeQY3IcQ== X-Received: by 10.129.155.216 with SMTP id s207mr2269777ywg.77.1507831002861; Thu, 12 Oct 2017 10:56:42 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:0:f685:3152:9ba1:429a]) by smtp.gmail.com with ESMTPSA id x140sm5853087ywd.60.2017.10.12.10.56.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 10:56:42 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 09/10] drm/panel: p079zca: Remove enabled/prepared state Date: Thu, 12 Oct 2017 13:55:36 -0400 Message-Id: <20171012175546.21323-10-seanpaul@chromium.org> X-Mailer: git-send-email 2.15.0.rc0.271.g36b669edcc-goog In-Reply-To: <20171012175546.21323-1-seanpaul@chromium.org> References: <20171012175546.21323-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 --- 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; }