Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1212287rwl; Fri, 31 Mar 2023 08:07:09 -0700 (PDT) X-Google-Smtp-Source: AKy350Z+0i98bF36Gxf9u8yvUBLcGRXB0Ar2zGw4rI4rnJM+lk7WqoWWLv5AaQu+5ENKxfc5ench X-Received: by 2002:a05:6402:4315:b0:502:616b:cbd5 with SMTP id m21-20020a056402431500b00502616bcbd5mr6695653edc.2.1680275229188; Fri, 31 Mar 2023 08:07:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680275229; cv=none; d=google.com; s=arc-20160816; b=odat6cgACo76LD9jeJ/sZswWXknfRmANbaZTpNiDAYmOprnJ9zAFJ9EIikBfTxaIW0 4D+FSnmp5E8VnCfmxN/Q4h6Ac3j4Ytdw1Orm7y7vffcxK2dNjinm5SkNWLwqTzH2h4PC F0CSSzqHSjvZUY9Pp9VEnMDMCNHuS7S7rA5fi4U7kAFRbR0/gvMoBrypzKLrtSPmu3h/ 6OTmONgWQ3uzH3c3/X7zAObYx7GMJbyEQDPf9POOJ620NCqhY0kFD2tYIp/Lh4vHxDHt t+4cgvpkJe7o80wbof3VQiWB730o2L5UwvtTI2yNTdc+PPWFaJX49cDoO/M2VAV40+yT GmLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=+9vywVkizA1/BL+IoFGg5oSdyRUHG9JaCTPgm6cyxaI=; b=wp2KFFrvHEdwu2T5rkETumwG+XaxkSxQ8ixNKxIoC+cQ9MrNAp4815dZJBkj7BVSF9 EC5QBI6phWlu0+XaTenAMtxR2F4ph9tmX0d2OwE9KEPZCuXJjuC3RS6HarWIuZf1ezvq jSinx8cynUCXKSugnpRVRIrvhU98aRbRWl5+Ml81kflhB3Rabj3Jk02SdVt9y/fRAVO+ fjl5uf8cOovJSUtKgZJEKhx18sa6ROwXc8c+JkaAVAka2tqXrOg79mcJoNIoMv+3Eyb0 I3DxVjpWPbxlgQ74qgyv4hNKSwTrfg+tFf2q5Ugi3imXOzWbU6zMuuWpQkp2lCQ0IXPY Zr/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RiEUbASd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n19-20020a056402061300b0050029c65a33si1895580edv.305.2023.03.31.08.06.43; Fri, 31 Mar 2023 08:07:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RiEUbASd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232470AbjCaO62 (ORCPT + 99 others); Fri, 31 Mar 2023 10:58:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231775AbjCaO61 (ORCPT ); Fri, 31 Mar 2023 10:58:27 -0400 Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 38E896A63 for ; Fri, 31 Mar 2023 07:58:24 -0700 (PDT) Received: by mail-yb1-xb30.google.com with SMTP id p15so27675745ybl.9 for ; Fri, 31 Mar 2023 07:58:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680274703; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=+9vywVkizA1/BL+IoFGg5oSdyRUHG9JaCTPgm6cyxaI=; b=RiEUbASd4Nv2bK5U0NfdCxz+zGU9jvca9t9L9dX8WOCA+TKl2+UavAzbHhwokVPtii Ns/nmgxsMfcFREXylGBnoQNH6yVWzO9I2/Lr3fBUhDBuQ1B02+IPW9wI7Go+UeQ767GJ EhsoUgCVLsyu3PM+cZRxuOjp9fXxG+208DkvZObKFf5+Y4mixJ7fwrqXVbbPt7cvcmzD GgRTzUc4OrI0bZSmug8TxFMTjUjrbMYcNWhYjrwVdDTxEPvyavmLqideHlzGIoFLPTw+ WE795LitI1h0crKga2+zmrGOIs39+D7z1ih/3NIVqwwwnnbEjuSYrYJrTMzC7ozAKF+L 5z3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680274703; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+9vywVkizA1/BL+IoFGg5oSdyRUHG9JaCTPgm6cyxaI=; b=Wdy4kY7fLLxjCXuatq38aMNeKKRFeKOElwT6dGFYLLVAvnjJLR77iPbEctuhP6AL7x NHFqA+Q0TUIxgZNleaiLbIFiv2BVJoiTvJ7v/PIcMyJ0pITJrlAsdXOTbLmwIkJiNTYB Vcq6j7PrJYUYE8B0gMLuoj9QuTndT0ZDUQv3JMoQ+zTzmYGj8IpRTaPLXc/VZ2I8QyGn a4PPlUNueGOdmvm89kWqbJv3Iu6rUKF+Cpm41uiW5JpYA6X50wpftsTRg9MPu/nTrFtH J5Tu3T1JjhrigmWSOyPgumOeUg1F3Hx+OTbL8QHF6pNGCC18NKuo2qu6qmLVmeg56qj2 s7Rw== X-Gm-Message-State: AAQBX9eDUH5ckamMywgmMHPj1sipGGuovdEVNzwrgzDotjZRaL7PI28Z FK2CTZnkLj6pzUHlvevlOPdwGUe2lD7YTWqYo7GNhg== X-Received: by 2002:a25:d747:0:b0:b82:410e:daae with SMTP id o68-20020a25d747000000b00b82410edaaemr211714ybg.9.1680274703429; Fri, 31 Mar 2023 07:58:23 -0700 (PDT) MIME-Version: 1.0 References: <1680271114-1534-1-git-send-email-quic_vpolimer@quicinc.com> <1680271114-1534-4-git-send-email-quic_vpolimer@quicinc.com> In-Reply-To: <1680271114-1534-4-git-send-email-quic_vpolimer@quicinc.com> From: Dmitry Baryshkov Date: Fri, 31 Mar 2023 17:58:12 +0300 Message-ID: Subject: Re: [PATCH v1 3/3] msm: skip the atomic commit of self refresh while PSR running To: Vinod Polimera Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, robdclark@gmail.com, dianders@chromium.org, swboyd@chromium.org, quic_kalyant@quicinc.com, quic_khsieh@quicinc.com, quic_vproddut@quicinc.com, quic_bjorande@quicinc.com, quic_abhinavk@quicinc.com, quic_sbillaka@quicinc.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 31 Mar 2023 at 16:59, Vinod Polimera wrote: > > In certain CPU stress conditions, there can be a delay in scheduling commit > work and it was observed that PSR commit from a different work queue was > scheduled. Avoid these commits as display is already in PSR mode. > > Signed-off-by: Vinod Polimera > --- > drivers/gpu/drm/msm/msm_atomic.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/msm/msm_atomic.c b/drivers/gpu/drm/msm/msm_atomic.c > index 645fe53..f8141bb 100644 > --- a/drivers/gpu/drm/msm/msm_atomic.c > +++ b/drivers/gpu/drm/msm/msm_atomic.c > @@ -192,6 +192,9 @@ int msm_atomic_check(struct drm_device *dev, struct drm_atomic_state *state) > new_crtc_state->mode_changed = true; > state->allow_modeset = true; > } > + > + if (old_crtc_state->self_refresh_active && new_crtc_state->self_refresh_active) > + return -EINVAL; EINVAL here means that atomic_check will fail if both old and new states are in SR mode. For example, there might be a mode set for another CRTC (while keeping this one in SR mode). I don't think this is correct. We should skip/shortcut the commit, that's true. But I doubt that returning an error here is a proper way to do this. Please correct me if I'm wrong. > } > > return drm_atomic_helper_check(dev, state); > -- > 2.7.4 > -- With best wishes Dmitry