Re: [PATCH xserver] xf86-video-modesetting: Lease planes as well if using atomic

2018-07-03 Thread Adam Jackson
On Wed, 2018-06-27 at 10:41 +0100, Daniel Stone wrote:
> Hi,
> 
> On Wed, 27 Jun 2018 at 00:35, Keith Packard  wrote:
> > @@ -3251,6 +3251,9 @@ drmmode_create_lease(RRLeasePtr lease, int *fd)
> > 
> >  nobjects = ncrtc + noutput;
> > 
> > +if (ms->atomic_modeset)
> > +nobjects += ncrtc;
> 
> This seems like it definitely wants a comment as to why we add ncrtc
> twice (for the primary plane). But, with that (and no need to pass it
> through the list again):
> Reviewed-by: Daniel Stone 

Added such comment, and merged the series:

remote: I: patch #232471 updated using rev 
4a11f66e4690f9e94dc61cb264f5ef78dbdb255a.
remote: E: failed to find patch for rev 
d83efc47b7a524b4f8d4a993c27a3e402a98fa7c.
remote: I: 1 patch(es) updated to state Accepted.
To ssh://git.freedesktop.org/git/xorg/xserver
   2faf4cef8b..d83efc47b7  master -> master

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] xf86-video-modesetting: Lease planes as well if using atomic

2018-06-27 Thread Daniel Stone
Hi,

On Wed, 27 Jun 2018 at 00:35, Keith Packard  wrote:
> @@ -3251,6 +3251,9 @@ drmmode_create_lease(RRLeasePtr lease, int *fd)
>
>  nobjects = ncrtc + noutput;
>
> +if (ms->atomic_modeset)
> +nobjects += ncrtc;

This seems like it definitely wants a comment as to why we add ncrtc
twice (for the primary plane). But, with that (and no need to pass it
through the list again):
Reviewed-by: Daniel Stone 

Cheers,
Daniel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver] xf86-video-modesetting: Lease planes as well if using atomic

2018-06-26 Thread Keith Packard
If we're using atomic modesetting, then we're also using universal
planes, and so the lease we create needs to include the plane.

Signed-off-by: Keith Packard 
---
 hw/xfree86/drivers/modesetting/drmmode_display.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c 
b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 859a21a9d..dbb885e8e 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -3251,6 +3251,9 @@ drmmode_create_lease(RRLeasePtr lease, int *fd)
 
 nobjects = ncrtc + noutput;
 
+if (ms->atomic_modeset)
+nobjects += ncrtc;
+
 if (nobjects == 0)
 return BadValue;
 
@@ -3267,12 +3270,14 @@ drmmode_create_lease(RRLeasePtr lease, int *fd)
 
 i = 0;
 
-/* Add CRTC ids */
+/* Add CRTC and plane ids */
 for (c = 0; c < ncrtc; c++) {
 xf86CrtcPtr crtc = lease->crtcs[c]->devPrivate;
 drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
 
 objects[i++] = drmmode_crtc->mode_crtc->crtc_id;
+if (ms->atomic_modeset)
+objects[i++] = drmmode_crtc->plane_id;
 }
 
 /* Add connector ids */
-- 
2.17.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel