<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/gpu/drm/drm_ioctl.c, branch v4.19.141</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.141</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.141'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-05-10T08:30:12+00:00</updated>
<entry>
<title>drm/atomic: Take the atomic toys away from X</title>
<updated>2020-05-10T08:30:12+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-09-05T18:53:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7c9af5cd6a7df58f47eac607cc5ab770d808ba82'/>
<id>urn:sha1:7c9af5cd6a7df58f47eac607cc5ab770d808ba82</id>
<content type='text'>
commit 26b1d3b527e7bf3e24b814d617866ac5199ce68d upstream.

The -modesetting ddx has a totally broken idea of how atomic works:
- doesn't disable old connectors, assuming they get auto-disable like
  with the legacy setcrtc
- assumes ASYNC_FLIP is wired through for the atomic ioctl
- not a single call to TEST_ONLY

Iow the implementation is a 1:1 translation of legacy ioctls to
atomic, which is a) broken b) pointless.

We already have bugs in both i915 and amdgpu-DC where this prevents us
from enabling neat features.

If anyone ever cares about atomic in X we can easily add a new atomic
level (req-&gt;value == 2) for X to get back the shiny toys.

Since these broken versions of -modesetting have been shipping,
there's really no other way to get out of this bind.

v2:
- add an informational dmesg output (Rob, Ajax)
- reorder after the DRIVER_ATOMIC check to avoid useless noise (Ilia)
- allow req-&gt;value &gt; 2 so that X can do another attempt at atomic in
  the future

v3: Go with paranoid, insist that the X should be first (suggested by
Rob)

Cc: Ilia Mirkin &lt;imirkin@alum.mit.edu&gt;
References: https://gitlab.freedesktop.org/xorg/xserver/issues/629
References: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/180
References: abbc0697d5fb ("drm/fb: revert the i915 Actually configure untiled displays from master")
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt; (v1)
Reviewed-by: Nicholas Kazlauskas &lt;nicholas.kazlauskas@amd.com&gt; (v1)
Cc: Michel Dänzer &lt;michel@daenzer.net&gt;
Cc: Alex Deucher &lt;alexdeucher@gmail.com&gt;
Cc: Adam Jackson &lt;ajax@redhat.com&gt;
Acked-by: Adam Jackson &lt;ajax@redhat.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Acked-by: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190905185318.31363-1-daniel.vetter@ffwll.ch
Cc: Yves-Alexis Perez &lt;corsac@debian.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>drm/ioctl: Fix Spectre v1 vulnerabilities</title>
<updated>2018-12-29T12:37:59+00:00</updated>
<author>
<name>Gustavo A. R. Silva</name>
<email>gustavo@embeddedor.com</email>
</author>
<published>2018-12-20T00:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7f3ebea19795eb38438cd3709fabf2afd53cf447'/>
<id>urn:sha1:7f3ebea19795eb38438cd3709fabf2afd53cf447</id>
<content type='text'>
commit 505b5240329b922f21f91d5b5d1e535c805eca6d upstream.

nr is indirectly controlled by user-space, hence leading to a
potential exploitation of the Spectre variant 1 vulnerability.

This issue was detected with the help of Smatch:

drivers/gpu/drm/drm_ioctl.c:805 drm_ioctl() warn: potential spectre issue 'dev-&gt;driver-&gt;ioctls' [r]
drivers/gpu/drm/drm_ioctl.c:810 drm_ioctl() warn: potential spectre issue 'drm_ioctls' [r] (local cap)
drivers/gpu/drm/drm_ioctl.c:892 drm_ioctl_flags() warn: potential spectre issue 'drm_ioctls' [r] (local cap)

Fix this by sanitizing nr before using it to index dev-&gt;driver-&gt;ioctls
and drm_ioctls.

Notice that given that speculation windows are large, the policy is
to kill the speculation on the first load and not worry if it can be
completed with a dependent load/store [1].

[1] https://marc.info/?l=linux-kernel&amp;m=152449131114778&amp;w=2

Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva &lt;gustavo@embeddedor.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181220000015.GA18973@embeddedor
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: Make ioctls available for in-kernel clients</title>
<updated>2018-06-25T14:20:14+00:00</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2018-06-18T14:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d30827ce0df4410648c3fbba48681d7aafb19f36'/>
<id>urn:sha1:d30827ce0df4410648c3fbba48681d7aafb19f36</id>
<content type='text'>
Make ioctl wrappers for functions that will be used by the in-kernel API.
The following functions are touched:
- drm_mode_create_dumb_ioctl()
- drm_mode_destroy_dumb_ioctl()
- drm_mode_addfb()
- drm_mode_rmfb()

Signed-off-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180618141739.48151-4-noralf@tronnes.org
</content>
</entry>
<entry>
<title>drm: writeback: Add client capability for exposing writeback connectors</title>
<updated>2018-06-20T14:30:20+00:00</updated>
<author>
<name>Liviu Dudau</name>
<email>Liviu.Dudau@arm.com</email>
</author>
<published>2018-02-28T14:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d67b6a2065076d763c7df626b8c54f16038ad862'/>
<id>urn:sha1:d67b6a2065076d763c7df626b8c54f16038ad862</id>
<content type='text'>
Due to the fact that writeback connectors behave in a special way
in DRM (they always report being disconnected) we might confuse some
userspace. Add a client capability for writeback connectors that will
filter them out for clients that don't understand the capability.

Changelog:
 - only accept the capability if the client has already set the
