Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2272743rdb; Fri, 8 Dec 2023 03:36:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdjZJSeXa/HN3zmjc2WeXiwC/+W++Gjq2Adn1KphrHRX0yfPlBuo3tlfHVFr9jxeVKxQF7 X-Received: by 2002:a17:902:e741:b0:1d0:6ffd:8359 with SMTP id p1-20020a170902e74100b001d06ffd8359mr3675347plf.100.1702035411655; Fri, 08 Dec 2023 03:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702035411; cv=none; d=google.com; s=arc-20160816; b=L9U5oQQRpf3gY7CGO8ITqCCJ9MCCQYVRa07RLX9/J5K37JwJRcD8JstJEMGVoJ+cRF vvK4374IV0nBg7omYQ60tiHosNSfIBJByy9ajGIPJ+IIj8qdYO/spDQwPB/0UMPQ5Gtk 2Vf8lqQ89p42UnYy2+mVic1exUoAxC4HgqmoUt1qFnGx41AGeCi2pv3QAoUkpMDCnarb raCiB8kmOqjB3IjJzgFMPGsmUA5cLKc67R5n2Y/LD3cmeGnGpbgXgp9qKCfUpoZQi1WD ub4giaALRrodxKgM6MdGvTA1beR1jmsTDFeA7AophtgYBmkK6S+pRg9xuOnmE2lC4yOj +sqQ== 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=9vphCG37O8eMkMC8HIffZ3tk8WXWBglaXiyl76vCMdg=; fh=u+8seKyB07yIfN5FApT/HxHz0QUzYKPNWnQOq0f6iUM=; b=nQFHy6ahwT57V/lIa/VU/qQQeU1kw4bOJrHRGYo6970ZEQw3OQTITxaVjyYIV9lAaR Ta2e+8yhBVUQjeZ5WGLAa5ctoNsCUWibjtw0OdjHOyfFQ2oxgVET6xNl2Z0mU5Tl0dEO rjpVtWnrNvIoU6g8//lxVuRhDhY4wH1tjxLgqnlRa4PLwLcRPhfNfEG7qK6KFNzlcb1O V0hPujIUuH0WHJg1PVuT4l7plEWlpIr6/pJpbPoDaOl2ArEPZZ+itrADhZ0gmKKzqa8N 20kBd/lFoIUsLKa1Fg5h2S7EpSB9f13XL73ExqmCYwxig89yIYmFv8+fZyju3b7tuI2U yYhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ubq3gEE+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id t18-20020a1709028c9200b001cf677b6c20si1417700plo.594.2023.12.08.03.36.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 03:36:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ubq3gEE+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id A137980FCD95; Fri, 8 Dec 2023 03:36:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573584AbjLHLgc (ORCPT + 99 others); Fri, 8 Dec 2023 06:36:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233380AbjLHLgb (ORCPT ); Fri, 8 Dec 2023 06:36:31 -0500 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9301810FC for ; Fri, 8 Dec 2023 03:36:37 -0800 (PST) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-5b383b4184fso17168037b3.1 for ; Fri, 08 Dec 2023 03:36:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702035396; x=1702640196; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=9vphCG37O8eMkMC8HIffZ3tk8WXWBglaXiyl76vCMdg=; b=ubq3gEE+AgwBI6bjU06Wb2mRjd/gHe5qeF8EBkQkfKHAJ+6kN27qTGOt04lfobQEuO tO7nCmg1rBrA94N2fOnCIFlRTgkHysaHGEIC+8VvSxV5h1PFuSTk8PcP3OdO/w6F+JaY lNAeLHp4pXUB/ffJ9/kCUSFfMw0Fum/EvWibtLni3yfZmWeejc8OaTIxrvdzA3rT0aj0 LbztLsD7wpI/lipz69Xi8uDc9doz+Q4thK1grem3RM6Pm6sQTVKIFuI3JkU9XlmIXo6Z hMCqedB6KsFEK3+zriPKk4ia1kCklWlsjophydx2k1i/1yRcJbu+NdfHceAkMxzmrRY8 CCVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702035396; x=1702640196; 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=9vphCG37O8eMkMC8HIffZ3tk8WXWBglaXiyl76vCMdg=; b=LT5ExkN9C9Cik/QFwvx1NnxG5o00Se0tGZ/rVIYm7fiKNjs85ke9L+g6XZgU7tC0vO 0AZHAs6u+1qAqzidO79nf/LYNUGf3Kx4qnaEbNg9VGHFhgHDF9+VxzuzqrotfpIw3ChM dubPW+AXonqL59r/yj7mJjBp0WiOYvPkPL4zXJJhIcB38OmYp5DCZIoHuR6QVokgaugm en80Vys3V/NAQmZpNt/ZwQvbGUYrDK1pEQ/2kvno0Vg4uIOCSG2HLIvMdC48VDIZUt3r VNMVfh+0VhPtQLvh1+RU0bl6j6L4d+XPUg5+KiqquYsZXAoZ2R3zVOKwCGqGGQZeepEF yqYg== X-Gm-Message-State: AOJu0YwFqGpSigXj+7IgrYE1YeNO/rRIyyYgMeDmer7FurPnycNh5FHq hdhAakvo9BEjwOuorGv6o6n04/RweLpgXdqCz2r0qA== X-Received: by 2002:a0d:ea0b:0:b0:5d7:1940:7d79 with SMTP id t11-20020a0dea0b000000b005d719407d79mr3847704ywe.80.1702035396669; Fri, 08 Dec 2023 03:36:36 -0800 (PST) MIME-Version: 1.0 References: <20231208050641.32582-1-quic_abhinavk@quicinc.com> <20231208050641.32582-12-quic_abhinavk@quicinc.com> In-Reply-To: <20231208050641.32582-12-quic_abhinavk@quicinc.com> From: Dmitry Baryshkov Date: Fri, 8 Dec 2023 13:36:25 +0200 Message-ID: Subject: Re: [PATCH v2 11/16] drm/msm/dpu: add support to disable CDM block during encoder cleanup To: Abhinav Kumar Cc: freedreno@lists.freedesktop.org, Rob Clark , Sean Paul , Marijn Suijten , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, quic_jesszhan@quicinc.com, quic_parellan@quicinc.com, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Fri, 08 Dec 2023 03:36:48 -0800 (PST) On Fri, 8 Dec 2023 at 07:07, Abhinav Kumar wrote: > > In preparation of setting up CDM block, add the logic to disable it > properly during encoder cleanup. > > changes in v2: > - call update_pending_flush_cdm even when bind_pingpong_blk > is not present > > Signed-off-by: Abhinav Kumar > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 10 ++++++++++ > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 2 ++ > 2 files changed, 12 insertions(+) Reviewed-by: Dmitry Baryshkov Minor nit below > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > index aa1a1646b322..862912727925 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > @@ -26,6 +26,7 @@ > #include "dpu_hw_dspp.h" > #include "dpu_hw_dsc.h" > #include "dpu_hw_merge3d.h" > +#include "dpu_hw_cdm.h" > #include "dpu_formats.h" > #include "dpu_encoder_phys.h" > #include "dpu_crtc.h" > @@ -2050,6 +2051,15 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc) > phys_enc->hw_pp->merge_3d->idx); > } > > + if (phys_enc->hw_cdm) { > + if (phys_enc->hw_cdm->ops.bind_pingpong_blk && phys_enc->hw_pp) > + phys_enc->hw_cdm->ops.bind_pingpong_blk(phys_enc->hw_cdm, > + false, phys_enc->hw_pp->idx); PINGPONG_NONE > + if (phys_enc->hw_ctl->ops.update_pending_flush_cdm) > + phys_enc->hw_ctl->ops.update_pending_flush_cdm(phys_enc->hw_ctl, > + phys_enc->hw_cdm->idx); > + } > + > if (dpu_enc->dsc) { > dpu_encoder_unprep_dsc(dpu_enc); > dpu_enc->dsc = NULL; > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h > index b6b48e2c63ef..410f6225789c 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h > @@ -151,6 +151,7 @@ enum dpu_intr_idx { > * @hw_pp: Hardware interface to the ping pong registers > * @hw_intf: Hardware interface to the intf registers > * @hw_wb: Hardware interface to the wb registers > + * @hw_cdm: Hardware interface to the CDM registers > * @dpu_kms: Pointer to the dpu_kms top level > * @cached_mode: DRM mode cached at mode_set time, acted on in enable > * @enabled: Whether the encoder has enabled and running a mode > @@ -179,6 +180,7 @@ struct dpu_encoder_phys { > struct dpu_hw_pingpong *hw_pp; > struct dpu_hw_intf *hw_intf; > struct dpu_hw_wb *hw_wb; > + struct dpu_hw_cdm *hw_cdm; > struct dpu_kms *dpu_kms; > struct drm_display_mode cached_mode; > enum dpu_enc_split_role split_role; > -- > 2.40.1 > -- With best wishes Dmitry