From patchwork Thu Oct 12 17:55:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10002461 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 9AEE460216 for ; Thu, 12 Oct 2017 17:56:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DF0728E57 for ; Thu, 12 Oct 2017 17:56:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 830AB28E5D; Thu, 12 Oct 2017 17:56:22 +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 B006F28E57 for ; Thu, 12 Oct 2017 17:56:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 858D36E8EE; Thu, 12 Oct 2017 17:56:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x229.google.com (mail-qt0-x229.google.com [IPv6:2607:f8b0:400d:c0d::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6F58F6E8EE for ; Thu, 12 Oct 2017 17:56:16 +0000 (UTC) Received: by mail-qt0-x229.google.com with SMTP id k31so15128549qta.6 for ; Thu, 12 Oct 2017 10:56:16 -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=mpavSe738tpudPBqhQcq5xTuvNlCYwEY659rPw272qQ=; b=KzwoHvzeURj/z7vR0i2tYZ63Ui2Dg5/VehGXZEEYpZj0SXDCB/9YjNgYfQ7STSf5t6 jEcJOkgpOSr7bNHry3OsXUGOfR1PIS03MkMDjb9v22Az30CzeynuazfbYFEBbVMMUwGt 9PsHwZsCYDqrcfF68e0Ev+8drWttlxrYxGqN8= 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=mpavSe738tpudPBqhQcq5xTuvNlCYwEY659rPw272qQ=; b=FydHAT35myGQcWdreZ48UeMhN4A8bL/VOPYlLZm3adBJ2D6CoR7PkBozrusUclUbCG 1UkpwCD4gYGokslVnO8RCHXvK6suGKSJLYEpr4D47hns5zNVirkEzaRShF2MhEHvpHZQ kQN8BAtMn/5T23TPtRF4rTeCSnXgjW61kiXCF3Okxs5AsDgX4vXp4nTKRQnpzyHPkR8e VQCnSEECdnaDX3oVpOGiZXE8gq8Gt2BNFZYeOR0j45g8+NbFVcaPbEVDU3i42sGGNxiq FHqzr5FX1jCct20V8uQjfsQB7a0NEUSpV6SCFbrb+6++Igk19H+0I22fHsP07GbeK+WI B69A== X-Gm-Message-State: AMCzsaV3Zxi1rJg87HZ8371IpjCgKR1bRz7oN8v4fhdvgC8nCRh/BByd /IdFGuRBF+tGqRH2W08Bm0t8l2oX0+g= X-Google-Smtp-Source: AOwi7QBFDWQ0/SIJ0MXDWSy7v3j0aBqDOzT/wmBmtJu0gd8FpJxeKbgLveLRaOss4mXkPdwP6lso8Q== X-Received: by 10.37.21.129 with SMTP id 123mr2311935ybv.23.1507830974234; Thu, 12 Oct 2017 10:56:14 -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.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 10:56:13 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 03/10] drm/panel: lt070me05000: Remove enabled/prepared state Date: Thu, 12 Oct 2017 13:55:30 -0400 Message-Id: <20171012175546.21323-4-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-jdi-lt070me05000.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c index 5b2340ef74ed..2f2455650258 100644 --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -50,9 +50,6 @@ struct jdi_panel { struct gpio_desc *dcdc_en_gpio; struct backlight_device *backlight; - bool prepared; - bool enabled; - const struct drm_display_mode *mode; }; @@ -189,14 +186,9 @@ static int jdi_panel_disable(struct drm_panel *panel) { struct jdi_panel *jdi = to_jdi_panel(panel); - if (!jdi->enabled) - return 0; - jdi->backlight->props.power = FB_BLANK_POWERDOWN; backlight_update_status(jdi->backlight); - jdi->enabled = false; - return 0; } @@ -206,9 +198,6 @@ static int jdi_panel_unprepare(struct drm_panel *panel) struct device *dev = &jdi->dsi->dev; int ret; - if (!jdi->prepared) - return 0; - jdi_panel_off(jdi); ret = regulator_bulk_disable(ARRAY_SIZE(jdi->supplies), jdi->supplies); @@ -221,8 +210,6 @@ static int jdi_panel_unprepare(struct drm_panel *panel) gpiod_set_value(jdi->dcdc_en_gpio, 0); - jdi->prepared = false; - return 0; } @@ -232,9 +219,6 @@ static int jdi_panel_prepare(struct drm_panel *panel) struct device *dev = &jdi->dsi->dev; int ret; - if (jdi->prepared) - return 0; - ret = regulator_bulk_enable(ARRAY_SIZE(jdi->supplies), jdi->supplies); if (ret < 0) { dev_err(dev, "regulator enable failed, %d\n", ret); @@ -264,8 +248,6 @@ static int jdi_panel_prepare(struct drm_panel *panel) goto poweroff; } - jdi->prepared = true; - return 0; poweroff: @@ -286,14 +268,9 @@ static int jdi_panel_enable(struct drm_panel *panel) { struct jdi_panel *jdi = to_jdi_panel(panel); - if (jdi->enabled) - return 0; - jdi->backlight->props.power = FB_BLANK_UNBLANK; backlight_update_status(jdi->backlight); - jdi->enabled = true; - return 0; }