Commit Graph

853452 Commits

Author SHA1 Message Date
Zhou Jing
9d75ca700c arm64: dts: rockchip: rk3368 support automatic frequency
Signed-off-by: Zhou Jing <tracy.zhou@rock-chips.com>
Change-Id: Ibb5432e81718bb6e6df116bd21c891c653ab0e58
2020-04-08 14:24:42 +08:00
Zhou Jing
5625ebbdc5 video: rockchip: mpp: automatic frequency on large resolution
Signed-off-by: Zhou Jing <tracy.zhou@rock-chips.com>
Change-Id: I70150a22a535cd13a6618a66a7c0f5c20790d58f
2020-04-08 14:24:42 +08:00
Zhou Jing
1d19144785 dt-bindings: video: add rk3368 codec properties
Signed-off-by: Zhou Jing <tracy.zhou@rock-chips.com>
Change-Id: I568b9f86b2b6149b1c645846d0250c7170abf1df
2020-04-08 14:24:42 +08:00
Zeng Tao
66cb0608ac FROMLIST: usb: gadget: uvc: configfs: add framebased format support
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/)
2020-04-08 11:45:11 +08:00
Laurent Pinchart
f8fdb7ba34 UPSTREAM: usb: gadget: uvc: configfs: Use %u to print unsigned int values
The driver uses the %d format to print unsigned int values. The correct
format is %u. Fix it.

Change-Id: Ic379aca372b268e360411cca0361975be31c6aef
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 3fb2fd76ed)
2020-04-08 11:45:05 +08:00
Laurent Pinchart
fc57e95751 UPSTREAM: usb: gadget: uvc: configfs: Simplify attributes macros
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)
2020-04-08 11:44:59 +08:00
Laurent Pinchart
0b28cca6d4 UPSTREAM: usb: gadget: uvc: configfs: Fix operation on big endian platforms
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)
2020-04-08 11:44:52 +08:00
Joel Pepper
8c8d0ba003 UPSTREAM: usb: gadget: uvc: configfs: Add bFrameIndex attributes
- 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)
2020-04-08 11:43:51 +08:00
Laurent Pinchart
068cd84209 UPSTREAM: usb: gadget: uvc: configfs: Add bFormatIndex attributes
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)
2020-04-08 11:43:51 +08:00
Laurent Pinchart
91f0677d2c UPSTREAM: usb: gadget: uvc: configfs: Add interface number attributes
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)
2020-04-08 11:43:51 +08:00
Laurent Pinchart
08a2ad13d4 UPSTREAM: usb: gadget: uvc: configfs: Allocate groups dynamically
The UVC configfs implementation creates all groups as global static
variables. This prevents creation of multiple UVC function instances,
as they would all require their own configfs group instances.

Fix this by allocating all groups dynamically. To avoid duplicating code
around, extend the config_item_type structure with group name and
children, and implement helper functions to create children
automatically for most groups.

Change-Id: I2de58cbb0adc5586dbe864b35f6d8af0cffec3bf
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 efbf0af70b)
2020-04-08 11:43:51 +08:00
Laurent Pinchart
7943908c55 UPSTREAM: usb: gadget: uvc: configfs: Add section header comments
The UVC configfs implementation is large and difficult to navigate. Add
a bit more air to the code to make it easier to read.

Change-Id: I0f3d52ef7831ee0f77ca936445ce67c6fc82a1dc
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 f7d8109e31)
2020-04-08 11:43:51 +08:00
Laurent Pinchart
fe6562575f UPSTREAM: usb: gadget: uvc: configfs: Don't wrap groups unnecessarily
Various configfs groups (represented by config_group) are wrapped in
structures that they're the only member of. This allows adding other
data fields to groups, but it unnecessarily makes the code more complex.
Remove the outer structures and use config_group directly to simplify
the code. Groups can still be wrapped individually in the future if
other data fields need to be added.

Change-Id: I031176a1b2a0eac6cc283422fc2bb1e011ad4da5
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 b0aa30f33b)
2020-04-08 11:43:51 +08:00
William Wu
04a5983be7 Revert "usb: gadget: uvc: add a new attribute streaming_intf"
This reverts commit 017ed08206.

