From patchwork Thu Oct 12 17:55:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10002469 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 1088A60216 for ; Thu, 12 Oct 2017 17:56:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04BC228E57 for ; Thu, 12 Oct 2017 17:56:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDCC928E5D; Thu, 12 Oct 2017 17:56:43 +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 2579A28E57 for ; Thu, 12 Oct 2017 17:56:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2EDD6E8FF; Thu, 12 Oct 2017 17:56:36 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-x235.google.com (mail-qt0-x235.google.com [IPv6:2607:f8b0:400d:c0d::235]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDF8C6E8FF for ; Thu, 12 Oct 2017 17:56:35 +0000 (UTC) Received: by mail-qt0-x235.google.com with SMTP id v41so4925207qtv.12 for ; Thu, 12 Oct 2017 10:56:35 -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=joHWh95FEgx+XfZ2xc8w5CmcknD9Akp2L6FD5TUh0RU=; b=TyldImxtXex71bffUXA/Sjq4jhxRX0yQ7BudnTTZ/MzkiVQvr9TS0afotDJITHKW9p jfR7WWus9eupnDVu8FhFBTIIs5tnIgkam7ZYMKxrx2sgYY+GuVTcMNtXAfMu8ARPur5s 82M5HcArvSXjhcWBFg5JproKUhaRefbquN83o= 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=joHWh95FEgx+XfZ2xc8w5CmcknD9Akp2L6FD5TUh0RU=; b=StGSvRXZ3r8s6C7Srmoi/d+jSsOhpP3psYF98chf0MuNReEENsz3icJpWjuq78Xxe5 DRkUS3W7gjCzorgpxOqIHFNhEzN68dUopA5aOdwhu3Sd3tMufWEkls0E5T0wTebG7eZE pJG1ur7mzsrlE488JTqXG1xDK7uAWyKRPMm6SjKxOjRCoo7yPJkvZlNV0gAU6CYbVnwB VbYLltk9tWojAvL3ug4BqdzwIwey9BZ7u/AIeyOj0iHN9ukuwAsDaAKugvbh0zP5sT2d 93VHzXN69PkNDENsEgeipObpHW1QypoXKub8gaoeXeP4H4SDHb+hLUId/RL0uVFnrRVg 3kqA== X-Gm-Message-State: AMCzsaWUYFdQXdENhgTeO0WZ8vu8tsOouraMyo1sPsZhk19YkB4TLRUf bh3weUR1EYxIE4Bbg9bmya6J2i201d0= X-Google-Smtp-Source: AOwi7QC1eAFL7qKpRGwZBFp4J8uyhtM/z24GbRE8fs0acWCoc7uT3ryRuAVkj7/i7rjf+upNb9TqCQ== X-Received: by 10.37.197.147 with SMTP id v141mr2229302ybe.125.1507830990913; Thu, 12 Oct 2017 10:56:30 -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.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Oct 2017 10:56:30 -0700 (PDT) From: Sean Paul To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 07/10] drm/panel: 43wvf1g: Remove enabled/prepared state Date: Thu, 12 Oct 2017 13:55:34 -0400 Message-Id: <20171012175546.21323-8-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-seiko-43wvf1g.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c index 71c09ed436ae..51785774efd1 100644 --- a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c +++ b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c @@ -44,8 +44,6 @@ struct seiko_panel_desc { struct seiko_panel { struct drm_panel base; - bool prepared; - bool enabled; const struct seiko_panel_desc *desc; struct backlight_device *backlight; struct regulator *dvdd; @@ -126,17 +124,12 @@ static int seiko_panel_disable(struct drm_panel *panel) { struct seiko_panel *p = to_seiko_panel(panel); - if (!p->enabled) - return 0; - if (p->backlight) { p->backlight->props.power = FB_BLANK_POWERDOWN; p->backlight->props.state |= BL_CORE_FBBLANK; backlight_update_status(p->backlight); } - p->enabled = false; - return 0; } @@ -144,9 +137,6 @@ static int seiko_panel_unprepare(struct drm_panel *panel) { struct seiko_panel *p = to_seiko_panel(panel); - if (!p->prepared) - return 0; - regulator_disable(p->avdd); /* Add a 100ms delay as per the panel datasheet */ @@ -154,8 +144,6 @@ static int seiko_panel_unprepare(struct drm_panel *panel) regulator_disable(p->dvdd); - p->prepared = false; - return 0; } @@ -164,9 +152,6 @@ static int seiko_panel_prepare(struct drm_panel *panel) struct seiko_panel *p = to_seiko_panel(panel); int err; - if (p->prepared) - return 0; - err = regulator_enable(p->dvdd); if (err < 0) { dev_err(panel->dev, "failed to enable dvdd: %d\n", err); @@ -182,8 +167,6 @@ static int seiko_panel_prepare(struct drm_panel *panel) goto disable_dvdd; } - p->prepared = true; - return 0; disable_dvdd: @@ -195,17 +178,12 @@ static int seiko_panel_enable(struct drm_panel *panel) { struct seiko_panel *p = to_seiko_panel(panel); - if (p->enabled) - return 0; - if (p->backlight) { p->backlight->props.state &= ~BL_CORE_FBBLANK; p->backlight->props.power = FB_BLANK_UNBLANK; backlight_update_status(p->backlight); } - p->enabled = true; - return 0; } @@ -254,8 +232,6 @@ static int seiko_panel_probe(struct device *dev, if (!panel) return -ENOMEM; - panel->enabled = false; - panel->prepared = false; panel->desc = desc; panel->dvdd = devm_regulator_get(dev, "dvdd");