<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/gpu/drm/vc4, branch linux-5.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-10-24T07:58:18Z</updated>
<entry>
<title>drm/vc4: vec: Fix timings for VEC modes</title>
<updated>2022-10-24T07:58:18Z</updated>
<author>
<name>Mateusz Kwiatkowski</name>
</author>
<published>2022-08-29T13:11:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7f778799d49e7e0d1174ad87e513c12ad6a762a'/>
<id>urn:sha1:a7f778799d49e7e0d1174ad87e513c12ad6a762a</id>
<content type='text'>
[ Upstream commit 30d7565be96b3946c18a1ce3fd538f7946839092 ]

This commit fixes vertical timings of the VEC (composite output) modes
to accurately represent the 525-line ("NTSC") and 625-line ("PAL") ITU-R
standards.

Previous timings were actually defined as 502 and 601 lines, resulting
in non-standard 62.69 Hz and 52 Hz signals being generated,
respectively.

Signed-off-by: Mateusz Kwiatkowski &lt;kfyatek+publicgit@gmail.com&gt;
Acked-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20220728-rpi-analog-tv-properties-v2-28-459522d653a7@cerno.tech
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Depends on CONFIG_PM</title>
<updated>2022-09-05T08:31:26Z</updated>
<author>
<name>Maxime Ripard</name>
</author>
<published>2022-06-29T12:34:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1cf82931822dbf3b24945147b5330d8fdd86cdff'/>
<id>urn:sha1:1cf82931822dbf3b24945147b5330d8fdd86cdff</id>
<content type='text'>
commit 72e2329e7c9bbe15e7a813670497ec9c6f919af3 upstream.

We already depend on runtime PM to get the power domains and clocks for
most of the devices supported by the vc4 driver, so let's just select it
to make sure it's there.

Link: https://lore.kernel.org/r/20220629123510.1915022-38-maxime@cerno.tech
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
(cherry picked from commit f1bc386b319e93e56453ae27e9e83817bb1f6f95)
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Cc: "Sudip Mukherjee (Codethink)" &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Rework power up</title>
<updated>2022-09-05T08:31:26Z</updated>
<author>
<name>Maxime Ripard</name>
</author>
<published>2022-06-29T12:34:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a289a16857062e704da52683a49aaf16e826cbf'/>
<id>urn:sha1:1a289a16857062e704da52683a49aaf16e826cbf</id>
<content type='text'>
commit 258e483a4d5e97a6a8caa74381ddc1f395ac1c71 upstream.

The current code tries to handle the case where CONFIG_PM isn't selected
by first calling our runtime_resume implementation and then properly
report the power state to the runtime_pm core.

This allows to have a functionning device even if pm_runtime_get_*
functions are nops.

However, the device power state if CONFIG_PM is enabled is
RPM_SUSPENDED, and thus our vc4_hdmi_write() and vc4_hdmi_read() calls
in the runtime_pm hooks will now report a warning since the device might
not be properly powered.

Even more so, we need CONFIG_PM enabled since the previous RaspberryPi
have a power domain that needs to be powered up for the HDMI controller
to be usable.

The previous patch has created a dependency on CONFIG_PM, now we can
just assume it's there and only call pm_runtime_resume_and_get() to make
sure our device is powered in bind.

Link: https://lore.kernel.org/r/20220629123510.1915022-39-maxime@cerno.tech
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Tested-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
(cherry picked from commit 53565c28e6af2cef6bbf438c34250135e3564459)
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Cc: "Sudip Mukherjee (Codethink)" &lt;sudipm.mukherjee@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Move pixel doubling from Pixelvalve to HDMI block</title>
<updated>2022-08-17T13:14:38Z</updated>
<author>
<name>Dave Stevenson</name>
</author>
<published>2022-06-13T14:48:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=392dea95fc802a84c90457c1c76df4a2349e7b1d'/>
<id>urn:sha1:392dea95fc802a84c90457c1c76df4a2349e7b1d</id>
<content type='text'>
[ Upstream commit 3650062e4281ab28a6f8c9d59606d0a6266be736 ]

With the change to 2 pixels/clock, the pixel doubling in the PV
results in doubling each pair of pixels, ie ABABCDCD instead of
AABBCCDD.

Move the pixel doubling to the HDMI block, however this means
that DBLCLK modes now fall foul of requiring even values for
all the horizontal timing parameters.
As both 480i and 576i fail this, attempt to fix up DBLCLK modes
that have odd timings values.

Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers")
Signed-off-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Link: https://lore.kernel.org/r/20220613144800.326124-34-maxime@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Correct HDMI timing registers for interlaced modes</title>
<updated>2022-08-17T13:14:38Z</updated>
<author>
<name>Dave Stevenson</name>
</author>
<published>2022-06-13T14:47:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad1c50bd181f94dc8840eff5109839b9cabde12e'/>
<id>urn:sha1:ad1c50bd181f94dc8840eff5109839b9cabde12e</id>
<content type='text'>
[ Upstream commit fb10dc451c0f15e3c19798a2f41d357f3f7576f5 ]

For interlaced modes the timings were not being correctly
programmed into the HDMI block, so correct them.

Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers")
Signed-off-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Link: https://lore.kernel.org/r/20220613144800.326124-33-maxime@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Force modeset when bpc or format changes</title>
<updated>2022-08-17T13:14:38Z</updated>
<author>
<name>Dom Cobley</name>
</author>
<published>2022-06-13T14:47:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a868c24730534f4523c9e10af066d377c2bc6372'/>
<id>urn:sha1:a868c24730534f4523c9e10af066d377c2bc6372</id>
<content type='text'>
[ Upstream commit c94cd0620a922156c9ff9af9c3301b174b287677 ]

Whenever the maximum BPC is changed, vc4_hdmi_encoder_compute_config()
might pick up a different BPC or format depending on the display
capabilities.

That change will have a number of side effects, including the clock
rates and whether the scrambling is enabled.

However, only drm_crtc_state.connectors_changed will be set to true,
since that properly only affects the connector.

This means that while drm_atomic_crtc_needs_modeset() will return true,
and thus drm_atomic_helper_commit_modeset_enables() will call our
encoder atomic_enable() hook, mode_changed will be false.

So crtc_set_mode() will not call our encoder .atomic_mode_set() hook. We
use this hook in vc4 to set the vc4_hdmi_connector_state.output_bpc (and
output_format), and will then reuse the value in .atomic_enable() to select
whether or not scrambling should be enabled.

However, since our clock rate is pre-computed during .atomic_check(), we
end up with the clocks properly configured, but the scrambling disabled,
leading to a blank screen.

Let's set mode_changed to true in our HDMI driver to force the update of
output_bpc, and thus prevent the issue entirely.

Fixes: ba8c0faebbb0 ("drm/vc4: hdmi: Enable 10/12 bpc output")
Signed-off-by: Dom Cobley &lt;popcornmix@gmail.com&gt;
Link: https://lore.kernel.org/r/20220613144800.326124-32-maxime@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Fix timings for interlaced modes</title>
<updated>2022-08-17T13:14:38Z</updated>
<author>
<name>Mateusz Kwiatkowski</name>
</author>
<published>2022-06-13T14:47:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f04bdc1f98627976c4d0656120cc200bcb34a0c9'/>
<id>urn:sha1:f04bdc1f98627976c4d0656120cc200bcb34a0c9</id>
<content type='text'>
[ Upstream commit 0ee5a40152b15f200ed3a0d51e8aa782ea979c6a ]

Increase the number of post-sync blanking lines on odd fields instead of
decreasing it on even fields. This makes the total number of lines
properly match the modelines.

