Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2216921imu; Fri, 14 Dec 2018 07:35:07 -0800 (PST) X-Google-Smtp-Source: AFSGD/XCVqdXRMEDL1DWZIbdiNJhWb0pl/bzzULFPkCDSz2iK/GpjqoQE5HsZ4gQC7XJdnSQVk3X X-Received: by 2002:a63:ee4c:: with SMTP id n12mr3031869pgk.21.1544801707737; Fri, 14 Dec 2018 07:35:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544801707; cv=none; d=google.com; s=arc-20160816; b=eeF0fZ5mk1WHR+4yZ1UumrdkX0R24KYr5BO7DW/nuiExzzrHWjT/s/w9p8PUYPaL07 lSJ/PQhoNM6E1SERoVyqU9r43wXpGzci75MRO0/uDk7W/iOFlE93rIlfV0AVUgwah2tk jJYCX20gyT7uZPJB4LtslXdDwPFZFJ1Q213FUfCP00AteIrZrwyqDiusSj97Rq8YDVBF 8hlLgf6MgVhWqRASdOqhOe7muA27nED8JEJOlkDWr1o7X1VlinNuaMlwiwggcF0n+lBl TYKNPP3HYh+vX8K2Zix9raoOBWdOYAhWP6kt3ZDN5oC9MHRr9GARVFN2yMJfX/6r9lj8 r5kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date:dmarc-filter:dkim-signature :dkim-signature; bh=J4BG9HLUvZqtG5GQXy7il0nniKfUAAR7H2gIu4s03n4=; b=m0/2pxHVTvKVHKthe3IRes13x9HbJH31GaUbRXNU1OJLaTZDbU+kP6/U2hEbMsDRoi G1Efwm2nkPPaQ2yrsQXENp54EhnlfA5DdUwCkcD6PNDPAwdq3ShuE5uKWkB17S3c5Uzq YjZqiAuGg2WrZLNpsWK6QFjS37+DGZnU1xJqf25RbUmw+BhlnrvTz42TEiOBFY+TYYlS TBvuUxYXuAIEHyYYt6ybvLdJyjSYGgaoskXNaMlZunlj/RwTzSlL3TuoZkZQBclCI787 gdN3Efyn/gd4vKfhy6UhQD+p3+dFlwUMgPtsd6+ZTKrMsBEN5lvwZbC/t7G7QnTY5g2D KmTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=enAhfLxQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=LQ2h2gPo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q8si4093506plr.382.2018.12.14.07.34.40; Fri, 14 Dec 2018 07:35:07 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=enAhfLxQ; dkim=pass header.i=@codeaurora.org header.s=default header.b=LQ2h2gPo; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728678AbeLNPcW (ORCPT + 99 others); Fri, 14 Dec 2018 10:32:22 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:35294 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726494AbeLNPcW (ORCPT ); Fri, 14 Dec 2018 10:32:22 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 213F760779; Fri, 14 Dec 2018 15:32:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544801541; bh=OZBZ4pBR/w/wahCbosI0e4qsADs4/Qs3UYYjaMumFU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=enAhfLxQOt0aACbLYAbLqr2ywwRNO6qveshc04ON92bZNSztjFa64LimpVZGWCPuz 50OQ2h+qmaJ3Nuu+myCjmPnwdUcYTpkDyh1VDKmaXWJxgnAWBGc3HTl2yOzKUJ71lO 93w78tTdXK7SPRSmCXJK0JYO+N0numYJOHYIylao= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from jcrouse-lnx.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: jcrouse@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 53FC06071B; Fri, 14 Dec 2018 15:32:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1544801540; bh=OZBZ4pBR/w/wahCbosI0e4qsADs4/Qs3UYYjaMumFU0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LQ2h2gPokG2f8TkcRzH8KTMh6/aK1EzygHhcFfbZiyyRuRZaPqSFGfNKSwpfHvo/z EoyKWFzbPW5JYxGYFjkpGZ8OeDRSQG4OwRnvwFNFd3b80ZAg9ig0sj+cDdLWyCmdNy bvpPW2BKHY8H3ZIEgACRlc9+bmGNhNCjDLSjyjsQ= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 53FC06071B Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=jcrouse@codeaurora.org Date: Fri, 14 Dec 2018 08:32:17 -0700 From: Jordan Crouse To: Jayant Shekhar Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, abhinavk@codeaurora.org, robdclark@gmail.com, nganji@codeaurora.org, seanpaul@chromium.org, hoegsberg@chromium.org, jsanka@codeaurora.org, chandanu@codeaurora.org Subject: Re: [Freedreno] [DPU PATCH] drm/msm/dpu: Clean up dpu hw interrupts Message-ID: <20181214153217.GC29770@jcrouse-lnx.qualcomm.com> Mail-Followup-To: Jayant Shekhar , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, abhinavk@codeaurora.org, robdclark@gmail.com, nganji@codeaurora.org, seanpaul@chromium.org, hoegsberg@chromium.org, jsanka@codeaurora.org, chandanu@codeaurora.org References: <1544777352-11455-1-git-send-email-jshekhar@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1544777352-11455-1-git-send-email-jshekhar@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Dec 14, 2018 at 02:19:12PM +0530, Jayant Shekhar wrote: > Remove unused functions and macros from dpu hw interrupts > file. > > Signed-off-by: Jayant Shekhar > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 30 -------------------- > drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 34 ----------------------- > 2 files changed, 64 deletions(-) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c > index c0b7f00..0f70cee 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c > @@ -170,10 +170,6 @@ > /** > * AD4 interrupt status bit definitions > */ > -#define DPU_INTR_BRIGHTPR_UPDATED BIT(4) > -#define DPU_INTR_DARKENH_UPDATED BIT(3) > -#define DPU_INTR_STREN_OUTROI_UPDATED BIT(2) > -#define DPU_INTR_STREN_INROI_UPDATED BIT(1) > #define DPU_INTR_BACKLIGHT_UPDATED BIT(0) > /** > * struct dpu_intr_reg - array of DPU register sets > @@ -782,18 +778,6 @@ static int dpu_hw_intr_irqidx_lookup(enum dpu_intr_type intr_type, > return -EINVAL; > } > > -static void dpu_hw_intr_set_mask(struct dpu_hw_intr *intr, uint32_t reg_off, > - uint32_t mask) > -{ > - if (!intr) > - return; > - > - DPU_REG_WRITE(&intr->hw, reg_off, mask); > - > - /* ensure register writes go through */ > - wmb(); > -} > - > static void dpu_hw_intr_dispatch_irq(struct dpu_hw_intr *intr, > void (*cbfunc)(void *, int), > void *arg) > @@ -1004,18 +988,6 @@ static int dpu_hw_intr_disable_irqs(struct dpu_hw_intr *intr) > return 0; > } > > -static int dpu_hw_intr_get_valid_interrupts(struct dpu_hw_intr *intr, > - uint32_t *mask) > -{ > - if (!intr || !mask) > - return -EINVAL; > - > - *mask = IRQ_SOURCE_MDP | IRQ_SOURCE_DSI0 | IRQ_SOURCE_DSI1 > - | IRQ_SOURCE_HDMI | IRQ_SOURCE_EDP; > - > - return 0; > -} > - > static void dpu_hw_intr_get_interrupt_statuses(struct dpu_hw_intr *intr) > { > int i; > @@ -1113,14 +1085,12 @@ static u32 dpu_hw_intr_get_interrupt_status(struct dpu_hw_intr *intr, > > static void __setup_intr_ops(struct dpu_hw_intr_ops *ops) > { > - ops->set_mask = dpu_hw_intr_set_mask; > ops->irq_idx_lookup = dpu_hw_intr_irqidx_lookup; > ops->enable_irq = dpu_hw_intr_enable_irq; > ops->disable_irq = dpu_hw_intr_disable_irq; > ops->dispatch_irqs = dpu_hw_intr_dispatch_irq; > ops->clear_all_irqs = dpu_hw_intr_clear_irqs; > ops->disable_all_irqs = dpu_hw_intr_disable_irqs; > - ops->get_valid_interrupts = dpu_hw_intr_get_valid_interrupts; > ops->get_interrupt_statuses = dpu_hw_intr_get_interrupt_statuses; > ops->clear_interrupt_status = dpu_hw_intr_clear_interrupt_status; I think you can zap clear_interrupt_status too. Other than that, this looks real good. Lots of nice negative lines. > ops->clear_intr_status_nolock = dpu_hw_intr_clear_intr_status_nolock; > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h > index 61e4cba..985f873 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h > @@ -20,13 +20,6 @@ > #include "dpu_hw_util.h" > #include "dpu_hw_mdss.h" > > -#define IRQ_SOURCE_MDP BIT(0) > -#define IRQ_SOURCE_DSI0 BIT(4) > -#define IRQ_SOURCE_DSI1 BIT(5) > -#define IRQ_SOURCE_HDMI BIT(8) > -#define IRQ_SOURCE_EDP BIT(12) > -#define IRQ_SOURCE_MHL BIT(16) > - > /** > * dpu_intr_type - HW Interrupt Type > * @DPU_IRQ_TYPE_WB_ROT_COMP: WB rotator done > @@ -96,18 +89,6 @@ enum dpu_intr_type { > */ > struct dpu_hw_intr_ops { > /** > - * set_mask - Programs the given interrupt register with the > - * given interrupt mask. Register value will get overwritten. > - * @intr: HW interrupt handle > - * @reg_off: MDSS HW register offset > - * @irqmask: IRQ mask value > - */ > - void (*set_mask)( > - struct dpu_hw_intr *intr, > - uint32_t reg, > - uint32_t irqmask); > - > - /** > * irq_idx_lookup - Lookup IRQ index on the HW interrupt type > * Used for all irq related ops > * @intr_type: Interrupt type defined in dpu_intr_type > @@ -206,21 +187,6 @@ struct dpu_hw_intr_ops { > struct dpu_hw_intr *intr, > int irq_idx, > bool clear); > - > - /** > - * get_valid_interrupts - Gets a mask of all valid interrupt sources > - * within DPU. These are actually status bits > - * within interrupt registers that specify the > - * source of the interrupt in IRQs. For example, > - * valid interrupt sources can be MDP, DSI, > - * HDMI etc. > - * @intr: HW interrupt handle > - * @mask: Returning the interrupt source MASK > - * @return: 0 for success, otherwise failure > - */ > - int (*get_valid_interrupts)( > - struct dpu_hw_intr *intr, > - uint32_t *mask); > }; > > /** -- The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project