<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/xserver.git/hw/xfree86, branch master</title>
<subtitle>gitlab.freedesktop.org: xorg/xserver.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/'/>
<entry>
<title>modesetting: Support accurate DRI presentation timing with TearFree</title>
<updated>2023-03-01T06:43:37+00:00</updated>
<author>
<name>Sultan Alsawaf</name>
<email>sultan@kerneltoast.com</email>
</author>
<published>2023-02-15T03:41:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=53b02054f36a49bd45e954f0eef1029152af78b7'/>
<id>53b02054f36a49bd45e954f0eef1029152af78b7</id>
<content type='text'>
When using TearFree, DRI clients have no way of accurately knowing when
their copied pixmaps appear on the display without utilizing the kernel
driver's notification indicating that the TearFree flip containing their
pixmap is complete. This is because the target CRTC's MSC can change while
the predicted completion MSC is calculated and even while the page flip
IOCTL is sent to the kernel due to scheduling delays and/or unfortunate
timing. Even worse, a page flip isn't actually guaranteed to be finished
after one vblank; it may be several MSCs until a flip actually finishes
depending on delays and load in hardware.

As a result, DRI clients may be off by one or more MSCs when they naively
expect their pixmaps to be visible at MSC+1 with TearFree enabled. This,
for example, makes it impossible for DRI clients to achieve precise A/V
synchronization when TearFree is enabled.

This change therefore adds a way for DRI clients to receive a notification
straight from the TearFree flip-done handler to know exactly when their
pixmaps appear on the display. This is done by checking for a NULL pixmap
pointer to modesetting's DRI flip routine, which indicates that the DRI
client has copied its pixmap and wants TearFree to send a notification when
the copied pixmap appears on the display as part of a TearFree flip. The
existing PageFlip scaffolding is reused to achieve this with minimal churn.

The Present extension will be updated in an upcoming change to utilize this
new mechanism for DRI clients' presentations.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Acked-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When using TearFree, DRI clients have no way of accurately knowing when
their copied pixmaps appear on the display without utilizing the kernel
driver's notification indicating that the TearFree flip containing their
pixmap is complete. This is because the target CRTC's MSC can change while
the predicted completion MSC is calculated and even while the page flip
IOCTL is sent to the kernel due to scheduling delays and/or unfortunate
timing. Even worse, a page flip isn't actually guaranteed to be finished
after one vblank; it may be several MSCs until a flip actually finishes
depending on delays and load in hardware.

As a result, DRI clients may be off by one or more MSCs when they naively
expect their pixmaps to be visible at MSC+1 with TearFree enabled. This,
for example, makes it impossible for DRI clients to achieve precise A/V
synchronization when TearFree is enabled.

This change therefore adds a way for DRI clients to receive a notification
straight from the TearFree flip-done handler to know exactly when their
pixmaps appear on the display. This is done by checking for a NULL pixmap
pointer to modesetting's DRI flip routine, which indicates that the DRI
client has copied its pixmap and wants TearFree to send a notification when
the copied pixmap appears on the display as part of a TearFree flip. The
existing PageFlip scaffolding is reused to achieve this with minimal churn.

The Present extension will be updated in an upcoming change to utilize this
new mechanism for DRI clients' presentations.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Acked-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>modesetting: Ensure vblank events always run in sequential order</title>
<updated>2023-03-01T06:43:37+00:00</updated>
<author>
<name>Sultan Alsawaf</name>
<email>sultan@kerneltoast.com</email>
</author>
<published>2023-01-26T02:06:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=9d1997f72aa431612961cba0e4c2cbf40c07f7c4'/>
<id>9d1997f72aa431612961cba0e4c2cbf40c07f7c4</id>
<content type='text'>
It is possible for vblank events to run out of order with respect to one
another because the event which was queued to the kernel has the privilege
of running before all other events are handled. This allows kernel-queued
events to run before other, older events which should've run first.

Although this isn't a huge problem now, it will become more problematic
after the next change which ties DRI client notifications to TearFree page
flips. This increases the likelihood of DRI clients erroneously receiving
presentation-completion notifications out of order; i.e., a client could
receive a notification for a newer pixmap it submitted *before* receiving a
notification for an older pixmap.

