Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp451072pxb; Thu, 9 Sep 2021 04:54:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZnprr0U/WRCT+kedf560oPUnPOEKGprdKPKwWPOXFcpPtUjg6D9iBKCjaYK1v4FSywPFJ X-Received: by 2002:a17:906:3148:: with SMTP id e8mr2904030eje.240.1631188472955; Thu, 09 Sep 2021 04:54:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631188472; cv=none; d=google.com; s=arc-20160816; b=x+zstUfPPBIqFjpa1FoL/2I8D4Z6hCHKHAcTDIOzVjBysZlm+v+/+RyfPLjsPhofoJ zTj4bRm/nc0NmTDh9KCta8IcI3JZf10HKvRdPndF0ZyjE5DA8FxYRnEkFFDVKXyHEx99 Wz3CduWo9242j+pbC8MD74EOy3Eh8Gp/1BhXQ5UpGIlmMEiQxmkZynJ9DuLyg71ARc23 ar9jvVTsc5S/aJKLMt6BSitrmeMt4ORl4UEeCefhLv032FhaIcLeKL5HF4XH2VcqYoEK 4EG60HkTx+l4CjBKn0j5LQjkT+7626jAChaEHc/vtNQFhxByrJXBe/LpwBtfv1+RoG0W fc6Q== 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 :dkim-signature; bh=zUI/8DjyVDWuR1vVqJPXtYwZAga1URNwWlQJgvjh2aM=; b=GB8u8VihixmWZ7UwP0mLW8g1QvchVrJMyisYC4tscnTmIG+28p9snUm67ITsAZwjfB 4JBShaaGTv3MHrSf3oUeF+/xqYO4nQChxTseEzdRVQxmFW3PWxkL2E3ZUHOzcTvrs8Qs e6EHDyDczUl3CjBlYGjEzG7zx6pbOyBpdyVLr9Nd2pltIuNHOZKNbRnw+dDo0K64/7OI 43fI7cZTdD8rAJIA1BaY9hwuGqqorgj+psFNPgkXMRbsORNMJTOQiB+SjESlAASVgwAQ 2ublC15t/9Z0NepjHr6lGK5KiqUnoahEzyqhtOmb8b9/Hnccxa+UN8HEh27UIw3jfYT8 syeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q2tvqQjQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a25si1443320ejc.304.2021.09.09.04.54.05; Thu, 09 Sep 2021 04:54:32 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=q2tvqQjQ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236659AbhIILxG (ORCPT + 99 others); Thu, 9 Sep 2021 07:53:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:54742 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240936AbhIILui (ORCPT ); Thu, 9 Sep 2021 07:50:38 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3E77C6120A; Thu, 9 Sep 2021 11:43:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631187831; bh=xL8R0xhcv7lM2CtakF54LGe40ktCPUaMQx6L5gTtMWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q2tvqQjQuWWIk5YpWl8PeOoXToxFEuPpD8pI7owQuQ2vZEKPGUomFa48LjXjqHNk7 J6HN1vC4oBM2i4XXlc8CQ+g1OhPj5HbYabuaDkIk6I6VjrAjIBwM7sOspSwxe+v3wd cxpNIFtFcsPYESNrG9F0LLklpIi+GwIf/YRTilUBRIsYGcyx2bRLI+NrHmLXfdbCUK iUYOXtIEo3970Zx+5MHrNUl1P8iIApzwKTgcsfy3yvXpYCgCmI1cGafIt+qWp9Rlh5 1YpRQ7D3WNcmweudMdkeXv8KiT3xw7Llkr4JzbZZ5b0YIHQE1XvrMrufOV8/v8//7c t8ubAzZKazp7w== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: David Heidelberg , Dmitry Baryshkov , Rob Clark , Sasha Levin , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.14 127/252] drm/msm: mdp4: drop vblank get/put from prepare/complete_commit Date: Thu, 9 Sep 2021 07:39:01 -0400 Message-Id: <20210909114106.141462-127-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210909114106.141462-1-sashal@kernel.org> References: <20210909114106.141462-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Heidelberg [ Upstream commit 56bd931ae506730c9ab1e4cc4bfefa43fc2d18fa ] msm_atomic is doing vblank get/put's already, currently there no need to duplicate the effort in MDP4 Fix warning: ... WARNING: CPU: 3 PID: 79 at drivers/gpu/drm/drm_vblank.c:1194 drm_vblank_put+0x1cc/0x1d4 ... and multiple vblank time-outs: ... msm 5100000.mdp: vblank time out, crtc=1 ... Tested on Nexus 7 2013 (deb), LTS 5.10.50. Introduced by: 119ecb7fd3b5 ("drm/msm/mdp4: request vblank during modeset") Signed-off-by: David Heidelberg Link: https://lore.kernel.org/r/20210715060925.7880-1-david@ixit.cz Signed-off-by: Dmitry Baryshkov Signed-off-by: Rob Clark Signed-off-by: Sasha Levin --- drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c index 4a5b518288b0..1325731282f7 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_kms.c @@ -108,13 +108,6 @@ static void mdp4_disable_commit(struct msm_kms *kms) static void mdp4_prepare_commit(struct msm_kms *kms, struct drm_atomic_state *state) { - int i; - struct drm_crtc *crtc; - struct drm_crtc_state *crtc_state; - - /* see 119ecb7fd */ - for_each_new_crtc_in_state(state, crtc, crtc_state, i) - drm_crtc_vblank_get(crtc); } static void mdp4_flush_commit(struct msm_kms *kms, unsigned crtc_mask) @@ -133,12 +126,6 @@ static void mdp4_wait_flush(struct msm_kms *kms, unsigned crtc_mask) static void mdp4_complete_commit(struct msm_kms *kms, unsigned crtc_mask) { - struct mdp4_kms *mdp4_kms = to_mdp4_kms(to_mdp_kms(kms)); - struct drm_crtc *crtc; - - /* see 119ecb7fd */ - for_each_crtc_mask(mdp4_kms->dev, crtc, crtc_mask) - drm_crtc_vblank_put(crtc); } static long mdp4_round_pixclk(struct msm_kms *kms, unsigned long rate, -- 2.30.2