<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_modes.c, branch v6.6.131</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.131'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2024-12-27T12:58:51+00:00</updated>
<entry>
<title>drm/modes: Avoid divide by zero harder in drm_mode_vrefresh()</title>
<updated>2024-12-27T12:58:51+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2024-11-29T04:26:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b39de5a71bac5641d0fda33d1cf5682d82cf1ae5'/>
<id>urn:sha1:b39de5a71bac5641d0fda33d1cf5682d82cf1ae5</id>
<content type='text'>
commit 9398332f23fab10c5ec57c168b44e72997d6318e upstream.

drm_mode_vrefresh() is trying to avoid divide by zero
by checking whether htotal or vtotal are zero. But we may
still end up with a div-by-zero of vtotal*htotal*...

Cc: stable@vger.kernel.org
Reported-by: syzbot+622bba18029bcde672e1@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=622bba18029bcde672e1
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20241129042629.18280-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm: Fix comment on mode parsing</title>
<updated>2023-02-20T13:56:52+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-02-09T13:55:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1e84dadb2762cddbb5a1066713fc5fc6505e9f27'/>
<id>urn:sha1:1e84dadb2762cddbb5a1066713fc5fc6505e9f27</id>
<content type='text'>
Do not claim that there's a default mode in the video= option parser.
if no option string has been given, the parser does nothing.

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230209135509.7786-12-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm: Include &lt;linux/of.h&gt; where needed</title>
<updated>2023-01-13T12:18:35+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2023-01-11T13:01:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fb28b3f0ecb2393307e5618adb331be5e0f44006'/>
<id>urn:sha1:fb28b3f0ecb2393307e5618adb331be5e0f44006</id>
<content type='text'>
Include &lt;linux/of.h&gt; in source files that need it. Some of DRM's
source code gets OF header via drm_crtc_helper.h and &lt;linux/fb.h&gt;,
which can leed to unnecessary recompilation.

In drm_modes.c, add a comment on the reason for still including
&lt;linux/fb.h&gt;. The header file is required to get KHZ2PICOS(). The
macro is part of the UAPI headers, so it cannot be moved to a less
prominent location.

v2:
	* include &lt;linux/of.h&gt; in komeda_drv.c (kernel test robot)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Acked-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt; # komeda
Acked-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230111130206.29974-3-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/modes: Use strscpy() to copy command-line mode name</title>
<updated>2022-12-01T10:12:44+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-11-28T08:19:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0f9aa074c92dd9274b811c1c3fa93736814a4b0d'/>
<id>urn:sha1:0f9aa074c92dd9274b811c1c3fa93736814a4b0d</id>
<content type='text'>
The mode name in struct drm_cmdline_mode can hold 32 characters at most,
which can easily get overrun. Switch to strscpy() to prevent such a
thing.

Reported-by: coverity-bot &lt;keescook+coverity-bot@chromium.org&gt;
Addresses-Coverity-ID: 1527354 ("Security best practices violations")
Fixes: a7ab155397dd ("drm/modes: Switch to named mode descriptors")
Reviewed-by: Javier Martinez Canillas &lt;javierm@redhat.com&gt;
Link: https://lore.kernel.org/r/20221128081938.742410-2-maxime@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm/modes: Introduce more named modes</title>
<updated>2022-11-24T11:42:40+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-11-17T09:28:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0740ac381b2c674eec72e63c78253b3ad07febd2'/>
<id>urn:sha1:0740ac381b2c674eec72e63c78253b3ad07febd2</id>
<content type='text'>
Now that we can easily extend the named modes list, let's add a few more
analog TV modes that were used in the wild, and some unit tests to make
sure it works as intended.

Reviewed-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Tested-by: Mateusz Kwiatkowski &lt;kfyatek+publicgit@gmail.com&gt;
Acked-in-principle-or-something-like-that-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-11-256dad125326@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm/modes: Properly generate a drm_display_mode from a named mode</title>
<updated>2022-11-24T11:42:39+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-11-17T09:28:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=fedcaf726f542b1b32611449bdea9cb02bf6bba9'/>
<id>urn:sha1:fedcaf726f542b1b32611449bdea9cb02bf6bba9</id>
<content type='text'>
The framework will get the drm_display_mode from the drm_cmdline_mode it
got by parsing the video command line argument by calling
drm_connector_pick_cmdline_mode().

