Received: by 10.223.176.46 with SMTP id f43csp682363wra; Fri, 26 Jan 2018 05:19:27 -0800 (PST) X-Google-Smtp-Source: AH8x225CNRjOfQyyJ/2hTGUi7uwUqT+ZeGdFjHYUfA9+PubCd9uYeKNRu9a1qs2NmSa6/WqCS2GY X-Received: by 10.101.101.19 with SMTP id x19mr16447564pgv.347.1516972767836; Fri, 26 Jan 2018 05:19:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516972767; cv=none; d=google.com; s=arc-20160816; b=rWFpOy1rfwO14VKlzLO6l4ZiuHuqcmGXTMkj/Ze7p6ZMODj9MtiZC8vgnW+C4sJyEt fEF7KkII1+c6m82Hv0/IEfR+R3B9r6g9HPxlxoNwQ5U7OiabcolFW6tzNU7DBM9ah8iZ wyOPj15hFE6v0pydYkzV9o+UfOUzJRccEUbir+6ue8MABjm9YpW4PXE4unHlFWpt9Ql8 mW65sQkpkx4pGqwhIe1TCM2BnCjBGpJSZGUowsaCYc41O6nVBc8E7vhmh+vRKN5YV7/j jCLLSuxDgPg1X1AYDsx0ktbPL7BvKoAvJk2m0qxOAd8jUP6/VESQHVY6Ss0LpP3TYyho 00dg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfert-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=GrSg55xiO5OAdQfaXqpPImzfrjBmKIzfkb6ru4w6AGU=; b=TgH69iAIdx3XbxnBJX3F3AV0h1lijUz2+SSTPaNzRNi66tgED7ghS0xBOZL3HEFjjK VV3xixQeoivdjQdcCAqaYrpxoYxV/FSXXHjKcxGBbo3KZSq4qotCLrsmMH4fyWOjZLRW LvtGT4nyCd04mlb3c1swzFVfyYaKmKIebFOtsa0CflQ2dVE5a5y1n8XQ0zD3tmSX2+FK Vy7r/mZ3d1xhEO0BcarQcp2Y1Im5FKl3zxRTZMfr+vzmO8leAmSZqMNWPDXCJwClbv/J 7QgyYsWmeoqnkZ9LYj6947SyHSVaoosrTjC7wdpK6sQToZjl98tYOfaONCMQFkGNz64h 079Q== 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 q10-v6si3830151pli.698.2018.01.26.05.19.13; Fri, 26 Jan 2018 05:19:27 -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 S1752543AbeAZNSX (ORCPT + 99 others); Fri, 26 Jan 2018 08:18:23 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:35036 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752515AbeAZNSJ (ORCPT ); Fri, 26 Jan 2018 08:18:09 -0500 Received: from localhost.localdomain (unknown [IPv6:2a01:e35:8a7e:4790:a8d7:ca4:7b4f:7f87]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tescande) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 10ED4274EE1; Fri, 26 Jan 2018 13:18:08 +0000 (GMT) From: Thierry Escande To: Archit Taneja , Inki Dae , Thierry Reding , Sandy Huang , Sean Paul , David Airlie , Tomasz Figa Cc: Haixia Shi , =?UTF-8?q?=C3=98rjan=20Eide?= , Zain Wang , Yakir Yang , Lin Huang , Douglas Anderson , Mark Yao , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 43/43] drm/rockchip: psr: Remove flush by CRTC Date: Fri, 26 Jan 2018 14:17:10 +0100 Message-Id: <20180126131710.7622-44-thierry.escande@collabora.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180126131710.7622-1-thierry.escande@collabora.com> References: <20180126131710.7622-1-thierry.escande@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset = "utf-8" Content-Transfert-Encoding: 8bit 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 --- 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.14.1