3126 need set grf to change hardware, and set
register should via regmap_write
Change-Id: I49b9baf9cdd442689183d59cdc594f81bcc6bbba
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
HDR_PANEL_METADATA is used to indicate HDR capacity of sink device.
Change-Id: I598a7bb5634f14b57f94135fd3be6b0ad2075116
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
HDR_SOURCE_METADATA property is used to set source hdr metadata,
which will be sent to sink though HDMI DRM infoframe.
Change-Id: If3500cb505c16c2f0caf66b8e64b4d80b93b228f
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
The blob_id is used to get blob data of hdr_source_metadata_property.
Change-Id: I8383265e50261438cf8484bd731e42fc23c24c51
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
This patch add serial RGB output interface for rockchip vop, the
more info about serial RGB output interface described at the
following file:
Documentation/devicetree/bindings/display/panel/panel-rgb.txt
(am from https://patchwork.kernel.org/patch/10035987/)
Change-Id: I191d30879b42dab79ae40c5d85573057c86eeb53
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Some Rockchip CRTCs, like rv1108, can directly output parallel and
serial RGB data to panel or conversion chip, so we add this driver to
probe encoder and connector.
(am from https://patchwork.kernel.org/patch/10035995/)
Change-Id: Ieab9271205cace962b7e871becaf903b9abebd94
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This path add support rv1108 rgb output interface driver.
(am from https://patchwork.kernel.org/patch/10035983/)
Change-Id: I571520b131688afd4591740c035c49e61ec03d52
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Describe the panel property rgb-mode for parallel and serial
RGB output interface, include the connection relations for each
mode.
(am from https://patchwork.kernel.org/patch/10035979/)
Change-Id: I05b25c397cba6b8de067492d7db61912a1c544ed
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
Many drivers have a common pattern of searching the OF graph for either an
attached panel or bridge and then finding the DRM struct for the panel
or bridge. Also, most drivers need to handle deferred probing when the
DRM device is not yet instantiated. Create a common function,
drm_of_find_panel_or_bridge, to find the connected node and the
associated DRM panel or bridge device.
(cherry picked from commit 1f2db3034c)
Change-Id: Ibda889742bfb0ea53181ed2ef9b19a9d9df3303e
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
[seanpaul dropped extern from drm_of.h]
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
The OF graph API leaves too much of the graph walking to clients when
in many cases the driver doesn't care about accessing the port or
endpoint nodes. The drivers typically just want the device connected via
a particular graph connection. of_graph_get_remote_node provides this
functionality.
(cherry picked from commit b85ad49409)
Change-Id: Iaee6a0f3c176d43d4bc6225f195aaaff1e7b419a
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
mipi->vopb, edp->vopl.
backlight1 is invalid. because edp panel and mipi panel
on sdk share backlight. This is just an demo.
Change-Id: I75d21ee880dbcb771030fcbc129c940c9bd2422f
Signed-off-by: Jerry Xu <xbl@rock-chips.com>
Put unchangeable configs beyond the SOM in rk3229-at-common.dtsi
and put SOM configs in rk3229-at-som.dtsi.
Some pins which customer can change the iomux is put in product dts
files, such as rk3229-at-3nod.dts, you can see the comment in &pinctrl
node.
Change-Id: I5ba80e8aab72da24e498391835eb1a43646df5f8
Signed-off-by: Wenping Zhang <wenping.zhang@rock-chips.com>
Poll messages that are used to allocate a logical address should
use the same initiator as the destination. Instead, it expected that
the initiator was 0xf which is not according to the standard.
This also had consequences for the message checks in cec_transmit_msg_fh
that incorrectly rejected poll messages with the same initiator and
destination.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 42980da2eb)
Change-Id: Ib00532f887be8758f5bbaf284f63656770e7f3f2
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
The driver type can be assigned immediately when an RC device
requests to the framework to allocate the device.
This is an 'enum rc_driver_type' data type and specifies whether
the device is a raw receiver or scancode receiver. The type will
be given as parameter to the rc_allocate_device device.
Change accordingly all the drivers calling rc_allocate_device()
so that the device type is specified during the rc device
allocation. Whenever the device type is not specified, it will be
set as RC_DRIVER_SCANCODE which was the default '0' value.
Suggested-by: Sean Young <sean@mess.org>
Signed-off-by: Andi Shyti <andi.shyti@samsung.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 0f7499fddb)
Change-Id: Ic145f8c2ce310dacaa53d18f3f5dcb846ac1a967
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Due to an incorrect condition the last_la used for the initial attempt at
claiming a logical address could be wrong.
The last_la wasn't converted to a mask when ANDing with type2mask, so that
test was broken.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit f9f96fc10c)
Change-Id: I7de00bb0346c8bf78ca4910bf1b22bf63d3674c2
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This race was discovered by running cec-compliance -A with the cec module debug
parameter set to 2: suddenly the test would fail.
It turns out that this happens when the test configures the adapter in
non-blocking mode, then it waits for the CEC_EVENT_STATE_CHANGE event and once
the event is received it unconfigures the adapter.
What happened was that the unconfigure was executed while the configure was
still transmitting the Report Features and Report Physical Address messages.
This messed up the internal state of the cec_adapter.
The fix is to transmit those messages with the adap->lock mutex held (this will
just queue them up in the internal transmit queue, and not actually transmit
anything yet). Only unlock the mutex once everything is done. The main thread
will dequeue the messages from the internal transmit queue and transmit them
one by one, unless an unconfigure was done, and in that case any messages are
just dropped.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit f60f35609f)
Change-Id: I210f2d09f2ca7ce7733580bbefa6474b38a354cd
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
It's only a small function and this makes it easier to switch to
transmitting the message with adap->lock held in the next patch.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit d3d64bc740)
Change-Id: I936ba05b9b70681d57d52e10645f8865a27f5689
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
The fill function just fills in the cec_msg struct, it doesn't transmit
the message. This is now done explicitly.
This makes it possible to switch to transmitting this message with adap->lock
held.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 52bc30fda9)
Change-Id: Ie6c7a1f88b5691b8e4240af697646387db2e11a9
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
The loop that sets the unused logical addresses to INVALID should be
done before 'configured' is set to true. This ensures that cec_log_addrs
is consistent before it will be used.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 7af26f889e)
Change-Id: I431f4df06482c20c1a33d7b32afc742e61947425
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
This is a 2.0 only message, so it should return Feature Abort if the
adapter is configured for CEC version 1.4.
Right now it does nothing, which means that the sender will time out.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit a24f56d479)
Change-Id: Ibd812b99013bf83a080c0c89219b8fef4396cd88
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
When a pending message was canceled (e.g. due to a timeout), then the
old tx_status info was overwritten instead of ORed. The same happened
with the tx_error_cnt field. So just modify them instead of overwriting
them.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 1204761236)
Change-Id: Ibec7ccb5c1adaff39eb90f1ed4e0a962d9581746
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
In the (very) small print of the REPORT_CURRENT_LATENCY message there is a
line that says that the last byte of the message (audio out delay) is only
present if the 'audio out compensated' value is 3.
I missed this, and so if this message was sent with a total length of 6 (i.e.
without the audio out delay byte), then it was rejected by the framework
since a minimum length of 7 was expected.
Fix this minimum length check and update the wrappers in cec-funcs.h to do
the right thing based on the message length.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit f3854973f1)
Change-Id: Iec4d9db94bb66194ec68c014a06f8b2d33f1dbdb
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
The cec_allocate_adapter function doesn't need the parent device, only the
cec_register_adapter function needs it.
Drop the cec_devnode parent field, since devnode.dev.parent can be used
instead.
This change makes the framework consistent with other frameworks where the
parent device is not used until the device is registered.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit f51e80804f)
Change-Id: Ib9a26eedf0e07f5964482d8cbb2c4698031d7bd9
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Some CEC adapters will receive messages that they initiated. Add a
check that will ignore such messages.
Most hardware behaves correctly in this respect, but I have seen
adapters that don't, so just filter this out in the framework.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 3f98da9636)
Change-Id: I3940308265d3e6f9370a3004fdd24945409f7a4b
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Make sure the TX counters are zeroed in the cec_msg struct.
Non-zero TX counters make no sense when a message is received,
and applications should not see non-zero values here.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 8991a63d1a)
Change-Id: Ia592fe3992b4897ad5589c6bbb0976d48d630b78
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
An inner for-loop reused the outer loop variable. This was
only noticeable with CEC adapters supporting more than one
logical address.
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit a161bef042)
Change-Id: I332d480bb6e73d55724634ade1bc038f9719cb09
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Replace bool by int or __u8 (when used in a struct).
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 3145c754ac)
Change-Id: I690eccd438339cf490e746ba6ef780f705b1046a
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>