From patchwork Tue Feb 15 14:16:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 542785 Delivered-To: patch@linaro.org Received: by 2002:ac0:e142:0:0:0:0:0 with SMTP id r2csp501842imn; Tue, 15 Feb 2022 06:16:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtA2v9sF/mlE/sQ6/zsyK8qi/HkC8TBUJ6hg6VbZLPhJ+VEI8AedykynVN5DrAqMqaBr4W X-Received: by 2002:a05:6a00:2349:: with SMTP id j9mr4644091pfj.34.1644934617137; Tue, 15 Feb 2022 06:16:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644934617; cv=none; d=google.com; s=arc-20160816; b=R9chI1rke4XpM/cDeWG2CJZjXlakCOxzwhST8d7nIEZ05rSg58FJhNvAFNoAoWqqnu kvrrw2YLt6WujhLFrApY7jM9f7I5dcDiDVioz2H3XWFPlV3ifByM222O2DwWEFCH1OL8 hCcud23QMr0ynyniMSU7/Bgm2WyuvB2CC2/Psv5PFu6DmFTqR0Lx9fL6DPg+XyVmpaS4 esh8D4lmUpitwr/7Y+AS2q+onw/rwUPaf5LMi5v6peGZsif5LWoWRfLsiR7NhMEFnLDj JOaEdPgnDO0ZLxSU8rlMhr9b8X4kcP3F2akaje6inEWmtIVI7y/q8G+crGkB3o6h9OSt g/AQ== 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=zOWsFQ2NqdBKJaWz8vlkHE1lWZ3O8C4cPJw7Ctmru5A=; b=aNzzkBD6Uu9ZgbO1qUYg70VaK/F5Tie2yo7SLi8egaJEd3r8YZmb0tzPpt/pBr8wwB Y63/eGH1q7/QwPOVCsr9p7xzKsypcZ9tnYjGTWijZYBejdMvrlUAMYqiSPvVY2f9LaWx 27+gdyNTTjDm3St6GDGUBBUOpHH9PrHRELwDEqm6MKcJmsaKSy2SSGKu3Z+HBv9EvvyS T+DhMo2XJEPzbMwMUV8a728r+nwRTEI+sKZBFKVpS0IrS1Q7uepdleRfmnc5qZ7ba58d 4lMuZQLtANYnB+9AHm4sY4TgN6KHHj5DzQiccyBNGW5pfBgshzuzIc0WreGBbCxJ6c6V ZzdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ar3rW97B; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id q11si33927772pfu.131.2022.02.15.06.16.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:57 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ar3rW97B; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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 159BA10E5F3; Tue, 15 Feb 2022 14:16:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D05610E5F4 for ; Tue, 15 Feb 2022 14:16:50 +0000 (UTC) Received: by mail-lf1-x132.google.com with SMTP id u6so37148406lfc.3 for ; Tue, 15 Feb 2022 06:16:50 -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=zOWsFQ2NqdBKJaWz8vlkHE1lWZ3O8C4cPJw7Ctmru5A=; b=ar3rW97Bd/FO3/TiXMLwcY5rUfU+ObqWzWidDP6RqiKwOimcHmEUimm0UfmtFkl+ZY L/BEn+OZGQJnYcnOKPgy21EZ6vD0lIst/8Syl3z7NrF8Vkwh4AoFKsqVPi4jPaiWj6EJ e5/i8Qrd7Z9zD6epSqcnAtQBBQDURdwHriUDYextSnl+RG5HsfWloX+hVWk/cIFFfEA6 qdBBi8D68pUh6KZ6QaGMiV9Rg/eIfqMEpB2+3Y1GLwWidsbsOaoCXAL5a7ZupVoKE5Ch FWqezFdsn7BthdHgOjTr47xeMKggMQA59gPGKU6PWLaKorvc7K7NqWL3D9+YDgOdcSFM ZJRg== 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=zOWsFQ2NqdBKJaWz8vlkHE1lWZ3O8C4cPJw7Ctmru5A=; b=y3bTBAt5BQpLEm10CCddaHksxlukzDzhT7v4ja1xpMyCnn0rAlKOprBH6+poJRMUN4 XQcEOWuKo8s6/paCVfM+ff6zoa39fSJrK+Kj7ZiDoJFxkHUlnXQ/oBOqHJSo7K5nw3xe Lh9M1nOor9KbkCrh6IgsOlL0Z4K6rtq3ZiMFq+0jyzTOKTnwcqdchip9R2MdvQ02AjJx aE3sjSF2rJltHU5RfnrRXWh0dalYuhHrDoBccmDXWvTrXa5zPBgMRfYUFh1/s4HcY0rm 8FeJ0I0/DDCtbzHFnX7a/L9jw9wbiJbqciXk629u0ZwWNoMIKg+HUXZYneDeySGQhCTl nWng== X-Gm-Message-State: AOAM5330Ht0kRfHC2nyjUqddoaHmtrKIdFaHvMcE8taw1+hLLC9I25cJ /zKkaaR4emXPGwDcfnNqjxp+Mg== X-Received: by 2002:a05:6512:1081:: with SMTP id j1mr3247583lfg.257.1644934608816; Tue, 15 Feb 2022 06:16:48 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id m16sm1018044ljb.131.2022.02.15.06.16.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 06:16:48 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v2 5/8] drm/msm/dpu: encoder: drop unused mode_fixup callback Date: Tue, 15 Feb 2022 17:16:40 +0300 Message-Id: <20220215141643.3444941-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220215141643.3444941-1-dmitry.baryshkov@linaro.org> References: <20220215141643.3444941-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" Both cmd and vid backends provide useless mode_fixup() callback. Drop it. Signed-off-by: Dmitry Baryshkov Reviewed-by: Bjorn Andersson Reviewed-by: Abhinav Kumar Reviewed-by: Stephen Boyd --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ---- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 4 ---- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 10 ---------- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 14 -------------- 4 files changed, 32 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 480d02ccff8c..394916e8fe08 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -602,10 +602,6 @@ static int dpu_encoder_virt_atomic_check( if (phys->ops.atomic_check) ret = phys->ops.atomic_check(phys, crtc_state, conn_state); - else if (phys->ops.mode_fixup) - if (!phys->ops.mode_fixup(phys, mode, adj_mode)) - ret = -EINVAL; - if (ret) { DPU_ERROR_ENC(dpu_enc, "mode unsupported, phys idx %d\n", i); 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 e7270eb6b84b..7b14948c4c87 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -84,7 +84,6 @@ struct dpu_encoder_virt_ops { * @is_master: Whether this phys_enc is the current master * encoder. Can be switched at enable time. Based * on split_role and current mode (CMD/VID). - * @mode_fixup: DRM Call. Fixup a DRM mode. * @mode_set: DRM Call. Set a DRM mode. * This likely caches the mode, for use at enable. * @enable: DRM Call. Enable a DRM mode. @@ -117,9 +116,6 @@ struct dpu_encoder_phys_ops { struct dentry *debugfs_root); void (*prepare_commit)(struct dpu_encoder_phys *encoder); bool (*is_master)(struct dpu_encoder_phys *encoder); - bool (*mode_fixup)(struct dpu_encoder_phys *encoder, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode); void (*mode_set)(struct dpu_encoder_phys *encoder, struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode); diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c index 35071964d0f6..1796f83b47ae 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c @@ -45,15 +45,6 @@ static bool dpu_encoder_phys_cmd_is_master(struct dpu_encoder_phys *phys_enc) return (phys_enc->split_role != ENC_ROLE_SLAVE); } -static bool dpu_encoder_phys_cmd_mode_fixup( - struct dpu_encoder_phys *phys_enc, - const struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) -{ - DPU_DEBUG_CMDENC(to_dpu_encoder_phys_cmd(phys_enc), "\n"); - return true; -} - static void _dpu_encoder_phys_cmd_update_intf_cfg( struct dpu_encoder_phys *phys_enc) { @@ -756,7 +747,6 @@ static void dpu_encoder_phys_cmd_init_ops( ops->prepare_commit = dpu_encoder_phys_cmd_prepare_commit; ops->is_master = dpu_encoder_phys_cmd_is_master; ops->mode_set = dpu_encoder_phys_cmd_mode_set; - ops->mode_fixup = dpu_encoder_phys_cmd_mode_fixup; ops->enable = dpu_encoder_phys_cmd_enable; ops->disable = dpu_encoder_phys_cmd_disable; ops->destroy = dpu_encoder_phys_cmd_destroy; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c index ddd9d89cd456..1831fe37c88c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c @@ -225,19 +225,6 @@ static void programmable_fetch_config(struct dpu_encoder_phys *phys_enc, spin_unlock_irqrestore(phys_enc->enc_spinlock, lock_flags); } -static bool dpu_encoder_phys_vid_mode_fixup( - struct dpu_encoder_phys *phys_enc, - const struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) -{ - DPU_DEBUG_VIDENC(phys_enc, "\n"); - - /* - * Modifying mode has consequences when the mode comes back to us - */ - return true; -} - static void dpu_encoder_phys_vid_setup_timing_engine( struct dpu_encoder_phys *phys_enc) { @@ -676,7 +663,6 @@ static void dpu_encoder_phys_vid_init_ops(struct dpu_encoder_phys_ops *ops) { ops->is_master = dpu_encoder_phys_vid_is_master; ops->mode_set = dpu_encoder_phys_vid_mode_set; - ops->mode_fixup = dpu_encoder_phys_vid_mode_fixup; ops->enable = dpu_encoder_phys_vid_enable; ops->disable = dpu_encoder_phys_vid_disable; ops->destroy = dpu_encoder_phys_vid_destroy;