From patchwork Sun Jul 30 01:19:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 708315 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 D15DAC04A6A for ; Sun, 30 Jul 2023 01:19:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229614AbjG3BTn (ORCPT ); Sat, 29 Jul 2023 21:19:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229602AbjG3BTm (ORCPT ); Sat, 29 Jul 2023 21:19:42 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F0C52708 for ; Sat, 29 Jul 2023 18:19:41 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-5222a38c0a0so4795885a12.1 for ; Sat, 29 Jul 2023 18:19:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690679979; x=1691284779; 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=2fetHFJrVBIqajjO9vTTq/S6N654BcjogotSI7gQiFo=; b=ujNkHJAazoZqzoWj7LGFkhps5mu9P88G1UBvPqTugJhE3KNixYjxPGnw9I7WCLJOKJ NeWXMtY3LLRVvgz3cJFIYG3VuCgdtElJNeVxZW/ad6HNptLhAaqIxQ6Sqvv3dHzar9GL brpfnRMdVBvtmJw9QOMEMADFyva97Xy70n/IoIqRx0vVH9R6CeohL9Z1pi3AFjFKGdMu Q+CGsfgRtj078j8i23MgrW1gdxhXYhSmoUP8juVAHL5JIZ0s8wil0BWtzUKOThapNEL3 ulw2td8WVE2AtydSvmF5L2icx3Vapyf3sm+DkpgYKnQa7FxhYA4Yt3Dxe1B6pYomGS3q 3HQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690679979; x=1691284779; 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=2fetHFJrVBIqajjO9vTTq/S6N654BcjogotSI7gQiFo=; b=RVRksXTYws5INqCw60mwvn7twlO8Nszhl2lIJHfIZEPsZ683bkehsuEzjf07whnoSl lvAxYl+EdA0pK7XHNJJcFKJKYmjU+lN43g8IgXD2mDsH52di5uMCFqkiPvmtAlnLHs4W k3U14vflTN3D49ySU7TssVVB6nZrwhHlxWsYfj71DD9mhYuRV55yQcv+4bnJHpVAa3TJ cV5N3y3p1hZDIJK0CTy94JD89ycc7RMpWEp1DWzz5wBjXEVxR0tKhi5JLYxMTPPAmzaB AP/lelKMIbA5mk9h/Km2LUfbM4i/pZBzLjUE2J0XhPs2GVi7UM++xuvnXb4yM1Hj/rKp HvmQ== X-Gm-Message-State: ABy/qLZox3HoxTxQU73QA8iAzNQYLhaxWt6PXF7+HJrbx5ZdViJjMzeN l9LaNf5yVhfKUJyMGuim00hSv1y3NSGSfJuWpnk= X-Google-Smtp-Source: APBJJlEmjqZdWteCTFoMqqW3CVl1NdBglW6pK0FOgL7T1Cv70ZrFJvc0u8h8dcsts4pr1EZw5c8mcg== X-Received: by 2002:a17:906:739a:b0:98e:37fe:691b with SMTP id f26-20020a170906739a00b0098e37fe691bmr3651099ejl.34.1690679979761; Sat, 29 Jul 2023 18:19:39 -0700 (PDT) Received: from umbar.unikie.fi ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id rk21-20020a170907215500b00992ea405a79sm3915835ejb.166.2023.07.29.18.19.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 29 Jul 2023 18:19:39 -0700 (PDT) From: Dmitry Baryshkov To: Rob Clark , Sean Paul , Abhinav Kumar , Marijn Suijten Cc: Stephen Boyd , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, Jessica Zhang Subject: [PATCH v3 12/13] drm/msm/dpu: drop dpu_encoder_phys_ops::destroy Date: Sun, 30 Jul 2023 04:19:19 +0300 Message-Id: <20230730011920.354575-13-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230730011920.354575-1-dmitry.baryshkov@linaro.org> References: <20230730011920.354575-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Drop the dpu_encoder_phys_ops' destroy() callback. No phys backend implements it anymore, so it is useless. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 18 ------------------ .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 2 -- 2 files changed, 20 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 6a7ea73fe6e2..2b94ff3d08a1 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -456,24 +456,6 @@ static void dpu_encoder_destroy(struct drm_encoder *drm_enc) dpu_enc = to_dpu_encoder_virt(drm_enc); DPU_DEBUG_ENC(dpu_enc, "\n"); - mutex_lock(&dpu_enc->enc_lock); - - for (i = 0; i < dpu_enc->num_phys_encs; i++) { - struct dpu_encoder_phys *phys = dpu_enc->phys_encs[i]; - - if (phys->ops.destroy) { - phys->ops.destroy(phys); - --dpu_enc->num_phys_encs; - dpu_enc->phys_encs[i] = NULL; - } - } - - if (dpu_enc->num_phys_encs) - DPU_ERROR_ENC(dpu_enc, "expected 0 num_phys_encs not %d\n", - dpu_enc->num_phys_encs); - dpu_enc->num_phys_encs = 0; - mutex_unlock(&dpu_enc->enc_lock); - drm_encoder_cleanup(drm_enc); mutex_destroy(&dpu_enc->enc_lock); } 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 4fb0d95f3061..757ce58f958b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -72,7 +72,6 @@ struct dpu_encoder_phys; * @enable: DRM Call. Enable a DRM mode. * @disable: DRM Call. Disable mode. * @atomic_check: DRM Call. Atomic check new DRM state. - * @destroy: DRM Call. Destroy and release resources. * @control_vblank_irq Register/Deregister for VBLANK IRQ * @wait_for_commit_done: Wait for hardware to have flushed the * current pending frames to hardware @@ -102,7 +101,6 @@ struct dpu_encoder_phys_ops { int (*atomic_check)(struct dpu_encoder_phys *encoder, struct drm_crtc_state *crtc_state, struct drm_connector_state *conn_state); - void (*destroy)(struct dpu_encoder_phys *encoder); int (*control_vblank_irq)(struct dpu_encoder_phys *enc, bool enable); int (*wait_for_commit_done)(struct dpu_encoder_phys *phys_enc); int (*wait_for_tx_complete)(struct dpu_encoder_phys *phys_enc);