If the streamoff call was triggered by some previous disconnect
or userspace application shutdown the uvc_function_setup_continue
should not be called and the state should not be overwritten.
For this situation the set_alt(0) was never called and the streaming ep
has no USB_GADGET_DELAYED_STATUS pending.
Since the state then was already updated before we also omit the state
update.
Change-Id: I65382e0ed663138ea694c27276fe813c30863f89
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20240403-uvc_request_length_by_interval-v7-9-e224bb1035f0@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit e723ebc3a9aa172ab8042382afcae310c953104d)
Since the req_free list will updated if enqueuing one request was not
possible it will be added back to the free list. With every available
free request in the queue it is a valid case for the pump worker to use
it and continue the pending bufferdata into requests for the req_ready
list.
Change-Id: Ib52f29e23a938b469782f4b25221e127c01cc8a3
Fixes: 6acba0345b68 ("usb:gadget:uvc Do not use worker thread to pump isoc usb requests")
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20240403-uvc_request_length_by_interval-v7-1-e224bb1035f0@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit adc292d54de9db2e6b8ecb7f81f278bbbaf713e9)
Since commit "6acba0345b68 usb:gadget:uvc Do not use worker thread to pump
isoc usb requests", pump work could only be queued in uvc_video_complete()
and uvc_v4l2_qbuf(). If VIDIOC_QBUF is executed before VIDIOC_STREAMON,
we can only depend on uvc_video_complete() to queue pump work. However,
this requires some free requests in req_ready list. If req_ready list is
empty all the time, pump work will never be queued and video datas will
never be pumped to usb controller. Actually, this situation could happen
when run uvc-gadget with static image:
$ ./uvc-gadget -i 1080p.jpg uvc.0
When capture image from this device, the user app will always block there.
The issue is uvc driver has queued video buffer before streamon, but the
req_ready list is empty all the time after streamon. This will queue pump
work in uvcg_video_enable() to fill some request to req_ready list so the
uvc device could work properly.
Change-Id: Iedfba9335ea5f1a61dc1157f8d20c647803c84cd
Fixes: 6acba0345b68 ("usb:gadget:uvc Do not use worker thread to pump isoc usb requests")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20240814112537.2608949-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit b52a07e07dead777517af3cbda851bb2cc157c9d)
This reverts commit 3c5b006f3e.
gadget_is_{super|dual}speed() API check UDC controller capitblity. It
should pass down highest speed endpoint descriptor to UDC controller. So
UDC controller driver can reserve enough resource at check_config(),
especially mult and maxburst. So UDC driver (such as cdns3) can know need
at least (mult + 1) * (maxburst + 1) * wMaxPacketSize internal memory for
this uvc functions.
Change-Id: Iae006b68943aac4ec9958e08a11f19dec270f954
Cc: <stable@vger.kernel.org>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20231224153816.1664687-5-Frank.Li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 895ee5aefb7e24203de5dffae7ce9a02d78fa3d1)
1.reset fast speed
2.fix no ghost remove by part check
Change-Id: I4f688db74fd1f34595c7e90f295361be92df2e17
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
do_one_request cannot call crypto_finalize_akcipher_request,
otherwise it will result in a null pointer reference.
The asym algorithm needs to be changed to synchronous mode.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I6615f113691a334b148da0364b7a1e3764d27739
The top cru source clock of aclk rkvdec should enable when power on/off pd.
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ib6eea60ca59ad8a5fb79713781476f710bb51d9c
ATF will use npor reset, so we need a os_reg that can't be reset.
Change-Id: Ie13953a915524b203808909c090eb4d5d88381fc
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
According to the hardware test, the current 100M amplitude is too high,
and it is recommended to modify it to 0xc.
Change-Id: I6a50109d6ff171d4a3f1605b43bc6ca0ef21a750
Signed-off-by: David Wu <david.wu@rock-chips.com>
It's better to use a 50M clock for fephy, and the disable enable switch
ensures better timing.
Change-Id: I965648ce08a6e2c7c6137b18e9390cc589f48afe
Signed-off-by: David Wu <david.wu@rock-chips.com>
The layer sel configuration is exclusive for RV1126B, only one of
them can be set to 0b01 for either layer2_sel or layer1_sel when two
layers are displayed on the same time.
1. For RV1126B:
dsp_layer2_sel, that is top layer:
- 2'b00 WIN0 is top layer
- 2'b01 WIN2 is top layer
dsp_layer1_sel, that is bottom layer:
- 2'b00 WIN0 is bottom layer
- 2'b01 WIN2 is bottom layer
For {dsp_layer2_sel, dsp_layer1_sel}:
- 4'b0001 : WIN0 on the top, WIN2 on the bottom
- 4'b0100 : WIN2 on the top, WIN0 on the bottom
2. For other version:
- 2'b00 select WIN0
- 2'b10 select WIN2
Change-Id: I4ab4928868a599e9b398e83aca88074c6e5eaabb
Signed-off-by: Chaoyi Chen <chaoyi.chen@rock-chips.com>
1. Rockchip U-Boot will use kernel dtb by default.
2. The legacy U-Boot GPIO driver need regulator-boot-on in dtb to set
correct SDMMC0_PWREN value.
3. regulator-boot-on will not affect SDMMC0 function in kernel.
Change-Id: I7160a2c1f29e35e2fcf29389dca60f507dea8cb4
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
sg_phys(sgl) == SZ_4G must be regarded as an illegal value
because the address space exceeds 32 bits.
Change-Id: I50dca3970654ea8ce4d60ea20ced7d5dcc843724
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>