<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/gpu/drm/drm_modes.c, branch v5.8</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>drm: Nuke mode-&gt;hsync</title>
<updated>2020-04-29T15:44:26+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2020-04-28T17:19:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=58911c240783e0d1e7d457832416eb3347b8abbb'/>
<id>58911c240783e0d1e7d457832416eb3347b8abbb</id>
<content type='text'>
Let's just calculate the hsync rate on demand. No point in wasting
space storing it and risking the cached value getting out of sync
with reality.

v2: Move drm_mode_hsync() next to its only users
    Drop the TODO

Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt; #v1
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-2-ville.syrjala@linux.intel.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Let's just calculate the hsync rate on demand. No point in wasting
space storing it and risking the cached value getting out of sync
with reality.

v2: Move drm_mode_hsync() next to its only users
    Drop the TODO

Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt; #v1
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200428171940.19552-2-ville.syrjala@linux.intel.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: Make sure to parse valid rotation value from cmdline</title>
<updated>2020-02-12T17:32:54+00:00</updated>
<author>
<name>Stephan Gerhold</name>
<email>stephan@gerhold.net</email>
</author>
<published>2020-01-17T15:34:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e6980a727154b793adb218fbc7b4d6af52a7e364'/>
<id>e6980a727154b793adb218fbc7b4d6af52a7e364</id>
<content type='text'>
A rotation value should have exactly one rotation angle.
At the moment there is no validation for this when parsing video=
parameters from the command line. This causes problems later on
when we try to combine the command line rotation with the panel
orientation.

To make sure that we generate a valid rotation value:
  - Set DRM_MODE_ROTATE_0 by default (if no rotate= option is set)
  - Validate that there is exactly one rotation angle set
    (i.e. specifying the rotate= option multiple times is invalid)

Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200117153429.54700-2-stephan@gerhold.net
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A rotation value should have exactly one rotation angle.
At the moment there is no validation for this when parsing video=
parameters from the command line. This causes problems later on
when we try to combine the command line rotation with the panel
orientation.

To make sure that we generate a valid rotation value:
  - Set DRM_MODE_ROTATE_0 by default (if no rotate= option is set)
  - Validate that there is exactly one rotation angle set
    (i.e. specifying the rotate= option multiple times is invalid)

Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Signed-off-by: Maxime Ripard &lt;maxime@cerno.tech&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200117153429.54700-2-stephan@gerhold.net
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: tag unused variables to avoid warnings</title>
<updated>2020-01-09T16:17:28+00:00</updated>
<author>
<name>Benjamin Gaignard</name>
<email>benjamin.gaignard@st.com</email>
</author>
<published>2019-12-10T10:24:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f199af00186cb7eb2d842633e47689fb7b791e60'/>
<id>f199af00186cb7eb2d842633e47689fb7b791e60</id>
<content type='text'>
Some variables are set but never used. To avoid warning when compiling
with W=1 and keep the algorithm like it is tag theses variables
with _maybe_unused macro.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191210102437.19377-1-benjamin.gaignard@st.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some variables are set but never used. To avoid warning when compiling
with W=1 and keep the algorithm like it is tag theses variables
with _maybe_unused macro.

Signed-off-by: Benjamin Gaignard &lt;benjamin.gaignard@st.com&gt;
Acked-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191210102437.19377-1-benjamin.gaignard@st.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: parse_cmdline: Explicitly memset the passed in drm_cmdline_mode struct</title>
<updated>2019-12-16T11:13:18+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-11-18T15:51:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=d1fe276b5115f0d581c3cfe6154633b3547e8aab'/>
<id>d1fe276b5115f0d581c3cfe6154633b3547e8aab</id>
<content type='text'>
Instead of only setting mode-&gt;specified on false on an early exit and
leaving e.g. mode-&gt;bpp_specified and mode-&gt;refresh_specified as is,
lets be consistent and just zero out the entire passed in struct at
the top of drm_mode_parse_command_line_for_connector()

