Received: by 10.192.165.148 with SMTP id m20csp3274939imm; Mon, 23 Apr 2018 03:53:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx48WYmnxkdlGl6yU4BU5/CEdagO+r+ogKf0lM6FO+T5o5kyRWYsAUgGi8XF5R5EpPKzpmZGX X-Received: by 10.98.208.195 with SMTP id p186mr19574492pfg.250.1524480800060; Mon, 23 Apr 2018 03:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524480800; cv=none; d=google.com; s=arc-20160816; b=g1zxOvXd7jqjHB32hkSponRlezzaIwWVieFaX8e5PdOOhiI7t6OBEj3ow6YydiH1bk Z1EgN5e6FJ/2by93W63m/07/ly2SmpYYmQm65YG/T8KyF0XY5COa3okfzpE+m2XtWrYx 7xsAj/Prln+N0tCoZ5UlhVvWK9nvgpfv+mVkpce/EpwBZ+p5GsXB9gVUcuZ7jBtZj0W2 Ysx8cSduydxRiU/L2ufTkfZKqRGsnj6m1WWY1YXSh2efBz6LCWCV7dllJ+Q6XGco/bj6 z3GLlf+IjXYptYala/ZuLX3d9v9/HPH9YY1B98AVfn8rH+gnsjRqw8Q2xxEs7mXA9J97 YrZg== 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=NIvg/qY6hEavUsZFOjFh/jsbCVfEqsZb4ICqA3tvWvM=; b=i9EoHhg1VLRCc8Ich+VSm/BtkG8w2zoPru8fU7HedG0em7tgVlLGh4OUFaoi8F2Xj2 rVH7uY2AyIQoyb8JP6ZW8ByeFrjkOPhAbsxM1fufhIQ5e227cB4PZiBDmbhpZpBiu/GS kxhXK2b23zNIXRS0g5KVCIbMidrVpF0S7bhq+/k+rwCzoMch36n1lBMZDNObZOmnRdjh OXTS0vn7MT1lkhtRqjmeSdH0AF0DOntqCTurg//hVO+8fkKmXFOu4rm8hvKlcjkZW7dE pfwXgF1ns1RGDHg0pShyku+0i2yhsI7r4lUl5LFdUkxRatgbm8M0FPfi+pgJFE79csCr MfTQ== 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 n17si10284572pfa.187.2018.04.23.03.53.05; Mon, 23 Apr 2018 03:53:20 -0700 (PDT) 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 S1755178AbeDWKvg (ORCPT + 99 others); Mon, 23 Apr 2018 06:51:36 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39196 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755184AbeDWKvQ (ORCPT ); Mon, 23 Apr 2018 06:51:16 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 7818C277B9A 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, 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, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, 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: [RESEND PATCH v6 27/27] drm/rockchip: psr: Remove flush by CRTC Date: Mon, 23 Apr 2018 12:50:03 +0200 Message-Id: <20180423105003.9004-28-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180423105003.9004-1-enric.balletbo@collabora.com> References: <20180423105003.9004-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 Reviewed-by: Andrzej Hajda --- 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 74f6a6a887dd..79d00d861a31 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c @@ -33,23 +33,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; @@ -166,24 +149,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.17.0