From patchwork Thu Sep 21 17:06: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: 9964399 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 4A2356056E for ; Thu, 21 Sep 2017 17:07:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 36CB626538 for ; Thu, 21 Sep 2017 17:07:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2BBF32679B; Thu, 21 Sep 2017 17:07:11 +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 DEF5926538 for ; Thu, 21 Sep 2017 17:07:10 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3C4946E8AF; Thu, 21 Sep 2017 17:07:10 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf0-x22f.google.com (mail-pf0-x22f.google.com [IPv6:2607:f8b0:400e:c00::22f]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4E6C36E8AF for ; Thu, 21 Sep 2017 17:07:09 +0000 (UTC) Received: by mail-pf0-x22f.google.com with SMTP id u12so3517658pfl.4 for ; Thu, 21 Sep 2017 10:07:09 -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=Kj5n64A2sR0bWBuMpWMOVtGbJ8T8yret1P3wueuO1h8=; b=bS3e+Y1RRYZemGny6oQBbVPIisjq59o/q5fcfDxDxZ1zT2Hxz+HSZ0qv4P7gUltiHK 6bLHRIEwmrJdyAmABKkbRJkcg/qjgzU0q9gi2ZjElRkHwxC2NdVA2z5ebpL921XqcBBg JT7ELIxkIBzkducov66G7uPhRVHJt84NYL3hA= 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=Kj5n64A2sR0bWBuMpWMOVtGbJ8T8yret1P3wueuO1h8=; b=Umn8GBa/P/wQzYLtyKL59tjPfCqgTiKkLTSHU1N6tLnYK9KjbRypY8mrjMxvmbPTBV 5yXeXknviHb6oxIi9Ud8VjgiVhTMOowNQimJHtUj52A2xo7VNKXbBGj2ThNbbs3xSma2 8LMaJ21mBsj6hlVL03C8Zhfabsx5IVpcbOfd3mwHaiuRvMbgk+J2/YyUZVIyAlvB/mLK hWA/AZ1samzIK9F2M5lYz9GO6eRpoA/Sjx8UeWX0EsT4iYyc2iZjyr4NwMgPnuL+m0ok PH48Dbf1KBg8PWgPuzz1SIqqAdgDz4eNgaA9575+xytmhiV0VAiBgbeGQ0nmGkqdZjCD aoLw== X-Gm-Message-State: AHPjjUjRPDCKDrTdpkaJViNBBb36sKFy9jTIwpaKsb68nmzj6XstsMLB T3EEndqHVTfl75H723oQjzWBHF4FSJE= X-Google-Smtp-Source: AOwi7QD+9PGr+IyUOjM98vhYxqlmjWf08HVI44cM/8jAbF62ZtzHJ6nBF0BgqXoA3QUYt3OyWjxBdQ== X-Received: by 10.98.224.143 with SMTP id d15mr6280784pfm.170.1506013628584; Thu, 21 Sep 2017 10:07:08 -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.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Sep 2017 10:07:07 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH 03/10] drm/panel: lt070me05000: Remove enabled/prepared state Date: Thu, 21 Sep 2017 10:06:14 -0700 Message-Id: <20170921170638.27031-4-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-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; }