Changes in v3:
-Drop "mode-&gt;specified = false;" line instead of the "return false;" (oops)
 This crasher was reported-by: kernel test robot &lt;lkp@intel.com&gt;

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-11-hdegoede@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of only setting mode-&gt;specified on false on an early exit and
leaving e.g. mode-&gt;bpp_specified and mode-&gt;refresh_specified as is,
lets be consistent and just zero out the entire passed in struct at
the top of drm_mode_parse_command_line_for_connector()

Changes in v3:
-Drop "mode-&gt;specified = false;" line instead of the "return false;" (oops)
 This crasher was reported-by: kernel test robot &lt;lkp@intel.com&gt;

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-11-hdegoede@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: parse_cmdline: Remove some unnecessary code (v2)</title>
<updated>2019-12-16T11:13:18+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-11-18T15:51:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5b926617cdef41ce0696e09834991194b1759e28'/>
<id>5b926617cdef41ce0696e09834991194b1759e28</id>
<content type='text'>
fb_get_options() will return fb_mode_option if no video=&lt;connector-name&gt;
argument is present on the kernel commandline, so there is no need to also
do this in drm_mode_parse_command_line_for_connector() as our only caller
uses fb_get_options() to get the mode_option argument.

Changes in v2:
-Split out the changes dealing with the initialization of the mode struct
 into a separate patch

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-10-hdegoede@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fb_get_options() will return fb_mode_option if no video=&lt;connector-name&gt;
argument is present on the kernel commandline, so there is no need to also
do this in drm_mode_parse_command_line_for_connector() as our only caller
uses fb_get_options() to get the mode_option argument.

Changes in v2:
-Split out the changes dealing with the initialization of the mode struct
 into a separate patch

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-10-hdegoede@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: parse_cmdline: Add support for specifying panel_orientation (v2)</title>
<updated>2019-12-16T11:13:18+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-11-18T15:51:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4e7a4a6fbdc669c44e6079f9d5eb25673749455f'/>
<id>4e7a4a6fbdc669c44e6079f9d5eb25673749455f</id>
<content type='text'>
Sometimes we want to override a connector's panel_orientation from the
kernel commandline. Either for testing and for special cases, e.g. a kiosk
like setup which uses a TV mounted in portrait mode.

Users can already specify a "rotate" option through a video= kernel cmdline
option. But that only supports 0/180 degrees (see drm_client_modeset TODO)
and only works for in kernel modeset clients, not for userspace kms users.

The "panel-orientation" connector property OTOH does support 90/270 degrees
as it leaves dealing with the rotation up to userspace and this does work
for userspace kms clients (at least those which support this property).

Changes in v2:
-Add missing ':' after @panel_orientation (reported by kbuild test robot)

BugLink: https://gitlab.freedesktop.org/plymouth/plymouth/merge_requests/83
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-9-hdegoede@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes we want to override a connector's panel_orientation from the
kernel commandline. Either for testing and for special cases, e.g. a kiosk
like setup which uses a TV mounted in portrait mode.

Users can already specify a "rotate" option through a video= kernel cmdline
option. But that only supports 0/180 degrees (see drm_client_modeset TODO)
and only works for in kernel modeset clients, not for userspace kms users.

The "panel-orientation" connector property OTOH does support 90/270 degrees
as it leaves dealing with the rotation up to userspace and this does work
for userspace kms clients (at least those which support this property).

Changes in v2:
-Add missing ':' after @panel_orientation (reported by kbuild test robot)

BugLink: https://gitlab.freedesktop.org/plymouth/plymouth/merge_requests/83
Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-9-hdegoede@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: parse_cmdline: Allow specifying stand-alone options</title>
<updated>2019-12-16T11:13:18+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-11-18T15:51:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7b1cce760afe38b40f0989cdf10b2190dccf9815'/>
<id>7b1cce760afe38b40f0989cdf10b2190dccf9815</id>
<content type='text'>
Some options which can be specified on the commandline, such as
margin_right=..., margin_left=..., etc. are applied not only to the
specified mode, but to all modes. As such it would be nice if the user
can simply say e.g.
video=HDMI-1:margin_right=14,margin_left=24,margin_bottom=36,margin_top=42

