drm/msm/dpu: drop dpu_encoder_phys_ops::destroy
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 1 Dec 2023 21:18:44 +0000 (00:18 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 5 Dec 2023 19:14:34 +0000 (22:14 +0300)
Drop the dpu_encoder_phys_ops' destroy() callback. No phys backend
implements it anymore, so it is useless.

Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/570058/
Link: https://lore.kernel.org/r/20231201211845.1026967-13-dmitry.baryshkov@linaro.org
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h

index cd2e153860b5242452c71488d87efd170e4bebb1..6167aa664b30e9b7714c9aa75564beb8e10f24f2 100644 (file)
@@ -455,24 +455,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);
 }
index 5dc53b65040e26f6413ba1cd54390ef9bb041c71..b6b48e2c63efa6c60ed409f2704059832f4d0c1e 100644 (file)
@@ -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);