By default fsync option, if fsync is called frequently, and suddenly
lost power, the POR will consume too much memory at mounting, this
process may be very slow due to a large number of swapping.
Change-Id: I8235098cca062d7ab58af4ebed414aed9aba6c75
Signed-off-by: Cliff Chen <cliff.chen@rock-chips.com>
Signed-off-by: Alex Wang <alex.wang@rock-chips.com>
The DWC2 driver auto detects the hardware and enable
the gadget descriptor DMA if the DWC2 IP supports it.
However, the gadget descriptor DMA has some unexpected
compatibility issues, so we use buffer DMA instead of
desc DMA.
Change-Id: I1fed77f7d9bec1e0916b44d80813fb6248d461f0
Signed-off-by: William Wu <william.wu@rock-chips.com>
v2 tuning will inherit pre-stage loader's phase
settings for the first time, and do re-tune if
necessary. Re-tune will still try the rough degrees,
for instance, 90, 180, 270, 360 but continue to do the
fine tuning if sample window isn't good enough.
Change-Id: I593384ee381d09df5b9adfc29a18eb22517b2764
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
xfer timer was introduced to solve native defects for RK3308
platform but it seems some others also suffer from it. Enable
it would not put any burden on the normal driver process but
just ensure it has a dead-line weapon to fight for any issues
preventing the IP to work normally.
Change-Id: I0b6914d46788f4df99a7d49c608c3336976f78c6
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Current pvtm-voltage-sel table is not stable for some chips, reported by
some clients.
Change-Id: If2f7d8cd6a077922334c8e6ba4b01f82e27048d7
Signed-off-by: Liang Chen <cl@rock-chips.com>
Ref: https://android.googlesource.com/kernel/configs
commit aaf4b964e66f ("Add CONFIG_PSI to recommended")
This feature is not (yet?) required for Go, so we need to put it in
'recommended'.
commit 5f92c3d69791 ("android R: replace CONFIG_MEMCG requirement with CONFIG_PSI")
With adoption of PSI events as low memory notification mechanism MEMCG
becomes optional and PSI becomes mandatory. Note that MEMCG can still be
used for instance in Android Go devices but it's not mandatory anymore.
Change-Id: Id955b47aebc0411594906bc615464d894b1f8d51
Signed-off-by: Jianhui Wang <wjh@rock-chips.com>
current->pid may be the same for different sessions in one thread.
Change-Id: Iac6ee4c641d63cbd3e883861d339eb2d540d3118
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
1.Add more varification for ftl read/write input param
2.dump stack in FtlMemInit
Change-Id: I7a09f54c217d9da8e656cb91fe18ca83a882cff6
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
mipi dphy subdev s_stream has been called in rkcif_pipeline_set_stream,
no need be called here
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Iba9074da59d6516b169660ebae8039b70ee428c4
add mutex for mipidphy_s_stream to fix n4 green issue
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: I7fe7a5b0369569757e3f3c179e37bb4f5e8967ce
It is not necessary to check offset for MPP_CMD_SET_REG_ADDR_OFFSET,
and user space can not ensure it.
Change-Id: Iac3a2fa3ce8be8d9afd7294e7c3ec4bc6df4a2e3
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
dtc generation of symbols by CONFIG_DTC_SYMBOLS other than
CONFIG_ANDROID directly.
Fixes: 761bc94299 ("ANDROID: rk: kbuild: dtc generation of symbols")
Change-Id: Ia10496031bc02fd3a4ff98ab0acfc6fc9a54951b
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This patch fixes the issue that "bFrameindex" attribute was
always set to "1". And add V4L2_PIX_FMT_H264 in uvc_formats[]
to support H264 format.
Fixes: 66cb0608ac ("FROMLIST: usb: gadget: uvc: configfs: add framebased format support")
Change-Id: Icd7ce96b9667c378de421fd714a42f243b543764
Signed-off-by: William Wu <william.wu@rock-chips.com>
As we know, The framebased format can be used to support a lot of
formats other than YUV and MJPEG, for example: H264 or H265.
And Nowadays, the H264 and H265 is used more and more compared to the
MJPEG, so there is a need to support such usecase, although the new UVC
1.5 and the UVC1.1 extensions already support H264, but they are much
more expensive and most of the time, what we need is just a channel to
stream the video frames.
In this patch, we implement the framebased format and set it to H264 by
default, and the users could change the video format as they need through
the guid configfs attribute node.
Change-Id: Ie1c62f5fb4fa57c24a2878f9992c982e9deb302e
Signed-off-by: Zeng Tao <prime.zeng@hisilicon.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(am from https://patchwork.kernel.org/patch/10722957/)
Several macros used to define attributes and their access functions take
multiple arguments to specify endianness and string conversion
functions, based on the size of the attribute. This can be simplified by
passing the number of bits explicitly, and constructing the name of the
functions internally.
The UVCG_OPTS_ATTR macro can be simplified further as all fields it
deals with are unsigned int.
Change-Id: I967a1af76104635feab93ce902e291370feeb0db
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 4f2a6552c2)
USB descriptors are stored in little endian, requiring the use of
conversion macros. Those macros are incorrectly used for values stored
in native endian structures within the driver. Operation on big endian
platforms is thus broken. Fix it by removing the conversion macros where
they're not needed.
Change-Id: I65e7107abe4ddd5fdecdaf0970ba5d6b610e4a80
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 78c9e7ce00)
- Add bFrameIndex as a UVCG_FRAME_ATTR_RO for each frame size.
- Automatically assign ascending bFrameIndex to each frame in a format.
Before all "bFrameindex" attributes were set to "1" with no way to
configure the gadget otherwise. This resulted in the host always
negotiating for bFrameIndex 1 (i.e. the first frame size of the gadget).
After the negotiation the host driver will set the user or application
selected frame size, while the gadget is actually set to the first frame
size.
Now, when the containing format is linked into the streaming header,
iterate over all child frame descriptors and assign ascending indices.
The automatically assigned indices can be read from the new read only
bFrameIndex configfs attribute in each frame descriptor item.
Change-Id: I3da430c7be39460bd62e310a5b4930f623c12938
Signed-off-by: Joel Pepper <joel.pepper@rwth-aachen.de>
[Simplified documentation, renamed function, blank space update]
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit b206548be6)
The UVC format description are numbered using the descriptor's
bFormatIndex field. The index is used in UVC requests, and is thus
needed to handle requests in userspace. Make it dynamically discoverable
by exposing it in a bFormatIndex configfs attribute of the uncompressed
and mjpeg format config items.
The bFormatIndex value exposed through the attribute is stored in the
config item private data. However, that value is never set: the driver
instead computes the bFormatIndex value when linking the stream class
header in the configfs hierarchy and stores it directly in the class
descriptors in a separate structure. In order to expose the value
through the configfs attribute, store it in the config item private data
as well. This results in a small code simplification.
Change-Id: I537f24242d4cf63efab72b96437193b665f44a60
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit 61ff10e0ea)
The video control and video streaming interface numbers are needed in
the UVC gadget userspace stack to reply to UVC requests. They are
hardcoded to fixed values at the moment, preventing configurations with
multiple functions.
To fix this, make them dynamically discoverable by userspace through
read-only configfs attributes in <function>/control/bInterfaceNumber and
<function>/streaming/bInterfaceNumber respectively.
Change-Id: I093a4e403ef0bd2188a799d9e6cbde986c58a2d4
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit bf71544883)