This commit refactors drm_mode_parse_command_line_for_connector() to
add support for this, and as a nice side effect also cleans up the
function a bit.

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-8-hdegoede@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some options which can be specified on the commandline, such as
margin_right=..., margin_left=..., etc. are applied not only to the
specified mode, but to all modes. As such it would be nice if the user
can simply say e.g.
video=HDMI-1:margin_right=14,margin_left=24,margin_bottom=36,margin_top=42

This commit refactors drm_mode_parse_command_line_for_connector() to
add support for this, and as a nice side effect also cleans up the
function a bit.

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-8-hdegoede@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: parse_cmdline: Set bpp/refresh_specified after successful parsing</title>
<updated>2019-12-16T11:13:18+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-11-18T15:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6a2d163756545aa3180d7851d5f8322b865e72be'/>
<id>6a2d163756545aa3180d7851d5f8322b865e72be</id>
<content type='text'>
drm_connector_get_cmdline_mode() calls
drm_mode_parse_command_line_for_connector() with &amp;connector-&gt;cmdline_mode
as mode argument, so anything which we store in the mode arguments gets
kept even if we return false.

Avoid storing a possibly false-postive bpp/refresh_specified setting
in connector-&gt;cmdline_mode by moving the setting of these to after
successful parsing of the bpp/refresh parts of the video= argument.

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-7-hdegoede@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drm_connector_get_cmdline_mode() calls
drm_mode_parse_command_line_for_connector() with &amp;connector-&gt;cmdline_mode
as mode argument, so anything which we store in the mode arguments gets
kept even if we return false.

Avoid storing a possibly false-postive bpp/refresh_specified setting
in connector-&gt;cmdline_mode by moving the setting of these to after
successful parsing of the bpp/refresh parts of the video= argument.

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-7-hdegoede@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: parse_cmdline: Add freestanding argument to drm_mode_parse_cmdline_options()</title>
<updated>2019-12-16T11:13:17+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-11-18T15:51:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=99e2716e053734b70434502867be24d20a3e2d84'/>
<id>99e2716e053734b70434502867be24d20a3e2d84</id>
<content type='text'>
Add a freestanding function argument to drm_mode_parse_cmdline_options()
similar to how drm_mode_parse_cmdline_extra() already has this.

This is a preparation patch for allowing parsing of stand-alone options
without a mode before them, e.g.: video=HDMI-1:margin_right=14,...

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-6-hdegoede@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a freestanding function argument to drm_mode_parse_cmdline_options()
similar to how drm_mode_parse_cmdline_extra() already has this.

This is a preparation patch for allowing parsing of stand-alone options
without a mode before them, e.g.: video=HDMI-1:margin_right=14,...

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-6-hdegoede@redhat.com
</pre>
</div>
</content>
</entry>
<entry>
<title>drm/modes: parse_cmdline: Rework drm_mode_parse_cmdline_options()</title>
<updated>2019-12-16T11:13:17+00:00</updated>
<author>
<name>Hans de Goede</name>
<email>hdegoede@redhat.com</email>
</author>
<published>2019-11-18T15:51:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=739b200c2edcaaa7a86f37b0c11db57956433dfb'/>
<id>739b200c2edcaaa7a86f37b0c11db57956433dfb</id>
<content type='text'>
Refactor drm_mode_parse_cmdline_options() so that it takes a pointer
to the first option, rather then a pointer to the ',' before the first
option.

This is a preparation patch for allowing parsing of stand-alone options
without a mode before them, e.g.: video=HDMI-1:margin_right=14,...

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-5-hdegoede@redhat.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refactor drm_mode_parse_cmdline_options() so that it takes a pointer
to the first option, rather then a pointer to the ',' before the first
option.

This is a preparation patch for allowing parsing of stand-alone options
without a mode before them, e.g.: video=HDMI-1:margin_right=14,...

Acked-by: Maxime Ripard &lt;mripard@kernel.org&gt;
Signed-off-by: Hans de Goede &lt;hdegoede@redhat.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20191118155134.30468-5-hdegoede@redhat.com
</pre>
</div>
</content>
</entry>
</feed>
