From patchwork Thu Jul 26 20:30:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10546429 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B4979180E for ; Thu, 26 Jul 2018 20:30:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C259A2B7DE for ; Thu, 26 Jul 2018 20:30:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B67AB2B806; Thu, 26 Jul 2018 20:30:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 420522B7DE for ; Thu, 26 Jul 2018 20:30:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EC2D56E847; Thu, 26 Jul 2018 20:30:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC48B6E14F; Thu, 26 Jul 2018 20:30:19 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id B4CF760B15; Thu, 26 Jul 2018 20:30:19 +0000 (UTC) Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id DDF9560588; Thu, 26 Jul 2018 20:30:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org DDF9560588 From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [PATCH 1/5] drm/msm/disp/dpu: Remove unused code from drm_encoder.c Date: Thu, 26 Jul 2018 14:30:10 -0600 Message-Id: <20180726203014.3270-2-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726203014.3270-1-jcrouse@codeaurora.org> References: <20180726203014.3270-1-jcrouse@codeaurora.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove dpu_encoder_check_mode and dpu_encoder_helper_hw_release frmo drm_encoder.c as they appear to be unused. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 80 ------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 8 -- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 9 --- 3 files changed, 97 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 27775feed32b..5c0051af5e98 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -1627,22 +1627,6 @@ static void _dpu_encoder_kickoff_phys(struct dpu_encoder_virt *dpu_enc) spin_unlock_irqrestore(&dpu_enc->enc_spinlock, lock_flags); } -bool dpu_encoder_check_mode(struct drm_encoder *drm_enc, u32 mode) -{ - struct dpu_encoder_virt *dpu_enc; - struct msm_display_info *disp_info; - - if (!drm_enc) { - DPU_ERROR("invalid encoder\n"); - return false; - } - - dpu_enc = to_dpu_encoder_virt(drm_enc); - disp_info = &dpu_enc->disp_info; - - return (disp_info->capabilities & mode); -} - void dpu_encoder_trigger_kickoff_pending(struct drm_encoder *drm_enc) { struct dpu_encoder_virt *dpu_enc; @@ -1903,70 +1887,6 @@ void dpu_encoder_kickoff(struct drm_encoder *drm_enc) DPU_ATRACE_END("encoder_kickoff"); } -int dpu_encoder_helper_hw_release(struct dpu_encoder_phys *phys_enc, - struct drm_framebuffer *fb) -{ - struct drm_encoder *drm_enc; - struct dpu_hw_mixer_cfg mixer; - struct dpu_rm_hw_iter lm_iter; - bool lm_valid = false; - - if (!phys_enc || !phys_enc->parent) { - DPU_ERROR("invalid encoder\n"); - return -EINVAL; - } - - drm_enc = phys_enc->parent; - memset(&mixer, 0, sizeof(mixer)); - - /* reset associated CTL/LMs */ - if (phys_enc->hw_ctl->ops.clear_pending_flush) - phys_enc->hw_ctl->ops.clear_pending_flush(phys_enc->hw_ctl); - if (phys_enc->hw_ctl->ops.clear_all_blendstages) - phys_enc->hw_ctl->ops.clear_all_blendstages(phys_enc->hw_ctl); - - dpu_rm_init_hw_iter(&lm_iter, drm_enc->base.id, DPU_HW_BLK_LM); - while (dpu_rm_get_hw(&phys_enc->dpu_kms->rm, &lm_iter)) { - struct dpu_hw_mixer *hw_lm = (struct dpu_hw_mixer *)lm_iter.hw; - - if (!hw_lm) - continue; - - /* need to flush LM to remove it */ - if (phys_enc->hw_ctl->ops.get_bitmask_mixer && - phys_enc->hw_ctl->ops.update_pending_flush) - phys_enc->hw_ctl->ops.update_pending_flush( - phys_enc->hw_ctl, - phys_enc->hw_ctl->ops.get_bitmask_mixer( - phys_enc->hw_ctl, hw_lm->idx)); - - if (fb) { - /* assume a single LM if targeting a frame buffer */ - if (lm_valid) - continue; - - mixer.out_height = fb->height; - mixer.out_width = fb->width; - - if (hw_lm->ops.setup_mixer_out) - hw_lm->ops.setup_mixer_out(hw_lm, &mixer); - } - - lm_valid = true; - - /* only enable border color on LM */ - if (phys_enc->hw_ctl->ops.setup_blendstage) - phys_enc->hw_ctl->ops.setup_blendstage( - phys_enc->hw_ctl, hw_lm->idx, NULL); - } - - if (!lm_valid) { - DPU_DEBUG_ENC(to_dpu_encoder_virt(drm_enc), "lm not found\n"); - return -EFAULT; - } - return 0; -} - void dpu_encoder_prepare_commit(struct drm_encoder *drm_enc) { struct dpu_encoder_virt *dpu_enc; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h index ce92901ed227..204e538b0b74 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h @@ -139,14 +139,6 @@ enum dpu_intf_mode dpu_encoder_get_intf_mode(struct drm_encoder *encoder); */ void dpu_encoder_virt_restore(struct drm_encoder *encoder); -/** - * dpu_encoder_check_mode - check if given mode is supported or not - * @drm_enc: Pointer to drm encoder object - * @mode: Mode to be checked - * @Return: true if it is cmd mode - */ -bool dpu_encoder_check_mode(struct drm_encoder *drm_enc, u32 mode); - /** * dpu_encoder_init - initialize virtual encoder object * @dev: Pointer to drm device structure 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 8505edddcc81..dacec1c8eeeb 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -402,15 +402,6 @@ void dpu_encoder_helper_split_config( struct dpu_encoder_phys *phys_enc, enum dpu_intf interface); -/** - * dpu_encoder_helper_hw_release - prepare for h/w reset during disable - * @phys_enc: Pointer to physical encoder structure - * @fb: Optional fb for specifying new mixer output resolution, may be NULL - * Return: Zero on success - */ -int dpu_encoder_helper_hw_release(struct dpu_encoder_phys *phys_enc, - struct drm_framebuffer *fb); - /** * dpu_encoder_helper_report_irq_timeout - utility to report error that irq has * timed out, including reporting frame error event to crtc and debug dump From patchwork Thu Jul 26 20:30:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10546427 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9A89E180E for ; Thu, 26 Jul 2018 20:30:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A7F722B7DE for ; Thu, 26 Jul 2018 20:30:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9C5502B806; Thu, 26 Jul 2018 20:30:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BCD5C2B7DE for ; Thu, 26 Jul 2018 20:30:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F0CB26E848; Thu, 26 Jul 2018 20:30:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29D196E843; Thu, 26 Jul 2018 20:30:21 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 1281460B73; Thu, 26 Jul 2018 20:30:20 +0000 (UTC) Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7CF87604D4; Thu, 26 Jul 2018 20:30:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7CF87604D4 From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [PATCH 2/5] drm/msm/disp/dpu: Remove unused code from drm_crtc.c Date: Thu, 26 Jul 2018 14:30:11 -0600 Message-Id: <20180726203014.3270-3-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726203014.3270-1-jcrouse@codeaurora.org> References: <20180726203014.3270-1-jcrouse@codeaurora.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove a chunk of unused code from drm_crtc.c, namely dpu_crtc_res_add, dpu_crtc_res_get, dpu_crtc_res_put and associated static functions. Also zap dpu_crtc_event_queue(), helper functions and members. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 383 +---------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 61 ---- 2 files changed, 2 insertions(+), 442 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index 7ac0e0dda866..80cbf75bc2ff 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -280,289 +280,6 @@ static void _dpu_crtc_rp_reset(struct dpu_crtc_respool *rp, mutex_unlock(rp_lock); } -/** - * _dpu_crtc_rp_add_no_lock - add given resource to resource pool without lock - * @rp: Pointer to original resource pool - * @type: Resource type - * @tag: Search tag for given resource - * @val: Resource handle - * @ops: Resource callback operations - * return: 0 if success; error code otherwise - */ -static int _dpu_crtc_rp_add_no_lock(struct dpu_crtc_respool *rp, u32 type, - u64 tag, void *val, struct dpu_crtc_res_ops *ops) -{ - struct dpu_crtc_res *res; - struct drm_crtc *crtc; - - if (!rp || !ops) { - DPU_ERROR("invalid resource pool/ops\n"); - return -EINVAL; - } - - crtc = _dpu_crtc_rp_to_crtc(rp); - if (!crtc) { - DPU_ERROR("invalid crtc\n"); - return -EINVAL; - } - - list_for_each_entry(res, &rp->res_list, list) { - if (res->type != type || res->tag != tag) - continue; - DPU_ERROR("crtc%d.%u already exist res:0x%x/0x%llx/%pK/%d\n", - crtc->base.id, rp->sequence_id, - res->type, res->tag, res->val, - atomic_read(&res->refcount)); - return -EEXIST; - } - res = kzalloc(sizeof(struct dpu_crtc_res), GFP_KERNEL); - if (!res) - return -ENOMEM; - INIT_LIST_HEAD(&res->list); - atomic_set(&res->refcount, 1); - res->type = type; - res->tag = tag; - res->val = val; - res->ops = *ops; - list_add_tail(&res->list, &rp->res_list); - DPU_DEBUG("crtc%d.%u added res:0x%x/0x%llx\n", - crtc->base.id, rp->sequence_id, type, tag); - return 0; -} - -/** - * _dpu_crtc_rp_add - add given resource to resource pool - * @rp: Pointer to original resource pool - * @type: Resource type - * @tag: Search tag for given resource - * @val: Resource handle - * @ops: Resource callback operations - * return: 0 if success; error code otherwise - */ -static int _dpu_crtc_rp_add(struct dpu_crtc_respool *rp, u32 type, u64 tag, - void *val, struct dpu_crtc_res_ops *ops) -{ - int rc; - - if (!rp) { - DPU_ERROR("invalid resource pool\n"); - return -EINVAL; - } - - mutex_lock(rp->rp_lock); - rc = _dpu_crtc_rp_add_no_lock(rp, type, tag, val, ops); - mutex_unlock(rp->rp_lock); - return rc; -} - -/** - * _dpu_crtc_rp_get - lookup the resource from given resource pool and obtain - * if available; otherwise, obtain resource from global pool - * @rp: Pointer to original resource pool - * @type: Resource type - * @tag: Search tag for given resource - * return: Resource handle if success; pointer error or null otherwise - */ -static void *_dpu_crtc_rp_get(struct dpu_crtc_respool *rp, u32 type, u64 tag) -{ - struct dpu_crtc_respool *old_rp; - struct dpu_crtc_res *res; - void *val = NULL; - int rc; - struct drm_crtc *crtc; - - if (!rp) { - DPU_ERROR("invalid resource pool\n"); - return NULL; - } - - crtc = _dpu_crtc_rp_to_crtc(rp); - if (!crtc) { - DPU_ERROR("invalid crtc\n"); - return NULL; - } - - mutex_lock(rp->rp_lock); - list_for_each_entry(res, &rp->res_list, list) { - if (res->type != type || res->tag != tag) - continue; - DPU_DEBUG("crtc%d.%u found res:0x%x/0x%llx/%pK/%d\n", - crtc->base.id, rp->sequence_id, - res->type, res->tag, res->val, - atomic_read(&res->refcount)); - atomic_inc(&res->refcount); - res->flags &= ~DPU_CRTC_RES_FLAG_FREE; - mutex_unlock(rp->rp_lock); - return res->val; - } - list_for_each_entry(res, &rp->res_list, list) { - if (res->type != type || !(res->flags & DPU_CRTC_RES_FLAG_FREE)) - continue; - DPU_DEBUG("crtc%d.%u retag res:0x%x/0x%llx/%pK/%d\n", - crtc->base.id, rp->sequence_id, - res->type, res->tag, res->val, - atomic_read(&res->refcount)); - atomic_inc(&res->refcount); - res->tag = tag; - res->flags &= ~DPU_CRTC_RES_FLAG_FREE; - mutex_unlock(rp->rp_lock); - return res->val; - } - /* not in this rp, try to grab from global pool */ - if (rp->ops.get) - val = rp->ops.get(NULL, type, -1); - if (!IS_ERR_OR_NULL(val)) - goto add_res; - /* - * Search older resource pools for hw blk with matching type, - * necessary when resource is being used by this object, - * but in previous states not yet cleaned up. - * - * This enables searching of all resources currently owned - * by this crtc even though the resource might not be used - * in the current atomic state. This allows those resources - * to be re-acquired by the new atomic state immediately - * without waiting for the resources to be fully released. - */ - else if (IS_ERR_OR_NULL(val) && (type < DPU_HW_BLK_MAX)) { - list_for_each_entry(old_rp, rp->rp_head, rp_list) { - if (old_rp == rp) - continue; - - list_for_each_entry(res, &old_rp->res_list, list) { - if (res->type != type) - continue; - DRM_DEBUG_KMS("crtc%d.%u found res:0x%x//%pK/ " - "in crtc%d.%d\n", - crtc->base.id, rp->sequence_id, - res->type, res->val, - crtc->base.id, - old_rp->sequence_id); - if (res->ops.get) - res->ops.get(res->val, 0, -1); - val = res->val; - break; - } - - if (!IS_ERR_OR_NULL(val)) - break; - } - } - if (IS_ERR_OR_NULL(val)) { - DPU_DEBUG("crtc%d.%u failed to get res:0x%x//\n", - crtc->base.id, rp->sequence_id, type); - mutex_unlock(rp->rp_lock); - return NULL; - } -add_res: - rc = _dpu_crtc_rp_add_no_lock(rp, type, tag, val, &rp->ops); - if (rc) { - DPU_ERROR("crtc%d.%u failed to add res:0x%x/0x%llx\n", - crtc->base.id, rp->sequence_id, type, tag); - if (rp->ops.put) - rp->ops.put(val); - val = NULL; - } - mutex_unlock(rp->rp_lock); - return val; -} - -/** - * _dpu_crtc_rp_put - return given resource to resource pool - * @rp: Pointer to original resource pool - * @type: Resource type - * @tag: Search tag for given resource - * return: None - */ -static void _dpu_crtc_rp_put(struct dpu_crtc_respool *rp, u32 type, u64 tag) -{ - struct dpu_crtc_res *res, *next; - struct drm_crtc *crtc; - - if (!rp) { - DPU_ERROR("invalid resource pool\n"); - return; - } - - crtc = _dpu_crtc_rp_to_crtc(rp); - if (!crtc) { - DPU_ERROR("invalid crtc\n"); - return; - } - - mutex_lock(rp->rp_lock); - list_for_each_entry_safe(res, next, &rp->res_list, list) { - if (res->type != type || res->tag != tag) - continue; - DPU_DEBUG("crtc%d.%u found res:0x%x/0x%llx/%pK/%d\n", - crtc->base.id, rp->sequence_id, - res->type, res->tag, res->val, - atomic_read(&res->refcount)); - if (res->flags & DPU_CRTC_RES_FLAG_FREE) - DPU_ERROR( - "crtc%d.%u already free res:0x%x/0x%llx/%pK/%d\n", - crtc->base.id, rp->sequence_id, - res->type, res->tag, res->val, - atomic_read(&res->refcount)); - else if (atomic_dec_return(&res->refcount) == 0) - res->flags |= DPU_CRTC_RES_FLAG_FREE; - - mutex_unlock(rp->rp_lock); - return; - } - DPU_ERROR("crtc%d.%u not found res:0x%x/0x%llx\n", - crtc->base.id, rp->sequence_id, type, tag); - mutex_unlock(rp->rp_lock); -} - -int dpu_crtc_res_add(struct drm_crtc_state *state, u32 type, u64 tag, - void *val, struct dpu_crtc_res_ops *ops) -{ - struct dpu_crtc_respool *rp; - - if (!state) { - DPU_ERROR("invalid parameters\n"); - return -EINVAL; - } - - rp = &to_dpu_crtc_state(state)->rp; - return _dpu_crtc_rp_add(rp, type, tag, val, ops); -} - -void *dpu_crtc_res_get(struct drm_crtc_state *state, u32 type, u64 tag) -{ - struct dpu_crtc_respool *rp; - void *val; - - if (!state) { - DPU_ERROR("invalid parameters\n"); - return NULL; - } - - rp = &to_dpu_crtc_state(state)->rp; - val = _dpu_crtc_rp_get(rp, type, tag); - if (IS_ERR(val)) { - DPU_ERROR("failed to get res type:0x%x:0x%llx\n", - type, tag); - return NULL; - } - - return val; -} - -void dpu_crtc_res_put(struct drm_crtc_state *state, u32 type, u64 tag) -{ - struct dpu_crtc_respool *rp; - - if (!state) { - DPU_ERROR("invalid parameters\n"); - return; - } - - rp = &to_dpu_crtc_state(state)->rp; - _dpu_crtc_rp_put(rp, type, tag); -} - static void dpu_crtc_destroy(struct drm_crtc *crtc) { struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); @@ -2364,97 +2081,6 @@ static const struct drm_crtc_helper_funcs dpu_crtc_helper_funcs = { .atomic_flush = dpu_crtc_atomic_flush, }; -static void _dpu_crtc_event_cb(struct kthread_work *work) -{ - struct dpu_crtc_event *event; - struct dpu_crtc *dpu_crtc; - unsigned long irq_flags; - - if (!work) { - DPU_ERROR("invalid work item\n"); - return; - } - - event = container_of(work, struct dpu_crtc_event, kt_work); - - /* set dpu_crtc to NULL for static work structures */ - dpu_crtc = event->dpu_crtc; - if (!dpu_crtc) - return; - - if (event->cb_func) - event->cb_func(&dpu_crtc->base, event->usr); - - spin_lock_irqsave(&dpu_crtc->event_lock, irq_flags); - list_add_tail(&event->list, &dpu_crtc->event_free_list); - spin_unlock_irqrestore(&dpu_crtc->event_lock, irq_flags); -} - -int dpu_crtc_event_queue(struct drm_crtc *crtc, - void (*func)(struct drm_crtc *crtc, void *usr), void *usr) -{ - unsigned long irq_flags; - struct dpu_crtc *dpu_crtc; - struct msm_drm_private *priv; - struct dpu_crtc_event *event = NULL; - u32 crtc_id; - - if (!crtc || !crtc->dev || !crtc->dev->dev_private || !func) { - DPU_ERROR("invalid parameters\n"); - return -EINVAL; - } - dpu_crtc = to_dpu_crtc(crtc); - priv = crtc->dev->dev_private; - crtc_id = drm_crtc_index(crtc); - - /* - * Obtain an event struct from the private cache. This event - * queue may be called from ISR contexts, so use a private - * cache to avoid calling any memory allocation functions. - */ - spin_lock_irqsave(&dpu_crtc->event_lock, irq_flags); - if (!list_empty(&dpu_crtc->event_free_list)) { - event = list_first_entry(&dpu_crtc->event_free_list, - struct dpu_crtc_event, list); - list_del_init(&event->list); - } - spin_unlock_irqrestore(&dpu_crtc->event_lock, irq_flags); - - if (!event) - return -ENOMEM; - - /* populate event node */ - event->dpu_crtc = dpu_crtc; - event->cb_func = func; - event->usr = usr; - - /* queue new event request */ - kthread_init_work(&event->kt_work, _dpu_crtc_event_cb); - kthread_queue_work(&priv->event_thread[crtc_id].worker, - &event->kt_work); - - return 0; -} - -static int _dpu_crtc_init_events(struct dpu_crtc *dpu_crtc) -{ - int i, rc = 0; - - if (!dpu_crtc) { - DPU_ERROR("invalid crtc\n"); - return -EINVAL; - } - - spin_lock_init(&dpu_crtc->event_lock); - - INIT_LIST_HEAD(&dpu_crtc->event_free_list); - for (i = 0; i < DPU_CRTC_MAX_EVENT_COUNT; ++i) - list_add_tail(&dpu_crtc->event_cache[i].list, - &dpu_crtc->event_free_list); - - return rc; -} - /* initialize crtc */ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane) { @@ -2462,7 +2088,7 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane) struct dpu_crtc *dpu_crtc = NULL; struct msm_drm_private *priv = NULL; struct dpu_kms *kms = NULL; - int i, rc; + int i; priv = dev->dev_private; kms = to_dpu_kms(priv->kms); @@ -2503,12 +2129,7 @@ struct drm_crtc *dpu_crtc_init(struct drm_device *dev, struct drm_plane *plane) snprintf(dpu_crtc->name, DPU_CRTC_NAME_SIZE, "crtc%u", crtc->base.id); /* initialize event handling */ - rc = _dpu_crtc_init_events(dpu_crtc); - if (rc) { - drm_crtc_cleanup(crtc); - kfree(dpu_crtc); - return ERR_PTR(rc); - } + spin_lock_init(&dpu_crtc->event_lock); dpu_crtc->phandle = &kms->phandle; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h index 4a97ba16735f..e87109e608e9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h @@ -112,23 +112,6 @@ struct dpu_crtc_frame_event { u32 event; }; -/** - * struct dpu_crtc_event - event callback tracking structure - * @list: Linked list tracking node - * @kt_work: Kthread worker structure - * @dpu_crtc: Pointer to associated dpu_crtc structure - * @cb_func: Pointer to callback function - * @usr: Pointer to user data to be provided to the callback - */ -struct dpu_crtc_event { - struct list_head list; - struct kthread_work kt_work; - void *dpu_crtc; - - void (*cb_func)(struct drm_crtc *crtc, void *usr); - void *usr; -}; - /* * Maximum number of free event structures to cache */ @@ -172,8 +155,6 @@ struct dpu_crtc_event { * @frame_done_comp : for frame_event_done synchronization * @event_thread : Pointer to event handler thread * @event_worker : Event worker queue - * @event_cache : Local cache of event worker structures - * @event_free_list : List of available event structures * @event_lock : Spinlock around event handling code * @misr_enable : boolean entry indicates misr enable/disable status. * @misr_frame_count : misr frame count provided by client @@ -224,8 +205,6 @@ struct dpu_crtc { struct completion frame_done_comp; /* for handling internal event thread */ - struct dpu_crtc_event event_cache[DPU_CRTC_MAX_EVENT_COUNT]; - struct list_head event_free_list; spinlock_t event_lock; bool misr_enable; u32 misr_frame_count; @@ -441,44 +420,4 @@ static inline bool dpu_crtc_is_enabled(struct drm_crtc *crtc) return crtc ? crtc->enabled : false; } -/** - * dpu_crtc_event_queue - request event callback - * @crtc: Pointer to drm crtc structure - * @func: Pointer to callback function - * @usr: Pointer to user data to be passed to callback - * Returns: Zero on success - */ -int dpu_crtc_event_queue(struct drm_crtc *crtc, - void (*func)(struct drm_crtc *crtc, void *usr), void *usr); - -/** - * dpu_crtc_res_add - add given resource to resource pool in crtc state - * @state: Pointer to drm crtc state - * @type: Resource type - * @tag: Search tag for given resource - * @val: Resource handle - * @ops: Resource callback operations - * return: 0 if success; error code otherwise - */ -int dpu_crtc_res_add(struct drm_crtc_state *state, u32 type, u64 tag, - void *val, struct dpu_crtc_res_ops *ops); - -/** - * dpu_crtc_res_get - get given resource from resource pool in crtc state - * @state: Pointer to drm crtc state - * @type: Resource type - * @tag: Search tag for given resource - * return: Resource handle if success; pointer error or null otherwise - */ -void *dpu_crtc_res_get(struct drm_crtc_state *state, u32 type, u64 tag); - -/** - * dpu_crtc_res_put - return given resource to resource pool in crtc state - * @state: Pointer to drm crtc state - * @type: Resource type - * @tag: Search tag for given resource - * return: None - */ -void dpu_crtc_res_put(struct drm_crtc_state *state, u32 type, u64 tag); - #endif /* _DPU_CRTC_H_ */ From patchwork Thu Jul 26 20:30:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10546431 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CA53C1805 for ; Thu, 26 Jul 2018 20:30:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D71622B800 for ; Thu, 26 Jul 2018 20:30:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB31E2B7DE; Thu, 26 Jul 2018 20:30:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3FAEE2B7DE for ; Thu, 26 Jul 2018 20:30:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 642356E849; Thu, 26 Jul 2018 20:30:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id A40AC6E843; Thu, 26 Jul 2018 20:30:21 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 7A43C60BDD; Thu, 26 Jul 2018 20:30:21 +0000 (UTC) Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2DB196074D; Thu, 26 Jul 2018 20:30:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2DB196074D From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [PATCH 3/5] drm/msm/disp/dpu: Remove dpu_kms_utils Date: Thu, 26 Jul 2018 14:30:12 -0600 Message-Id: <20180726203014.3270-4-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726203014.3270-1-jcrouse@codeaurora.org> References: <20180726203014.3270-1-jcrouse@codeaurora.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP None of the functions in dpu_kms_utils.c seem to be used so remove them all. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 112 ------------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c | 153 ------------------ 3 files changed, 266 deletions(-) delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile index 1639ea8c0d13..7c773e003663 100644 --- a/drivers/gpu/drm/msm/Makefile +++ b/drivers/gpu/drm/msm/Makefile @@ -68,7 +68,6 @@ msm-y := \ disp/dpu1/dpu_io_util.o \ disp/dpu1/dpu_irq.o \ disp/dpu1/dpu_kms.o \ - disp/dpu1/dpu_kms_utils.o \ disp/dpu1/dpu_mdss.o \ disp/dpu1/dpu_plane.o \ disp/dpu1/dpu_power_handle.o \ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index 407c1ed27fe6..66d466628e2b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h @@ -270,118 +270,6 @@ void *dpu_debugfs_get_root(struct dpu_kms *dpu_kms); */ #define DPU_KMS_INFO_MAX_SIZE 4096 -/** - * struct dpu_kms_info - connector information structure container - * @data: Array of information character data - * @len: Current length of information data - * @staged_len: Temporary data buffer length, commit to - * len using dpu_kms_info_stop - * @start: Whether or not a partial data entry was just started - */ -struct dpu_kms_info { - char data[DPU_KMS_INFO_MAX_SIZE]; - uint32_t len; - uint32_t staged_len; - bool start; -}; - -/** - * DPU_KMS_INFO_DATA - Macro for accessing dpu_kms_info data bytes - * @S: Pointer to dpu_kms_info structure - * Returns: Pointer to byte data - */ -#define DPU_KMS_INFO_DATA(S) ((S) ? ((struct dpu_kms_info *)(S))->data : 0) - -/** - * DPU_KMS_INFO_DATALEN - Macro for accessing dpu_kms_info data length - * it adds an extra character length to count null. - * @S: Pointer to dpu_kms_info structure - * Returns: Size of available byte data - */ -#define DPU_KMS_INFO_DATALEN(S) ((S) ? ((struct dpu_kms_info *)(S))->len + 1 \ - : 0) - -/** - * dpu_kms_info_reset - reset dpu_kms_info structure - * @info: Pointer to dpu_kms_info structure - */ -void dpu_kms_info_reset(struct dpu_kms_info *info); - -/** - * dpu_kms_info_add_keyint - add integer value to 'dpu_kms_info' - * @info: Pointer to dpu_kms_info structure - * @key: Pointer to key string - * @value: Signed 64-bit integer value - */ -void dpu_kms_info_add_keyint(struct dpu_kms_info *info, - const char *key, - int64_t value); - -/** - * dpu_kms_info_add_keystr - add string value to 'dpu_kms_info' - * @info: Pointer to dpu_kms_info structure - * @key: Pointer to key string - * @value: Pointer to string value - */ -void dpu_kms_info_add_keystr(struct dpu_kms_info *info, - const char *key, - const char *value); - -/** - * dpu_kms_info_start - begin adding key to 'dpu_kms_info' - * Usage: - * dpu_kms_info_start(key) - * dpu_kms_info_append(val_1) - * ... - * dpu_kms_info_append(val_n) - * dpu_kms_info_stop - * @info: Pointer to dpu_kms_info structure - * @key: Pointer to key string - */ -void dpu_kms_info_start(struct dpu_kms_info *info, - const char *key); - -/** - * dpu_kms_info_append - append value string to 'dpu_kms_info' - * Usage: - * dpu_kms_info_start(key) - * dpu_kms_info_append(val_1) - * ... - * dpu_kms_info_append(val_n) - * dpu_kms_info_stop - * @info: Pointer to dpu_kms_info structure - * @str: Pointer to partial value string - */ -void dpu_kms_info_append(struct dpu_kms_info *info, - const char *str); - -/** - * dpu_kms_info_append_format - append format code string to 'dpu_kms_info' - * Usage: - * dpu_kms_info_start(key) - * dpu_kms_info_append_format(fourcc, modifier) - * ... - * dpu_kms_info_stop - * @info: Pointer to dpu_kms_info structure - * @pixel_format: FOURCC format code - * @modifier: 64-bit drm format modifier - */ -void dpu_kms_info_append_format(struct dpu_kms_info *info, - uint32_t pixel_format, - uint64_t modifier); - -/** - * dpu_kms_info_stop - finish adding key to 'dpu_kms_info' - * Usage: - * dpu_kms_info_start(key) - * dpu_kms_info_append(val_1) - * ... - * dpu_kms_info_append(val_n) - * dpu_kms_info_stop - * @info: Pointer to dpu_kms_info structure - */ -void dpu_kms_info_stop(struct dpu_kms_info *info); - /** * Vblank enable/disable functions */ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c deleted file mode 100644 index a80b3da5a9fe..000000000000 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms_utils.c +++ /dev/null @@ -1,153 +0,0 @@ -/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#define pr_fmt(fmt) "dpu-kms_utils:[%s] " fmt, __func__ - -#include "dpu_kms.h" - -void dpu_kms_info_reset(struct dpu_kms_info *info) -{ - if (info) { - info->len = 0; - info->staged_len = 0; - } -} - -void dpu_kms_info_add_keyint(struct dpu_kms_info *info, - const char *key, - int64_t value) -{ - uint32_t len; - - if (info && key) { - len = snprintf(info->data + info->len, - DPU_KMS_INFO_MAX_SIZE - info->len, - "%s=%lld\n", - key, - value); - - /* check if snprintf truncated the string */ - if ((info->len + len) < DPU_KMS_INFO_MAX_SIZE) - info->len += len; - } -} - -void dpu_kms_info_add_keystr(struct dpu_kms_info *info, - const char *key, - const char *value) -{ - uint32_t len; - - if (info && key && value) { - len = snprintf(info->data + info->len, - DPU_KMS_INFO_MAX_SIZE - info->len, - "%s=%s\n", - key, - value); - - /* check if snprintf truncated the string */ - if ((info->len + len) < DPU_KMS_INFO_MAX_SIZE) - info->len += len; - } -} - -void dpu_kms_info_start(struct dpu_kms_info *info, - const char *key) -{ - uint32_t len; - - if (info && key) { - len = snprintf(info->data + info->len, - DPU_KMS_INFO_MAX_SIZE - info->len, - "%s=", - key); - - info->start = true; - - /* check if snprintf truncated the string */ - if ((info->len + len) < DPU_KMS_INFO_MAX_SIZE) - info->staged_len = info->len + len; - } -} - -void dpu_kms_info_append(struct dpu_kms_info *info, - const char *str) -{ - uint32_t len; - - if (info) { - len = snprintf(info->data + info->staged_len, - DPU_KMS_INFO_MAX_SIZE - info->staged_len, - "%s", - str); - - /* check if snprintf truncated the string */ - if ((info->staged_len + len) < DPU_KMS_INFO_MAX_SIZE) { - info->staged_len += len; - info->start = false; - } - } -} - -void dpu_kms_info_append_format(struct dpu_kms_info *info, - uint32_t pixel_format, - uint64_t modifier) -{ - uint32_t len; - - if (!info) - return; - - if (modifier) { - len = snprintf(info->data + info->staged_len, - DPU_KMS_INFO_MAX_SIZE - info->staged_len, - info->start ? - "%c%c%c%c/%llX/%llX" : " %c%c%c%c/%llX/%llX", - (pixel_format >> 0) & 0xFF, - (pixel_format >> 8) & 0xFF, - (pixel_format >> 16) & 0xFF, - (pixel_format >> 24) & 0xFF, - (modifier >> 56) & 0xFF, - modifier & ((1ULL << 56) - 1)); - } else { - len = snprintf(info->data + info->staged_len, - DPU_KMS_INFO_MAX_SIZE - info->staged_len, - info->start ? - "%c%c%c%c" : " %c%c%c%c", - (pixel_format >> 0) & 0xFF, - (pixel_format >> 8) & 0xFF, - (pixel_format >> 16) & 0xFF, - (pixel_format >> 24) & 0xFF); - } - - /* check if snprintf truncated the string */ - if ((info->staged_len + len) < DPU_KMS_INFO_MAX_SIZE) { - info->staged_len += len; - info->start = false; - } -} - -void dpu_kms_info_stop(struct dpu_kms_info *info) -{ - uint32_t len; - - if (info) { - /* insert final delimiter */ - len = snprintf(info->data + info->staged_len, - DPU_KMS_INFO_MAX_SIZE - info->staged_len, - "\n"); - - /* check if snprintf truncated the string */ - if ((info->staged_len + len) < DPU_KMS_INFO_MAX_SIZE) - info->len = info->staged_len + len; - } -} From patchwork Thu Jul 26 20:30:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10546433 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 504241805 for ; Thu, 26 Jul 2018 20:30:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5CE052B7DE for ; Thu, 26 Jul 2018 20:30:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4FE302B808; Thu, 26 Jul 2018 20:30:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B361F2B7DE for ; Thu, 26 Jul 2018 20:30:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C3D936E851; Thu, 26 Jul 2018 20:30:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4DDA46E843; Thu, 26 Jul 2018 20:30:22 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 31A0D60B7E; Thu, 26 Jul 2018 20:30:21 +0000 (UTC) Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id C587960B62; Thu, 26 Jul 2018 20:30:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org C587960B62 From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [PATCH 4/5] drm/msm/disp/dpu: Remove unused functions from dpu_formats.c Date: Thu, 26 Jul 2018 14:30:13 -0600 Message-Id: <20180726203014.3270-5-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726203014.3270-1-jcrouse@codeaurora.org> References: <20180726203014.3270-1-jcrouse@codeaurora.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jordan Crouse , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Remove dpu_format_get_block_size, dpu_format_get_framebuffer_size, dpu_set_scaler_v2 and dpu_copy_formats they are unused and unneeded. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 41 ---------- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h | 31 -------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c | 84 --------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h | 10 --- 4 files changed, 166 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c index 8189539b0620..0cb00612f96f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c @@ -869,47 +869,6 @@ int dpu_format_get_plane_sizes( return _dpu_format_get_plane_sizes_linear(fmt, w, h, layout, pitches); } -int dpu_format_get_block_size(const struct dpu_format *fmt, - uint32_t *w, uint32_t *h) -{ - if (!fmt || !w || !h) { - DRM_ERROR("invalid pointer\n"); - return -EINVAL; - } - - /* TP10 is 96x96 and all others are 128x128 */ - if (DPU_FORMAT_IS_YUV(fmt) && DPU_FORMAT_IS_DX(fmt) && - (fmt->num_planes == 2) && fmt->unpack_tight) - *w = *h = 96; - else - *w = *h = 128; - - return 0; -} - -uint32_t dpu_format_get_framebuffer_size( - const uint32_t format, - const uint32_t width, - const uint32_t height, - const uint32_t *pitches, - const uint64_t modifiers) -{ - const struct dpu_format *fmt; - struct dpu_hw_fmt_layout layout; - - fmt = dpu_get_dpu_format_ext(format, modifiers); - if (!fmt) - return 0; - - if (!pitches) - return -EINVAL; - - if (dpu_format_get_plane_sizes(fmt, width, height, &layout, pitches)) - layout.total_size = 0; - - return layout.total_size; -} - static int _dpu_format_populate_addrs_ubwc( struct msm_gem_address_space *aspace, struct drm_framebuffer *fb, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h index b55bfd13e296..b3a6592f1a8a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h @@ -72,19 +72,6 @@ int dpu_format_get_plane_sizes( struct dpu_hw_fmt_layout *layout, const uint32_t *pitches); -/** - * dpu_format_get_block_size - get block size of given format when - * operating in block mode - * @fmt: pointer to dpu_format - * @w: pointer to width of the block - * @h: pointer to height of the block - * - * Return: 0 if success; error oode otherwise - */ -int dpu_format_get_block_size(const struct dpu_format *fmt, - uint32_t *w, uint32_t *h); - -/** * dpu_format_check_modified_format - validate format and buffers for * dpu non-standard, i.e. modified format * @kms: kms driver @@ -115,22 +102,4 @@ int dpu_format_populate_layout( struct drm_framebuffer *fb, struct dpu_hw_fmt_layout *fmtl); -/** - * dpu_format_get_framebuffer_size - get framebuffer memory size - * @format: DRM pixel format - * @width: pixel width - * @height: pixel height - * @pitches: array of size [DPU_MAX_PLANES] to populate - * pitch for each plane - * @modifiers: drm modifier - * - * Return: memory size required for frame buffer - */ -uint32_t dpu_format_get_framebuffer_size( - const uint32_t format, - const uint32_t width, - const uint32_t height, - const uint32_t *pitches, - const uint64_t modifiers); - #endif /*_DPU_FORMATS_H */ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c index 1ba571e94b32..4cabae480a7b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.c @@ -92,59 +92,6 @@ u32 *dpu_hw_util_get_log_mask_ptr(void) return &dpu_hw_util_log_mask; } -void dpu_set_scaler_v2(struct dpu_hw_scaler3_cfg *cfg, - const struct dpu_drm_scaler_v2 *scale_v2) -{ - int i; - - cfg->enable = scale_v2->enable; - cfg->dir_en = scale_v2->dir_en; - - for (i = 0; i < DPU_MAX_PLANES; i++) { - cfg->init_phase_x[i] = scale_v2->init_phase_x[i]; - cfg->phase_step_x[i] = scale_v2->phase_step_x[i]; - cfg->init_phase_y[i] = scale_v2->init_phase_y[i]; - cfg->phase_step_y[i] = scale_v2->phase_step_y[i]; - - cfg->preload_x[i] = scale_v2->preload_x[i]; - cfg->preload_y[i] = scale_v2->preload_y[i]; - cfg->src_width[i] = scale_v2->src_width[i]; - cfg->src_height[i] = scale_v2->src_height[i]; - } - - cfg->dst_width = scale_v2->dst_width; - cfg->dst_height = scale_v2->dst_height; - - cfg->y_rgb_filter_cfg = scale_v2->y_rgb_filter_cfg; - cfg->uv_filter_cfg = scale_v2->uv_filter_cfg; - cfg->alpha_filter_cfg = scale_v2->alpha_filter_cfg; - cfg->blend_cfg = scale_v2->blend_cfg; - - cfg->lut_flag = scale_v2->lut_flag; - cfg->dir_lut_idx = scale_v2->dir_lut_idx; - cfg->y_rgb_cir_lut_idx = scale_v2->y_rgb_cir_lut_idx; - cfg->uv_cir_lut_idx = scale_v2->uv_cir_lut_idx; - cfg->y_rgb_sep_lut_idx = scale_v2->y_rgb_sep_lut_idx; - cfg->uv_sep_lut_idx = scale_v2->uv_sep_lut_idx; - - cfg->de.enable = scale_v2->de.enable; - cfg->de.sharpen_level1 = scale_v2->de.sharpen_level1; - cfg->de.sharpen_level2 = scale_v2->de.sharpen_level2; - cfg->de.clip = scale_v2->de.clip; - cfg->de.limit = scale_v2->de.limit; - cfg->de.thr_quiet = scale_v2->de.thr_quiet; - cfg->de.thr_dieout = scale_v2->de.thr_dieout; - cfg->de.thr_low = scale_v2->de.thr_low; - cfg->de.thr_high = scale_v2->de.thr_high; - cfg->de.prec_shift = scale_v2->de.prec_shift; - - for (i = 0; i < DPU_MAX_DE_CURVES; i++) { - cfg->de.adjust_a[i] = scale_v2->de.adjust_a[i]; - cfg->de.adjust_b[i] = scale_v2->de.adjust_b[i]; - cfg->de.adjust_c[i] = scale_v2->de.adjust_c[i]; - } -} - static void _dpu_hw_setup_scaler3_lut(struct dpu_hw_blk_reg_map *c, struct dpu_hw_scaler3_cfg *scaler3_cfg, u32 offset) { @@ -419,34 +366,3 @@ void dpu_hw_csc_setup(struct dpu_hw_blk_reg_map *c, DPU_REG_WRITE(c, csc_reg_off + 0x3c, data->csc_post_bv[1]); DPU_REG_WRITE(c, csc_reg_off + 0x40, data->csc_post_bv[2]); } - -/** - * _dpu_copy_formats - copy formats from src_list to dst_list - * @dst_list: pointer to destination list where to copy formats - * @dst_list_size: size of destination list - * @dst_list_pos: starting position on the list where to copy formats - * @src_list: pointer to source list where to copy formats from - * @src_list_size: size of source list - * Return: number of elements populated - */ -uint32_t dpu_copy_formats( - struct dpu_format_extended *dst_list, - uint32_t dst_list_size, - uint32_t dst_list_pos, - const struct dpu_format_extended *src_list, - uint32_t src_list_size) -{ - uint32_t cur_pos, i; - - if (!dst_list || !src_list || (dst_list_pos >= (dst_list_size - 1))) - return 0; - - for (i = 0, cur_pos = dst_list_pos; - (cur_pos < (dst_list_size - 1)) && (i < src_list_size) - && src_list[i].fourcc_format; ++i, ++cur_pos) - dst_list[cur_pos] = src_list[i]; - - dst_list[cur_pos].fourcc_format = 0; - - return i; -} diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h index 42f1b228d342..1240f505ca53 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_util.h @@ -333,9 +333,6 @@ int dpu_reg_read(struct dpu_hw_blk_reg_map *c, u32 reg_off); void *dpu_hw_util_get_dir(void); -void dpu_set_scaler_v2(struct dpu_hw_scaler3_cfg *cfg, - const struct dpu_drm_scaler_v2 *scale_v2); - void dpu_hw_setup_scaler3(struct dpu_hw_blk_reg_map *c, struct dpu_hw_scaler3_cfg *scaler3_cfg, u32 scaler_offset, u32 scaler_version, @@ -348,11 +345,4 @@ void dpu_hw_csc_setup(struct dpu_hw_blk_reg_map *c, u32 csc_reg_off, struct dpu_csc_cfg *data, bool csc10); -uint32_t dpu_copy_formats( - struct dpu_format_extended *dst_list, - uint32_t dst_list_size, - uint32_t dst_list_pos, - const struct dpu_format_extended *src_list, - uint32_t src_list_size); - #endif /* _DPU_HW_UTIL_H */ From patchwork Thu Jul 26 20:30:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jordan Crouse X-Patchwork-Id: 10546435 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A1491180E for ; Thu, 26 Jul 2018 20:30:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD1FF2B7DE for ; Thu, 26 Jul 2018 20:30:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A1B4D2B808; Thu, 26 Jul 2018 20:30:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1284F2B7DE for ; Thu, 26 Jul 2018 20:30:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5B7D96E855; Thu, 26 Jul 2018 20:30:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by gabe.freedesktop.org (Postfix) with ESMTPS id 170646E847; Thu, 26 Jul 2018 20:30:24 +0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E965A60BE8; Thu, 26 Jul 2018 20:30:23 +0000 (UTC) Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 807BE60B83; Thu, 26 Jul 2018 20:30:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 807BE60B83 From: Jordan Crouse To: freedreno@lists.freedesktop.org Subject: [PATCH 5/5] drm/msm/disp/dpu: Mark a handful of functions as static Date: Thu, 26 Jul 2018 14:30:14 -0600 Message-Id: <20180726203014.3270-6-jcrouse@codeaurora.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726203014.3270-1-jcrouse@codeaurora.org> References: <20180726203014.3270-1-jcrouse@codeaurora.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Mark a number of static functions that are only unsed in the file that defines them and remove the prototypes from the headers where needed. Signed-off-by: Jordan Crouse --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 +++++-- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 6 ------ .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 14 -------------- .../drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h | 17 ----------------- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c | 4 ++-- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 2 +- 11 files changed, 13 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c index 5c0051af5e98..0bd3eda93e22 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c @@ -264,6 +264,9 @@ void dpu_encoder_helper_report_irq_timeout(struct dpu_encoder_phys *phys_enc, DPU_ENCODER_FRAME_EVENT_ERROR); } +static int dpu_encoder_helper_wait_event_timeout(int32_t drm_id, + int32_t hw_id, struct dpu_encoder_wait_info *info); + int dpu_encoder_helper_wait_for_irq(struct dpu_encoder_phys *phys_enc, enum dpu_intr_idx intr_idx, struct dpu_encoder_wait_info *wait_info) @@ -467,7 +470,7 @@ void dpu_encoder_get_hw_resources(struct drm_encoder *drm_enc, } } -void dpu_encoder_destroy(struct drm_encoder *drm_enc) +static void dpu_encoder_destroy(struct drm_encoder *drm_enc) { struct dpu_encoder_virt *dpu_enc = NULL; int i = 0; @@ -1516,7 +1519,7 @@ void dpu_encoder_helper_trigger_start(struct dpu_encoder_phys *phys_enc) } } -int dpu_encoder_helper_wait_event_timeout( +static int dpu_encoder_helper_wait_event_timeout( int32_t drm_id, int32_t hw_id, struct dpu_encoder_wait_info *info) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h index 204e538b0b74..60f809fc7c13 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h @@ -158,12 +158,6 @@ struct drm_encoder *dpu_encoder_init( int dpu_encoder_setup(struct drm_device *dev, struct drm_encoder *enc, struct msm_display_info *disp_info); -/** - * dpu_encoder_destroy - destroy previously initialized virtual encoder - * @drm_enc: Pointer to previously created drm encoder structure - */ -void dpu_encoder_destroy(struct drm_encoder *drm_enc); - /** * dpu_encoder_prepare_commit - prepare encoder at the very beginning of an * atomic commit, before any registers are written 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 dacec1c8eeeb..c7df8aad6613 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h @@ -355,20 +355,6 @@ struct dpu_encoder_phys *dpu_encoder_phys_cmd_init( */ void dpu_encoder_helper_trigger_start(struct dpu_encoder_phys *phys_enc); -/** - * dpu_encoder_helper_wait_event_timeout - wait for event with timeout - * taking into account that jiffies may jump between reads leading to - * incorrectly detected timeouts. Prevent failure in this scenario by - * making sure that elapsed time during wait is valid. - * @drm_id: drm object id for logging - * @hw_id: hw instance id for logging - * @info: wait info structure - */ -int dpu_encoder_helper_wait_event_timeout( - int32_t drm_id, - int32_t hw_id, - struct dpu_encoder_wait_info *info); - /** * dpu_encoder_helper_hw_reset - issue ctl hw reset * This helper function may be optionally specified by physical 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 e6d02c6947b4..3084675ed425 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 @@ -349,7 +349,7 @@ static int dpu_encoder_phys_cmd_control_vblank_irq( return ret; } -void dpu_encoder_phys_cmd_irq_control(struct dpu_encoder_phys *phys_enc, +static void dpu_encoder_phys_cmd_irq_control(struct dpu_encoder_phys *phys_enc, bool enable) { struct dpu_encoder_phys_cmd *cmd_enc; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c index 0cb00612f96f..bfcd165e96df 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.c @@ -846,7 +846,7 @@ static int _dpu_format_get_plane_sizes_linear( return 0; } -int dpu_format_get_plane_sizes( +static int dpu_format_get_plane_sizes( const struct dpu_format *fmt, const uint32_t w, const uint32_t h, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h index b3a6592f1a8a..a54451d8d011 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_formats.h @@ -55,23 +55,6 @@ uint32_t dpu_populate_formats( uint32_t pixel_formats_max); /** - * dpu_format_get_plane_sizes - calculate size and layout of given buffer format - * @fmt: pointer to dpu_format - * @w: width of the buffer - * @h: height of the buffer - * @layout: layout of the buffer - * @pitches: array of size [DPU_MAX_PLANES] to populate - * pitch for each plane - * - * Return: size of the buffer - */ -int dpu_format_get_plane_sizes( - const struct dpu_format *fmt, - const uint32_t w, - const uint32_t h, - struct dpu_hw_fmt_layout *layout, - const uint32_t *pitches); - * dpu_format_check_modified_format - validate format and buffers for * dpu non-standard, i.e. modified format * @kms: kms driver diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c index 1793cfd29a07..44ee06398b1d 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -449,7 +449,7 @@ static struct dpu_perf_cfg sdm845_perf_data = { * sdm845_cfg_init(): populate sdm845 dpu sub-blocks reg offsets * and instance counts. */ -void sdm845_cfg_init(struct dpu_mdss_cfg *dpu_cfg) +static void sdm845_cfg_init(struct dpu_mdss_cfg *dpu_cfg) { *dpu_cfg = (struct dpu_mdss_cfg){ .caps = &sdm845_dpu_caps, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c index da6f0609be5f..554874ba0c3b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_cdm.c @@ -217,7 +217,7 @@ static int dpu_hw_cdm_setup_cdwn(struct dpu_hw_cdm *ctx, return 0; } -int dpu_hw_cdm_enable(struct dpu_hw_cdm *ctx, +static int dpu_hw_cdm_enable(struct dpu_hw_cdm *ctx, struct dpu_hw_cdm_cfg *cdm) { struct dpu_hw_blk_reg_map *c = &ctx->hw; @@ -249,7 +249,7 @@ int dpu_hw_cdm_enable(struct dpu_hw_cdm *ctx, return 0; } -void dpu_hw_cdm_disable(struct dpu_hw_cdm *ctx) +static void dpu_hw_cdm_disable(struct dpu_hw_cdm *ctx) { struct cdm_output_cfg cdm_cfg = { 0 }; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c index 42fc72cf48dd..db2798e862fc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c @@ -275,7 +275,7 @@ static void dpu_hw_get_safe_status(struct dpu_hw_mdp *mdp, status->sspp[SSPP_CURSOR1] = (value >> 26) & 0x1; } -void dpu_hw_reset_ubwc(struct dpu_hw_mdp *mdp, struct dpu_mdss_cfg *m) +static void dpu_hw_reset_ubwc(struct dpu_hw_mdp *mdp, struct dpu_mdss_cfg *m) { struct dpu_hw_blk_reg_map c; diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 1c0838801e78..7dd6bd2d6d37 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -819,7 +819,7 @@ static int dpu_kms_pm_resume(struct device *dev) return 0; } -void _dpu_kms_set_encoder_mode(struct msm_kms *kms, +static void _dpu_kms_set_encoder_mode(struct msm_kms *kms, struct drm_encoder *encoder, bool cmd_mode) { diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c index 6dfc26698a09..9e533b86682c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c @@ -115,7 +115,7 @@ static int _dpu_mdss_irq_domain_add(struct dpu_mdss *dpu_mdss) return 0; } -int _dpu_mdss_irq_domain_fini(struct dpu_mdss *dpu_mdss) +static int _dpu_mdss_irq_domain_fini(struct dpu_mdss *dpu_mdss) { if (dpu_mdss->irq_controller.domain) { irq_domain_remove(dpu_mdss->irq_controller.domain);