Ensure vblank events always run in sequential order by removing the bias
towards kernel-queued events, and therefore forcing them to run at their
sequential position in the queue like other events.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is possible for vblank events to run out of order with respect to one
another because the event which was queued to the kernel has the privilege
of running before all other events are handled. This allows kernel-queued
events to run before other, older events which should've run first.

Although this isn't a huge problem now, it will become more problematic
after the next change which ties DRI client notifications to TearFree page
flips. This increases the likelihood of DRI clients erroneously receiving
presentation-completion notifications out of order; i.e., a client could
receive a notification for a newer pixmap it submitted *before* receiving a
notification for an older pixmap.

Ensure vblank events always run in sequential order by removing the bias
towards kernel-queued events, and therefore forcing them to run at their
sequential position in the queue like other events.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>modesetting: Introduce ms_tearfree_is_active_on_crtc helper</title>
<updated>2023-03-01T06:43:37+00:00</updated>
<author>
<name>Sultan Alsawaf</name>
<email>sultan@kerneltoast.com</email>
</author>
<published>2023-02-15T03:30:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=18b14ea1f68b0acac4bfb48d51e749db4ec417e4'/>
<id>18b14ea1f68b0acac4bfb48d51e749db4ec417e4</id>
<content type='text'>
There is more than one place with the confusing TearFree state check for a
CRTC. Instead of open-coding the TearFree check everywhere, introduce a
helper, ms_tearfree_is_active_on_crtc, to cover the TearFree state checks.

Suggested-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is more than one place with the confusing TearFree state check for a
CRTC. Instead of open-coding the TearFree check everywhere, introduce a
helper, ms_tearfree_is_active_on_crtc, to cover the TearFree state checks.

Suggested-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>modesetting: Improve TearFree state check in ms_present_check_flip</title>
<updated>2023-03-01T06:43:37+00:00</updated>
<author>
<name>Sultan Alsawaf</name>
<email>sultan@kerneltoast.com</email>
</author>
<published>2023-01-23T05:02:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=8b5fd556582ba040aad5beeeb4c024e5dae40eba'/>
<id>8b5fd556582ba040aad5beeeb4c024e5dae40eba</id>
<content type='text'>
Check that the VT is owned and that the CRTC is on before exporting info to
Present stating that TearFree is available. Also, since `trf-&gt;buf[0].px` is
checked, the `ms-&gt;drmmode.tearfree_enable` check is redundant and can
therefore be removed.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Check that the VT is owned and that the CRTC is on before exporting info to
Present stating that TearFree is available. Also, since `trf-&gt;buf[0].px` is
checked, the `ms-&gt;drmmode.tearfree_enable` check is redundant and can
therefore be removed.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>modesetting: Fix memory leak on ms_do_pageflip error</title>
<updated>2023-03-01T06:43:37+00:00</updated>
<author>
<name>Sultan Alsawaf</name>
<email>sultan@kerneltoast.com</email>
</author>
<published>2023-01-23T04:59:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=35975d90546931de10b014a222a6051f34c62e57'/>
<id>35975d90546931de10b014a222a6051f34c62e57</id>
<content type='text'>
The event allocation for ms_do_pageflip is leaked on error because callers
of ms_do_pageflip have no way of knowing whether or not a page flip
succeeded for any CRTCs. If a page flip succeeded for at least one CRTC,
then it's not safe for the caller to free the event allocation, and the
allocation won't be leaked. The event allocation is only leaked when not a
single CRTC's page flip succeeded.

Since all callers of ms_do_pageflip allocate the event pointer, and all of
them intentionally leak the event allocation when ms_do_pageflip returns an
error, just free the event pointer inside ms_do_pageflip when a page flip
doesn't succeed for any CRTC.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The event allocation for ms_do_pageflip is leaked on error because callers
of ms_do_pageflip have no way of knowing whether or not a page flip
succeeded for any CRTCs. If a page flip succeeded for at least one CRTC,
then it's not safe for the caller to free the event allocation, and the
allocation won't be leaked. The event allocation is only leaked when not a
single CRTC's page flip succeeded.

