Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: Ionut Nicu <ionut.nicu@mindbit.ro>
To: "Ramirez Luna, Omar" <omar.ramirez@ti.com>
Cc: Greg Kroah-Hartman <greg@kroah.com>,
	Sapiens Rene <rene.sapiens@ti.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	Fernando Guzman Lugo <x0095840@ti.com>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 1/2] staging: tidspbridge: rmgr/node.c code cleanup
Date: Sun, 12 Dec 2010 16:20:29 +0200	[thread overview]
Message-ID: <1292163629.2375.5.camel@atlantis.mindbit.ro> (raw)
In-Reply-To: <AANLkTikLoNf-NDb6kCQnVHB95zrTKi2f9CU6m_u0A+KB@mail.gmail.com>

Hi,

On Thu, 2010-12-09 at 17:03 -0600, Ramirez Luna, Omar wrote:
> Hi Ionut,
> 
> On Thu, Dec 9, 2010 at 4:22 PM, Ionut Nicu <ionut.nicu@mindbit.ro> wrote:
> > Hi Omar,
> >
> > On Thu, 2010-12-09 at 23:47 +0200, Ionut Nicu wrote:
> >> Reorganized some code in rmgr/node.c to increase its
> >> readability. Most of the changes reduce the code
> >> indentation level and simplifiy the code. No functional
> >> changes were done.
> >
> > <snip>
> >
> >>       /*
> >>        * Check stream mode. Default is STRMMODE_PROCCOPY.
> >>        */
> >> -     if (!status && pattrs) {
> >> -             if (pattrs->strm_mode != STRMMODE_PROCCOPY)
> >> -                     status = -EPERM;        /* illegal stream mode */
> >> -
> >> -     }
> >> -     if (status)
> >> -             goto func_end;
> >> +     if (pattrs && pattrs->strm_mode != STRMMODE_PROCCOPY)
> >> +             return -EPERM;  /* illegal stream mode */
> >>
> >
> > While cleaning up and reviewing the code I saw this check,  which unless
> > it's intentional I think it looks like a bug. See comment below.
> >
> > <snip>
> >> +             strm_mode = pattrs ? pattrs->strm_mode : STRMMODE_PROCCOPY;
> >> +             switch (strm_mode) {
> >> +             case STRMMODE_RDMA:
> >
> > ...
> >
> >> +
> >> +             case STRMMODE_ZEROCOPY:
> >
> > ...
> >
> >> +             case STRMMODE_PROCCOPY:
> >
> > It looks like all modes are handled here although the only one that
> > could escape the validation from above is STRMMODE_PROCCOPY.
> >
> > I tried removing the first check and tested with the
> > userspace-dspbridge strmcopy application, but I noticed the DSP hangs if
> > I try to use it with anything else than the copy mode.
> >
> > Are the other modes (rdma, zerocopy) not supported at all?
> 
> No, those modes are not supported... the only one working for dsp
> streams is proc-copy.
> 

Is there any plan to make them work? If not, maybe the code that handles
them should be removed...

Thanks,
Ionut.


  reply	other threads:[~2010-12-12 14:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 21:47 [PATCH 0/2] staging: tidspbridge: various cleanups Ionut Nicu
2010-12-09 21:47 ` [PATCH 1/2] staging: tidspbridge: rmgr/node.c code cleanup Ionut Nicu
2010-12-09 22:22   ` Ionut Nicu
2010-12-09 23:02     ` Felipe Contreras
2010-12-09 23:03     ` Ramirez Luna, Omar
2010-12-12 14:20       ` Ionut Nicu [this message]
2010-12-14  4:01         ` Ramirez Luna, Omar
2010-12-22 18:07   ` Ramirez Luna, Omar
2010-12-09 21:47 ` [PATCH 2/2] staging: tidspbridge: rmgr " Ionut Nicu
2010-12-22 20:52   ` Ramirez Luna, Omar
2010-12-24 11:33     ` Ionut Nicu

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=1292163629.2375.5.camel@atlantis.mindbit.ro \
    --to=ionut.nicu@mindbit.ro \
    --cc=andy.shevchenko@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=greg@kroah.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --cc=rene.sapiens@ti.com \
    --cc=x0095840@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox