<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_dp_cec.c, branch v5.10.264</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.264</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.10.264'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-03-13T11:47:04+00:00</updated>
<entry>
<title>gpu: drm_dp_cec: fix broken CEC adapter properties check</title>
<updated>2025-03-13T11:47:04+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2025-01-29T09:51:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c7f544666100abd22742f5de78861757b5fb63c2'/>
<id>urn:sha1:c7f544666100abd22742f5de78861757b5fb63c2</id>
<content type='text'>
[ Upstream commit 6daaae5ff7f3b23a2dacc9c387ff3d4f95b67cad ]

If the hotplug detect of a display is low for longer than one second
(configurable through drm_dp_cec_unregister_delay), then the CEC adapter
is unregistered since we assume the display was disconnected. If the
HPD went low for less than one second, then we check if the properties
of the CEC adapter have changed, since that indicates that we actually
switch to new hardware and we have to unregister the old CEC device and
register a new one.

Unfortunately, the test for changed properties was written poorly, and
after a new CEC capability was added to the CEC core code the test always
returned true (i.e. the properties had changed).

As a result the CEC device was unregistered and re-registered for every
HPD toggle. If the CEC remote controller integration was also enabled
(CONFIG_MEDIA_CEC_RC was set), then the corresponding input device was
also unregistered and re-registered. As a result the input device in
/sys would keep incrementing its number, e.g.:

/sys/devices/pci0000:00/0000:00:08.1/0000:e7:00.0/rc/rc0/input20

Since short HPD toggles are common, the number could over time get into
the thousands.

While not a serious issue (i.e. nothing crashes), it is not intended
to work that way.

This patch changes the test so that it only checks for the single CEC
capability that can actually change, and it ignores any other
capabilities, so this is now safe as well if new caps are added in
the future.

With the changed test the bit under #ifndef CONFIG_MEDIA_CEC_RC can be
dropped as well, so that's a nice cleanup.

Signed-off-by: Hans Verkuil &lt;hverkuil@xs4all.nl&gt;
Reported-by: Farblos &lt;farblos@vodafonemail.de&gt;
Reviewed-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Fixes: 2c6d1fffa1d9 ("drm: add support for DisplayPort CEC-Tunneling-over-AUX")
Tested-by: Farblos &lt;farblos@vodafonemail.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/361bb03d-1691-4e23-84da-0861ead5dbdc@xs4all.nl
Signed-off-by: Dmitry Baryshkov &lt;dmitry.baryshkov@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm_dp_cec: drop use of drmP.h</title>
<updated>2019-10-08T16:29:00+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2019-10-07T17:12:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0aa32f8e572e3efa61107e099fd93c9c5191682b'/>
<id>urn:sha1:0aa32f8e572e3efa61107e099fd93c9c5191682b</id>
<content type='text'>
drmP.h is deprecated and will be deleted.
Replace use with proper header.

Divide header includes in blocks while touching these.

Build tested with various archtectures and configs.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Fixes: ae85b0df124f6928 ("drm_dp_cec: add connector info support.")
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Sean Paul &lt;sean@poorly.run&gt;
Acked-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Cc: Dariusz Marcinkiewicz &lt;darekm@google.com&gt;
Cc: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191007171224.1581-2-sam@ravnborg.org
</content>
</entry>
<entry>
<title>drm_dp_cec: add connector info support.</title>
<updated>2019-08-27T10:52:59+00:00</updated>
<author>
<name>Dariusz Marcinkiewicz</name>
<email>darekm@google.com</email>
</author>
<published>2019-08-14T10:44:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ae85b0df124f6928709f6707db55457f369bcb27'/>
<id>urn:sha1:ae85b0df124f6928709f6707db55457f369bcb27</id>
<content type='text'>
Pass the connector info to the CEC adapter. This makes it possible
to associate the CEC adapter with the corresponding drm connector.

Signed-off-by: Dariusz Marcinkiewicz &lt;darekm@google.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Tested-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Reviewed-by: Ben Skeggs &lt;bskeggs@redhat.com&gt;
Signed-off-by: Hans Verkuil &lt;hverkuil-cisco@xs4all.nl&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190814104520.6001-2-darekm@google.com
</content>
</entry>
<entry>
<title>drm: Do not call drm_dp_cec_set_edid() while registering DP connectors</title>
<updated>2018-10-11T08:52:35+00:00</updated>
<author>
<name>José Roberto de Souza</name>
<email>jose.souza@intel.com</email>
</author>
<published>2018-10-11T00:44:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7323001549804be70b179a8b636f78e758aeb28d'/>
<id>urn:sha1:7323001549804be70b179a8b636f78e758aeb28d</id>
<content type='text'>
drm_dp_cec_register_connector() is called when registering each DP
connector in DRM, while sounds a good idea register CEC adapters as
earlier as possible, it causes some driver initialization delay
trying to do DPCD transactions in disconnected connectors.

This change will cause no regressions as drm_dp_cec_set_edid() will
still be called in further detection of connected connectors with a
valid edid parameter.

This change reduced the module load of i915 by average 0.5sec in a
machine with just one DP port disconnected while reducing more than
3sec in a machine with 4 DP ports disconnected.

Cc: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: José Roberto de Souza &lt;jose.souza@intel.com&gt;
Acked-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181011004439.4482-1-jose.souza@intel.com
</content>
</entry>
<entry>
<title>drm_dp_cec: add note about good MegaChips 2900 CEC support</title>
<updated>2018-08-31T08:20:38+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2018-08-27T07:58:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9bcf6d9868ae95fc7e5eda3dae5200f234ea5623'/>
<id>urn:sha1:9bcf6d9868ae95fc7e5eda3dae5200f234ea5623</id>
<content type='text'>
A big problem with DP CEC-Tunneling-over-AUX is that it is tricky
to find adapters with a chipset that supports this AND where the
manufacturer actually connected the HDMI CEC line to the chipset.

Add a mention of the MegaChips 2900 chipset which seems to support
this feature well.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180827075820.41109-3-hverkuil@xs4all.nl
</content>
</entry>
<entry>
<title>drm_dp_cec: check that aux has a transfer function</title>
<updated>2018-08-31T08:20:37+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2018-08-27T07:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5ce70c799ac22c142061c71aaeae518f04283472'/>
<id>urn:sha1:5ce70c799ac22c142061c71aaeae518f04283472</id>
<content type='text'>
If aux-&gt;transfer == NULL, then just return without doing
anything. In that case the function is likely called for
a non-(e)DP connector.

This never happened for the i915 driver, but the nouveau and amdgpu
drivers need this check.

The alternative would be to add this check in those drivers before
every drm_dp_cec call, but it makes sense to check it in the
drm_dp_cec functions to prevent a kernel oops.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reviewed-by: Lyude Paul &lt;lyude@redhat.com&gt;
Acked-by: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180827075820.41109-2-hverkuil@xs4all.nl
</content>
</entry>
<entry>
<title>drm_dp_cec.c: fix formatting typo: %pdH -&gt; %phD</title>
<updated>2018-07-28T18:50:40+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hverkuil@xs4all.nl</email>
</author>
<published>2018-07-24T19:20:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ea5569ecd6b81232eb536017b627c417befc1acb'/>
<id>urn:sha1:ea5569ecd6b81232eb536017b627c417befc1acb</id>
<content type='text'>
This caused a kernel oops since %pdH interpreted the pointer
as a struct file.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Signed-off-by: Gustavo Padovan &lt;gustavo.padovan@collabora.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/f3720ddf-ec0f-cd22-46b6-720a5e2098f2@xs4all.nl
</content>
</entry>
<entry>
<title>drm: add support for DisplayPort CEC-Tunneling-over-AUX</title>
<updated>2018-07-13T14:58:19+00:00</updated>
<author>
<name>Hans Verkuil</name>
<email>hans.verkuil@cisco.com</email>
</author>
<published>2018-07-11T13:29:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2c6d1fffa1d9b0a5b5ac1a23be9ad64abe60910d'/>
<id>urn:sha1:2c6d1fffa1d9b0a5b5ac1a23be9ad64abe60910d</id>
<content type='text'>
This adds support for the DisplayPort CEC-Tunneling-over-AUX
feature that is part of the DisplayPort 1.3 standard.

Unfortunately, not all DisplayPort/USB-C to HDMI adapters with a
chip that has this capability actually hook up the CEC pin, so
even though a CEC device is created, it may not actually work.

Signed-off-by: Hans Verkuil &lt;hans.verkuil@cisco.com&gt;
Reviewed-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180711132909.25409-2-hverkuil@xs4all.nl
</content>
</entry>
</feed>
