Received: by 10.223.185.111 with SMTP id b44csp817900wrg; Fri, 9 Mar 2018 14:26:46 -0800 (PST) X-Google-Smtp-Source: AG47ELvjpvCuE/AN0UfKSl2F01Z1yshXd7eGckBhACqCXHkXGuEbQ3dDseOyGelhkYpjkjfpcjqE X-Received: by 10.99.164.81 with SMTP id c17mr60314pgp.114.1520634406666; Fri, 09 Mar 2018 14:26:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520634406; cv=none; d=google.com; s=arc-20160816; b=GMqWK4rf6xaR9wnq/CZ1s0tlTTPqF29kON8UYAoZECDAH1cvYB4fBJin6E9fyEClKn RTOJFJDZHV8YtXYKCLplWZ8R29hzmxDVtBWqUl0d7Lw7VO19TitUox9jq8/NLpf5bP3w j54KvXX3uRkFivWdX7nxcTTjCBNKTOK109zd4HmiFZjracCONSvmkj3abWFYvkK65Yjh W5x3adG7ikKunym/cqRUnJ3AB0A7PbjlGi0sWGLhTkm248zrFJfSv9vhwnBpJDqHkzUn l6YYFwmnb+ILRRXY4GGc9WKpgjYaxbSCkgNKHw4o+yFDCAo4peJCuCWyThiqcDCKPWQP 2ovA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=wH25beNqu1OqUyKTTuDIIKtD2XttZQuYDJQxhrBpCU4=; b=SConM010d7SMkfM9b/5bnTQhZ0A0r96VSlL1u1ktAPwasWSzHIZU70EbDjOaNTaQ1v +t0SEOWnvJ4OKHxuEa2xLG3m4nkcrW5NeKWb3nfLBLaVTfNViBTk9l2dP2YqjzDZYAcU rReSZYK/qk6VnpQ9wyNzSqRLE1/YHwkQwglR70khvApwMgn3l3IwcNBfb4bvmOSSwg2h QwNr9No//Kt/at4Pe7ELvyjHSeL8v2fHhe1H83/pOB/lhhoCeZ0zTW+nDACqpvfKrY5V Uzg/8mpuGeFraFT2qOSdRxK76vvqpjHslgkikhTbZbDOpFCMgYkbK9zqBVSpFPHl16iP tWQA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si1336210pgs.511.2018.03.09.14.26.32; Fri, 09 Mar 2018 14:26:46 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933296AbeCIWZ0 (ORCPT + 99 others); Fri, 9 Mar 2018 17:25:26 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:43228 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933271AbeCIWZL (ORCPT ); Fri, 9 Mar 2018 17:25:11 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id B2A922792D8 From: Enric Balletbo i Serra To: architt@codeaurora.org, inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org, Enric Balletbo i Serra Subject: [PATCH v5 36/36] drm/rockchip: psr: Remove flush by CRTC Date: Fri, 9 Mar 2018 23:23:27 +0100 Message-Id: <20180309222327.18689-37-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180309222327.18689-1-enric.balletbo@collabora.com> References: <20180309222327.18689-1-enric.balletbo@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tomasz Figa It is not used anymore after last changes and it was not even correct to begin with as it assumed a 1:1 relation between a CRTC and encoder, while in fact a CRTC can be attached to multiple encoders. Signed-off-by: Tomasz Figa Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra Tested-by: Marek Szyprowski --- drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 35 ----------------------------- drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 1 - 2 files changed, 36 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c index 1bf5cba9a64d..b1988ac758d5 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c @@ -40,23 +40,6 @@ struct psr_drv { int (*set)(struct drm_encoder *encoder, bool enable); }; -static struct psr_drv *find_psr_by_crtc(struct drm_crtc *crtc) -{ - struct rockchip_drm_private *drm_drv = crtc->dev->dev_private; - struct psr_drv *psr; - - mutex_lock(&drm_drv->psr_list_lock); - list_for_each_entry(psr, &drm_drv->psr_list, list) { - if (psr->encoder->crtc == crtc) - goto out; - } - psr = ERR_PTR(-ENODEV); - -out: - mutex_unlock(&drm_drv->psr_list_lock); - return psr; -} - static struct psr_drv *find_psr_by_encoder(struct drm_encoder *encoder) { struct rockchip_drm_private *drm_drv = encoder->dev->dev_private; @@ -173,24 +156,6 @@ static void rockchip_drm_do_flush(struct psr_drv *psr) mutex_unlock(&psr->lock); } -/** - * rockchip_drm_psr_flush - flush a single pipe - * @crtc: CRTC of the pipe to flush - * - * Returns: - * 0 on success, -errno on fail - */ -int rockchip_drm_psr_flush(struct drm_crtc *crtc) -{ - struct psr_drv *psr = find_psr_by_crtc(crtc); - if (IS_ERR(psr)) - return PTR_ERR(psr); - - rockchip_drm_do_flush(psr); - return 0; -} -EXPORT_SYMBOL(rockchip_drm_psr_flush); - /** * rockchip_drm_psr_flush_all - force to flush all registered PSR encoders * @dev: drm device diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_psr.h b/drivers/gpu/drm/rockchip/rockchip_drm_psr.h index 40e026c14168..860c62494496 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_psr.h +++ b/drivers/gpu/drm/rockchip/rockchip_drm_psr.h @@ -16,7 +16,6 @@ #define __ROCKCHIP_DRM_PSR___ void rockchip_drm_psr_flush_all(struct drm_device *dev); -int rockchip_drm_psr_flush(struct drm_crtc *crtc); int rockchip_drm_psr_inhibit_put(struct drm_encoder *encoder); int rockchip_drm_psr_inhibit_get(struct drm_encoder *encoder); -- 2.16.1