RE: [PATCH 2/3] media: vsp1: Add support to deassert/assert reset line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Philipp,

Thanks for the feedback.

> Subject: Re: [PATCH 2/3] media: vsp1: Add support to deassert/assert reset
> line
> 
> Hi Biju,
> 
> On Mi, 2022-03-09 at 19:45 +0000, Biju Das wrote:
> [...]
> > @@ -569,7 +570,19 @@ static void vsp1_mask_all_interrupts(struct
> > vsp1_device *vsp1)
> >   */
> >  int vsp1_device_get(struct vsp1_device *vsp1)
> >  {
> > -       return pm_runtime_resume_and_get(vsp1->dev);
> > +       int ret = reset_control_deassert(vsp1->rstc);
> > +
> > +       if (ret < 0)
> > +               goto err;
> > +
> > +       ret = pm_runtime_resume_and_get(vsp1->dev);
> > +       if (ret < 0)
> > +               goto err;
> > +
> > +       return 0;
> > +err:
> > +       reset_control_assert(vsp1->rstc);
> > +       return ret;
> >  }
> >
> >  /*
> > @@ -581,6 +594,7 @@ int vsp1_device_get(struct vsp1_device *vsp1)
> >  void vsp1_device_put(struct vsp1_device *vsp1)
> >  {
> >         pm_runtime_put_sync(vsp1->dev);
> > +       reset_control_assert(vsp1->rstc);
> 
> Now the comment above doesn't fit anymore, since reset_control_assert is
> not reference counted in case vsp1->rstc has exclusive control:

Thanks for pointing out. I will send v2 with shared reset instead of exclusive
control to match with the comment above.

Moreover for next patch, we need to use shared reset as reset line is shared
with DU Module.

Cheers,
Biju

> 
> /*
>  * vsp1_device_put - Release the VSP1 device
>  *
>  * Decrement the VSP1 reference count and cleanup the device if the last
>  * reference is released.
>  */
> 
> regards
> Philipp




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux