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


Groups > linux.kernel > #1498601

Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver

From Jassi Brar <jaswinder.singh@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver
Date 2016-10-11 06:30 +0200
Message-ID <sqWRs-1Yo-7@gated-at.bofh.it> (permalink)
References (8 earlier) <soTEm-Y7-3@gated-at.bofh.it> <soVG9-2e3-13@gated-at.bofh.it> <spgAW-wz-13@gated-at.bofh.it> <spgKB-A6-15@gated-at.bofh.it> <sqViF-Wg-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 11 October 2016 at 08:10, Horng-Shyang Liao <hs.liao@mediatek.com> wrote:
> On Thu, 2016-10-06 at 18:40 +0530, Jassi Brar wrote:
>> On 6 October 2016 at 18:31, Horng-Shyang Liao <hs.liao@mediatek.com> wrote:
>>
>> > Back to our original statement, we need to flush all tasks to queue
>> > in GCE HW; i.e. we need to use mbox_client_txdone after
>> > mbox_send_message, or send tx_done once mailbox controller receive
>> > message (task). However, we still need a way to notice done tasks to
>> > clients. Currently, we don't have a good way to call callback in mailbox
>> > framework. Therefore, CMDQ driver has its owner callback functions.
>> >
>> mbox_client_txdone() is called by the client driver when only it knows
>> the messages has been transmitted (i.e your submitted tasks are done).
>> Obviously the client driver should do any callbacks to its users
>> upstream.
>
> Hi Jassi,
>
> In current CMDQ driver, mbox_client_txdone() is called to prevent the
> blocking of chan->active_req. It is not the real point of CMDQ task
> done, so the client driver cannot do any callbacks to its user upstream.
>
> (1) If we don't use mbox_client_txdone(), could you tell us an
>     alternative way to prevent the blocking of chan->active_req?
>     And then we can use tx_done when CMDQ task is relly done.
>
mbox_client_txdone() should be used only when the mailbox controller
driver can't figure when the TX is done. Client driver (by like some
reply packet) realises the TX is done (for the reply to have arrived).

 If your hardware does flag/irq when tx is done, you should prefer
that over mbox_client_txdone().


> (2) If we use mbox_client_txdone() to prevent the blocking of
>     chan->active_req, could CMDQ driver just uses self-defined callback
>     function to notice client driver CMDQ task done?
>
Anything above the mailbox api, is none of its business. Your platform
specific 'server' driver can implement its own callbacks to notify its
users.

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


Thread

Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver CK Hu <ck.hu@mediatek.com> - 2016-09-30 05:10 +0200
  Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Horng-Shyang Liao <hs.liao@mediatek.com> - 2016-09-30 11:00 +0200
    Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver CK Hu <ck.hu@mediatek.com> - 2016-09-30 11:20 +0200
      Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Horng-Shyang Liao <hs.liao@mediatek.com> - 2016-09-30 11:50 +0200
        Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Horng-Shyang Liao <hs.liao@mediatek.com> - 2016-10-05 05:00 +0200
          Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Jassi Brar <jaswinder.singh@linaro.org> - 2016-10-05 05:40 +0200
            Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Horng-Shyang Liao <hs.liao@mediatek.com> - 2016-10-05 14:40 +0200
              Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Jassi Brar <jaswinder.singh@linaro.org> - 2016-10-05 16:50 +0200
                Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Horng-Shyang Liao <hs.liao@mediatek.com> - 2016-10-06 15:10 +0200
                Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Jassi Brar <jaswinder.singh@linaro.org> - 2016-10-06 15:20 +0200
                Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Horng-Shyang Liao <hs.liao@mediatek.com> - 2016-10-11 04:50 +0200
                Re: [PATCH v14 2/4] CMDQ: Mediatek CMDQ driver Jassi Brar <jaswinder.singh@linaro.org> - 2016-10-11 06:30 +0200

csiph-web