From patchwork Fri Jan 21 21:06:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 533832 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1054729imr; Fri, 21 Jan 2022 13:06:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwOS66QUSDFexUkww004lk0cGJdspiHG1Z1MNQ48rQxlrI48JU3VPFogHiWWzVh1PnTrt6M X-Received: by 2002:a17:902:7297:b0:14a:9df9:6424 with SMTP id d23-20020a170902729700b0014a9df96424mr5508036pll.19.1642799194476; Fri, 21 Jan 2022 13:06:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642799194; cv=none; d=google.com; s=arc-20160816; b=O6gw4RNrbn6I+Upl97D2YlVRNKcjDf3c+MMS3fDczqpAxZOD3bYsL4/pojUwR4ufZk BN3JA4KAoSLnS8ek9FexuuZNbhVHUEvVSME0F3QWpHvQufhlapriXWcEoreb30PZRIVY ikVvzqEJMKKZZS37QharWEXLjNJh7eEbragwqfNv/2dtx9Z4WWHplE4ryjrtQcaosLCE YDWHMbvTfGtLYJb2aG4hjVe+xwJNiRevsdzdJkSkUJszsTbolIJqsbZ0tBNoZs7+XoLs ja6rfZU+ZKWk7QeB5Nx3tRcqhSglbpLx3ijkph+kkHWK+H9pl/Ta6g6OesQZn/kLKeB0 Fc0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=gbDYfYkXzgmiEZGNTQVBb6LTE3GRv8HVsbajZEr2dIk=; b=Pe+3gjozMbeVpNQf/x4DAkrg1Yxs4mldW+7SAcEVtxZLYV3cX0Dc6xcHHuNoWFTnlW kmpjzPQzgsvf4CVeUXIbzyJdXCytf13xk2UjwowYyOIbelZqzsB578F98KikFiDetr58 L18Wj/5g8DHrai5SLCuBSiga5TS8hZzO5sxkSkl+u2it+ywhNySpmLVOymYF6D/1sCgx Spj9G5gGowNV7R/sYmAR2DOM6Y7I8fTMKGWD4TogjI91hMSfoYJWis9OF9zHMYPKS62W XPQSfqC7ncPnqFrfXqXqzelEx7m1LRrlRTZ1JJTCnV8JeUgfBMw0ri2UQ9v8ivJ4s80N 7eZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vdcnX1xS; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id o18si533951plg.356.2022.01.21.13.06.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 13:06:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=vdcnX1xS; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E5BFC10E6A4; Fri, 21 Jan 2022 21:06:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8EE3B10E69A for ; Fri, 21 Jan 2022 21:06:23 +0000 (UTC) Received: by mail-lf1-x136.google.com with SMTP id m1so36391007lfq.4 for ; Fri, 21 Jan 2022 13:06:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=gbDYfYkXzgmiEZGNTQVBb6LTE3GRv8HVsbajZEr2dIk=; b=vdcnX1xS5hTwnCvfbiEqPJiR77PcyU1Y9bya0cA8O52sBjiDPfjXG+qIm2DBrhszyt Zy2tK1s9rXxBYKa+s7kskeK4/yC09B4HogYMlmQp0rJ/Pt26yNC4Vx8geszM0uYcKaIt vKUyGs2Sm36c+5IqxsVoWWQVfzN7uV9G4pV0Bh+IFsoFHcOivw3Iq3Kfexg2+sQZDqj1 XY1bTpwYtonMuD8h3Tnvdm9tj+UsWWdDo41L0MvuNpIVT/D049wsInMqTT8g5qwQHpVj JPoBLb31wSJX/tkXxASNof9ctZaLd7KZ6oRoX/bI/TVDMEK1OzAS5DZ35dYtrWmFaUFA hGkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=gbDYfYkXzgmiEZGNTQVBb6LTE3GRv8HVsbajZEr2dIk=; b=b+TzMr0pZExXxtlRVEW6AoJSk3T6Jfat90ypBsIMz8rS7OaQP0g4qYMRXC+6myVCy9 ZAWUmJzNJTjNhBnRIzRvkMpk6m9RXRdB3khewtlQtI0ZxKZLxwKCYyk9G5wHRcpJ6Ii5 bvUGHqDUn/2Vp7PWpeCDz1LIfTIXr6nEMIXyi318AvNpuSlsE5GS3UUIMBmiAzccI2T4 qisfAW39g9VFv9AY/PtL0a8CCP39jSjBjGLDsR0qtJ27cUAw8X536RweR6bLGC5oH67E T9LtAPUuh4UK+ePqQnNwXpLyEdXY/5O+rp5Xn19G+qpJ1gBeCB3EnP7GOJPXV+LNOXuk /MkA== X-Gm-Message-State: AOAM530OmRh/rGhzyysMj37kirXvA9WaFYQ6Gnm3izDw6bYrn4iFmzGM 3s0hNut+NWUVs4N7fYa9nV5vog== X-Received: by 2002:ac2:424a:: with SMTP id m10mr146163lfl.361.1642799181923; Fri, 21 Jan 2022 13:06:21 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id v10sm279125ljk.44.2022.01.21.13.06.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jan 2022 13:06:21 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v5 2/6] drm/msm/dpu: add DSPP blocks teardown Date: Sat, 22 Jan 2022 00:06:14 +0300 Message-Id: <20220121210618.3482550-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220121210618.3482550-1-dmitry.baryshkov@linaro.org> References: <20220121210618.3482550-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add missing calls to dpu_hw_dspp_destroy() to free resources allocated for DSPP hardware blocks. Fixes: e47616df008b ("drm/msm/dpu: add support for color processing blocks in dpu driver") Signed-off-by: Dmitry Baryshkov Reviewed-by: Stephen Boyd Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c index b5b1ea1e4de6..63ed0d7df848 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c @@ -35,6 +35,14 @@ int dpu_rm_destroy(struct dpu_rm *rm) { int i; + for (i = 0; i < ARRAY_SIZE(rm->dspp_blks); i++) { + struct dpu_hw_dspp *hw; + + if (rm->dspp_blks[i]) { + hw = to_dpu_hw_dspp(rm->dspp_blks[i]); + dpu_hw_dspp_destroy(hw); + } + } for (i = 0; i < ARRAY_SIZE(rm->pingpong_blks); i++) { struct dpu_hw_pingpong *hw;