Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1287936pxj; Sat, 8 May 2021 12:56:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUCqw+M80PPBQve/+vmBFRccBO4TbOOPEg9Yo7OJax0X2m0+SiUcZ0ANXQ/syh245hycuO X-Received: by 2002:a02:83c2:: with SMTP id j2mr6213623jah.6.1620503807649; Sat, 08 May 2021 12:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620503807; cv=none; d=google.com; s=arc-20160816; b=U1fOOTgEwPeXMp8QVDnW4kHhpfHtEFiXEkn6W0/iHFzSaXoyCG10IeDig45ioJpnzX 9ZNuQcs2fUhQMqUibue5dHJb1elmZjFWZ5VbLlZN/LYtqj84GV3eLmznVIGBdmV6N64r YPJLG5Xh+jR4ud1lWpj5tzKUaE+5gsa5f5wPBAbOG8YJ57Lw+//M6mVkSqj/ctWYt35N 2oupxHH4nHnuw53IYnxDKEj5WOLq/K5ZPPm3lzxRoyBkItIRXN+XLU2VA6DeiG8cWRD3 0p3qlmaW/T6yc4BsH//jHzsYkjTxswAwMNjn3NFa28gd0mLnTWGt7FKlQ6yswE5ZYW4X 15QQ== 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=P7qWaXSLZT/HSg5BGmuOtFL+9OavfUK43XNh+avyzkE=; b=TX7Br3UPYXqnJkJya4GQt10K2i3t8IIk2JFvWCCgIHuGAWW8mTZi13m3fdHgzSlHdC bM5zFMZydlP3J0/TTRKvO5MpNOYMVH8G2acsjF7xZlfQQMErs3GL2Hx6WIflQElzGY2b erXjpx1L4HjiqzHncsPEAgDYsB75J1Nn3WR8tNFTEbi3A3EC4mZRQIkie0SYAwWNTUI8 /EEEAdAIPrGKTEVwW+2fiW+o7Cov8kPJDF4tR7GdBad9jw3Bdixy0HaZoi9+zvrMATGr n6Wo2FdEvL2Ndfbbl74grW4nLM4j3bRCJLVmR7kUBTOoCJ1F1G8yDvehP6iiZrGpCHha aP5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Cfz6kXOQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si12217962ioj.39.2021.05.08.12.56.35; Sat, 08 May 2021 12:56:47 -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=@gmail.com header.s=20161025 header.b=Cfz6kXOQ; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229709AbhEHTyG (ORCPT + 99 others); Sat, 8 May 2021 15:54:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbhEHTyF (ORCPT ); Sat, 8 May 2021 15:54:05 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 106A1C061574; Sat, 8 May 2021 12:53:03 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id j6-20020a17090adc86b02900cbfe6f2c96so7874929pjv.1; Sat, 08 May 2021 12:53:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=P7qWaXSLZT/HSg5BGmuOtFL+9OavfUK43XNh+avyzkE=; b=Cfz6kXOQ7lqNfnzW70b8KqN+tUSJD0CXYqIS6qaQ1jYmxz8btG4RZHeN1w5BrbyI8O dGL2brbo+0eiVkFGuUoqNfqpIiBgcu+ZFkwMM3q9G8kA+j6gUtVEWo8peuSFxZ4QYVzR oS/hswtOr5v0V1Se+RGAGRHT6MJgDNK7avqyXT3wBlu5djN7qFJmqh93sBjuyzIWb9Q9 Ji0Jcoa6GaOtW1fvE5rkTPFN4Mr/rlBjGJkQgs/9tdO3krNNTTsvhinGf3Dp4QN7Cs4P xIeDlmvQD5dPJVR2o55d/LYGT3muYdKY5/RrT659fVp9tAf1wjBg/auTDLZKXCcfxgwT KUcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=P7qWaXSLZT/HSg5BGmuOtFL+9OavfUK43XNh+avyzkE=; b=eucR1DFITse3NQqsBDoXEDSd3qWNHc/u9gU6mUsqJo1Fy0fDFn982kFAQ+AJB291/A URqil0t5Zzm34/Nwt+/zedL6SXl9H3E8fQnof6S5acKnQFCCu5TiO88vejtCFJneFO69 5EoIFdzCfkOndtywgfUNtFkOVmcu0XPn8KkvPvbI/W3czhKom2M2+QNru0jbkpxetq64 c/Yhyr2PYdpYoArn5C4t3ZQWPnXkJCCy5x6VcXeq9/vK8UzMMLilao8Bm+Ub9FPUQHcq JrcAEtYwB0savXKXGkwaVgo0WdvzECqMl02czI31d9BzNhv7wOnXdU5o0gYNyL+U6ajq KFQA== X-Gm-Message-State: AOAM5330lBKLAYCdG4ESrqk2ymANs9IEQFLH00sNHt5yEgXOkS3Y/9bS cXSiz/nR+mZJO7GsXJV+kH2VHZfkcuU1ow== X-Received: by 2002:a17:90a:c297:: with SMTP id f23mr17680567pjt.197.1620503582651; Sat, 08 May 2021 12:53:02 -0700 (PDT) Received: from localhost (c-73-25-156-94.hsd1.or.comcast.net. [73.25.156.94]) by smtp.gmail.com with ESMTPSA id j26sm7484972pfn.47.2021.05.08.12.53.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 May 2021 12:53:01 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: Rob Clark , Rob Clark , Sean Paul , David Airlie , Daniel Vetter , Abhinav Kumar , Stephen Boyd , Maxime Ripard , Kalyan Thota , Qinglang Miao , Hongbo Yao , linux-arm-msm@vger.kernel.org (open list:DRM DRIVER FOR MSM ADRENO GPU), freedreno@lists.freedesktop.org (open list:DRM DRIVER FOR MSM ADRENO GPU), linux-kernel@vger.kernel.org (open list) Subject: [PATCH 2/2] drm/msm/dpu: Wire up needs_dirtyfb Date: Sat, 8 May 2021 12:56:39 -0700 Message-Id: <20210508195641.397198-3-robdclark@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210508195641.397198-1-robdclark@gmail.com> References: <20210508195641.397198-1-robdclark@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Clark Signed-off-by: Rob Clark --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 5a74f93e29da..868ee6136438 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -143,6 +143,19 @@ static bool dpu_crtc_get_scanout_position(struct drm_crtc *crtc, return true; } +static bool dpu_crtc_needs_dirtyfb(struct drm_crtc *crtc) +{ + struct drm_encoder *encoder; + + drm_for_each_encoder_mask (encoder, crtc->dev, crtc->state->encoder_mask) { + if (dpu_encoder_get_intf_mode(encoder) == INTF_MODE_CMD) { + return true; + } + } + + return false; +} + static void _dpu_crtc_setup_blend_cfg(struct dpu_crtc_mixer *mixer, struct dpu_plane_state *pstate, struct dpu_format *format) { @@ -1343,6 +1356,7 @@ static const struct drm_crtc_helper_funcs dpu_crtc_helper_funcs = { .atomic_begin = dpu_crtc_atomic_begin, .atomic_flush = dpu_crtc_atomic_flush, .get_scanout_position = dpu_crtc_get_scanout_position, + .needs_dirtyfb = dpu_crtc_needs_dirtyfb, }; /* initialize crtc */ -- 2.30.2