The heavy lifting will then be done by the
drm_mode_create_from_cmdline_mode() function.

In the case of the named modes though, there's no real code to make that
translation and we rely on the drivers to guess which actual display mode
we meant.

Let's modify drm_mode_create_from_cmdline_mode() to properly generate the
drm_display_mode we mean when passing a named mode.

Reviewed-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Tested-by: Mateusz Kwiatkowski &lt;kfyatek+publicgit@gmail.com&gt;
Acked-in-principle-or-something-like-that-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-9-256dad125326@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm/modes: Introduce the tv_mode property as a command-line option</title>
<updated>2022-11-24T11:42:39+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-11-17T09:28:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e691c9992ae1c731ea67083739823b131c1d88ea'/>
<id>urn:sha1:e691c9992ae1c731ea67083739823b131c1d88ea</id>
<content type='text'>
Our new tv mode option allows to specify the TV mode from a property.
However, it can still be useful, for example to avoid any boot time
artifact, to set that property directly from the kernel command line.

Let's add some code to allow it, and some unit tests to exercise that code.

Reviewed-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Tested-by: Mateusz Kwiatkowski &lt;kfyatek+publicgit@gmail.com&gt;
Acked-in-principle-or-something-like-that-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-8-256dad125326@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm/modes: Add a function to generate analog display modes</title>
<updated>2022-11-24T11:42:39+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-11-17T09:28:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4fcd238560ee6724d6edcae95820bdf7f2e40ab1'/>
<id>urn:sha1:4fcd238560ee6724d6edcae95820bdf7f2e40ab1</id>
<content type='text'>
Multiple drivers (meson, vc4, sun4i) define analog TV 525-lines and
625-lines modes in their drivers.

Since those modes are fairly standard, and that we'll need to use them
in more places in the future, it makes sense to move their definition
into the core framework.

However, analog display usually have fairly loose timings requirements,
the only discrete parameters being the total number of lines and pixel
clock frequency. Thus, we created a function that will create a display
mode from the standard, the pixel frequency and the active area.

Tested-by: Mateusz Kwiatkowski &lt;kfyatek+publicgit@gmail.com&gt;
Acked-in-principle-or-something-like-that-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v10-6-256dad125326@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm/connector: Add pixel clock to cmdline mode</title>
<updated>2022-11-15T09:10:24+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-11-14T13:00:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0e308efe232afdec35d508f5dfae52f03d50efca'/>
<id>urn:sha1:0e308efe232afdec35d508f5dfae52f03d50efca</id>
<content type='text'>
We'll need to get the pixel clock to generate proper display modes for
all the current named modes. Let's add it to struct drm_cmdline_mode and
fill it when parsing the named mode.

Reviewed-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Tested-by: Mateusz Kwiatkowski &lt;kfyatek+publicgit@gmail.com&gt;
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-12-24b168e5bcd5@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
<entry>
<title>drm/modes: Fill drm_cmdline mode from named modes</title>
<updated>2022-11-15T09:10:14+00:00</updated>
<author>
<name>Maxime Ripard</name>
<email>maxime@cerno.tech</email>
</author>
<published>2022-11-14T13:00:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=00dcc4a2d560c57543ee36b94a864256f99cac32'/>
<id>urn:sha1:00dcc4a2d560c57543ee36b94a864256f99cac32</id>
<content type='text'>
The current code to deal with named modes will only set the mode name, and
then it's up to drivers to try to match that name to whatever mode or
configuration they see fit.

The plan is to remove that need and move the named mode handling out of
drivers and into the core, and only rely on modes and properties. Let's
start by properly filling drm_cmdline_mode from a named mode.

Reviewed-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Tested-by: Mateusz Kwiatkowski &lt;kfyatek+publicgit@gmail.com&gt;
Link: https://lore.kernel.org/r/20220728-rpi-analog-tv-properties-v9-11-24b168e5bcd5@cerno.tech
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
</content>
</entry>
</feed>