Since all callers of ms_do_pageflip allocate the event pointer, and all of
them intentionally leak the event allocation when ms_do_pageflip returns an
error, just free the event pointer inside ms_do_pageflip when a page flip
doesn't succeed for any CRTC.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>modesetting: Pass CRTC pointer to TearFree flip handlers</title>
<updated>2023-03-01T06:43:37+00:00</updated>
<author>
<name>Sultan Alsawaf</name>
<email>sultan@kerneltoast.com</email>
</author>
<published>2023-01-23T04:57:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=be864d8e185fe9e699fa661e70e02b319384dee6'/>
<id>be864d8e185fe9e699fa661e70e02b319384dee6</id>
<content type='text'>
The CRTC pointer will soon be needed in the TearFree flip handlers, so pass
it in instead of passing in drmmode_tearfree_ptr.

No functional change.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The CRTC pointer will soon be needed in the TearFree flip handlers, so pass
it in instead of passing in drmmode_tearfree_ptr.

No functional change.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>modesetting: Pass reference CRTC pointer to ms_do_pageflip</title>
<updated>2023-03-01T06:43:37+00:00</updated>
<author>
<name>Sultan Alsawaf</name>
<email>sultan@kerneltoast.com</email>
</author>
<published>2023-01-22T22:58:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=1fd9d79ae0dac5ae5f84f8012aa2764fcb777ea1'/>
<id>1fd9d79ae0dac5ae5f84f8012aa2764fcb777ea1</id>
<content type='text'>
Rather than passing the reference CRTC's vblank pipe to ms_do_pageflip,
just pass the pointer to the reference CRTC directly instead. This is
clearer and more useful than the vblank pipe, since the vblank pipe is only
used to identify whether or not a given CRTC is the reference CRTC.

No functional change.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than passing the reference CRTC's vblank pipe to ms_do_pageflip,
just pass the pointer to the reference CRTC directly instead. This is
clearer and more useful than the vblank pipe, since the vblank pipe is only
used to identify whether or not a given CRTC is the reference CRTC.

No functional change.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>modesetting: Remove redundant GLAMOR_HAS_GBM #ifdef from ms_do_pageflip</title>
<updated>2023-03-01T06:43:37+00:00</updated>
<author>
<name>Sultan Alsawaf</name>
<email>sultan@kerneltoast.com</email>
</author>
<published>2023-01-22T22:56:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=7288b4d1051a4902384fa2b3c12cacbd3caf04b0'/>
<id>7288b4d1051a4902384fa2b3c12cacbd3caf04b0</id>
<content type='text'>
This #ifdef is redundant since ms_do_pageflip is already enclosed within a
larger GLAMOR_HAS_GBM #ifdef.

No functional change.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This #ifdef is redundant since ms_do_pageflip is already enclosed within a
larger GLAMOR_HAS_GBM #ifdef.

No functional change.

Signed-off-by: Sultan Alsawaf &lt;sultan@kerneltoast.com&gt;
Reviewed-by: Martin Roukala &lt;martin.roukala@mupuf.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove "All rights reserved" from Oracle copyright notices</title>
<updated>2023-02-25T17:40:41+00:00</updated>
<author>
<name>Alan Coopersmith</name>
<email>alan.coopersmith@oracle.com</email>
</author>
<published>2023-02-25T17:40:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=d6b20f5e36591e7719b38359d46003425ff3eab8'/>
<id>d6b20f5e36591e7719b38359d46003425ff3eab8</id>
<content type='text'>
Oracle no longer includes this term in our copyright &amp; license notices.

Signed-off-by: Alan Coopersmith &lt;alan.coopersmith@oracle.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Oracle no longer includes this term in our copyright &amp; license notices.

Signed-off-by: Alan Coopersmith &lt;alan.coopersmith@oracle.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add DRM platform for BSD</title>
<updated>2023-02-23T15:47:19+00:00</updated>
<author>
<name>Austin Shafer</name>
<email>ashafer@nvidia.com</email>
</author>
<published>2022-03-17T16:49:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/xserver.git/commit/?id=5468123822bbe8cd0a0abe07bbbd3a9cb14ed2cb'/>
<id>5468123822bbe8cd0a0abe07bbbd3a9cb14ed2cb</id>
<content type='text'>
This moves lnx_platform.c to the shared directory and adds it to
the BSD build. This is needed for PRIME render offload.

Acked-by: Olivier Fourdan &lt;ofourdan@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This moves lnx_platform.c to the shared directory and adds it to
the BSD build. This is needed for PRIME render offload.

Acked-by: Olivier Fourdan &lt;ofourdan@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
