Received: by 10.213.65.68 with SMTP id h4csp1733923imn; Thu, 5 Apr 2018 02:54:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/KxXm44bubQVWVcllVKpAx5G9rROizDKB3iK03XZxw7GXDz9CfQa8nBMtEPB5AktzJBUAN X-Received: by 10.99.56.8 with SMTP id f8mr14476390pga.374.1522922049442; Thu, 05 Apr 2018 02:54:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522922049; cv=none; d=google.com; s=arc-20160816; b=hzM4XwnJ1yolXBRJA2ReAgotgUZ7K5INGYeD2mPHPtryeXfV2cFt3ShfWi+OShiKPA AEgqCu2WoD4jFjhLT62xih6Mmt6cD+6t3eHm/msGDyKdPIgwW5+MLZZrkvGijVJbbmoP lomDC8UpUFp0lvxzCovAc4Jl67WHWvXEJ6529ISff66orIN9QU0oKLQPmtWpvyEXh5Ng hQSaZ5SwF9O7tSu497xuNhxaYC6cM9VMjyNwduNm2hFLB+MssBybo8rLikvxSTBRfkuI VdQeINrr9eLpFMPudm/QzDGNqO23oaCUd5Q76V+nqbbYjVDwQanqRvGbrH60UtnF5MKX /9Zw== 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=pK6/WaOQQIMjd8GhsIzMV9n7zq/Vx+7SNtYlIWHrmt4=; b=feNz3exe0nfEWpz8zF2kn2UMOMCMhBzOOEyjxo3vBVWYeMnUSwDFswBs9p0lqDTKtB uqjozuCXn/jDXkVlzseK1nJv9o+pIgPQgb+Mv6ZHj5cG0BHfCsmp6RmoUdG0gsrh146D SS5EnuhI30qhETrKEv0P5pwbzXCGPpBcWwTCy0I0aZueB6pNdCUctMeiYYVtGywUcYkw PJc8xCWTJ+ta8YFFk/XX7E+bXHea7WHUChWQrGYDGBOovP1C8luiynMVotmZ/b4B7yu/ NzPjh/fdC3NrFgAkqggbRN1CLC9fae417/QusRpEvM+n/jsdj0CcgzN4MsOLgOlD8ck6 WMGA== 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 f3si5077964pgq.625.2018.04.05.02.53.54; Thu, 05 Apr 2018 02:54:09 -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 S1752565AbeDEJwU (ORCPT + 99 others); Thu, 5 Apr 2018 05:52:20 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:33050 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752318AbeDEJvT (ORCPT ); Thu, 5 Apr 2018 05:51:19 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 8AC9827AF06 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 v6 30/30] drm/rockchip: psr: Remove flush by CRTC Date: Thu, 5 Apr 2018 11:50:00 +0200 Message-Id: <20180405095000.9756-31-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180405095000.9756-1-enric.balletbo@collabora.com> References: <20180405095000.9756-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.3