All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH xf86-video-ati] dri3: Handle radeon_get_pixmap_bo returning NULL
@ 2018-10-18  8:13 Michel Dänzer
       [not found] ` <20181018081358.28915-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Michel Dänzer @ 2018-10-18  8:13 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

From: Michel Dänzer <michel.daenzer@amd.com>

We were trying to already, but testing the wrong pointer.

Fixes: b85b7b11f5b5 "Add struct radeon_buffer"
Bug: https://bugs.debian.org/910846
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
 src/radeon_dri3.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/radeon_dri3.c b/src/radeon_dri3.c
index 7e89a2f0b..25078bae1 100644
--- a/src/radeon_dri3.c
+++ b/src/radeon_dri3.c
@@ -212,7 +212,7 @@ static int radeon_dri3_fd_from_pixmap(ScreenPtr screen,
 				      CARD16 *stride,
 				      CARD32 *size)
 {
-	struct radeon_bo *bo;
+	struct radeon_buffer *bo;
 	int fd;
 #ifdef USE_GLAMOR
 	ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
@@ -222,10 +222,10 @@ static int radeon_dri3_fd_from_pixmap(ScreenPtr screen,
 		return glamor_fd_from_pixmap(screen, pixmap, stride, size);
 #endif
 
-	bo = radeon_get_pixmap_bo(pixmap)->bo.radeon;
+	bo = radeon_get_pixmap_bo(pixmap);
 	if (!bo) {
 		exaMoveInPixmap(pixmap);
-		bo = radeon_get_pixmap_bo(pixmap)->bo.radeon;
+		bo = radeon_get_pixmap_bo(pixmap);
 		if (!bo)
 			return -1;
 	}
@@ -233,11 +233,11 @@ static int radeon_dri3_fd_from_pixmap(ScreenPtr screen,
 	if (pixmap->devKind > UINT16_MAX)
 		return -1;
 
-	if (radeon_gem_prime_share_bo(bo, &fd) < 0)
+	if (radeon_gem_prime_share_bo(bo->bo.radeon, &fd) < 0)
 		return -1;
 
 	*stride = pixmap->devKind;
-	*size = bo->size;
+	*size = bo->bo.radeon->size;
 	return fd;
 }
 
-- 
2.19.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH xf86-video-ati] dri3: Handle radeon_get_pixmap_bo returning NULL
       [not found] ` <20181018081358.28915-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2018-10-18 13:25   ` Deucher, Alexander
  0 siblings, 0 replies; 2+ messages in thread
From: Deucher, Alexander @ 2018-10-18 13:25 UTC (permalink / raw)
  To: Michel Dänzer, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 2487 bytes --]

Reviewed-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>

________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Michel Dänzer <michel-otUistvHUpPR7s880joybQ@public.gmane.org>
Sent: Thursday, October 18, 2018 4:13:58 AM
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH xf86-video-ati] dri3: Handle radeon_get_pixmap_bo returning NULL

From: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>

We were trying to already, but testing the wrong pointer.

Fixes: b85b7b11f5b5 "Add struct radeon_buffer"
Bug: https://bugs.debian.org/910846
Signed-off-by: Michel Dänzer <michel.daenzer-5C7GfCeVMHo@public.gmane.org>
---
 src/radeon_dri3.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/radeon_dri3.c b/src/radeon_dri3.c
index 7e89a2f0b..25078bae1 100644
--- a/src/radeon_dri3.c
+++ b/src/radeon_dri3.c
@@ -212,7 +212,7 @@ static int radeon_dri3_fd_from_pixmap(ScreenPtr screen,
                                       CARD16 *stride,
                                       CARD32 *size)
 {
-       struct radeon_bo *bo;
+       struct radeon_buffer *bo;
         int fd;
 #ifdef USE_GLAMOR
         ScrnInfoPtr scrn = xf86ScreenToScrn(screen);
@@ -222,10 +222,10 @@ static int radeon_dri3_fd_from_pixmap(ScreenPtr screen,
                 return glamor_fd_from_pixmap(screen, pixmap, stride, size);
 #endif

-       bo = radeon_get_pixmap_bo(pixmap)->bo.radeon;
+       bo = radeon_get_pixmap_bo(pixmap);
         if (!bo) {
                 exaMoveInPixmap(pixmap);
-               bo = radeon_get_pixmap_bo(pixmap)->bo.radeon;
+               bo = radeon_get_pixmap_bo(pixmap);
                 if (!bo)
                         return -1;
         }
@@ -233,11 +233,11 @@ static int radeon_dri3_fd_from_pixmap(ScreenPtr screen,
         if (pixmap->devKind > UINT16_MAX)
                 return -1;

-       if (radeon_gem_prime_share_bo(bo, &fd) < 0)
+       if (radeon_gem_prime_share_bo(bo->bo.radeon, &fd) < 0)
                 return -1;

         *stride = pixmap->devKind;
-       *size = bo->size;
+       *size = bo->bo.radeon->size;
         return fd;
 }

--
2.19.1

_______________________________________________
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: 5308 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 related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-18 13:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18  8:13 [PATCH xf86-video-ati] dri3: Handle radeon_get_pixmap_bo returning NULL Michel Dänzer
     [not found] ` <20181018081358.28915-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-10-18 13:25   ` Deucher, Alexander

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.