Message ID | a5724b2c7cac1192cbd5033d90745daa586883aa.1441540862.git.mchehab@osg.samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 09/06/2015 02:03 PM, Mauro Carvalho Chehab wrote: > Sometimes, it is important to see if the created pad is > sink or source. Add info to track that. > > Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> > > diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c > index d8038a53f945..6ed5eef88593 100644 > --- a/drivers/media/media-entity.c > +++ b/drivers/media/media-entity.c > @@ -121,8 +121,11 @@ static void dev_dbg_obj(const char *event_name, struct media_gobj *gobj) > struct media_pad *pad = gobj_to_pad(gobj); > > dev_dbg(gobj->mdev->dev, > - "%s: id 0x%08x pad#%d: '%s':%d\n", > - event_name, gobj->id, media_localid(gobj), > + "%s: id 0x%08x %s%spad#%d: '%s':%d\n", > + event_name, gobj->id, > + pad->flags & MEDIA_PAD_FL_SINK ? " sink " : "", > + pad->flags & MEDIA_PAD_FL_SOURCE ? "source " : "", > + media_localid(gobj), > pad->entity->name, pad->index); > break; > } > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Mauro, Thank you for the patch. On Sunday 06 September 2015 09:03:03 Mauro Carvalho Chehab wrote: > Sometimes, it is important to see if the created pad is > sink or source. Add info to track that. > > Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> > > diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c > index d8038a53f945..6ed5eef88593 100644 > --- a/drivers/media/media-entity.c > +++ b/drivers/media/media-entity.c > @@ -121,8 +121,11 @@ static void dev_dbg_obj(const char *event_name, struct > media_gobj *gobj) struct media_pad *pad = gobj_to_pad(gobj); > > dev_dbg(gobj->mdev->dev, > - "%s: id 0x%08x pad#%d: '%s':%d\n", > - event_name, gobj->id, media_localid(gobj), > + "%s: id 0x%08x %s%spad#%d: '%s':%d\n", > + event_name, gobj->id, > + pad->flags & MEDIA_PAD_FL_SINK ? " sink " : "", > + pad->flags & MEDIA_PAD_FL_SOURCE ? "source " : "", I'm wondering if we really need the two leading spaces in " sink ", as a bidirectional pad would print " sink source pad" and mess up the alignment anyway. > + media_localid(gobj), > pad->entity->name, pad->index); > break; > }
Em Sun, 06 Dec 2015 02:53:57 +0200 Laurent Pinchart <laurent.pinchart@ideasonboard.com> escreveu: > Hi Mauro, > > Thank you for the patch. > > On Sunday 06 September 2015 09:03:03 Mauro Carvalho Chehab wrote: > > Sometimes, it is important to see if the created pad is > > sink or source. Add info to track that. > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> > > > > diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c > > index d8038a53f945..6ed5eef88593 100644 > > --- a/drivers/media/media-entity.c > > +++ b/drivers/media/media-entity.c > > @@ -121,8 +121,11 @@ static void dev_dbg_obj(const char *event_name, struct > > media_gobj *gobj) struct media_pad *pad = gobj_to_pad(gobj); > > > > dev_dbg(gobj->mdev->dev, > > - "%s: id 0x%08x pad#%d: '%s':%d\n", > > - event_name, gobj->id, media_localid(gobj), > > + "%s: id 0x%08x %s%spad#%d: '%s':%d\n", > > + event_name, gobj->id, > > + pad->flags & MEDIA_PAD_FL_SINK ? " sink " : "", > > + pad->flags & MEDIA_PAD_FL_SOURCE ? "source " : "", > > I'm wondering if we really need the two leading spaces in " sink ", as a > bidirectional pad would print " sink source pad" and mess up the alignment > anyway. Good point. Right now, we don't have any bidirectional pad. For now, this looks nicer and makes easier to check the logs. So, I prefer to keep it as-is for now. We can change it later, when we add bidirectional pads. > > > + media_localid(gobj), > > pad->entity->name, pad->index); > > break; > > } > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index d8038a53f945..6ed5eef88593 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -121,8 +121,11 @@ static void dev_dbg_obj(const char *event_name, struct media_gobj *gobj) struct media_pad *pad = gobj_to_pad(gobj); dev_dbg(gobj->mdev->dev, - "%s: id 0x%08x pad#%d: '%s':%d\n", - event_name, gobj->id, media_localid(gobj), + "%s: id 0x%08x %s%spad#%d: '%s':%d\n", + event_name, gobj->id, + pad->flags & MEDIA_PAD_FL_SINK ? " sink " : "", + pad->flags & MEDIA_PAD_FL_SOURCE ? "source " : "", + media_localid(gobj), pad->entity->name, pad->index); break; }
Sometimes, it is important to see if the created pad is sink or source. Add info to track that. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>