<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/drivers/gpu/drm/drm_mode_object.c, branch v4.18.8</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.18.8</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.18.8'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2017-11-10T03:50:47Z</updated>
<entry>
<title>drm/mode_object: fix documentation for object lookups.</title>
<updated>2017-11-10T03:50:47Z</updated>
<author>
<name>Dave Airlie</name>
<email>airlied@redhat.com</email>
</author>
<published>2017-11-08T23:35:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e7e62c7ef382f5db0de5e492e558efc9c3d60943'/>
<id>urn:sha1:e7e62c7ef382f5db0de5e492e558efc9c3d60943</id>
<content type='text'>
The lease updates missed a few bits of docs, fixed up
the wrong name on the property lookup fn as well.

Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Add four ioctls for managing drm mode object leases [v7]</title>
<updated>2017-10-25T06:31:30Z</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2017-03-17T00:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=62884cd386b876638720ef88374b31a84ca7ee5f'/>
<id>urn:sha1:62884cd386b876638720ef88374b31a84ca7ee5f</id>
<content type='text'>
drm_mode_create_lease

	Creates a lease for a list of drm mode objects, returning an
	fd for the new drm_master and a 64-bit identifier for the lessee

drm_mode_list_lesees

	List the identifiers of the lessees for a master file

drm_mode_get_lease

	List the leased objects for a master file

drm_mode_revoke_lease

	Erase the set of objects managed by a lease.

This should suffice to at least create and query leases.

Changes for v2 as suggested by Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;:

 * query ioctls only query the master associated with
   the provided file.

 * 'mask_lease' value has been removed

 * change ioctl has been removed.

Changes for v3 suggested in part by Dave Airlie &lt;airlied@gmail.com&gt;

 * Add revoke ioctl.

Changes for v4 suggested by Dave Airlie &lt;airlied@gmail.com&gt;

 * Expand on the comment about the magic use of &amp;drm_lease_idr_object
 * Pad lease ioctl structures to align on 64-bit boundaries

Changes for v5 suggested by Dave Airlie &lt;airlied@gmail.com&gt;

 * Check for non-negative object_id in create_lease to avoid debug
   output from the kernel.

Changes for v6 provided by Dave Airlie &lt;airlied@gmail.com&gt;

 * For non-universal planes add primary/cursor planes to lease

   If we aren't exposing universal planes to this userspace client,
   and it requests a lease on a crtc, we should implicitly export the
   primary and cursor planes for the crtc.

   If the lessee doesn't request universal planes, it will just see
   the crtc, but if it does request them it will then see the plane
   objects as well.

   This also moves the object look ups earlier as a side effect, so
   we'd exit the ioctl quicker for non-existant objects.

 * Restrict leases to crtc/connector/planes.

   This only allows leasing for objects we wish to allow.

Changes for v7 provided by Dave Airlie &lt;airlied@gmail.com&gt;

 * Check pad args are 0
 * Check create flags and object count are valid.
 * Check return from fd allocation
 * Refactor lease idr setup and add some simple validation
 * Use idr_mutex uniformly (Keith)

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Check mode object lease status in all master ioctl paths [v4]</title>
<updated>2017-10-25T06:31:30Z</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2017-04-10T04:35:34Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=7de440db20d4531e4b740bf17b56afc426c54377'/>
<id>urn:sha1:7de440db20d4531e4b740bf17b56afc426c54377</id>
<content type='text'>
Attempts to modify un-leased objects are rejected with an error.
Information returned about unleased objects is modified to make them
appear unusable and/or disconnected.

Changes for v2 as suggested by Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;:

 * With the change in the __drm_mode_object_find API to pass the
   file_priv along, we can now centralize most of the lease-based
   access checks in that function.

 * A few places skip that API and require in-line checks.

Changes for v3 provided by Dave Airlie &lt;airlied@redhat.com&gt;

 * remove support for leasing encoders.
 * add support for leasing planes.

Changes for v4

 * Only call drm_lease_held if DRIVER_MODESET.

Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Pass struct drm_file * to __drm_mode_object_find [v2]</title>
<updated>2017-10-12T00:03:04Z</updated>
<author>
<name>Keith Packard</name>
<email>keithp@keithp.com</email>
</author>
<published>2017-03-15T06:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=418da17214aca5ef5f0b6f7588905ee7df92f98f'/>
<id>urn:sha1:418da17214aca5ef5f0b6f7588905ee7df92f98f</id>
<content type='text'>
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.

v2: Also fix up vboxvideo driver in staging

[airlied: merging early as this is an API change]

Suggested-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Keith Packard &lt;keithp@keithp.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Make __drm_object_property_get_value() static</title>
<updated>2017-09-11T12:53:33Z</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2017-09-01T16:53:28Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8a50b9bd5679d5788f2f7add576fbd8e3ad6fed6'/>
<id>urn:sha1:8a50b9bd5679d5788f2f7add576fbd8e3ad6fed6</id>
<content type='text'>
Make __drm_object_property_get_value() static to fix the following
sparse warning:
drm_mode_object.c:250:5: warning: symbol '__drm_object_property_get_value' was not declared. Should it be static?

Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Fixes: 4a97a3da420b ("drm: Don't update property values for atomic drivers")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170901165328.24459-4-ville.syrjala@linux.intel.com
Reviewed-by: Thierry Reding &lt;treding@nvidia.com&gt;
</content>
</entry>
<entry>
<title>drm: Handle properties in the core for atomic drivers</title>
<updated>2017-08-08T12:45:09Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-07-25T12:02:04Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=144a7999d6334be5237d5926ab19c56bc24d0204'/>
<id>urn:sha1:144a7999d6334be5237d5926ab19c56bc24d0204</id>
<content type='text'>
The reason behind the original indirection through the helper
functions was to allow existing drivers to overwrite how they handle
properties. For example when a vendor-specific userspace had
expectations that didn't match atomic. That seemed likely, since
atomic is standardizing a _lot_ more of the behaviour of a kms driver.

