* [PATCH xf86-video-amdgpu] Add support for ScreenPtr::SyncSharedPixmap
@ 2016-09-28 8:00 Michel Dänzer
[not found] ` <20160928080018.17364-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
0 siblings, 1 reply; 4+ messages in thread
From: Michel Dänzer @ 2016-09-28 8:00 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
From: Michel Dänzer <michel.daenzer@amd.com>
This allows deferring shared pixmap updates between different drivers.
(Ported from radeon commit 53be26b00e83f871f0afd39caa5a7a1d6ec4aea1)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
src/amdgpu_kms.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 42 insertions(+), 1 deletion(-)
diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
index a159c84..4ae7995 100644
--- a/src/amdgpu_kms.c
+++ b/src/amdgpu_kms.c
@@ -491,6 +491,35 @@ amdgpu_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
}
}
+
+#if HAS_SYNC_SHARED_PIXMAP
+
+static Bool
+master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
+{
+ ScreenPtr master_screen = dirty->src->master_pixmap->drawable.pScreen;
+
+ return master_screen->SyncSharedPixmap != NULL;
+}
+
+static Bool
+slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
+{
+ ScreenPtr slave_screen = dirty->slave_dst->drawable.pScreen;
+
+ return slave_screen->SyncSharedPixmap != NULL;
+}
+
+static void
+call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
+{
+ ScreenPtr master_screen = dirty->src->master_pixmap->drawable.pScreen;
+
+ master_screen->SyncSharedPixmap(dirty);
+}
+
+#else /* !HAS_SYNC_SHARED_PIXMAP */
+
static Bool
master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
{
@@ -507,6 +536,15 @@ slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
return slave_scrn->driverName == scrn->driverName;
}
+static void
+call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
+{
+ amdgpu_sync_shared_pixmap(dirty);
+}
+
+#endif /* HAS_SYNC_SHARED_PIXMAPS */
+
+
static Bool
amdgpu_prime_scanout_do_update(xf86CrtcPtr crtc, unsigned scanout_id)
{
@@ -524,7 +562,7 @@ amdgpu_prime_scanout_do_update(xf86CrtcPtr crtc, unsigned scanout_id)
RegionPtr region;
if (master_has_sync_shared_pixmap(scrn, dirty))
- amdgpu_sync_shared_pixmap(dirty);
+ call_sync_shared_pixmap(dirty);
region = dirty_region(dirty);
if (RegionNil(region))
@@ -1803,6 +1841,9 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
#ifdef AMDGPU_PIXMAP_SHARING
pScreen->StartPixmapTracking = PixmapStartDirtyTracking;
pScreen->StopPixmapTracking = PixmapStopDirtyTracking;
+#if HAS_SYNC_SHARED_PIXMAP
+ pScreen->SyncSharedPixmap = amdgpu_sync_shared_pixmap;
+#endif
#endif
if (!xf86CrtcScreenInit(pScreen))
--
2.9.3
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH xf86-video-amdgpu] Add support for ScreenPtr::SyncSharedPixmap
[not found] ` <20160928080018.17364-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2016-09-28 8:42 ` Mike Lothian
[not found] ` <CAHbf0-GuUZPCGHzQrooOi4cTmRSJMQGrph4oD9E7+4DtW=z0Aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-28 13:38 ` Alex Deucher
1 sibling, 1 reply; 4+ messages in thread
From: Mike Lothian @ 2016-09-28 8:42 UTC (permalink / raw)
To: Michel Dänzer, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1.1: Type: text/plain, Size: 3309 bytes --]
Am I right in guessing this is only required for DRI2?
On Wed, 28 Sep 2016 at 09:00 Michel Dänzer <michel-otUistvHUpPR7s880joybQ@public.gmane.org> wrote:
> From: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>
>
> This allows deferring shared pixmap updates between different drivers.
>
> (Ported from radeon commit 53be26b00e83f871f0afd39caa5a7a1d6ec4aea1)
>
> Signed-off-by: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>
> ---
> src/amdgpu_kms.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 42 insertions(+), 1 deletion(-)
>
> diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
> index a159c84..4ae7995 100644
> --- a/src/amdgpu_kms.c
> +++ b/src/amdgpu_kms.c
> @@ -491,6 +491,35 @@ amdgpu_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
> }
> }
>
> +
> +#if HAS_SYNC_SHARED_PIXMAP
> +
> +static Bool
> +master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr
> dirty)
> +{
> + ScreenPtr master_screen =
> dirty->src->master_pixmap->drawable.pScreen;
> +
> + return master_screen->SyncSharedPixmap != NULL;
> +}
> +
> +static Bool
> +slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
> +{
> + ScreenPtr slave_screen = dirty->slave_dst->drawable.pScreen;
> +
> + return slave_screen->SyncSharedPixmap != NULL;
> +}
> +
> +static void
> +call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
> +{
> + ScreenPtr master_screen =
> dirty->src->master_pixmap->drawable.pScreen;
> +
> + master_screen->SyncSharedPixmap(dirty);
> +}
> +
> +#else /* !HAS_SYNC_SHARED_PIXMAP */
> +
> static Bool
> master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr
> dirty)
> {
> @@ -507,6 +536,15 @@ slave_has_sync_shared_pixmap(ScrnInfoPtr scrn,
> PixmapDirtyUpdatePtr dirty)
> return slave_scrn->driverName == scrn->driverName;
> }
>
> +static void
> +call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
> +{
> + amdgpu_sync_shared_pixmap(dirty);
> +}
> +
> +#endif /* HAS_SYNC_SHARED_PIXMAPS */
> +
> +
> static Bool
> amdgpu_prime_scanout_do_update(xf86CrtcPtr crtc, unsigned scanout_id)
> {
> @@ -524,7 +562,7 @@ amdgpu_prime_scanout_do_update(xf86CrtcPtr crtc,
> unsigned scanout_id)
> RegionPtr region;
>
> if (master_has_sync_shared_pixmap(scrn, dirty))
> - amdgpu_sync_shared_pixmap(dirty);
> + call_sync_shared_pixmap(dirty);
>
> region = dirty_region(dirty);
> if (RegionNil(region))
> @@ -1803,6 +1841,9 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
> #ifdef AMDGPU_PIXMAP_SHARING
> pScreen->StartPixmapTracking = PixmapStartDirtyTracking;
> pScreen->StopPixmapTracking = PixmapStopDirtyTracking;
> +#if HAS_SYNC_SHARED_PIXMAP
> + pScreen->SyncSharedPixmap = amdgpu_sync_shared_pixmap;
> +#endif
> #endif
>
> if (!xf86CrtcScreenInit(pScreen))
> --
> 2.9.3
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
>
[-- Attachment #1.2: Type: text/html, Size: 4234 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH xf86-video-amdgpu] Add support for ScreenPtr::SyncSharedPixmap
[not found] ` <CAHbf0-GuUZPCGHzQrooOi4cTmRSJMQGrph4oD9E7+4DtW=z0Aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2016-09-28 9:07 ` Michel Dänzer
0 siblings, 0 replies; 4+ messages in thread
From: Michel Dänzer @ 2016-09-28 9:07 UTC (permalink / raw)
To: Mike Lothian; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
On 28/09/16 05:42 PM, Mike Lothian wrote:
> Am I right in guessing this is only required for DRI2?
It's for PRIME slave output (xrandr --setprovideroutputsource and
friends), which isn't directly related to DRI2 or DRI3.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH xf86-video-amdgpu] Add support for ScreenPtr::SyncSharedPixmap
[not found] ` <20160928080018.17364-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-28 8:42 ` Mike Lothian
@ 2016-09-28 13:38 ` Alex Deucher
1 sibling, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2016-09-28 13:38 UTC (permalink / raw)
To: Michel Dänzer; +Cc: amd-gfx list
On Wed, Sep 28, 2016 at 4:00 AM, Michel Dänzer <michel@daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer@amd.com>
>
> This allows deferring shared pixmap updates between different drivers.
>
> (Ported from radeon commit 53be26b00e83f871f0afd39caa5a7a1d6ec4aea1)
>
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> src/amdgpu_kms.c | 43 ++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 42 insertions(+), 1 deletion(-)
>
> diff --git a/src/amdgpu_kms.c b/src/amdgpu_kms.c
> index a159c84..4ae7995 100644
> --- a/src/amdgpu_kms.c
> +++ b/src/amdgpu_kms.c
> @@ -491,6 +491,35 @@ amdgpu_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
> }
> }
>
> +
> +#if HAS_SYNC_SHARED_PIXMAP
> +
> +static Bool
> +master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
> +{
> + ScreenPtr master_screen = dirty->src->master_pixmap->drawable.pScreen;
> +
> + return master_screen->SyncSharedPixmap != NULL;
> +}
> +
> +static Bool
> +slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
> +{
> + ScreenPtr slave_screen = dirty->slave_dst->drawable.pScreen;
> +
> + return slave_screen->SyncSharedPixmap != NULL;
> +}
> +
> +static void
> +call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
> +{
> + ScreenPtr master_screen = dirty->src->master_pixmap->drawable.pScreen;
> +
> + master_screen->SyncSharedPixmap(dirty);
> +}
> +
> +#else /* !HAS_SYNC_SHARED_PIXMAP */
> +
> static Bool
> master_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
> {
> @@ -507,6 +536,15 @@ slave_has_sync_shared_pixmap(ScrnInfoPtr scrn, PixmapDirtyUpdatePtr dirty)
> return slave_scrn->driverName == scrn->driverName;
> }
>
> +static void
> +call_sync_shared_pixmap(PixmapDirtyUpdatePtr dirty)
> +{
> + amdgpu_sync_shared_pixmap(dirty);
> +}
> +
> +#endif /* HAS_SYNC_SHARED_PIXMAPS */
> +
> +
> static Bool
> amdgpu_prime_scanout_do_update(xf86CrtcPtr crtc, unsigned scanout_id)
> {
> @@ -524,7 +562,7 @@ amdgpu_prime_scanout_do_update(xf86CrtcPtr crtc, unsigned scanout_id)
> RegionPtr region;
>
> if (master_has_sync_shared_pixmap(scrn, dirty))
> - amdgpu_sync_shared_pixmap(dirty);
> + call_sync_shared_pixmap(dirty);
>
> region = dirty_region(dirty);
> if (RegionNil(region))
> @@ -1803,6 +1841,9 @@ Bool AMDGPUScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
> #ifdef AMDGPU_PIXMAP_SHARING
> pScreen->StartPixmapTracking = PixmapStartDirtyTracking;
> pScreen->StopPixmapTracking = PixmapStopDirtyTracking;
> +#if HAS_SYNC_SHARED_PIXMAP
> + pScreen->SyncSharedPixmap = amdgpu_sync_shared_pixmap;
> +#endif
> #endif
>
> if (!xf86CrtcScreenInit(pScreen))
> --
> 2.9.3
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-09-28 13:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-28 8:00 [PATCH xf86-video-amdgpu] Add support for ScreenPtr::SyncSharedPixmap Michel Dänzer
[not found] ` <20160928080018.17364-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2016-09-28 8:42 ` Mike Lothian
[not found] ` <CAHbf0-GuUZPCGHzQrooOi4cTmRSJMQGrph4oD9E7+4DtW=z0Aw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-09-28 9:07 ` Michel Dänzer
2016-09-28 13:38 ` Alex Deucher
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.