From patchwork Wed Jan 5 23:10:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 530173 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp698807imp; Wed, 5 Jan 2022 15:10:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJwfP5RiayLSLrlmove3D1rxOeCUIV0peR8J8lVd3gQuOW8y8Jvgg5TgCCyeDrlvUm2AuZHF X-Received: by 2002:a63:293:: with SMTP id 141mr49726542pgc.499.1641424244723; Wed, 05 Jan 2022 15:10:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641424244; cv=none; d=google.com; s=arc-20160816; b=s53rm9TaTqpoBNoeu4gfEeAKYoNuX3m0KTskA2zGXUoEjs8OUw2oYAI+TAdT+ey4f1 974OhZTScwkQfiSHgmm7+3vhD9JXSK50Xe3oGZajuPqWnwVVDH7eQTQU7wxjOq0PS8mW QJ59EVRa2bYfkgkrbtX3sKvQ3fcuj70/TSYBR8tixanN770ZUS6+6clfkmiLGC4nIY6W hxu4dL0eP/AHFVw3YGGVgcukFrhcW0se0SRuijyp8BxbORJjpnX0B+dXnFMImQvQKDXM CevjPTTdehKu2SEEiYHQkRWyrkqq7+JzzcvK5oIwQiMeYQTBeILX0KcQFqKlNHQnRIez pkOA== 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=VQ0ZgNuAluSnuM7ZE2zA1IGqyGYMHg8c0oXA5e7yknc=; b=uFUAYBj9S5n8AR0DhGa538G4rEW5DuKGa1Rz7UMdQZXlQHTzDDybny0PkwTCDoxd3y dOJ2IwaZSOhNxo7XJX9GaHo8IpawANkUKgDmU5rPf1Gz0B69eW4G2+LND4QlNklF4dRs wldqXPewxx2MSRbh8U5S9RJcT6vqwAY7ppCwe3RFboel8BQsS9yO+CXNicUHQMv7yXgA 3Kxe1QNkZXK9tMgZwBUQlBLogFX1TrdpxZZvoy5ypCPqdn9fwX9zapqd66xDGeWgcEE9 3GpBB63Gk8+pTVFOn8Z2ry3yForYWPn06AmCJ0IwiYMshqImICRyh+4FTm2F0JMUxA5O epWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=wMd8DSiM; 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 n4si194620pgq.710.2022.01.05.15.10.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 15:10:44 -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=wMd8DSiM; 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 0F9FD10E3C1; Wed, 5 Jan 2022 23:10:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by gabe.freedesktop.org (Postfix) with ESMTPS id 28F2A10E32A for ; Wed, 5 Jan 2022 23:10:38 +0000 (UTC) Received: by mail-lf1-x134.google.com with SMTP id r4so1197644lfe.7 for ; Wed, 05 Jan 2022 15:10:38 -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=VQ0ZgNuAluSnuM7ZE2zA1IGqyGYMHg8c0oXA5e7yknc=; b=wMd8DSiMeFNXgkyoSpiKIGH6Q5J3GD39IyoPdk727c0BpbtUc7fK68+G4WRRdVJYZK rW1UB3kPlP1nDLZ67GwblFOvA1qPfHIA1fgUWFDgoMc0o5gNaQmELtV+U0opCIui/4HZ zfPhEYbA6gEN/qV8pK+r0ZQvADN8mR+o19JZU+iQ7pvszqUCVYcUCX9YRDnktVKiTKnE p7RGrvEX31WV4efx1KqLlnaoM+D+W9j7kejcRwqoYD7k3ky+YcTHWu4uQrQtR/ZntD0g +nQnw7dZNrExG2EFSeLZpA6wlR6xqj8Qm5AlMxKSSQX3Ln/D+NACdVxLOlzPP/68A8TW vY4g== 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=VQ0ZgNuAluSnuM7ZE2zA1IGqyGYMHg8c0oXA5e7yknc=; b=SsBbNuLOoYjvFqX5zirq/bam2EAW0my3YJJeWKHVSArnYRQNePQqIS5sPy9JkAe70B 4670ncqMT5uOjroKFnALVwIkZ7/iTbMUmFhZTnbnYOembbHQSwk/EPLsUU+eFMHyOZfi XLBoakq8D1SlSr8Qk5XfC0s412jQ1e7E44FA4lWuwIkIhElJCrJPWLTNlAeeHdMlA+ng wribS8paLzRDBHBXq/7P2DvLVg/W0NU2nz75zj57Z6PV140wMdvgjznrqMHx+n7qVNVj +MqgIueT/vj5xjk2UYlZr+y9CeS49HUssjAmoafKo4OI6nrJlMzi23lx6Sd/ZP7s+JSI PnXA== X-Gm-Message-State: AOAM533d9I3WwFly/bhcO4JuvyNCd85Iz5fmGlBBqssVx0hegrw9flIH HBpJsinEKC2ooJhl5gnUdf+lRQ== X-Received: by 2002:a05:6512:475:: with SMTP id x21mr19400581lfd.562.1641424236481; Wed, 05 Jan 2022 15:10:36 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id a13sm27187lff.104.2022.01.05.15.10.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jan 2022 15:10:35 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v4 2/5] drm/msm/dpu: add DSPP blocks teardown Date: Thu, 6 Jan 2022 02:10:28 +0300 Message-Id: <20220105231031.436020-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220105231031.436020-1-dmitry.baryshkov@linaro.org> References: <20220105231031.436020-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 --- 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;