But 20 drivers later there's no such need at all. Worse, this forces
all drivers to hook up the default behaviour, breaking userspace if
they forget to do that. And it forces us to export a bunch of core
function just for those helpers.

And finally, these helpers are the last places using
drm_atomic_legacy_backoff() and the implicit acquire_ctx.

This patch here just implements the new behaviour and updates the
docs. Follow-up patches will garbage-collect all the dead code.

v2: Fixup docs even better!

v3: Make it actually work ...

v4: Drop the uses_atomic_modeset() checks from the previous patch
again, since they're now moved up in the callchain.

Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Archit Taneja &lt;architt@codeaurora.org&gt; (v3)
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170725120204.2107-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Don't update property values for atomic drivers</title>
<updated>2017-08-08T12:11:53Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-07-25T12:01:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=4a97a3da420b82f967083a31fd80706e56ecabf9'/>
<id>urn:sha1:4a97a3da420b82f967083a31fd80706e56ecabf9</id>
<content type='text'>
Atomic drivers only use the property value store for immutable (i.e.
can't be set by userspace, but the kernel can still adjust it)
properties. The only tricky part is the removal of the update in
drm_atomic_helper_update_legacy_modeset_state().

This was added in

commit 8c10342cb48f3140d9abeadcfd2fa6625d447282 (tag: topic/drm-misc-2015-07-28)
Author: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Date:   Mon Jul 27 13:24:29 2015 +0200

    drm/atomic: Update legacy DPMS state during modesets, v3.

by copying it from the i915 code, where it was originally added in

commit 68d3472047a572936551f8ff0b6f4016c5a1fdef
Author: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Date:   Thu Sep 6 22:08:35 2012 +0200

    drm/i915: update dpms property in set_mode

for the legacy modeset code. The reason we needed this hack was that
i915 didn't yet set DRIVER_ATOMIC, and we checked for that instead of
the newer-ish drm_drv_uses_atomic_modeset(), which avoids such
troubles. With the correct feature checks this isn't needed anymore at
all.

Also make sure that drivers don't accidentally get this wrong by
making the exported version of drm_object_property_get_value() only
work for legacy drivers. Only gma500 uses it anyway.

v2: Fixup the uses_atomic_modeset() checks (Maarten)

Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Reviewed-by: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20170725120137.1903-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>Merge tag 'doc-4.11-images' of git://git.lwn.net/linux into drm-misc-next</title>
<updated>2017-03-14T14:07:33Z</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2017-03-14T14:07:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=b70366e5d31788650b2a5cec5cd13ea80ac7e44a'/>
<id>urn:sha1:b70366e5d31788650b2a5cec5cd13ea80ac7e44a</id>
<content type='text'>
Pointer for Markus's image conversion work.

We need this so we can merge all the pretty drm graphs for 4.12.

Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
</content>
</entry>
<entry>
<title>drm: Introduce drm_mode_object_{get,put}()</title>
<updated>2017-02-28T15:14:55Z</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2017-02-28T14:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=020a218f95bd3ceff7dd1022ff7ebc0497bc7bf9'/>
<id>urn:sha1:020a218f95bd3ceff7dd1022ff7ebc0497bc7bf9</id>
<content type='text'>
For consistency with other reference counting APIs in the kernel, add
drm_mode_object_get() and drm_mode_object_put() to reference count DRM
mode objects.

Compatibility aliases are added to keep existing code working. To help
speed up the transition, all the instances of the old functions in the
DRM core are already replaced in this commit.

A semantic patch is provided that can be used to convert all drivers to
the new helpers.

Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-3-thierry.reding@gmail.com
</content>
</entry>
<entry>
<title>drm: Rename drm_mode_object_get()</title>
<updated>2017-02-28T15:14:53Z</updated>
<author>
<name>Thierry Reding</name>
<email>treding@nvidia.com</email>
</author>
<published>2017-02-28T14:46:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=2135ea7aafa26b6bfbbd304459fdb624e82e021e'/>
<id>urn:sha1:2135ea7aafa26b6bfbbd304459fdb624e82e021e</id>
<content type='text'>
Subsequent patches will introduce reference counting APIs that are more
consistent with similar APIs throughout the Linux kernel. These APIs use
the _get() and _put() suffixes and will collide with this existing
function.

Rename the function to drm_mode_object_add() which is a slightly more
accurate description of what it does. Also the kerneldoc for this
function gives an indication that it's badly named because it doesn't
actually acquire a reference to anything.

Reviewed-by: Sean Paul &lt;seanpaul@chromium.org&gt;
Acked-by: Christian König &lt;christian.koenig@amd.com&gt;
Signed-off-by: Thierry Reding &lt;treding@nvidia.com&gt;
Link: http://patchwork.freedesktop.org/patch/msgid/20170228144643.5668-2-thierry.reding@gmail.com
</content>
</entry>
</feed>
