From patchwork Fri Mar 10 00:56:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13168554 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81B04C74A4B for ; Fri, 10 Mar 2023 00:57:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229827AbjCJA52 (ORCPT ); Thu, 9 Mar 2023 19:57:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58080 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229830AbjCJA5Y (ORCPT ); Thu, 9 Mar 2023 19:57:24 -0500 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09E6A115B7B for ; Thu, 9 Mar 2023 16:57:11 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id k14so4602711lfj.7 for ; Thu, 09 Mar 2023 16:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678409829; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lC959/HwMpiS2uwIlrKavXLY4c7ReN699YonwKpSQeo=; b=RRQ1/se19TWT/QVlfHViJmrRMiSBgQZfhTgaY/+8duKkHI2Z6OItz6NqLC5Fo13/ZW Qe5byzp4hHYrno4/ox2Pp9Jfebvfquv/zeI6F5djZ+U3tAd6cciquunVjZ/8s5uFZxp0 /6gjhp1nuVR2q23tw7LNln3nfVkIoQ3S+PVQnVtcSOY/RltRJPn+S85RLw+hH9oymrwl ayehTBvASYW6K0+KsDiEObpOrHBGaL2w8ms49wqkrTE0kebUeFhSL23TiMglB971dVFB HtvBlBe4nwu+B+JGCmHGoCuyE/kleqPJ8Pow/RQi2WOIaJGPtZ85ZJYu6Mk7rGhOxEci YeQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678409829; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lC959/HwMpiS2uwIlrKavXLY4c7ReN699YonwKpSQeo=; b=3XHQA9TIdjcJG6gcUY7D76O5gPaNdZQ68IBrBtoVqCKQgyxcrB/NRw1JbSw9ye6Oiy 5Hgp0wIi9Hs/un6BRuRZdbU3bd7ECYVwIf6DinQhNT+8HyCphUPiS9yjaRcc8ogPQuA9 u+nAH/0m238Z8p+KvaEi32vPCtYDTcqmhKdMu0xZcAmM7htTWv16vg0fD53+ui2HRV+T a494FnI/MOPfa6nvZmv9olr7ji2M4kddtBg0r9lasDrmzu3HepFSKZoJQ40xLo5ydUu5 dWDsK+hDnmxhNFDHYQntvDZOggkMdxkCwBVxlj6n3Bpp592/rxDhQ17ajfYFMgWxkhte 3RBw== X-Gm-Message-State: AO0yUKWZxNFGdrNUletVF0/Lr1hX51szSgAz/E/dQarGdelivnCEl15B VaX02I6Dx+ITn6eKkgPEuNTfUQ== X-Google-Smtp-Source: AK7set8rN3zX/reeJEW5k8lVcxs9JRC4tcWA2DXPIP3IUrD8iILatxcQQXysZOo8ST0I0iPfxv9lDw== X-Received: by 2002:ac2:4473:0:b0:4e1:36a:eda5 with SMTP id y19-20020ac24473000000b004e1036aeda5mr6416876lfl.30.1678409829402; Thu, 09 Mar 2023 16:57:09 -0800 (PST) Received: from eriador.lan (dzccz6yyyyyyyyyyybcwt-3.rev.dnainternet.fi. [2001:14ba:a085:4d00::8a5]) by smtp.gmail.com with ESMTPSA id m13-20020ac2428d000000b004d8540b947asm75280lfh.56.2023.03.09.16.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 16:57:08 -0800 (PST) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH v5 04/32] drm/msm/dpu: drop EAGAIN check from dpu_format_populate_layout Date: Fri, 10 Mar 2023 02:56:36 +0200 Message-Id: <20230310005704.1332368-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230310005704.1332368-1-dmitry.baryshkov@linaro.org> References: <20230310005704.1332368-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The pipe's layout is not cached, corresponding data structure is zeroed out each time in the dpu_plane_sspp_atomic_update(), right before the call to _dpu_plane_set_scanout() -> dpu_format_populate_layout(). Drop plane_addr comparison against previous layout and corresponding EAGAIN handling. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 10 +--------- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 4 +--- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c index d95540309d4d..ec1001e10f4f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c @@ -918,8 +918,7 @@ int dpu_format_populate_layout( struct drm_framebuffer *fb, struct dpu_hw_fmt_layout *layout) { - uint32_t plane_addr[DPU_MAX_PLANES]; - int i, ret; + int ret; if (!fb || !layout) { DRM_ERROR("invalid arguments\n"); @@ -940,9 +939,6 @@ int dpu_format_populate_layout( if (ret) return ret; - for (i = 0; i < DPU_MAX_PLANES; ++i) - plane_addr[i] = layout->plane_addr[i]; - /* Populate the addresses given the fb */ if (DPU_FORMAT_IS_UBWC(layout->format) || DPU_FORMAT_IS_TILE(layout->format)) @@ -950,10 +946,6 @@ int dpu_format_populate_layout( else ret = _dpu_format_populate_addrs_linear(aspace, fb, layout); - /* check if anything changed */ - if (!ret && !memcmp(plane_addr, layout->plane_addr, sizeof(plane_addr))) - ret = -EAGAIN; - return ret; } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 2b0ebdd4c207..d6518ef1beb2 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -476,9 +476,7 @@ static void _dpu_plane_set_scanout(struct drm_plane *plane, int ret; ret = dpu_format_populate_layout(aspace, fb, &pipe_cfg->layout); - if (ret == -EAGAIN) - DPU_DEBUG_PLANE(pdpu, "not updating same src addrs\n"); - else if (ret) + if (ret) DPU_ERROR_PLANE(pdpu, "failed to get format layout, %d\n", ret); else if (pdpu->pipe_hw->ops.setup_sourceaddress) { trace_dpu_plane_set_scanout(pdpu->pipe_hw->idx,