Change-Id: Ic99fd44da907292ca2f6328e6dff7933b9bed50d
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-04-08 11:43:51 +08:00
William Wu
0737cbbd0b Revert "usb: gadget: uvc: fix bFrameIndex of streaming interface descriptor"
This reverts commit 154e7b74ec.

Change-Id: I5f9835e4bcd716ee2bc938937accebb3cdfc71fd
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-04-08 11:43:51 +08:00
Allon Huang
90c3dec637 drivers: media: platform: rockchip: cif: fix compile failed for kernel-4.19
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I9d58702f5c948dd2d36f2b555fcda0e00c773266
2020-04-07 19:27:33 +08:00
Allon Huang
f268308100 media: rockchip: cif: csi-host compatible with rk3288
Change-Id: I59abdf5088622ba6e556912f5fef39ad75893b11
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2020-04-07 19:27:33 +08:00
Xu Hongfei
35c6b67ddb media: csi2: add mipi csi2 host driver
Change-Id: Iea58562c4f634d809add88b459949091b35b08b5
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
2020-04-07 19:27:33 +08:00
Allon Huang
02bc53d50b drivers: media: platform: rockchip: cif: sync with develop-4.4
sync with develop-4.4 at commit point:2b8ec827b22abc4a47

Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
Change-Id: I1d16e1a176ca8af36d5c8f0d55d747718db5aca0
2020-04-07 19:27:33 +08:00
Allon Huang
b2779ce342 drivers: media: platform: rockchip: cif: support rk3328 cif
Change-Id: Iad582e6f0e78b1dd2622f59c87ba6e19f4b97a9b
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2020-04-07 19:27:32 +08:00
Kaige Li
ff0999083d media: platform: add camera support hotplug for n4.
Change-Id: Id9868021c6e959f0e5f286a609a57c95b0af8e09
Signed-off-by: Kaige Li <kevin.li@rock-chips.com>
2020-04-07 19:27:32 +08:00
Allon Huang
2a6f987d3b drivers: platform: rockchip: cif: fix dvp camera fails to link with cif on rk1808
support yuv format for cif and let dvp camera link to cif on rk1808

Change-Id: Idb078a909522f0e98fdc5319411a923e818fc128
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2020-04-07 19:27:32 +08:00
Shunqian Zheng
b678bd9e8a media: rockchip: cif: add framesizes and frmintervals ioctls
These two callbacks are required for applications to obtain
framerates and enumrate framesizes.

Change-Id: I02cbea5e5c5bd7453c141726d1c3d37f8ccf31aa
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2020-04-07 19:27:32 +08:00
Xu Hongfei
1716bf4200 media: rockchip: cif: fix the bug that dummpy buffer size is error
Change-Id: I8826e3452a3bd460b331a1adfceebffb6469a1a2
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
2020-04-07 19:27:32 +08:00
Allon Huang
d685f55605 media: rockchip: cif: support sampling raw data
Change-Id: I79ee92ba56277b9a90717521be152ef31454930f
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2020-04-07 19:27:32 +08:00
Allon Huang
7d4c2c6551 media: rockchip: cif: support mipi channel and work mode switching
rk3288 cif can work with mipi channel and switch work mode

Change-Id: Ie8a49cf787617ff5d98ef84cdac761c3ece761c9
Signed-off-by: Allon Huang <allon.huang@rock-chips.com>
2020-04-07 19:27:32 +08:00
Xu Hongfei
ff64aa0746 media: rockchip: rk-cif: support yuyv output in cif
support yuyv output by setting the input mode to raw8

Change-Id: Ie33fa1e5d5cee532ebcfb23d57cac3700ee25042
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
2020-04-07 19:27:32 +08:00
Xu Hongfei
b5a1e17100 media: rockchip: rk-cif: v0.1.2
Compatible with cif only have single dma mode in driver

Change-Id: I5f2296549e20e3db1d8883474936e2892afc3ff0
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
2020-04-07 19:27:32 +08:00
Xu Hongfei
ebf350dee0 media: rockchip: rk-cif: v0.1.1
support the mipi vc multi-channel input in cif driver
for rk1808

