<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_modes.c, branch v4.19.265</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.265</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.265'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2019-02-15T07:10:12+00:00</updated>
<entry>
<title>drm/modes: Prevent division by zero htotal</title>
<updated>2019-02-15T07:10:12+00:00</updated>
<author>
<name>Tina Zhang</name>
<email>tina.zhang@intel.com</email>
</author>
<published>2019-01-23T07:28:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=56d3178666fb6dbc892665cc3cf4f8074876d687'/>
<id>urn:sha1:56d3178666fb6dbc892665cc3cf4f8074876d687</id>
<content type='text'>
commit a2fcd5c84f7a7825e028381b10182439067aa90d upstream.

This patch prevents division by zero htotal.

In a follow-up mail Tina writes:

&gt; &gt; How did you manage to get here with htotal == 0? This needs backtraces (or if
&gt; &gt; this is just about static checkers, a mention of that).
&gt; &gt; -Daniel
&gt;
&gt; In GVT-g, we are trying to enable a virtual display w/o setting timings for a pipe
&gt; (a.k.a htotal=0), then we met the following kernel panic:
&gt;
&gt; [   32.832048] divide error: 0000 [#1] SMP PTI
&gt; [   32.833614] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.18.0-rc4-sriov+ #33
&gt; [   32.834438] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.10.1-0-g8891697-dirty-20180511_165818-tinazhang-linux-1 04/01/2014
&gt; [   32.835901] RIP: 0010:drm_mode_hsync+0x1e/0x40
&gt; [   32.836004] Code: 31 c0 c3 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 8b 87 d8 00 00 00 85 c0 75 22 8b 4f 68 85 c9 78 1b 69 47 58 e8 03 00 00 99 &lt;f7&gt; f9 b9 d3 4d 62 10 05 f4 01 00 00 f7 e1 89 d0 c1 e8 06 f3 c3 66
&gt; [   32.836004] RSP: 0000:ffffc900000ebb90 EFLAGS: 00010206
&gt; [   32.836004] RAX: 0000000000000000 RBX: ffff88001c67c8a0 RCX: 0000000000000000
&gt; [   32.836004] RDX: 0000000000000000 RSI: ffff88001c67c000 RDI: ffff88001c67c8a0
&gt; [   32.836004] RBP: ffff88001c7d03a0 R08: ffff88001c67c8a0 R09: ffff88001c7d0330
&gt; [   32.836004] R10: ffffffff822c3a98 R11: 0000000000000001 R12: ffff88001c67c000
&gt; [   32.836004] R13: ffff88001c7d0370 R14: ffffffff8207eb78 R15: ffff88001c67c800
&gt; [   32.836004] FS:  0000000000000000(0000) GS:ffff88001da00000(0000) knlGS:0000000000000000
&gt; [   32.836004] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
&gt; [   32.836004] CR2: 0000000000000000 CR3: 000000000220a000 CR4: 00000000000006f0
&gt; [   32.836004] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&gt; [   32.836004] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
&gt; [   32.836004] Call Trace:
&gt; [   32.836004]  intel_mode_from_pipe_config+0x72/0x90
&gt; [   32.836004]  intel_modeset_setup_hw_state+0x569/0xf90
&gt; [   32.836004]  intel_modeset_init+0x905/0x1db0
&gt; [   32.836004]  i915_driver_load+0xb8c/0x1120
&gt; [   32.836004]  i915_pci_probe+0x4d/0xb0
&gt; [   32.836004]  local_pci_probe+0x44/0xa0
&gt; [   32.836004]  ? pci_assign_irq+0x27/0x130
&gt; [   32.836004]  pci_device_probe+0x102/0x1c0
&gt; [   32.836004]  driver_probe_device+0x2b8/0x480
&gt; [   32.836004]  __driver_attach+0x109/0x110
&gt; [   32.836004]  ? driver_probe_device+0x480/0x480
&gt; [   32.836004]  bus_for_each_dev+0x67/0xc0
&gt; [   32.836004]  ? klist_add_tail+0x3b/0x70
&gt; [   32.836004]  bus_add_driver+0x1e8/0x260
&gt; [   32.836004]  driver_register+0x5b/0xe0
&gt; [   32.836004]  ? mipi_dsi_bus_init+0x11/0x11
&gt; [   32.836004]  do_one_initcall+0x4d/0x1eb
&gt; [   32.836004]  kernel_init_freeable+0x197/0x237
&gt; [   32.836004]  ? rest_init+0xd0/0xd0
&gt; [   32.836004]  kernel_init+0xa/0x110
&gt; [   32.836004]  ret_from_fork+0x35/0x40
&gt; [   32.836004] Modules linked in:
&gt; [   32.859183] ---[ end trace 525608b0ed0e8665 ]---
&gt; [   32.859722] RIP: 0010:drm_mode_hsync+0x1e/0x40
&gt; [   32.860287] Code: 31 c0 c3 90 90 90 90 90 90 90 90 90 0f 1f 44 00 00 8b 87 d8 00 00 00 85 c0 75 22 8b 4f 68 85 c9 78 1b 69 47 58 e8 03 00 00 99 &lt;f7&gt; f9 b9 d3 4d 62 10 05 f4 01 00 00 f7 e1 89 d0 c1 e8 06 f3 c3 66
&gt; [   32.862680] RSP: 0000:ffffc900000ebb90 EFLAGS: 00010206
&gt; [   32.863309] RAX: 0000000000000000 RBX: ffff88001c67c8a0 RCX: 0000000000000000
&gt; [   32.864182] RDX: 0000000000000000 RSI: ffff88001c67c000 RDI: ffff88001c67c8a0
&gt; [   32.865206] RBP: ffff88001c7d03a0 R08: ffff88001c67c8a0 R09: ffff88001c7d0330
&gt; [   32.866359] R10: ffffffff822c3a98 R11: 0000000000000001 R12: ffff88001c67c000
&gt; [   32.867213] R13: ffff88001c7d0370 R14: ffffffff8207eb78 R15: ffff88001c67c800
&gt; [   32.868075] FS:  0000000000000000(0000) GS:ffff88001da00000(0000) knlGS:0000000000000000
&gt; [   32.868983] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
&gt; [   32.869659] CR2: 0000000000000000 CR3: 000000000220a000 CR4: 00000000000006f0
&gt; [   32.870599] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
&gt; [   32.871598] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
&gt; [   32.872549] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
&gt;
&gt; Since drm_mode_hsync() has the logic to check mode-&gt;htotal, I just extend it to cover the case htotal==0.

Signed-off-by: Tina Zhang &lt;tina.zhang@intel.com&gt;
Cc: Adam Jackson &lt;ajax@redhat.com&gt;
Cc: Dave Airlie &lt;airlied@redhat.com&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
[danvet: Add additional explanations + cc: stable.]
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1548228539-3061-1-git-send-email-tina.zhang@intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm: drop _mode_ from remaining connector functions</title>
<updated>2018-07-13T16:40:27+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-07-09T08:40:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=97e14fbeb53fe060c5f6a7a07e37fd24c087ed0c'/>
<id>urn:sha1:97e14fbeb53fe060c5f6a7a07e37fd24c087ed0c</id>
<content type='text'>
Since there's very few callers of these I've decided to do them all in
one patch. With this the unecessarily long drm_mode_connector_ prefix
is gone from the codebase! The only exception being struct
drm_mode_connector_set_property, which is part of the uapi so can't be
renamed.

Again done with sed+some manual fixups for indent issues.

Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180709084016.23750-8-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Add support for extracting sync signal drive edge from videomode</title>
<updated>2018-07-10T15:59:05+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@ti.com</email>
</author>
<published>2018-06-18T13:22:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=955f60db0f2b87094f64df3d7f608fdac4a6ebb1'/>
<id>urn:sha1:955f60db0f2b87094f64df3d7f608fdac4a6ebb1</id>
<content type='text'>
The sync in some panels needs to be driven by different edge of the pixel
clock compared to data. This is reflected by the
DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE in videmode flags.
Add similar similar definitions for bus_flags and convert the sync drive
edge via drm_bus_flags_from_videomode().

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@ti.com&gt;
Signed-off-by: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Signed-off-by: Jyri Sarha &lt;jsarha@ti.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180618132242.8673-2-tomi.valkeinen@ti.com
</content>
</entry>
<entry>
<title>drm: Print bad user modes</title>
<updated>2018-06-15T20:31:07+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2018-06-11T19:34:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6ab0edf4e79c42e3dc9c47e060a68d337af51be0'/>
<id>urn:sha1:6ab0edf4e79c42e3dc9c47e060a68d337af51be0</id>
<content type='text'>
Print out the modeline when we reject a bad user mode. Avoids having to
guess why it was rejected.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180611193403.16118-2-ville.syrjala@linux.intel.com
Reviewed-by: Harry Wentland &lt;harry.wentland@amd.com&gt;
</content>
</entry>
<entry>
<title>drm: Add and handle new aspect ratios in DRM layer</title>
<updated>2018-05-11T07:23:55+00:00</updated>
<author>
<name>Shashank Sharma</name>
<email>shashank.sharma@intel.com</email>
</author>
<published>2018-05-08T11:09:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=900aa8ad21587e909603f471b6cd81fd5338ec45'/>
<id>urn:sha1:900aa8ad21587e909603f471b6cd81fd5338ec45</id>
<content type='text'>
HDMI 2.0/CEA-861-F introduces two new aspect ratios:
- 64:27
- 256:135

This patch:
-  Adds new DRM flags for to represent these new aspect ratios.
-  Adds new cases to handle these aspect ratios while converting
from user-&gt;kernel mode or vise versa.

This patch was once reviewed and merged, and later reverted due
to lack of DRM client protection, while adding aspect ratio bits
in user modes. This is a re-spin of the series, with DRM client
cap protection.

The previous series can be found here:
https://pw-emeril.freedesktop.org/series/10850/

Signed-off-by: Shashank Sharma &lt;shashank.sharma@intel.com&gt;
Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt; (V2)
Reviewed-by: Jose Abreu &lt;Jose.Abreu@synopsys.com&gt; (V2)

Cc: Ville Syrjala &lt;ville.syrjala@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Jose Abreu &lt;Jose.Abreu@synopsys.com&gt;
Cc: Ankit Nautiyal &lt;ankit.k.nautiyal@intel.com&gt;

V3: rebase
V4: rebase
V5: corrected the macro name for an aspect ratio, in a switch case.
V6: rebase
V7: rebase
V8: rebase
V9: rebase
V10: rebase
V11: rebase
V12: rebase
V13: rebase
V14: rebase

Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1525777785-9740-11-git-send-email-ankit.k.nautiyal@intel.com
</content>
</entry>
<entry>
<title>drm: Add aspect ratio parsing in DRM layer</title>
<updated>2018-05-11T07:23:41+00:00</updated>
<author>
<name>Shashank Sharma</name>
<email>shashank.sharma@intel.com</email>
</author>
<published>2018-05-08T11:09:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=222ec1618c3aceca1e61e1e73e559c647c2b946f'/>
<id>urn:sha1:222ec1618c3aceca1e61e1e73e559c647c2b946f</id>
<content type='text'>
Current DRM layer functions don't parse aspect ratio information
while converting a user mode-&gt;kernel mode or vice versa. This
causes modeset to pick mode with wrong aspect ratio, eventually
causing failures in HDMI compliance test cases, due to wrong VIC.

This patch adds aspect ratio information in DRM's mode conversion
and mode comparision functions, to make sure kernel picks mode
with right aspect ratio (as per the VIC).

Background:
This patch was once reviewed and merged, and later reverted due to
lack of DRM cap protection. This is a re-spin of this patch, this
time with DRM cap protection, to avoid aspect ratio information, when
the client doesn't request for it.

Review link: https://pw-emeril.freedesktop.org/patch/104068/
Background discussion: https://patchwork.kernel.org/patch/9379057/

Signed-off-by: Shashank Sharma &lt;shashank.sharma@intel.com&gt;
Signed-off-by: Lin, Jia &lt;lin.a.jia@intel.com&gt;
Signed-off-by: Akashdeep Sharma &lt;akashdeep.sharma@intel.com&gt;
Reviewed-by: Jim Bride &lt;jim.bride@linux.intel.com&gt; (V2)
Reviewed-by: Jose Abreu &lt;Jose.Abreu@synopsys.com&gt; (V4)

Cc: Ville Syrjala &lt;ville.syrjala@linux.intel.com&gt;
Cc: Jim Bride &lt;jim.bride@linux.intel.com&gt;
Cc: Jose Abreu &lt;Jose.Abreu@synopsys.com&gt;
Cc: Ankit Nautiyal &lt;ankit.k.nautiyal@intel.com&gt;

V3: modified the aspect-ratio check in drm_mode_equal as per new flags
    provided by Ville. https://patchwork.freedesktop.org/patch/188043/
V4: rebase
V5: rebase
V6: As recommended by Ville, avoided matching of aspect-ratio in
    drm_fb_helper, while trying to find a common mode among connectors
    for the target clone mode.
V7: rebase
V8: rebase
V9: rebase
V10: rebase
V11: rebase
V12: rebase
V13: rebase
V14: rebase

Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1525777785-9740-10-git-send-email-ankit.k.nautiyal@intel.com
</content>
</entry>
<entry>
<title>drm/modes: Introduce drm_mode_match()</title>
<updated>2018-05-11T06:59:09+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2018-05-08T11:09:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=dd7c2626329468c0344a794187b467d34c3640cb'/>
<id>urn:sha1:dd7c2626329468c0344a794187b467d34c3640cb</id>
<content type='text'>
Make mode matching less confusing by allowing the caller to specify
which parts of the modes should match via some flags.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Reviewed-by: Shashank Sharma &lt;shashank.sharma@intel.com&gt;
Signed-off-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/1525777785-9740-2-git-send-email-ankit.k.nautiyal@intel.com
</content>
</entry>
<entry>
<title>drm: Fix uabi regression by allowing garbage mode-&gt;type from userspace</title>
<updated>2018-03-23T11:51:12+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2018-03-21T21:12:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a01c47737a9ca118ab75c6fd6e75739b824de830'/>
<id>urn:sha1:a01c47737a9ca118ab75c6fd6e75739b824de830</id>
<content type='text'>
Apparently xf86-video-vmware leaves the mode-&gt;type uninitialized
when feeding the mode to the kernel. Thus we have no choice but
to accept the garbage in. We'll just ignore any of the bits we
don't want. The mode type is just a hint anyway, and more
useful for the kernel-&gt;userspace direction.

Reported-by: Thomas Hellstrom &lt;thomas@shipmail.org&gt;
CC: Thomas Hellstrom &lt;thomas@shipmail.org&gt;
Cc: Adam Jackson &lt;ajax@redhat.com&gt;
Cc: Alex Deucher &lt;alexander.deucher@amd.com&gt;
Fixes: c6ed6dad5cfb ("drm/uapi: Validate the mode flags/type")
References: https://lists.freedesktop.org/archives/dri-devel/2018-March/170213.html
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180321211246.10152-1-ville.syrjala@linux.intel.com
Tested-by: Thomas Hellstrom &lt;thellstrom@vmware.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Daniel Stone &lt;daniels@collabora.com&gt;
</content>
</entry>
<entry>
<title>drm: Make drm_mode_vrefresh() a bit more accurate</title>
<updated>2018-03-16T16:31:49+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2018-03-13T15:07:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2f0e9d804935970a4ce0f58dd046b41881bfd8f3'/>
<id>urn:sha1:2f0e9d804935970a4ce0f58dd046b41881bfd8f3</id>
<content type='text'>
Do the refresh rate calculation with a single division. This gives
us slightly more accurate results, especially for interlaced since
we don't just double the final truncated result.

We do lose one bit compared to the old way, so with an interlaced
mode the new code can only handle ~2GHz instead of the ~4GHz the
old code handeled.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180313150759.27620-2-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm: Nuke the useless 'ret' variable from drm_mode_convert_umode()</title>
<updated>2018-03-16T16:31:06+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2018-03-13T15:07:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=df550548c6339e0d032af4a7f9bd7200ab0c827b'/>
<id>urn:sha1:df550548c6339e0d032af4a7f9bd7200ab0c827b</id>
<content type='text'>
No need to store the return value in a variable since we don't have to
do any unwinding.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180313150759.27620-1-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
</feed>