DRM_CLIENT_CAP_ATOMIC one.

Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: Brian Starkey &lt;brian.starkey@arm.com&gt;
Signed-off-by: Liviu Dudau &lt;liviu.dudau@arm.com&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
Reviewed-by: Brian Starkey &lt;brian.starkey@arm.com&gt;
Link: https://patchwork.freedesktop.org/patch/229038/
</content>
</entry>
<entry>
<title>drm: Add DRM client cap for aspect-ratio</title>
<updated>2018-05-11T07:05:03+00:00</updated>
<author>
<name>Ankit Nautiyal</name>
<email>ankit.k.nautiyal@intel.com</email>
</author>
<published>2018-05-08T11:09:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7595bda2fb4378ccbb8db1d0e8de56d15ea7f7fa'/>
<id>urn:sha1:7595bda2fb4378ccbb8db1d0e8de56d15ea7f7fa</id>
<content type='text'>
To enable aspect-ratio support in DRM, blindly exposing the aspect
ratio information along with mode, can break things in existing
non-atomic user-spaces which have no intention or support to use this
aspect ratio information.

To avoid this, a new drm client cap is required to enable a non-atomic
user-space to advertise if it supports modes with aspect-ratio. Based
on this cap value, the kernel will take a call on exposing the aspect
ratio info in modes or not.

This patch adds the client cap for aspect-ratio.

Since no atomic-userspaces blow up on receiving aspect-ratio
information, the client cap for aspect-ratio is always enabled
for atomic clients.

Cc: Ville Syrjala &lt;ville.syrjala@linux.intel.com&gt;
Cc: Shashank Sharma &lt;shashank.sharma@intel.com&gt;
Signed-off-by: Ankit Nautiyal &lt;ankit.k.nautiyal@intel.com&gt;

V3: rebase
V4: As suggested by Marteen Lankhorst modified the commit message
    explaining the need to use the DRM cap for aspect-ratio. Also,
    tweaked the comment lines in the code for better understanding and
    clarity, as recommended by Shashank Sharma.
V5: rebase
V6: rebase
V7: rebase
V8: rebase
V9: rebase
V10: rebase
V11: rebase
V12: As suggested by Daniel Vetter and Ville Syrjala,
     always enable aspect-ratio client cap for atomic userspaces,
     if no atomic userspace breaks on aspect-ratio bits.
V13: rebase
V14: rebase

Reviewed-by: Shashank Sharma &lt;shashank.sharma@intel.com&gt;
Reviewed-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-7-git-send-email-ankit.k.nautiyal@intel.com
</content>
</entry>
<entry>
<title>drm: remove all control node code</title>
<updated>2018-05-03T19:26:32+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-04-20T06:51:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0d49f303e8a7006e0af3b58ed3809e1cad0900fb'/>
<id>urn:sha1:0d49f303e8a7006e0af3b58ed3809e1cad0900fb</id>
<content type='text'>
With the ioctl and driver prep done, we can remove everything else.

Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180420065159.4531-4-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Drop DRM_CONTROL_ALLOW from ioctls</title>
<updated>2018-05-03T09:28:02+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2018-04-20T06:51:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5bb562f829bf69223e90e158f654b063d964a291'/>
<id>urn:sha1:5bb562f829bf69223e90e158f654b063d964a291</id>
<content type='text'>
We've disabled control nodes in

commit 8a357d10043c75e980e7fcdb60d2b913491564af
Author: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Date:   Fri Oct 28 10:10:50 2016 +0200

    drm: Nerf DRM_CONTROL nodes

and there was only a minor uapi break that we've paper over with

commit 6449b088dd51dd5aa6b38455888bbf538d21f2fc
Author: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Date:   Fri Dec 9 14:56:56 2016 +0100

    drm: Add fake controlD* symlinks for backwards compat

Since then Keith has also added real control nodes with a
proper&amp;useable uapi in the form of drm leases.

It's time to remove the control node leftovers.

Cc: Keith Packard &lt;keithp@keithp.com&gt;
Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Cc: Gustavo Padovan &lt;gustavo@padovan.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Sean Paul &lt;seanpaul@chromium.org&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180420065159.4531-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Print the pid when debug logging an ioctl error.</title>
<updated>2018-02-10T22:23:10+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2018-01-30T21:56:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=9c950e468cb5913d223282a05e6cd22fecce5ac8'/>
<id>urn:sha1:9c950e468cb5913d223282a05e6cd22fecce5ac8</id>
<content type='text'>
When we debug print what ioctl we're calling into, we include the pid.
If you have multiple processes rendering simulataneously, the error
return also needs the pid so you can see which of the ioctl calls was
the one to fail.

Signed-off-by: Eric Anholt &lt;eric@anholt.net&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180130215643.11016-1-eric@anholt.net
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
</content>
</entry>
<entry>
<title>drm/ioctl: Remove trailing whitespace</title>
<updated>2018-01-11T16:48:58+00:00</updated>
<author>
<name>Noralf Trønnes</name>
<email>noralf@tronnes.org</email>
</author>
<published>2018-01-03T22:21:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=937f3acc605397ccfce28c835f0bf9d6da589060'/>
<id>urn:sha1:937f3acc605397ccfce28c835f0bf9d6da589060</id>
<content type='text'>
Remove a couple of trailing spaces.

Signed-off-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Reviewed-by: Laurent Pinchart &lt;laurent.pinchart@ideasonboard.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20180103222110.45855-3-noralf@tronnes.org
</content>
</entry>
</feed>