Change-Id: I432c628b30e6f6f23e8515158dcf516e499bf79a
Signed-off-by: Xu Hongfei <xuhf@rock-chips.com>
2020-04-07 19:27:32 +08:00
Hu Kejun
c35748c9e6 media: rockchip: cif: clear unready subdevice when kernel boot complete
Change-Id: Ib53d8138dce1e9237cf40d776241eaa2ac05f816
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2020-04-07 19:27:32 +08:00
Hu Kejun
3e4125e7c9 media: rockchip: cif: add version number
Change-Id: I75960c5d035b11fd9e8ef2a22d77f4337c826e96
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
2020-04-07 19:27:32 +08:00
Cai YiWei
95ea71a61c media: rockchip/cif: support input raw/y format
dvp input raw/y, will output 16bit per pixel,
so output format shuold be raw16/y16.

Change-Id: I13e05ebe62b8802fa3a4c51f603c420e8127b929
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-04-07 19:27:31 +08:00
Tao Huang
186812abcc net: wireless: rockchip_wlan: make WL_ROCKCHIP tristate
Allow CFG80211 and MAC80211 being built as modules.

Change-Id: I414cb6e082a4c8fb044d74feaac2785395272078
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-04-07 19:27:31 +08:00
Jianqun Xu
78f23081e1 scripts/dtc: Support delete unused nodes
Delete nodes in case of:
* node is null, without any property and children node
* node with 'status' property but not "okay" or "ok"

Change-Id: Ic7d2ba1cb60350c21fa6a46222c20870c74359d4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-04-07 19:27:31 +08:00
Nickey Yang
38d1d22b1d input: touchscreen: gt1x: update config for support GT917S
Old panel combination: st7703 + gt5688 use GTP_CFG_GROUP1
New panel combination: ili9881d + gt917s use GTP_CFG_GROUP0
Tested on rk3326 rv1108 platform.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Change-Id: I6af571f5625316f3418cb51673fc3e43317dff74
2020-04-07 19:27:31 +08:00
Jose Abreu
286fd25f4a UPSTREAM: net: stmmac: Implement UDP Segmentation Offload
Implement the UDP Segmentation Offload feature in stmmac. This is only
available in GMAC4+ cores.

Change-Id: I36bbc42ddadc3957ec0134b38e1c04d5d0ce87a7
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry picked from commit b776620651)
2020-04-07 19:27:31 +08:00
Jisheng Zhang
9027054734 UPSTREAM: net: stmmac: use dev_info() before netdev is registered
Before the netdev is registered, calling netdev_info() will emit
something as "(unnamed net device) (uninitialized)", looks confusing.

Before this patch:
[    3.155028] stmmaceth f7b60000.ethernet (unnamed net_device) (uninitialized): device MAC address 52:1a:55:18:9e:9d

After this patch:
[    3.155028] stmmaceth f7b60000.ethernet: device MAC address 52:1a:55:18:9e:9d

Change-Id: I1fb100b417210de343ae54d323428d784520bb96
Signed-off-by: Jisheng Zhang <Jisheng.Zhang@synaptics.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry picked from commit af64935213)
2020-04-07 19:27:31 +08:00
Jose Abreu
b99b2c2cd1 UPSTREAM: net: stmmac: Correctly take timestamp for PTPv2
The case for PTPV2_EVENT requires event packets to be captured so add
this setting to the list of enabled captures.

Fixes: 891434b18e ("stmmac: add IEEE PTPv1 and PTPv2 support.")
Change-Id: I8d9072d6feac5d0524da4eb367acc9cc92006025
Signed-off-by: Jose Abreu <Jose.Abreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry picked from commit 14f347334b)
2020-04-07 19:27:31 +08:00
Ilias Apalodimas
ea9df2edfc UPSTREAM: net: stmmac: fix ptp timestamping on Rx on gmac4
The current driver only enables Pdelay_Req and Pdelay_Resp when
HWTSTAMP_FILTER_PTP_V2_EVENT, HWTSTAMP_FILTER_PTP_V1_L4_EVENT or
HWTSTAMP_FILTER_PTP_V2_L4_EVENT is requested. This results in ptp sync on
slave mode to report 'received SYNC without timestamp' when using ptp4l.

Although the hardware can support Sync, Pdelay_Req and Pdelay_resp by
setting bit14 annd bits 17/16 to 01 this leaves Delay_Req timestamps out.