Additionally fix the value of PV_VCONTROL_ODD_DELAY, which did not take
pixels_per_clock into account, causing some displays to invert the
fields when driven by bcm2711.

Fixes: 682e62c45406 ("drm/vc4: Fix support for interlaced modes on HDMI.")
Signed-off-by: Mateusz Kwiatkowski &lt;kfyatek+publicgit@gmail.com&gt;
Link: https://lore.kernel.org/r/20220613144800.326124-31-maxime@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Move HDMI reset to pm_resume</title>
<updated>2022-08-17T13:14:38Z</updated>
<author>
<name>Dave Stevenson</name>
</author>
<published>2022-06-13T14:47:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b1a412c12da61ce6c6df3bfca3a9faf294a81a2a'/>
<id>urn:sha1:b1a412c12da61ce6c6df3bfca3a9faf294a81a2a</id>
<content type='text'>
[ Upstream commit 467e30171b5b483922b1c24c573fa50787207cb6 ]

The BCM2835-37 found in the RaspberryPi 0 to 3 have a power domain
attached to the HDMI block, handled in Linux through runtime_pm.

That power domain is shared with the VEC block, so even if we put our
runtime_pm reference in the HDMI driver it would keep being on. If the
VEC is disabled though, the power domain would be disabled and we would
lose any initialization done in our bind implementation.

That initialization involves calling the reset function and initializing
the CEC registers.

Let's move the initialization to our runtime_resume implementation so
that we initialize everything properly if we ever need to.

Fixes: c86b41214362 ("drm/vc4: hdmi: Move the HSM clock enable to runtime_pm")
Signed-off-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Link: https://lore.kernel.org/r/20220613144800.326124-24-maxime@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Switch to pm_runtime_status_suspended</title>
<updated>2022-08-17T13:14:37Z</updated>
<author>
<name>Dave Stevenson</name>
</author>
<published>2022-06-13T14:47:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0241244456c139de5281bc61cb720652ea690f8d'/>
<id>urn:sha1:0241244456c139de5281bc61cb720652ea690f8d</id>
<content type='text'>
[ Upstream commit fcef97e70094a33ded73b3eb9bef06698c6e9c12 ]

If the controller isn't clocked or its domain powered up, the register
accesses will either stall the CPU or return garbage, respectively.

Thus, we had a warning in our register access function to complain when
that kind of risky accesses were performed.

In order to check the runtime_pm power state, we were using
pm_runtime_active(), but it turns out that it will become active only
once the runtime_resume hook has been executed.

This prevents us from doing any WARN-free register access in our
runtime_resume() implementation, while this is valid.

Let's switch to pm_runtime_status_suspended() instead.

Fixes: 14e193b95604 ("drm/vc4: hdmi: Warn if we access the controller while disabled")
Signed-off-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Link: https://lore.kernel.org/r/20220613144800.326124-23-maxime@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>drm/vc4: hdmi: Reset HDMI MISC_CONTROL register</title>
<updated>2022-08-17T13:14:37Z</updated>
<author>
<name>Dave Stevenson</name>
</author>
<published>2022-06-13T14:47:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ecd49a51e4ba93f25a4788758f6410c304128ed'/>
<id>urn:sha1:6ecd49a51e4ba93f25a4788758f6410c304128ed</id>
<content type='text'>
[ Upstream commit 35dc00c12a72700a9c4592afee7d136ecb280cbd ]

The HDMI block can repeat pixels for double clocked modes,
and the firmware is now configuring the block to do this as
the PV is doing it incorrectly when at 2pixels/clock.
If the kernel doesn't reset it then we end up with strange
modes.

Reset MISC_CONTROL.

Fixes: 8323989140f3 ("drm/vc4: hdmi: Support the BCM2711 HDMI controllers")
Signed-off-by: Dave Stevenson &lt;dave.stevenson@raspberrypi.com&gt;
Link: https://lore.kernel.org/r/20220613144800.326124-22-maxime@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
