Greg Kroah-Hartman writes:
> 4.19-stable review patch. If anyone has any objections, please let me
> know.
Acked-by: Keith Packard
--
-keith
signature.asc
Description: PGP signature
Jason Ekstrand writes:
> Yeah, I suppose an application could ask for 10k frames in the future or
> something ridiculous like that. For sync_file, people strongly want a
> finite time guarantee for security/deadlock reasons. I don't know how
> happy they would be with a finite time of 10 minute
Jason Ekstrand writes:
> Is the given sequence number guaranteed to be hit in finite time?
Certainly, it's a finite value...
However, realistically, it's just like all of the other vblank
interfaces where you can specify a crazy sequence and block for a very
long time. So, no different from the
(This is an RFC on whether this pair of ioctls seems reasonable. The
code compiles, but I haven't tested it as I'm away from home this
weekend.)
I'm rewriting my implementation of the Vulkan EXT_display_control
extension, which provides a way to signal a Vulkan fence at vblank
time. I had implemen
-by: Keith Packard
---
drivers/gpu/drm/drm_file.c | 5 +
drivers/gpu/drm/drm_internal.h | 4 +
drivers/gpu/drm/drm_ioctl.c| 2 +
drivers/gpu/drm/drm_syncobj.c | 13 ++-
drivers/gpu/drm/drm_vblank.c | 212 +
include/drm/drm_file.h
Kees Cook writes:
> Instead of kmalloc() with manually calculated values followed by
> multiple strcpy()/strcat() calls, just fold it all into a single
> kasprintf() call.
>
> Signed-off-by: Kees Cook
Reviewed-by: Keith Packard
--
-keith
signature.asc
Description: PGP signature
Tom Lendacky writes:
> A similar fix was already in the cryptodev tree and I thought was part of
> a recent pull request.
Yup, just saw it on master. I've checked and it will do pretty much the
same thing as my patch, with the addition of clearing
cur_rng_set_by_user, which is necessary. Thanks
hang.
Signed-off-by: Keith Packard
---
drivers/char/hw_random/core.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c
index 657b8770b6b9..8df3f9f147e2 100644
--- a/drivers/char/hw_random/core.c
+++ b/drivers/char
Daniel Vetter writes:
> On Thu, Jan 18, 2018 at 05:51:59PM -0800, Keith Packard wrote:
>> Don't let a lessee control what the current DRM master is set to;
>> that's the job of the "real" master. Otherwise, the lessee would
>> disable all access to master
"Gustavo A. R. Silva" writes:
> Assign true or false to boolean variables instead of an integer value.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva
Reviewed-by: Keith Packard
--
-keith
signature.asc
Description: PGP signature
Don't let a lessee control what the current DRM master is set to;
that's the job of the "real" master. Otherwise, the lessee would
disable all access to master operations for the owner and all lessees
under it.
This matches the same check made in the SET_MASTER ioctl.
s are not filled in until the
parameters are all validated and the function will succeed.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_lease.c | 22 +++---
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/drm_lease.c b/drivers/gpu/drm/drm_le
pdate_edid_property about
potentially merging that with drm_add_edid_modes to avoid
the need for two driver calls.
Signed-off-by: Keith Packard
Reviewed-by: Daniel Vetter
---
drivers/gpu/drm/drm_connector.c | 13 ++
drivers/gpu
e_edid_property taking a 'const struct edid *'
parameter and wanting to pass that along to drm_add_display_info.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_connector.c | 13 ++
drivers/gpu/drm/drm_edid.c | 53 ++---
include/drm
From: Dave Airlie
We don't want fbcon to get used on non-desktop dislays,
don't pass them as enabled connectors to the fb helper setup.
This prevents my HMD from getting disorted fbcon, and from
affecting other displays console.
v2: Change description from non-standard to non-desktop
Signed-of
This is the same as the series for non-standard displays but uses the
phrase 'non-desktop' instead. No functional changes.
From: Dave Airlie
This uses the EDID info from my HTC Vive to mark it as
non-desktop.
v2: Change description from non-standard to non-desktop
Signed-off-by: Dave Airlie
---
drivers/gpu/drm/drm_edid.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/g
From: Dave Airlie
This adds the infrastructure needed to quirk displays
using edid and to mark them a non-desktop.
A non-desktop display is one which shouldn't normally be included
as a part of a desktop environment.
This is meant to cover head mounted devices like HTC Vive.
v2: Change descrip
Sean Paul writes:
> nit: space before ,
Thanks.
>> +/* Clone the lessor file to create a new file for us */
>> +DRM_DEBUG_LEASE("Allocating lease file\n");
>> +path_get(&lessor_file->f_path);
>
> Please forgive the stupid question, but where is this reference given
> up?
That's not
Sean Paul writes:
> With these nits fixed,
> Reviewed-by: Sean Paul
Like this?
From 0aa52dd5a0873831c79c14942075354c041e5bed Mon Sep 17 00:00:00 2001
From: Keith Packard
Date: Mon, 16 Oct 2017 13:41:20 -0700
Subject: [PATCH] drm: Mark functions requiring idr_mutex. Add lock
Daniel Vetter writes:
> A bit lacking time to do an in-depth review, but all my major concerns
> seem to be addressed. On the series.
Thanks much.
I sent out a note over the weekend about how we can make the Vulkan API
work without the permissions change in the kernel. We need to provide
access
Sean Paul writes:
> Sphinx won't pick these up, and will issue warnings. Please update to @
> instead of \param
>
> If you want to try it out:
> make htmldocs
Yeah, I was attempting to emulate the existing style. I suggest that a
general cleanup to fix the docstrings should be in a separate patc
d by
removing all of the objects they have access to. The lease itself
hangs around as it's hanging off a file.
* Free the leases IDR when the master is destroyed
* _drm_lease_held should look at lessees, not lessor
* Allow non-master files to check for lease status
Changes in v
Separate out lease debugging from the core.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_drv.c | 3 ++-
include/drm/drmP.h| 4
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index c0292e5d7281
New since last time:
* Don't lease encoders
* Do lease planes
* Automatically lease primary and cursor planes for
apps which don't set universal_planes
* Restrict leases to only contain objects which
are actually leasable (connectors, crtcs and planes)
* Drop the patch which changes per
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
* remove support for leasing encoders.
* add support for leasing planes.
Signed-off-by: Keith Packard
From: Dave Airlie
In order to implement plane leasing we need to count things,
just make the code consistent with the counting code currently
used for counting crtcs/encoders/connectors and drop the need
for num_overlay_planes.
v2: don't forget to assign plane_ptr. (keithp)
Signed-off-by: Dave
s 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.
Signed-off-by: Keith Packard
Signed-off-by: Dave
for MODESETTING before looking for crtc in queue_vblank_event
UMS drivers will oops if we try to get a crtc, so make sure
we're modesetting before we try to find a crtc_id to fill into
the event.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_atomic.c
This series removes portions of the first patch which switched to
ktime_t as Arnd Bergmann posted a cleaner patch which did only
that. Otherwise, it's the same.
-keith
the switch to ktime_t parts.
Suggested-by: Michel Dänzer
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_vblank.c | 104 +--
include/drm/drm_vblank.h | 10 +++--
2 files changed, 78 insertions(+), 36 deletions(-)
re
that of the first pixel leaving the display engine for
the display (using the same wording as the Vulkan spec).
Suggested-by: Michel Dänzer
Acked-by: Dave Airlie
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_internal.h | 6 ++
drivers/gpu/drm/drm_ioctl.c| 2 +
drive
Daniel Vetter writes:
> One more that came up on irc after discussion why this is needed: The
> userspace side using this won't work on split gpus where the render node
> has 0 displays, and hence where you really need to query the compositor
> anyway.
Agreed -- using the X connection to get the
Daniel Vetter writes:
> So given the huge possibilities of abuse, do we really, really need all
> this, and is there not any way to create a bit of protocol to pass the
> relevant data from X to clients? From your presentation is sounded like
> current xrandr is (almost) there ...
Yeah, it's the
tch is better than the portion of my patch which does the same
thing as it uses the ktime APIs consistently and doesn't assume that
ktime_t is in ns. Thanks much!
Reviewed-by: Keith Packard
--
-keith
signature.asc
Description: PGP signature
Sean Paul writes:
> Would it be easier for you to respin this into your series, or for me
> to just apply it to drm-misc-next?
Yeah, I don't see any particular hurry to getting just the time widening
patch merged as it doesn't change any external interfaces. I'll go ahead
and respin my series us
Sean Paul writes:
> It looks like perhaps Keith missed one of the comment tweaks that you have
> below.
>
> Keith, perhaps you can rebase your widening patch on this one?
I'm easy; either order works for me just fine. Having the time
change separated from the sequence change might be nice?
--
Arnd Bergmann writes:
> That is an interesting coincidence, I created my patch earlier this week
> without having any idea that others were looking at the same files.
My requirements were to support 64-bit vblank counts and ns precision
vblank timing for Vulkan; obviously using ktime_t was a goo
for MODESETTING before looking for crtc in queue_vblank_event
UMS drivers will oops if we try to get a crtc, so make sure
we're modesetting before we try to find a crtc_id to fill into
the event.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_atomic.c |
count as before.
* Leave driver API with 32-bit vblank count
Suggested-by: Michel Dänzer
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_vblank.c | 214 +++
include/drm/drm_drv.h| 2 +-
include/drm/drm_vblank.h
d by
removing all of the objects they have access to. The lease itself
hangs around as it's hanging off a file.
* Free the leases IDR when the master is destroyed
* _drm_lease_held should look at lessees, not lessor
* Allow non-master files to check for lease status
Changes in v
lign on 64-bit boundaries
Changes for v5 suggested by Dave Airlie
* Check for non-negative object_id in create_lease to avoid debug
output from the kernel.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_ioctl.c | 4 +
drivers/gpu/drm/drm_
Separate out lease debugging from the core.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_drv.c | 3 ++-
include/drm/drmP.h| 4
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index c0292e5d7281
, 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.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_auth.c| 2 +-
drivers/gpu/drm/drm_connector.c | 5 +++--
drivers/gpu/drm/drm_encoder.c | 8
New since last time:
* Fix vboxvideo driver in staging
* Fixed some formatting and whitespace errors (Dave Airlie)
* Explain the odd use of the idr interface for leases (Dave Airlie)
* Disallow negative object_id in lease creation (Dave Airlie)
It's also been rebased on top of the drm-sequenc
This allows an application to discover what display resources are
available before requesting a lease from the X server.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_ioctl.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm
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
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
---
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16
re
that of the first pixel leaving the display engine for
the display (using the same wording as the Vulkan spec).
Suggested-by: Michel Dänzer
Acked-by: Dave Airlie
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_internal.h | 6 ++
drivers/gpu/drm/drm_ioctl.c| 2 +
drive
This version removes the FIRST_PIXEL_OUT flag as the existing code
already conforms to that requirement. It has also been rebased to
drm-next.
Dave Airlie writes:
>> +*/
>> + ret = idr_alloc(&leases, &drm_lease_idr_object , object_id,
>> object_id + 1, GFP_KERNEL);
>
> In current kernels, the idr_alloc warns if start < 0, so if object_id
> is a negative signed integer, which your
> igt tests actually make
Daniel Vetter writes:
> I just figured that -modesetting would be the simplest domenstration
> vehicle, since the vulkan patches don't look ready yet. I need fully
> reviewed&tested userspace before we can land any kernel stuff. Doing
> the quick modesetting conversion would unblock.
I've provid
Dave Airlie writes:
> I think a comment in here is definitely warranted with what you expect
> from the idr interface here.
I've added a longer comment where this value is used; I tried replacing
the IDR with a sorted array and the result wasn't any easier to use or
understand. I'm pretty sure i
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
---
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16
drivers/gpu/drm/amd/amdgpu/dce_virtual.c
d by
removing all of the objects they have access to. The lease itself
hangs around as it's hanging off a file.
* Free the leases IDR when the master is destroyed
* _drm_lease_held should look at lessees, not lessor
* Allow non-master files to check for lease status
Changes in v
This allows an application to discover what display resources are
available before requesting a lease from the X server.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_ioctl.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm
lign on 64-bit boundaries
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_ioctl.c | 4 +
drivers/gpu/drm/drm_lease.c | 277
include/drm/drm_lease.h | 12 ++
include/uapi/drm/drm.h | 5 +
include/uapi/drm/drm_mode.h | 66 +++
5 file
Separate out lease debugging from the core.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_drv.c | 3 ++-
include/drm/drmP.h| 4
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 2ed2d919beae
Here's another version of the DRM lease series. No changes in the code
at all:
[PATCH 4/6] drm: Add drm_object lease infrastructure [v4]
Changes in v4, suggested by Dave Airlie
* Formatting and whitespace changes
[PATCH 6/6] drm: Add four ioctls for managing drm mode object leas
, 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.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_auth.c| 2 +-
drivers/gpu/drm/drm_connector.c | 5 +++--
drivers/gpu/drm/drm_encoder.c | 8
Daniel Vetter writes:
> Subject is a bit confusing since you say uapi, but this is just the
> internal prep work. Dropping UAPI fixes that. With that fixed:
Yeah, thanks.
> Reviewed-by: Daniel Vetter
Added.
> Two more optional comments below, feel free to adapt or ignore. I'll wait
> for Mic
Michel Dänzer writes:
> [...]
>
>> +#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x0002 /* Use
>> next sequence if we've missed */
>
> Do you have userspace making use of DRM_CRTC_SEQUENCE_NEXT_ON_MISS? If
> not, drop it.
I added this so that the new ioctl would be compatible wi
Daniel Vetter writes:
> Since I missed all the details Michel spotted, so I'll defer to his r-b.
> Also, before merging we need the userspace user. Do we have e.g.
> -modesetting patch for this, fully reviewed&ready for merging, just as
> demonstration?
Well, given that we'll have to keep the ol
Here's an updated series for the proposed new IOCTLs. Major changes
since last time:
* Leave driver API with 32-bit vblank counts
* Use ktime_t instead of struct timespec.
* Check for MODESETTING before using modesetting APIs
* Ensure vblank is running in new get_sequence ioctl
There are othe
nce ioctls
Daniel Vetter prefers these over the old drm_vblank_put/get
APIs.
* Return s64 ns instead of u64 in new sequence event
Suggested-by: Daniel Vetter
Suggested-by: Ville Syrjälä
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_internal.h | 6 ++
drivers/gpu/drm/d
count as before.
* Leave driver API with 32-bit vblank count
Suggested-by: Michel Dänzer
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_vblank.c | 186 +--
include/drm/drmP.h | 2 +-
include/drm/drm_drv.h
for MODESETTING before looking for crtc in queue_vblank_event
UMS drivers will oops if we try to get a crtc, so make sure
we're modesetting before we try to find a crtc_id to fill into
the event.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_atomic.c |
Daniel Vetter writes:
> I'd drop that part (but keep 64 everywhere else ofc).
Yeah, we only ever ask drivers for a delta anyways, so keeping an
internal 64-bit value while retaining the 32-bit driver API is
easy to manage.
>> > Other thought on this, since you bother to change all the types: Af
Ville Syrjälä writes:
> With the disable_immediate thing we only wait until the next vblank
> before disabling the irq again.
Ok, still sounds like we'll be doing fine if the application does a
get immediately followed by a queue event. At least most of the time.
--
-keith
signature.asc
Desc
Ville Syrjälä writes:
> I was mostly thinking of the 'seq = query(); wait(seq + n);' pattern
> where we can avoid doing the full update more than once if we enable
> the interrupt already during the query.
Don't we still wait 5 seconds before disabling vblank? In that case, the
chances of hittin
Ville Syrjälä writes:
> Maybe, or maybe we want to turn the interrupt on in that case? That's
> what the old ioctl does.
That's what I suggested in my reply to Daniel's review. Even if we add
the accurate function, we'll still need the interrupt-enable case as a
fallback for drivers which don't
Daniel Vetter writes:
> I very much like this since the old ioctl really is a rather bad horror
> show. And since it's tied in with ums drivers everything is
> complicated.
Thanks for your kind words.
> I started a discussion a while back whether these should be restricted to
> DRM_MASTER (i.e.
Daniel Vetter writes:
> A few nits below, but looks good otherwise.
Thanks.
>> static struct drm_pending_vblank_event *create_vblank_event(
>> -struct drm_device *dev, uint64_t user_data)
>> +struct drm_device *dev, struct drm_crtc *crtc, uint64_t
>> user_data)
>
> Nit
Michel Dänzer writes:
> BTW, this got me thinking that we should probably treat
> _DRM_VBLANK_NEXTONMISS the same way, i.e. clear the flag after updating
> vblwait->request.sequence. Otherwise there could theoretically (though
> unlikely) be an infinite loop:
I was thinking that we should just r
Michel Dänzer writes:
> Subtle breakage here: vblwait->request.sequence must still get updated
> for _DRM_VBLANK_RELATIVE, in case we're interrupted by a signal.
Thanks for finding this.
I think it might be better to just not modify the request.type field
instead, so that on re-entry it gets re
Daniel Vetter writes:
> Extending the reported/sw vblank counter to u64 makes sense imo, but do we
> have to extend the driver interfaces too? If there's no 64 bit hw vblank
> currently I think I'd be good to postpone that part, simply because I'm
> too lazy to audit all the drivers for correctly
Dave Airlie writes:
> I think this needs a pad ^.
> And this.
Yup. Thanks!
>> +struct drm_mode_revoke_lease {
>> + /** Unique ID of lessee
>> +*/
>> + __u32 lessee_id;
>
> And this.
None of the other bare 32-bit ioctl structures are padded; I think
that's probably fine as
Here's a third version of my DRM mode object leases series. Since v2:
* Add revocation. This allows leases to be effectively revoked by
removing all of the objects they have access to. The lease itself
hangs around as it's hanging off a file.
* Allow non-master files to lo
Separate out lease debugging from the core.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_drv.c | 3 ++-
include/drm/drmP.h| 4
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index b5c6bb46a425
lease' value has been removed
* change ioctl has been removed.
Changes for v3 suggested in part by Dave Airlie
* Add revoke ioctl.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_ioctl.c | 4 +
drivers/gpu/drm/drm_lease.c | 270
i
, 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.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_auth.c| 2 +-
drivers/gpu/drm/drm_connector.c | 5 +++--
drivers/gpu/drm/drm_encoder.c | 8
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
---
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16
drivers/gpu/drm/amd/amdgpu/dce_virtual.c
This allows an application to discover what display resources are
available before requesting a lease from the X server.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_ioctl.c | 20 ++--
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm
d by
removing all of the objects they have access to. The lease itself
hangs around as it's hanging off a file.
* Free the leases IDR when the master is destroyed
* _drm_lease_held should look at lessees, not lessor
* Allow non-master files to check for lease status
Signed-off-by:
, rather than when delievered. This way, delivery doesn't
need to have the crtc ID available.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_atomic.c | 7 ---
drivers/gpu/drm/drm_plane.c | 2 +-
drivers/gpu/drm/drm_vblank.c | 27 ---
dr
necessary to widen that value
was already included to handle devices returning fewer than 32-bits.
This will provide the necessary datatypes for the Vulkan API.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
drivers
These provide crtc-id based functions instead of pipe-number, while
also offering higher resolution time (ns) and wider frame count (64)
as required by the Vulkan API.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_internal.h | 6 ++
drivers/gpu/drm/drm_ioctl.c| 2 +
drivers/gpu
This patch series provides a new interface which fixes three issues
with the current VBLANK_WAIT ioctl:
1) CRTC indices to select a target.
2) 32-bits of count resolution.
3) Microsecond time resolution.
The first makes it quite difficult to use this interface from a leased
DRM device; without
ned-off-by: Keith Packard
---
drivers/gpu/drm/drm_ioctl.c | 3 +
drivers/gpu/drm/drm_lease.c | 220
include/drm/drm_lease.h | 9 ++
include/uapi/drm/drm.h | 3 +
include/uapi/drm/drm_mode.h | 55 +++
5 files changed, 290 insertion
e controlled by the lessor; the
'mask_lease' flag has been removed
* Checking for leased status has been simplified, replacing
the drm_lease_check function with drm_lease_held.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/Makefile
, 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.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_auth.c| 2 +-
drivers/gpu/drm/drm_connector.c | 8 +++---
drivers/gpu/drm/drm_encoder.c | 8
Separate out lease debugging from the core.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/drm_drv.c | 3 ++-
include/drm/drmP.h| 4
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 6594b4088f11
This will allow __drm_mode_object_file to be extended to perform
access control checks based on the file in use.
Suggested-by: Daniel Vetter
Signed-off-by: Keith Packard
---
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 16
drivers/gpu/drm/amd/amdgpu/dce_virtual.c
Here's a second try at mode resource leasing. The differences from v1
are mostly deleting functionality that isn't currently useful.
There are no more sub-leases; there's the owner, the owner is the only
lessor and so the only one who can create leases and hand those out.
The lessor can now manip
Daniel Vetter writes:
> I think it'd be good if we could consolidate all the lease checking into
> drm_mode_object_find (respectively __drm_mode_object_find). We'd need to
> wire up the fpriv to be able to do that, but we could upstream that patch
> right away before anything else. That should ta
Daniel Vetter writes:
> On Sat, Apr 01, 2017 at 10:08:39AM -0700, Keith Packard wrote:
>> +BUG_ON(__mutex_owner(&master->dev->mode_config.idr_mutex) != current);
>
> Forgot to reply on this:
>
> lockdep_assert_held + enable lockdep.
Thanks. Will fix.
--
-ke
Daniel Vetter writes:
> Should we just use fd for this? Essentially lessors would be required to
> keep track of all their pending leases, and just dup() them over to the
> client. Would reduce the uapi scope a bit, and if a lessor can't keep
> track of it's leases there's a problem.
Right now,
Daniel Vetter writes:
> I think it'd be good if we could consolidate all the lease checking into
> drm_mode_object_find (respectively __drm_mode_object_find). We'd need to
> wire up the fpriv to be able to do that, but we could upstream that patch
> right away before anything else. That should ta
Daniel Vetter writes:
> Still not sure we want to restrict objects on the lessor side. Feels like
> unecessary complexity (i.e. more bugs in kernel, that's never good), and
> at best only needed for lessors who can't keep track of stuff.
It's been useful when hacking existing code, and will help
leased objects for a particular lessee
drm_mode_change_lease
Adjust the terms of a lease, adding or removing resources or
switching from masking to non-masking.
This should suffice to at least create, query and manage available
leases.
Signed-off-by: Keith Packard
---
drivers/gpu
leasing objects from an owner (either
directly, or indirectly through another lessee), can be searched from
an idr in the drm_master of the owner.
Signed-off-by: Keith Packard
---
drivers/gpu/drm/Makefile| 3 +-
drivers/gpu/drm/drm_auth.c | 22 +-
drivers/gpu/drm/drm_lease.c | 485 +
1 - 100 of 185 matches
Mail list logo