From patchwork Tue Oct 17 21:13:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10012875 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 F07BB600CC for ; Tue, 17 Oct 2017 21:14:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2F7328A3F for ; Tue, 17 Oct 2017 21:14:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D7EA028A41; Tue, 17 Oct 2017 21:14:08 +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 6FA3C28A3F for ; Tue, 17 Oct 2017 21:14:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34B916E785; Tue, 17 Oct 2017 21:14:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-it0-x22a.google.com (mail-it0-x22a.google.com [IPv6:2607:f8b0:4001:c0b::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 51AB96E785 for ; Tue, 17 Oct 2017 21:14:06 +0000 (UTC) Received: by mail-it0-x22a.google.com with SMTP id p138so4240128itp.2 for ; Tue, 17 Oct 2017 14:14:06 -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=effz18TNVIyfFBJ8GEY/y/8DZLp1qXhEunzUHUADd6M=; b=mT9KSeD6ukg+0R89VsXSVBViJjpdsgUQbHl3EhHGv9BwDDMLXjp46sVBBvW1nGKoIL zjL+f62DExo+0OJRw6y3ARbI+yHKfhLRyWhv+NkPBd3WfL7wnBS1uJr2MrhYmt7sGE96 M8IxCc2rAblsX0t9JkuLZLYvKIbg49Bs83sGk= 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=effz18TNVIyfFBJ8GEY/y/8DZLp1qXhEunzUHUADd6M=; b=op8mJfDKvNOrmMsZ0lL4IK2nRGKdVQJwIG/QE/ZPruIk07NGsVatoaJMCJLAAFPgii gwVQ2zr+064DtdkL0jJ1c41TrpmI2hz8p0V+GFxau8GEeDAVUNCEUhDFGNzNATXl8gX3 D8h/JkMRKQrmpnwymTf0GZFL5WXrHcdbOtvVzaJf/p+Bj1l5DldW9anRThYokcXsbwrT GLqAJ0HF63uJM0ilJMT9ZouodbU/Inp6myQ46DpkBL5FuI/Cj0nWUgkVE+24sIPf0Ot9 6Dj3oDxAr5USzdEGRYmgyqFWu3Tao+9Xl6UbROrIa1fN1mNHGUiOzO7W+4N946cBt4m5 UPVg== X-Gm-Message-State: AMCzsaVQmT0S1i2+ovpcePfUgE/N4czgXwKxjDtoKLLrvrJEtFNqa1TL HLxXwhND06iBIeNdeCBfGmdYu7Am81Q= X-Google-Smtp-Source: ABhQp+RFKkIJiugSBI2bvhOzk41w08C9Ncq2vti2Gq7/uLuhV20OR0ZHK1lv+nIsyuOhBkoaNPMiOg== X-Received: by 10.36.178.19 with SMTP id u19mr6873100ite.64.1508274845561; Tue, 17 Oct 2017 14:14:05 -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.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Oct 2017 14:14:05 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v3 06/12] drm/panel: lq101r1sx01: Remove enabled/prepared state Date: Tue, 17 Oct 2017 17:13:09 -0400 Message-Id: <20171017211321.7992-7-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-sharp-lq101r1sx01.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index 3cce3ca19601..9b447b0bfcd0 100644 --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c @@ -28,9 +28,6 @@ struct sharp_panel { struct backlight_device *backlight; struct regulator *supply; - bool prepared; - bool enabled; - const struct drm_display_mode *mode; }; @@ -93,16 +90,11 @@ static int sharp_panel_disable(struct drm_panel *panel) { struct sharp_panel *sharp = to_sharp_panel(panel); - if (!sharp->enabled) - return 0; - if (sharp->backlight) { sharp->backlight->props.power = FB_BLANK_POWERDOWN; backlight_update_status(sharp->backlight); } - sharp->enabled = false; - return 0; } @@ -111,9 +103,6 @@ static int sharp_panel_unprepare(struct drm_panel *panel) struct sharp_panel *sharp = to_sharp_panel(panel); int err; - if (!sharp->prepared) - return 0; - sharp_wait_frames(sharp, 4); err = mipi_dsi_dcs_set_display_off(sharp->link1); @@ -128,8 +117,6 @@ static int sharp_panel_unprepare(struct drm_panel *panel) regulator_disable(sharp->supply); - sharp->prepared = false; - return 0; } @@ -173,9 +160,6 @@ static int sharp_panel_prepare(struct drm_panel *panel) u8 format = MIPI_DCS_PIXEL_FMT_24BIT; int err; - if (sharp->prepared) - return 0; - err = regulator_enable(sharp->supply); if (err < 0) return err; @@ -244,8 +228,6 @@ static int sharp_panel_prepare(struct drm_panel *panel) goto poweroff; } - sharp->prepared = true; - /* wait for 6 frames before continuing */ sharp_wait_frames(sharp, 6); @@ -260,16 +242,11 @@ static int sharp_panel_enable(struct drm_panel *panel) { struct sharp_panel *sharp = to_sharp_panel(panel); - if (sharp->enabled) - return 0; - if (sharp->backlight) { sharp->backlight->props.power = FB_BLANK_UNBLANK; backlight_update_status(sharp->backlight); } - sharp->enabled = true; - return 0; }