Received: by 10.192.165.156 with SMTP id m28csp500154imm; Mon, 16 Apr 2018 04:09:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx49mjPLsQpc3WFLtCyslau9LG6z2HqJiiBLNVUMexrNVWtefA83sqJDU/xeSw6r/61g8Mii/ X-Received: by 2002:a17:902:b58e:: with SMTP id a14-v6mr15270924pls.175.1523876955689; Mon, 16 Apr 2018 04:09:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523876955; cv=none; d=google.com; s=arc-20160816; b=jPX6Fk/6dnxFYc9LpqgTP66B0tXG95ojQgvyPIP0SBoy9kCd7/Q7SltDJ/0jO09fxT ahhLOO+lp5/GjiD99off7yfzPAGeBK35vai28ovAI+Ri39admCJlGtilp33QveUCA5aa iM9hzF6mR2pRUPWb9qpxQvzF499S+piR+XiLLbsqQYmxoKZ9cjkrY45mhPWbyTzfX9Nk P4Leeyc9Lu8bH1kBKb8TQ6qzpfA2ViWslph03JF4ldk3ToIkHB7ZMO6YULWTR1FgCELu j/6l0RL4tZ2CGY4XaJ3pcwcREAfBkxVLQOxrZsWbdLGjM6d4aaUdIvElUQbxpOrplXSe 86eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:cc:to:subject:dkim-signature:dkim-filter :arc-authentication-results; bh=wFigX9X+9bfJb3KhchKhCuteX3L0ftRBjvXWUrFRWnw=; b=bjQD5ckY6hOyBkUPhMd9bvN3+RLCnT+EBDZfGfDc2CiZbeM6gn701CYVPT/G62iwaE GVjV+77EMK7ymQGisbwQA5YwT04xyCNEVDv7vJGL6JTXJzCXQYSmLUMsG2aZZzyvTb4q aWGBV7+TUF1XyfjAvSjkOYAjf3gPSh0DX9Lo487nOTswg0HI1d8At9iYjqcf27e5UuQJ cg0fBPJZ4kBq1YQicIUY3qe9O+eRyKk9Iz1P4kH2NS89ZKWRRqrP4EIB6l5hzbYZ0pE/ Jk/Ybpo0Ci7y0JCnp9tEpIjH8uJP0bBkUAV/Ra33Ma3bwwW9uJBEM8ND+lgtBtIbV4Xw hd2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZSOaSNe3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si9438033pgc.452.2018.04.16.04.09.01; Mon, 16 Apr 2018 04:09:15 -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; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZSOaSNe3; 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=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753435AbeDPJ0h (ORCPT + 99 others); Mon, 16 Apr 2018 05:26:37 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:52972 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752999AbeDPJ0e (ORCPT ); Mon, 16 Apr 2018 05:26:34 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20180416092631euoutp02abcc551d5c812acbe83d0e7655f4fc9a~l4Gk2tmWn0270902709euoutp02P; Mon, 16 Apr 2018 09:26:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180416092631euoutp02abcc551d5c812acbe83d0e7655f4fc9a~l4Gk2tmWn0270902709euoutp02P DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523870791; bh=wFigX9X+9bfJb3KhchKhCuteX3L0ftRBjvXWUrFRWnw=; h=Subject:To:Cc:From:Date:In-Reply-To:References:From; b=ZSOaSNe3rDeuZny1lWDQeTsj+lZ2DbAaW7ofglxthSSLnmHi0YBkv3IDCFIuPT1nh z44KBaKfnZl1U8bTWzHXZllWuk5gEGi4NHoYGDc0CvC7cf9Ak78Hn7om+S+HrfTZ90 UxQ1WYS42H/V84VrIjtjX0qa+4zNKluhMQ/uRT9o= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20180416092630eucas1p16cce060ca17feba9560e2bbdb8a77879~l4Gj3aZX32791027910eucas1p1a; Mon, 16 Apr 2018 09:26:30 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id D9.5D.05700.54C64DA5; Mon, 16 Apr 2018 10:26:30 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20180416092629eucas1p2cbf950c79898df4f7eba0ad274e1f882~l4Gi6xq8-0831208312eucas1p2V; Mon, 16 Apr 2018 09:26:29 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180416092629eusmtrp2a556c3b2a9468d9777970d21f73c7377~l4GiqeERO2390023900eusmtrp2-; Mon, 16 Apr 2018 09:26:29 +0000 (GMT) X-AuditID: cbfec7f2-1dbff70000011644-13-5ad46c452e00 Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id A4.E8.04183.44C64DA5; Mon, 16 Apr 2018 10:26:28 +0100 (BST) Received: from [106.120.43.17] (unknown [106.120.43.17]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20180416092627eusmtip1f0e88e5b3f038a59067721f2e46b4eab~l4GhQjF0l0438904389eusmtip1R; Mon, 16 Apr 2018 09:26:27 +0000 (GMT) Subject: Re: [PATCH v6 27/30] drm/rockchip: psr: Sanitize semantics of allow/disallow API To: Enric Balletbo i Serra , 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, 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 From: Andrzej Hajda Message-ID: Date: Mon, 16 Apr 2018 11:26:26 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180405095000.9756-28-enric.balletbo@collabora.com> Content-Transfer-Encoding: 8bit Content-Language: en-US X-Brightmail-Tracker: H4sIAAAAAAAAA01SbUxTZxT2vd90K7vWj77pDMtqyMaSydg0HuPGPjTLzf7oz4UluG5ewFDA 9Ap+b6RsUJgwhm6Di6IJFV3DIqEUSv2a4MYUW6xlCGitAYxI181R6CQEO27vlvHvOc/znPc5 5+TlSN0DxsDtKtwjWgpNZiOjoTp/mfO9+r55MOu1CRlBte8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tG37t9s9Sx+rSr4Pxgw7RU32w4qWOUPLP4Li0r5v8A2dS7b40DAAA= X-CMS-MailID: 20180416092629eucas1p2cbf950c79898df4f7eba0ad274e1f882 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-MTR: 20180416092629eucas1p2cbf950c79898df4f7eba0ad274e1f882 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180405095246epcas3p26974ed8997dce72fa8d02a0bfe811f07 X-RootMTR: 20180405095246epcas3p26974ed8997dce72fa8d02a0bfe811f07 References: <20180405095000.9756-1-enric.balletbo@collabora.com> <20180405095000.9756-28-enric.balletbo@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.04.2018 11:49, Enric Balletbo i Serra wrote: > From: Tomasz Figa > > Currently both rockchip_drm_psr_activate() and _deactivate() only set the > boolean "active" flag without actually making sure that hardware state > complies with it. > > Since we are going to extend the usage of this API to properly lock PSR > for the duration of atomic commits, we change the semantics in following > way: > - a counter is used to track the number of disallow requests, > - PSR is actually disabled in hardware on first disallow request, > - PSR enable work is scheduled on last disallow request. I guess you meant "on last allow request". I think It would be more readable if you replace disallow with inhibit. > > The above allows using the API as a way to deterministically synchronize > PSR state changes with other DRM events, i.e. atomic commits and cursor > updates. As a nice side effect, the naming is sorted out and we have > "inhibit" for stopping the software logic and "enable" for hardware > state. > > 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/analogix_dp-rockchip.c | 4 +- > drivers/gpu/drm/rockchip/rockchip_drm_psr.c | 57 ++++++++++++++++++------- > drivers/gpu/drm/rockchip/rockchip_drm_psr.h | 4 +- > 3 files changed, 46 insertions(+), 19 deletions(-) > > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > index 6d45d62466b3..080f05352195 100644 > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c > @@ -134,7 +134,7 @@ static int rockchip_dp_poweron_end(struct analogix_dp_plat_data *plat_data) > { > struct rockchip_dp_device *dp = to_dp(plat_data); > > - return rockchip_drm_psr_activate(&dp->encoder); > + return rockchip_drm_psr_inhibit_put(&dp->encoder); > } > > static int rockchip_dp_powerdown(struct analogix_dp_plat_data *plat_data) > @@ -142,7 +142,7 @@ static int rockchip_dp_powerdown(struct analogix_dp_plat_data *plat_data) > struct rockchip_dp_device *dp = to_dp(plat_data); > int ret; > > - ret = rockchip_drm_psr_deactivate(&dp->encoder); > + ret = rockchip_drm_psr_inhibit_get(&dp->encoder); > if (ret != 0) > return ret; > > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c > index 448c5fde241c..e7e16d92d5a1 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_drm_psr.c > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_psr.c > @@ -27,7 +27,7 @@ struct psr_drv { > struct drm_encoder *encoder; > > struct mutex lock; > - bool active; > + int inhibit_count; > bool enabled; > > struct delayed_work flush_work; > @@ -76,7 +76,7 @@ static int psr_set_state_locked(struct psr_drv *psr, bool enable) > { > int ret; > > - if (!psr->active) > + if (psr->inhibit_count > 0) > return -EINVAL; > > if (enable == psr->enabled) > @@ -101,13 +101,18 @@ static void psr_flush_handler(struct work_struct *work) > } > > /** > - * rockchip_drm_psr_activate - activate PSR on the given pipe > + * rockchip_drm_psr_inhibit_put - release PSR inhibit on given encoder > * @encoder: encoder to obtain the PSR encoder > * > + * Decrements PSR inhibit count on given encoder. Should be called only > + * for a PSR inhibit count increment done before. If PSR inhibit counter > + * reaches zero, PSR flush work is scheduled to make the hardware enter > + * PSR mode in PSR_FLUSH_TIMEOUT_MS. > + * > * Returns: > * Zero on success, negative errno on failure. > */ > -int rockchip_drm_psr_activate(struct drm_encoder *encoder) > +int rockchip_drm_psr_inhibit_put(struct drm_encoder *encoder) > { > struct psr_drv *psr = find_psr_by_encoder(encoder); > > @@ -115,21 +120,29 @@ int rockchip_drm_psr_activate(struct drm_encoder *encoder) > return PTR_ERR(psr); > > mutex_lock(&psr->lock); > - psr->active = true; > + --psr->inhibit_count; Maybe some WARN on negative value? With doc fixes: Reviewed-by: Andrzej Hajda  -- Regards Andrzej > + if (!psr->inhibit_count) > + mod_delayed_work(system_wq, &psr->flush_work, > + PSR_FLUSH_TIMEOUT_MS); > mutex_unlock(&psr->lock); > > return 0; > } > -EXPORT_SYMBOL(rockchip_drm_psr_activate); > +EXPORT_SYMBOL(rockchip_drm_psr_inhibit_put); > > /** > - * rockchip_drm_psr_deactivate - deactivate PSR on the given pipe > + * rockchip_drm_psr_inhibit_get - acquire PSR inhibit on given encoder > * @encoder: encoder to obtain the PSR encoder > * > + * Increments PSR inhibit count on given encoder. This function guarantees > + * that after it returns PSR is turned off on given encoder and no PSR-related > + * hardware state change occurs at least until a matching call to > + * rockchip_drm_psr_inhibit_put() is done. > + * > * Returns: > * Zero on success, negative errno on failure. > */ > -int rockchip_drm_psr_deactivate(struct drm_encoder *encoder) > +int rockchip_drm_psr_inhibit_get(struct drm_encoder *encoder) > { > struct psr_drv *psr = find_psr_by_encoder(encoder); > > @@ -137,15 +150,15 @@ int rockchip_drm_psr_deactivate(struct drm_encoder *encoder) > return PTR_ERR(psr); > > mutex_lock(&psr->lock); > - psr->active = false; > - psr->enabled = false; > + psr_set_state_locked(psr, false); > + ++psr->inhibit_count; > mutex_unlock(&psr->lock); > cancel_delayed_work_sync(&psr->flush_work); > cancel_work_sync(&psr->disable_work); > > return 0; > } > -EXPORT_SYMBOL(rockchip_drm_psr_deactivate); > +EXPORT_SYMBOL(rockchip_drm_psr_inhibit_get); > > static void rockchip_drm_do_flush(struct psr_drv *psr) > { > @@ -301,6 +314,11 @@ static const struct input_device_id psr_ids[] = { > * @encoder: encoder that obtain the PSR function > * @psr_set: call back to set PSR state > * > + * The function returns with PSR inhibit counter initialized with one > + * and the caller (typically encoder driver) needs to call > + * rockchip_drm_psr_inhibit_put() when it becomes ready to accept PSR > + * enable request. > + * > * Returns: > * Zero on success, negative errno on failure. > */ > @@ -322,7 +340,7 @@ int rockchip_drm_psr_register(struct drm_encoder *encoder, > INIT_WORK(&psr->disable_work, psr_disable_handler); > mutex_init(&psr->lock); > > - psr->active = false; > + psr->inhibit_count = 1; > psr->enabled = false; > psr->encoder = encoder; > psr->set = psr_set; > @@ -362,6 +380,11 @@ EXPORT_SYMBOL(rockchip_drm_psr_register); > * @encoder: encoder that obtain the PSR function > * @psr_set: call back to set PSR state > * > + * It is expected that the PSR inhibit counter is 1 when this function is > + * called, which corresponds to a state when related encoder has been > + * disconnected from any CRTCs and its driver called > + * rockchip_drm_psr_inhibit_get() to stop the PSR logic. > + * > * Returns: > * Zero on success, negative errno on failure. > */ > @@ -373,10 +396,14 @@ void rockchip_drm_psr_unregister(struct drm_encoder *encoder) > mutex_lock(&drm_drv->psr_list_lock); > list_for_each_entry_safe(psr, n, &drm_drv->psr_list, list) { > if (psr->encoder == encoder) { > - input_unregister_handler(&psr->input_handler); > - cancel_delayed_work_sync(&psr->flush_work); > - cancel_work_sync(&psr->disable_work); > + /* > + * Any other value would mean that the encoder > + * is still in use. > + */ > + WARN_ON(psr->inhibit_count != 1); > + > list_del(&psr->list); > + input_unregister_handler(&psr->input_handler); > kfree(psr->input_handler.name); > kfree(psr); > } > diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_psr.h b/drivers/gpu/drm/rockchip/rockchip_drm_psr.h > index 06537ee27565..40e026c14168 100644 > --- a/drivers/gpu/drm/rockchip/rockchip_drm_psr.h > +++ b/drivers/gpu/drm/rockchip/rockchip_drm_psr.h > @@ -18,8 +18,8 @@ > void rockchip_drm_psr_flush_all(struct drm_device *dev); > int rockchip_drm_psr_flush(struct drm_crtc *crtc); > > -int rockchip_drm_psr_activate(struct drm_encoder *encoder); > -int rockchip_drm_psr_deactivate(struct drm_encoder *encoder); > +int rockchip_drm_psr_inhibit_put(struct drm_encoder *encoder); > +int rockchip_drm_psr_inhibit_get(struct drm_encoder *encoder); > > int rockchip_drm_psr_register(struct drm_encoder *encoder, > int (*psr_set)(struct drm_encoder *, bool enable));