Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1578175

Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM

From Vinod Koul <vinod.koul@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM
Date 2017-02-10 06:00 +0100
Message-ID <t9btn-7bu-3@gated-at.bofh.it> (permalink)
References <t8XTr-7gc-19@gated-at.bofh.it> <t8XTs-7gc-27@gated-at.bofh.it> <t8XTs-7gc-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Feb 09, 2017 at 03:22:51PM +0100, Marek Szyprowski wrote:
  
> +static int pl330_set_slave(struct dma_chan *chan, struct device *slave)
> +{
> +	struct dma_pl330_chan *pch = to_pchan(chan);
> +	struct pl330_dmac *pl330 = pch->dmac;
> +	int i;
> +
> +	mutex_lock(&pl330->rpm_lock);
> +
> +	for (i = 0; i < pl330->num_peripherals; i++) {
> +		if (pl330->peripherals[i].chan.slave == slave &&
> +		    pl330->peripherals[i].slave_link) {
> +			pch->slave_link = pl330->peripherals[i].slave_link;
> +			goto done;
> +		}
> +	}
> +
> +	pch->slave_link = device_link_add(slave, pl330->ddma.dev,
> +				       DL_FLAG_PM_RUNTIME | DL_FLAG_RPM_ACTIVE);

So you are going to add the link on channel allocation and tear down on the
freeup. I am not sure I really like the idea here.

First, these thing shouldn't be handled in the drivers. These things should
be set in core and each driver setting the links doesn't sound great to me.

Second, should the link be always there and we only mange the state? Here it
seems that we have link being created and destroyed, so why not mark it
ACTIVE and DORMANT instead...

Lastly, looking at th description of the issue here, am perceiving (maybe my
understanding is not quite right here) that you have an IP block in SoC
which has multiple things and share common stuff and doing right PM is a
challenge for you, right?

-- 
~Vinod

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Marek Szyprowski <m.szyprowski@samsung.com> - 2017-02-09 15:30 +0100
  Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime  PM Vinod Koul <vinod.koul@intel.com> - 2017-02-10 06:00 +0100
    Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Marek Szyprowski <m.szyprowski@samsung.com> - 2017-02-10 13:00 +0100
      Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Ulf Hansson <ulf.hansson@linaro.org> - 2017-02-10 15:00 +0100
        Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime  PM Vinod Koul <vinod.koul@intel.com> - 2017-02-13 03:10 +0100
          Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Ulf Hansson <ulf.hansson@linaro.org> - 2017-02-13 12:20 +0100
            Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Marek Szyprowski <m.szyprowski@samsung.com> - 2017-02-13 13:20 +0100
              Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime  PM Vinod Koul <vinod.koul@intel.com> - 2017-02-13 13:40 +0100
            Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime  PM Vinod Koul <vinod.koul@intel.com> - 2017-02-13 13:30 +0100
              Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Ulf Hansson <ulf.hansson@linaro.org> - 2017-02-13 16:40 +0100
                Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime  PM Vinod Koul <vinod.koul@intel.com> - 2017-02-13 17:00 +0100
          Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Marek Szyprowski <m.szyprowski@samsung.com> - 2017-02-13 13:10 +0100
        Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Marek Szyprowski <m.szyprowski@samsung.com> - 2017-02-13 12:50 +0100
          Re: [PATCH v8 3/3] dmaengine: pl330: Don't require irq-safe runtime PM Ulf Hansson <ulf.hansson@linaro.org> - 2017-02-13 16:20 +0100

csiph-web