From patchwork Thu Oct 12 17:55:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10002463 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 5301560216 for ; Thu, 12 Oct 2017 17:56:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46E5328E57 for ; Thu, 12 Oct 2017 17:56:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C01A28E62; Thu, 12 Oct 2017 17:56:28 +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 6BDEB28E57 for ; Thu, 12 Oct 2017 17:56:24 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BD81A6E8E0; Thu, 12 Oct 2017 17:56:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x22a.google.com (mail-qt0-x22a.google.com [IPv6:2607:f8b0:400d:c0d::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 40FBB6E8E0 for ; Thu, 12 Oct 2017 17:56:22 +0000 (UTC) Received: by mail-qt0-x22a.google.com with SMTP id 8so15159616qtv.1 for ; Thu, 12 Oct 2017 10:56: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=ClfkFNF6CMaFtJsfv5lk2xxCbwgDjtz7SHgti+3nCC8=; b=A5QjFw88WwNIaNujV8c/Qtcbl+UVJw/cjYGYvlGlfBQ2lSQalBz5rPUPUHSgQwnlo9 Ha/+FTE+Cz5HxFe2yxJINq4PqT+dLs+GL55w9EDGU3v6Y6iDqxDuDpJ9NqL9vMQDWahg 6g+PGpdGmzpEc0cnOsTOUQJ01R4y+VsupPlzs= 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=ClfkFNF6CMaFtJsfv5lk2xxCbwgDjtz7SHgti+3nCC8=; b=G06YWQATv8RElfIjspiEM40XNKPR1yp4hf2LMW3OXlZgz9Qed1IpHeZLyI3diO8VGn RAgonoYcV0ageiEiaMh8h6uNXbYkwYHuJlIo3YDFyrUfAJoP1Tj8LnNKn7HDTTxlnEwA Kpz4S89jUrAO4S61duILOQ8dKoLqIG5pIC2B8xEpne/tzZ8HO7ZjFmHbU6Z9Mvv9V/yd 5THMo4osNHmSabxs5wCjF775VWrIAild9OaomLh8rr6XqPf8YyZuJglRunDY2G+PpD9/ eM7S2OwSVzeTOwUvF9ZYS9/UnmD9XSSbRp84seE6gt8I5hB5zWzVJyWwAgSp+l0lpjX/ Vf0g== X-Gm-Message-State: AMCzsaX8oKZ3ZH533rcT4t2T1qjOI9ngQ76lo4MCWewWo4vfUIUdr82B ql5O62XpTUtpvJCR66L2N5BxY7nBZcA= X-Google-Smtp-Source: AOwi7QDB/oYD83mrSA6wPqpAqFMjPWyTLLxf2DX6rjvhjUQyT7DD05IeXmsigaA3aZz27NYLprAoVw== X-Received: by 10.37.161.227 with SMTP id a90mr1393269ybi.228.1507830978682; Thu, 12 Oct 2017 10:56:18 -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.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 10:56:18 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 04/10] drm/panel: lq101r1sx01: Remove enabled/prepared state Date: Thu, 12 Oct 2017 13:55:31 -0400 Message-Id: <20171012175546.21323-5-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-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; }