Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp655770pxf; Wed, 7 Apr 2021 08:31:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDC2pZLAxLwGvb5eFWzkQl1CXNSIiQFMZPPLjmXz4uupxcIwfAVy17Lf/VQouMgRNeCLYL X-Received: by 2002:a17:907:70cd:: with SMTP id yk13mr4304567ejb.233.1617809513242; Wed, 07 Apr 2021 08:31:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617809513; cv=none; d=google.com; s=arc-20160816; b=g1+Zmrf/S7CBuK042N4NhfqSuVWIo4YIvUp+mwLJVD7OuX/jf5tjYIlpBlGHGlIAij tTV+fLTE8F9CBwSQTtso05WzZoywwXYU5FebysXeU+MLgpevbtwfL46JdPjny3J2nMPE VAvnsc2SgcUGmaghOa1N4fSrp2O//ZzYozsMKQzNqZf1NTM4uATvfBxhr7AUL2bCjvSX XFf1W34vemMlIwanP2+Wm/qXXKltG8wkCaLpIBsMbnn8g9RQ0gfCKa8qlTpZ8dupFQG/ J4p/b8cVsyBdHeGYpyOkpYaBEjXaYk6Z9puyKBsgVU3nby6QczSgN/WzWALdO4pQhEP3 6JpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ilzTdE/Gvbn1lJhcd48aQ+ZpFe2ec0b6AHmlzDG9cv4=; b=SslAV5RPARYHKRcJ+PYLj/JUjZPN7Gde9s5xhyFCle2u6xgiqofto6VODkPwnSofKt zlDWINvizLs4nWZxXuU3hiYRqiw+u9YIN3qlQbAB5/tCQHbhS/5xBbK0qipw4XjU07qs ftnnwosmXiyiJcM8Aj2t6mujO+pjoPzCfdz3O7yXjca7AYs+tHTUOyEjsipgO7PyqPbD o0EtGNd3ylzGQli48u0CEKb1NeW20ulQNH43EMVhVyCGGhkQRoNPxDAwQrxPCW2Tqq/a sbit/GuE/BZZrC2TiyZC2vElyJgcPqMD89XgVaOR/g7We+xMEPI4CEEpCBiHf0K1PyYr rTBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si10958540edc.106.2021.04.07.08.31.29; Wed, 07 Apr 2021 08:31:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343758AbhDFVrx (ORCPT + 99 others); Tue, 6 Apr 2021 17:47:53 -0400 Received: from relay05.th.seeweb.it ([5.144.164.166]:36669 "EHLO relay05.th.seeweb.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239469AbhDFVrx (ORCPT ); Tue, 6 Apr 2021 17:47:53 -0400 Received: from Marijn-Arch-PC.localdomain (94-209-165-62.cable.dynamic.v4.ziggo.nl [94.209.165.62]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by m-r2.th.seeweb.it (Postfix) with ESMTPSA id CB5CB3F3EF; Tue, 6 Apr 2021 23:47:39 +0200 (CEST) From: Marijn Suijten To: phone-devel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Konrad Dybcio , Martin Botka , Marijn Suijten , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Sai Prakash Ranjan , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] drm/msm/mdp5: Configure PP_SYNC_HEIGHT to double the vtotal Date: Tue, 6 Apr 2021 23:47:24 +0200 Message-Id: <20210406214726.131534-2-marijn.suijten@somainline.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210406214726.131534-1-marijn.suijten@somainline.org> References: <20210406214726.131534-1-marijn.suijten@somainline.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Leaving this at a close-to-maximum register value 0xFFF0 means it takes very long for the MDSS to generate a software vsync interrupt when the hardware TE interrupt doesn't arrive. Configuring this to double the vtotal (like some downstream kernels) leads to a frame to take at most twice before the vsync signal, until hardware TE comes up. In this case the hardware interrupt responsible for providing this signal - "disp-te" gpio - is not hooked up to the mdp5 vsync/pp logic at all. This solves severe panel update issues observed on at least the Xperia Loire and Tone series, until said gpio is properly hooked up to an irq. Suggested-by: AngeloGioacchino Del Regno Signed-off-by: Marijn Suijten Reviewed-by: AngeloGioacchino Del Regno --- drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c index ff2c1d583c79..2d5ac03dbc17 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c @@ -51,7 +51,7 @@ static int pingpong_tearcheck_setup(struct drm_encoder *encoder, mdp5_write(mdp5_kms, REG_MDP5_PP_SYNC_CONFIG_VSYNC(pp_id), cfg); mdp5_write(mdp5_kms, - REG_MDP5_PP_SYNC_CONFIG_HEIGHT(pp_id), 0xfff0); + REG_MDP5_PP_SYNC_CONFIG_HEIGHT(pp_id), (2 * mode->vtotal)); mdp5_write(mdp5_kms, REG_MDP5_PP_VSYNC_INIT_VAL(pp_id), mode->vdisplay); mdp5_write(mdp5_kms, REG_MDP5_PP_RD_PTR_IRQ(pp_id), mode->vdisplay + 1); -- 2.31.1