Add compile condition of ION and DRM.
Adapt struct kref.
Modify drm's iommu domain get method.
Delete drm's common_iommu_setup_dma_ops.
Delete code about ion.
Change-Id: I340e1798c5930af0a82566f8c40ec93e78084fda
Signed-off-by: Grey Li <grey.li@rock-chips.com>
Currently, it's set active_sensor to NULL when stream off. But it
could be useful for ioctls (e.g. enum_frameintervals) to obtain
active sensor's infomations.
This patchs keep active_sensor always available and renew it
every time before starting stream in case media topology changed.
Meanwhile, get active_sensor info once async subdevice registered
completely.
Change-Id: I21eb3954d5932a4bc7c899d8f110e31b409c91d2
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Currently the maximum size of video is 4416x3312. For those sensors(5M
or 8M), it's not a good idea to scale up to max resolution by ISP.
This avoid video output resolution exceeding the isp sub-device
size.
Change-Id: I4b2649cf3a8c3c7e81ff978eefba3e69e2c24d81
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
If no IOMMU support for ISP, we prefer to alloc continuous
physical memory from our reserved CMA region than from system
reserved.
Change-Id: I1e598ee7309c9c53254649f5267a1e7f515c6361
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
power on->isp start->restart...->power off
isp reset will set clk config to default value, if
isp restart clk isn't to reconfigure.
Change-Id: I2b5ef9883c8ca5e9e142270d935f300395b0ea74
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
This patch adds two v4l2 events, start/stop streaming, for
userspace to subscribe. With these events, userspace could
init/de-init 3A tuning in proper time.
Only if isp sub-device input format is Raw Bayer and output
format is YUV, the 3A tuning is required.
Change-Id: I027d603fcf6d6901ebcd3762d0889ef8f7603601
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Enable VB2_USERPTR mode. vb2_dma_contig takes care
the rest of details except the vb2_plane_vaddr().
Change-Id: Id23e0c9ef7b3332fcb3be57c71c4178e181d7141
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
The mipi interrupt is auto on in resume operation,
so we may receive interrupt before isp clock resume,
and the kernel will be dead when access isp register in mipi isr function.
Change-Id: I73779111cb103457b0a4f125d8e4c9420a2d8553
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
On RK3328, dw-hdmi driver is reloaded after bind and unbind
then it will use the first register debugfs address if no run
debugfs_remove_recursive, and cause system crash.
Change-Id: Iafa6b4059962b62c79157a9cf6c3e1d56df48f03
Signed-off-by: xuhuicong <xhc@rock-chips.com>
when other devices bind failed,drm will unbind and re-bind all devices.
if don't cancel the delayed work but flush and destroy workqueue directly,
kernel point is likely to become NULL.
Change-Id: Ib48704186ee298cbd4daac1cdbbac5fb3906b6bb
Signed-off-by: algea.cao <algea.cao@rock-chips.com>
If hdmi driver data isn't be set, hdmi pointer can't be get
correctly, system will crush when reboot or shutdown.
Change-Id: I3a17a3238c307ab28d7570e8803a6dbe8c57c930
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Filling in the missing parts from:
'commit d7f22ab4c1 ("drm: bridge: dw-hdmi: fix wrong color if get
edid error at bootup")'
Change-Id: I92b690dcc332e9f9e50ef7d457734952a9f1ef2a
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Default value of hdmi->colordepth is defined by input color mode,
so there is no need to set value again when color depth property
is created.
Change-Id: I2e242fabdaadc0c3b41e48f806cbded5f619c455
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
HDMI protocol does not allow retransmit more than
five times when send cec message failed. In android
system, we do retransmit in framework only.
Change-Id: I7bd1a4aa48874be11e4948d60e0c36077268c1c9
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
To differentiate extend colorimetry and normal colorimetry, we
add the offset HDMI_COLORIMETRY_EXTENDED in colorimetry property.
It should use same value in dw_hdmi_rockchip_select_output.
Change-Id: I13e10b6e8211e7a2634dbd4b6c5310bc129bfa8d
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
Modify the code to sensor driver into the kernel and
make the compilation successful.
Change-Id: I3226b5df0084a80c63b7ad59aec7c759b3165a7b
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
LPM feature of DWC2 module integrated in Rockchip SoCs doesn't work
properly or needs some additional handling, so disable it for now.
Without disabling LPM feature, the USB ADB communication fail with
the following error log:
dwc2 ff580000.usb: new address 27
dwc2 ff580000.usb: Failed to exit L1 sleep state in 200us.
dwc2 ff580000.usb: dwc2_hsotg_send_reply: cannot queue req
dwc2 ff580000.usb: dwc2_hsotg_process_req_status: failed to send reply
dwc2 ff580000.usb: dwc2_hsotg_enqueue_setup: failed queue (-11)
dwc2 ff580000.usb: Failed to exit L1 sleep state in 200us.
Change-Id: I4e2b243fba2f1536c39f313232433cfd295113d6
Signed-off-by: William Wu <william.wu@rock-chips.com>
set nand devices path to /dev/platform/xxxxxxx.nandc/rknand0
for android 9.0 and android 10 while using gpt.
Change-Id: I21c5d71ee6ed5d8520630174329c6da1c2764430
Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
The OCR register defines the supported range of VDD voltages for SD cards.
However, it has turned out that some SD cards reports an invalid voltage
range, for example having bit7 set.
When a host supports MMC_CAP2_FULL_PWR_CYCLE and some of the voltages from
the invalid VDD range, this triggers the core to run a power cycle of the
card to try to initialize it at the lowest common supported voltage.
Obviously this fails, since the card can't support it.
Let's fix this problem, by clearing invalid bits from the read OCR register
for SD cards, before proceeding with the VDD voltage negotiation.
Change-Id: I23c224b59505e747e4156f7ddaf0c26630b3f6a4
Cc: stable@vger.kernel.org
Reported-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Philip Langdale <philipl@overt.org>
Tested-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
(cherry picked from commit 72741084d9)
When hdmi HPD is occurred, call cec_notifier_repo_cec_hpd.
Change-Id: If2047121c8ccf55e9a49fa4c3c4ec2187248a593
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
Add cec-notifier interface that hdmi can call it when
HPD is occurred.
Change-Id: I0087a879bf3ba65e300c3db3a67ddaa7e22f16ad
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
1. set resolution from 654x258 to 654x270, because vop max scale up fac
limit.
2. convert logo_kernel.bmp to rle8 bmp
Change-Id: I0aee01aeb3546d11ae98a85ee811292ad91b1f22
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This would eliminate the repeating WARNING logs from dma_fence_set_error().
Change-Id: I3b319decb8899dfc0410f4975e31bb1c67f7ae9f
Signed-off-by: Zhen Chen <chenzhen@rock-chips.com>
To improve the accuracy of the horizontal time perform
multiplications before divisions.
Change-Id: I08eab894482a06831eb7211c9754de365a7ab1a8
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
When 4K x 2k 60Hz/50Hz tmds clock is above the max tmds clock, setting its
color to YUV420. A few TV edid declare that they can't support
4K x 2k 60Hz/50Hz YUV420, we still set color to YUV420 or 4K x 2k 60Hz/50Hz
tmds clock will over the limit.
Change-Id: Id57c9313ab52973927c578d0eb2a7b1b30cb9ec1
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
First, write hdcp key by "ProvisioningTool" if you want to
enable hdcp function, or else will auth fail.
To check whether the hdcp is enable or not
#cat /sys/class/misc/hdmi_hdcp1x/enable
0:hdcp is disabled
1:hdcp is enabled, hdmi screen will be pink if it is failed;
2:hdcp is enabled, hdmi screen will be normal if it is failed;
Enable or disable hdcp function
#echo 0 > /sys/class/misc/hdmi_hdcp1x/enable
#echo 1 > /sys/class/misc/hdmi_hdcp1x/enable
#echo 2 > /sys/class/misc/hdmi_hdcp1x/enable
Get the status of hdcp
#cat /sys/class/misc/hdmi_hdcp1x/status
The result will be one of the follow list:
hdcp disable;
hdcp_auth_start
hdcp_auth_success;
hdcp_auth_fail;
unknown status.
Change-Id: Iac6c7d6a1196ce9cf2869d7916bbe6c8941ec13b
Signed-off-by: Huicong Xu <xhc@rock-chips.com>
Hdmi suspend or resume may be called before hdmi initialization. We must
verify that hdmi is initialized first.
Change-Id: I2a680209e64b9c1aebc2d9ee19d543927137afd0
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>
When system shutdown, shutdown interface will be called.
Hdmi should be disabled when system shutdown.
Change-Id: I09ec1d7d3801bf8a8277c91072fa09bd1b430809
Signed-off-by: Algea Cao <algea.cao@rock-chips.com>