Fix this by enabling all event and general messages timestamps.
This includes SYNC, Follow_Up, Delay_Req, Delay_Resp, Pdelay_Req,
Pdelay_Resp and Pdelay_Resp_Follow_Up messages.

Change-Id: Id5e4c22bff9742d21a1ef8011e3bde77e689b830
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Acked-by: Jose Abreu <joabreu@synopsys.com>
Tested-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry picked from commit 7d8e249f39)
2020-04-07 19:27:31 +08:00
Artem Panfilov
fc779a7bec UPSTREAM: net: stmmac: implement the SIOCGHWTSTAMP ioctl
This patch adds support for the SIOCGHWTSTAMP ioctl which enables user
processes to read the current hwtstamp_config settings
non-destructively.

Change-Id: I26dec7bdd16332f6427ac6ec3096e3283d9ed8d1
Signed-off-by: Artem Panfilov <panfilov.artyom@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David Wu <david.wu@rock-chips.com>
(cherry picked from commit d6228b7cdd)
2020-04-07 19:27:31 +08:00
David Wu
238b00ba90 ARM: dts: rv1108: Remove "rockchip,grf" property except i2c2
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I0ca4699e2a031dbe53e77cbceba61a5a47257048
2020-04-07 19:27:30 +08:00
David Wu
14c0308516 i2c: busses: rk3x: Fix i2c grf special bit setting
When the property "rockchip,grf" of i2c DTS node exists and
the GRF offset is also valid, special bit needs to be configured.

Change-Id: If7ea4185b940ad026ed822b44cfb0c8acda83500
Signed-off-by: David Wu <david.wu@rock-chips.com>
2020-04-07 19:27:30 +08:00
Tao Huang
a8baa34ace f2fs: fix memory leak in f2fs_try_convert_inline_dir()
If fscrypt_setup_filename() successful, fscrypt_free_filename()
must be called later to clean up.

Change-Id: I761472d605a1a3c64307fc997210ca2007bd8932
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-04-07 19:27:30 +08:00
Ding Wei
6e73c8cad0 video: rockchip: mpp: fix issue about kill user process
If user process killed:
1. kernel should not to alloc task, and wait all task done in session,
   then release session.
2. fd in user space is closed, then kernel space can not use dma_buf_get
   to get dma handle, so kernel will crash.

crash:

[   35.677648 ] [<b022b098>] (__fget) from [<b0467134>]
(dma_buf_get+0x8/0x40)
[   35.678261 ] [<b0467134>] (dma_buf_get) from [<b0397848>]
(mpp_dma_find_buffer_fd+0x14/0x94)
[   35.679004 ] [<b0397848>] (mpp_dma_find_buffer_fd) from [<b03978fc>]
(mpp_dma_release_fd+0x34/0xa0)
[   35.679799 ] [<b03978fc>] (mpp_dma_release_fd) from [<b0395b2c>]
(mpp_task_finalize+0x68/0xbc)
[   35.680561 ] [<b0395b2c>] (mpp_task_finalize) from [<b0398614>]
(rkvdec_free_task+0xc/0x1c)
[   35.681290 ] [<b0398614>] (rkvdec_free_task) from [<b03963e4>]
(mpp_wait_result+0xd4/0x400)
[   35.682020 ] [<b03963e4>] (mpp_wait_result) from [<b0396940>]
(mpp_dev_release+0x230/0x244)
[   35.682750 ] [<b0396940>] (mpp_dev_release) from [<b020f30c>]
(__fput+0x88/0x1c4)
[   35.683415 ] [<b020f30c>] (__fput) from [<b0140cac>]
(task_work_run+0x90/0xb0)
[   35.684059 ] [<b0140cac>] (task_work_run) from [<b0128b38>]
(do_exit+0x3c4/0xac4)
[   35.684722 ] [<b0128b38>] (do_exit) from [<b0129f54>]
(do_group_exit+0x3c/0xbc)
[   35.685366 ] [<b0129f54>] (do_group_exit) from [<b0133b50>]
(get_signal+0xe4/0x6ac)
[   35.686040 ] [<b0133b50>] (get_signal) from [<b010b09c>]
(do_signal+0x2a0/0x494)
[   35.686690 ] [<b010b09c>] (do_signal) from [<b010b454>]
(do_work_pending+0xb4/0xd0)
[   35.687364 ] [<b010b454>] (do_work_pending) from [<b0101064>]
(slow_work_pending+0xc/0x20)

