From: Vinod Koul <vinod.koul@intel.com>
To: ivan.stoyanov@amk-drives.bg
Cc: arnd@arndb.de, dan.j.williams@intel.com,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: ipu: Revert ipu_irq_handler changes.
Date: Wed, 4 Jan 2017 10:01:16 +0530 [thread overview]
Message-ID: <20170104043116.GH3573@localhost> (raw)
In-Reply-To: <1482496260-26409-1-git-send-email-ivan.stoyanov@amk-drives.bg>
On Fri, Dec 23, 2016 at 02:31:00PM +0200, ivan.stoyanov@amk-drives.bg wrote:
> From: Ivan Stoyanov <ivan.stoyanov@amk-drives.bg>
>
> In commit 3d8cc00073d6750ffe883685e49b2e4a0f596370 are consolidate functions ipu_irq_err and ipu_irq_fn considered for duplicated.
> Since this patch ipu driver does not work properly and cause kernel freeze during booting.
I dont think we can do the revert (kbot gave build errors), can you debug
further and find out why this causes regression?
>
> [ 1.018314] Remapped [mem 0x53fc00b4-0x53fc01bf] at f57c00b4
> [ 1.024010] dmaengine: private_candidate: dma0chan0 filter said false
> [ 1.030591] dmaengine: private_candidate: dma0chan1 filter said false
> [ 1.037044] dmaengine: private_candidate: dma0chan2 filter said false
> [ 1.043643] dmaengine: private_candidate: dma0chan3 filter said false
> [ 1.050096] dmaengine: private_candidate: dma0chan4 filter said false
> [ 1.056692] dmaengine: private_candidate: dma0chan5 filter said false
> [ 1.063146] dmaengine: private_candidate: dma0chan6 filter said false
> [ 1.069742] dmaengine: private_candidate: dma0chan7 filter said false
> [ 1.076233] dmaengine: private_candidate: dma0chan8 filter said false
> [ 1.082843] dmaengine: private_candidate: dma0chan9 filter said false
> [ 1.089296] dmaengine: private_candidate: dma0chan10 filter said false
> [ 1.095894] dmaengine: private_candidate: dma0chan11 filter said false
> [ 1.102491] dmaengine: private_candidate: dma0chan12 filter said false
> [ 1.109102] dmaengine: private_candidate: dma0chan13 filter said false
> [ 1.115718] IPU: mapped source 14 to IRQ 176
> [ 1.198869] ipu-core ipu-core: init channel = 14
> [ 1.203638] ipu-core ipu-core: IDMAC_CONF 0x70, IC_CONF 0x0, IDMAC_CHA_EN 0x0, IDMAC_CHA_PRI 0x4000, IDMAC_ CHA_BUSY 0x0
> [ 1.214447] ipu-core ipu-core: BUF0_RDY 0x4000, BUF1_RDY 0x0, CUR_BUF 0x0, DB_MODE 0x0, TASKS_STAT 0x2003
> [ 1.224442] dma dma0chan14: Found channel 0xe, irq 176
> [ 1.229690] dmaengine: __dma_request_channel: success (dma0chan14)
> [ 1.235966] return 1
> [ 1.238276] mx3_sdc_fb mx3_sdc_fb: mx3fb_check_var
> [ 1.243121] mx3_sdc_fb mx3_sdc_fb: mx3fb_check_var
> [ 1.247989] mx3_sdc_fb mx3_sdc_fb: sdc_set_brightness: value = 255
> [ 1.254238] mx3_sdc_fb mx3_sdc_fb: disabling irq 176
> [ 1.270275] mx3_sdc_fb mx3_sdc_fb: allocated fb @ p=0x97000000, v=0xd887d000, size=1536000.
> [ 1.294524] mx3_sdc_fb mx3_sdc_fb: pixclock = 33260000l Hz
> [ 1.300118] mx3_sdc_fb mx3_sdc_fb: panel size = 800 x 480
> [ 1.305528] hor_conf 3e80000, ver_conf 1f40001
> [ 1.310266] mx3_sdc_fb mx3_sdc_fb: InitPanel() - Pixel clock divider less than 4
> [ 1.317813] mx3_sdc_fb mx3_sdc_fb: pixel clk = 33260000, divider 4.0
> [ 1.324272] mx3_sdc_fb mx3_sdc_fb: DI_DISP_IF_CONF = 0x04000000
> [ 1.330209] mx3_sdc_fb mx3_sdc_fb: DI_DISP_SIG_POL = 0x06000000
> [ 1.336287] mx3_sdc_fb mx3_sdc_fb: DI_DISP3_TIME_CONF = 0x01C00040
> [ 1.348164] mx3_sdc_fb mx3_sdc_fb: mx3fbi d798d25c, txd = NULL
> [ 1.354123] ipu-core ipu-core: write param mem - addr = 0x000100E0, data = 0x00000000
> [ 1.362003] ipu-core ipu-core: write param mem - addr = 0x000100E1, data = 0x00004000
> [ 1.369987] ipu-core ipu-core: write param mem - addr = 0x000100E2, data = 0x00000000
> [ 1.377835] ipu-core ipu-core: write param mem - addr = 0x000100E3, data = 0xDF31F000
> [ 1.385821] ipu-core ipu-core: write param mem - addr = 0x000100E4, data = 0x00000001
> [ 1.393670] ipu-core ipu-core: write param mem - addr = 0x000100E8, data = 0x97000000
> [ 1.401655] ipu-core ipu-core: write param mem - addr = 0x000100E9, data = 0x00000000
> [ 1.409504] ipu-core ipu-core: write param mem - addr = 0x000100EA, data = 0x1E0831FA
> [ 1.417490] ipu-core ipu-core: write param mem - addr = 0x000100EB, data = 0x96416502
> [ 1.425338] ipu-core ipu-core: write param mem - addr = 0x000100EC, data = 0x00000000
> [ 1.433323] dma dma0chan14: Submitting sg d798d2d4
> [ 1.438224] dma dma0chan14: Updated sg d798d2d4 on channel 0xe buffer 0
> [ 1.444864] ipu-core ipu-core: IDMAC_CONF 0x70, IC_CONF 0x0, IDMAC_CHA_EN 0x0, IDMAC_CHA_PRI 0x4000, IDMAC_ CHA_BUSY 0x0
> [ 1.455798] ipu-core ipu-core: BUF0_RDY 0x4000, BUF1_RDY 0x0, CUR_BUF 0x0, DB_MODE 0x0, TASKS_STAT 0x3
> [ 1.465214] ipu-core ipu-core: IDMAC_CONF 0x70, IC_CONF 0x0, IDMAC_CHA_EN 0x4000, IDMAC_CHA_PRI 0x4000, IDM AC_CHA_BUSY 0x0
> [ 1.476365] ipu-core ipu-core: BUF0_RDY 0x4000, BUF1_RDY 0x0, CUR_BUF 0x0, DB_MODE 0x0, TASKS_STAT 0x3
> [ 1.485807] mx3_sdc_fb mx3_sdc_fb: 422: Submit d887b09c #2 [+]
> [ 1.510871] mx3_sdc_fb mx3_sdc_fb: sdc_set_brightness: value = 255
> [
>
> Signed-off-by: Ivan Stoyanov <ivan.stoyanov@amk-drives.bg>
> ---
> drivers/dma/ipu/ipu_irq.c | 46 ++++++++++++++++++++++++++++++++++++++++++----
> 1 file changed, 42 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
> index dd184b5..3f9477c 100644
> --- a/drivers/dma/ipu/ipu_irq.c
> +++ b/drivers/dma/ipu/ipu_irq.c
> @@ -265,8 +265,8 @@ int ipu_irq_unmap(unsigned int source)
> return ret;
> }
>
> -/* Chained IRQ handler for IPU function and error interrupt */
> -static void ipu_irq_handler(struct irq_desc *desc)
> +/* Chained IRQ handler for IPU error interrupt */
> +static void ipu_irq_err(struct irq_desc *desc)
> {
> struct ipu *ipu = irq_desc_get_handler_data(desc);
> u32 status;
> @@ -306,6 +306,44 @@ static void ipu_irq_handler(struct irq_desc *desc)
> }
> }
>
> +/* Chained IRQ handler for IPU function interrupt */
> +static void ipu_irq_fn(struct irq_desc *desc)
> +{
> + struct ipu *ipu = irq_desc_get_handler_data(desc);
> + u32 status;
> + int i, line;
> +
> + for (i = 0; i < IPU_IRQ_NR_FN_BANKS; i++) {
> + struct ipu_irq_bank *bank = irq_bank + i;
> +
> + raw_spin_lock(&bank_lock);
> + status = ipu_read_reg(ipu, bank->status);
> + /* Not clearing all interrupts, see above */
> + status &= ipu_read_reg(ipu, bank->control);
> + raw_spin_unlock(&bank_lock);
> + while ((line = ffs(status))) {
> + struct ipu_irq_map *map;
> + unsigned int irq;
> +
> + line--;
> + status &= ~(1UL << line);
> +
> + raw_spin_lock(&bank_lock);
> + map = src2map(32 * i + line);
> + if (map)
> + irq = map->irq;
> + raw_spin_unlock(&bank_lock);
> +
> + if (!map) {
> + pr_err("IPU: Interrupt on unmapped source %u bank %d\n",
> + line, i);
> + continue;
> + }
> + generic_handle_irq(irq);
> + }
> + }
> +}
> +
> static struct irq_chip ipu_irq_chip = {
> .name = "ipu_irq",
> .irq_ack = ipu_irq_ack,
> @@ -343,9 +381,9 @@ int __init ipu_irq_attach_irq(struct ipu *ipu, struct platform_device *dev)
> irq_clear_status_flags(irq, IRQ_NOREQUEST | IRQ_NOPROBE);
> }
>
> - irq_set_chained_handler_and_data(ipu->irq_fn, ipu_irq_handler, ipu);
> + irq_set_chained_handler_and_data(ipu->irq_fn, ipu_irq_fn, ipu);
>
> - irq_set_chained_handler_and_data(ipu->irq_err, ipu_irq_handler, ipu);
> + irq_set_chained_handler_and_data(ipu->irq_err, ipu_irq_err, ipu);
>
> ipu->irq_base = irq_base;
>
> --
> 2.7.4
>
--
~Vinod
prev parent reply other threads:[~2017-01-04 4:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-23 12:31 [PATCH] dmaengine: ipu: Revert ipu_irq_handler changes ivan.stoyanov
2016-12-23 14:37 ` kbuild test robot
2017-01-04 4:31 ` Vinod Koul [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170104043116.GH3573@localhost \
--to=vinod.koul@intel.com \
--cc=arnd@arndb.de \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=ivan.stoyanov@amk-drives.bg \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.