This patch try to fix this issue by caching the dma-buf attachments and
stores the cache list to dtor_data of dma-buf structor. The dma-buf
attach with cache will try to find cached attachment first and return
the valid instance.
This patch also store the deattch operation to dtor of dma-buf structor
by dma_buf_set_destructor.
Change-Id: I4778c3328825f6c04f5d2608994e62fe3478bf1b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
dma-buf destructor support is useful as it allows clients an opportunity
to undo any attributes, such as security attributes, they have applied to
the dma-buf's memory.
The destructor is called when the dma-buf is freed, if the destructor
returns an error the dma-buf's exporter release function is not called in
order to ensure that memory which has not been properly cleaned up isn't
returned to the system.
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
[surenb: cherry-picked from:
3af4db1543c9 "dma-buf: Add support to set a destructor on a dma-buf"]
Bug: 150611569
Test: build
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I2d435b99fb9b1747bc1b32a4e0d484957614a5a3
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
This patch aims to configure usb for better compatibility.
1. Set ssc downward spread spectrum.
2. Enable the adaptive Continuous Time Linear Equalizer (CTLE).
3. Set ssc to 31.5KHz for 24MHz ref clk.
4. Adjusts the PLL the parameters for USB Rx to pass the
Receiver Jitter Tolerance Test, and it's helpful to
improve the USB 3.0 signal compatibility.
Signed-off-by: William Wu <william.wu@rock-chips.com>
Change-Id: Ide2e2325e9d273c0ebbcd9786eb256e85a042c1a
ZONE_DMA32 is enabled by default on android12-5.10, yet it is not
needed for all devices, nor is it desirable to have if not needed. For
instance, if a partner in GKI 1.0 did not use ZONE_DMA32, memory can
be lower for ZONE_NORMAL relative to older targets, such that memory
would run out more quickly in ZONE_NORMAL leading kswapd to be invoked
unnecessarily.
Correspondingly, provide a means of making ZONE_DMA32 empty via the
kernel command line when it is compiled in via CONFIG_ZONE_DMA32.
Bug: 199917449
Change-Id: I70ec76914b92e518d61a61072f0b3cb41cb28646
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
This fix a case that a right part of a window in splice mode
that not disable when the right part isactual_w/h is zero, that
will cause a iommu page fault.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I71cfb819d200e642ef343c2d37f818772aa7e329
Both overlay mode of two Video Ports should be set the
same in splice mode.
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: If613bc91e18c585140fdcf6f6ac72d0e6aa434e2
dp lane mapping need set vo0grf, but vo0grf is in PD_VO0.
dp controller also in PD_VO0. Setting the vo0grf register
in the dp power on sequence, when the dp controller has
hold the PD_VO0.
Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com>
Change-Id: If944daf5ebd71ae9ebaa58dc1f9493a3022a2eaf
This adds "rockchip,u2phy-grf" phandle for USBDP Combo PHY.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ia170eda889cdf8a45375887f460fcebd48ac88c8
For RK3588 EVB design, the USB vbus is always pull-up, and the USB
controller can not detect that the device was unattached. So based on
the orientation switch process, control the bvalid status via writing
U2PHY GRF when the Type-C controller detected that the device was
attached or unattached.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ied27dea686895c180ec7b5d33a06af888a9fd64d
Add "rockchip,u2phy-grf" property for usbdp combo PHY.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: Ieb58efce53446f45f188e25192e0b3a2835675bc
The Type-C0 vbus circuit of rk3588s tablet has been modified.
Type-C0 is used as the host mode, the charger ic(bq25703)
outputs vbus.
Change-Id: I4940b9dbe90c915256d6b6ec2d56fa6a461bcf76
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
the minimum region size (HSA,HBP,HACT,HFP) is 4 pixels
which is the dsi2 ip known issues and limitations.
Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I15c4fd942ff5cd0fd8c3ad3590b83b24a0c7dd33