Change-Id: I8decec8ff4c356b315fe511128c5b67c5b349932
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-03 10:00:03 +08:00
Jianing Ren
4b5336a3bb usb: dwc3: core: enable runtime for rockchip platform
Change-Id: I49e3fa207db8aea0355a797b69c9c8a791d2eaa3
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
2020-04-02 20:05:35 +08:00
Christoph Hellwig
b64974825a UPSTREAM: mm/swapfile.c: move inode_lock out of claim_swapfile
claim_swapfile() currently keeps the inode locked when it is successful,
or the file is already swapfile (with -EBUSY).  And, on the other error
cases, it does not lock the inode.

This inconsistency of the lock state and return value is quite confusing
and actually causing a bad unlock balance as below in the "bad_swap"
section of __do_sys_swapon().

This commit fixes this issue by moving the inode_lock() and IS_SWAPFILE
check out of claim_swapfile().  The inode is unlocked in
"bad_swap_unlock_inode" section, so that the inode is ensured to be
unlocked at "bad_swap".  Thus, error handling codes after the locking now
jumps to "bad_swap_unlock_inode" instead of "bad_swap".

    =====================================
    WARNING: bad unlock balance detected!
    5.5.0-rc7+ #176 Not tainted
    -------------------------------------
    swapon/4294 is trying to release lock (&sb->s_type->i_mutex_key) at: __do_sys_swapon+0x94b/0x3550
    but there are no more locks to release!

    other info that might help us debug this:
    no locks held by swapon/4294.

    stack backtrace:
    CPU: 5 PID: 4294 Comm: swapon Not tainted 5.5.0-rc7-BTRFS-ZNS+ #176
    Hardware name: ASUS All Series/H87-PRO, BIOS 2102 07/29/2014
    Call Trace:
     dump_stack+0xa1/0xea
     print_unlock_imbalance_bug.cold+0x114/0x123
     lock_release+0x562/0xed0
     up_write+0x2d/0x490
     __do_sys_swapon+0x94b/0x3550
     __x64_sys_swapon+0x54/0x80
     do_syscall_64+0xa4/0x4b0
     entry_SYSCALL_64_after_hwframe+0x49/0xbe
    RIP: 0033:0x7f15da0a0dc7

Change-Id: I02a0fcfc63c3dcc4c4cdaf8b2500f5253e648649
Fixes: 1638045c36 ("mm: set S_SWAPFILE on blockdev swap devices")
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Tested-by: Qais Youef <qais.yousef@arm.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: <stable@vger.kernel.org>
Link: http://lkml.kernel.org/r/20200206090132.154869-1-naohiro.aota@wdc.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit d795a90e2b)
2020-04-02 17:25:08 +08:00
Kever Yang
63275236b7 ARM: dts: rockchip: add build rk3229-evb-android-avb.dtb
This is the only dts tested with android 10.

Change-Id: I444f7832beec8ec6ed599acdd745abc9d5b430f2
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2020-04-02 15:47:08 +08:00
Jianqun Xu
5e2bcd8c9f pinctrl: rockchip: support mux route flags
Create a new flag to indicate mux route is from topgrf or pmugrf.
 * INVALID: means do not need to set mux route
 * DEFAULT: means same regmap as pin iomux
 * TOPGRF: means mux route setting in topgrf
 * PMUGRF: means mux route setting in pmugrf

Change-Id: Iff57f3649d09751ff846560bd8a1599f6ef7ef04
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-04-02 15:44:58 +08:00
Ding Wei
c7377b7be5 video: rockchip: mpp: reset osd plt clock config before setting register
rkvenc: osd plt clock should reset, othterwise, osd setting will not work

Change-Id: I47752b735b6f63303e9b12f4616510f2701970bd
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-04-02 12:23:37 +08:00
Sandy Huang
0f7832c079 drm/rockchip: rgb: Add supoort bt656 and bt1120
Change-Id: I9a0fe7933979e58dc76f6a12611ff539086ba04a
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
2020-04-01 18:11:51 +08:00