[PATCH xf86-video-amdgpu 1/4] Add amdgpu_pixmap_get_handle helper
Alex Deucher
alexdeucher at gmail.com
Fri Feb 26 17:50:09 UTC 2016
On Wed, Feb 24, 2016 at 4:49 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> (inspired by radeon commits dfad91fffb5bd013785223b42d78886df839eacf
> and ccbda955ebae1d457d35293833f12791e0f9fb0b)
>
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
For the series:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/amdgpu_bo_helper.c | 10 ++++++++++
> src/amdgpu_bo_helper.h | 2 ++
> 2 files changed, 12 insertions(+)
>
> diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
> index 65f1ac6..ad56197 100644
> --- a/src/amdgpu_bo_helper.c
> +++ b/src/amdgpu_bo_helper.c
> @@ -131,6 +131,16 @@ Bool amdgpu_bo_get_handle(struct amdgpu_buffer *bo, uint32_t *handle)
> handle) == 0;
> }
>
> +Bool amdgpu_pixmap_get_handle(PixmapPtr pixmap, uint32_t *handle)
> +{
> + struct amdgpu_buffer *bo = amdgpu_get_pixmap_bo(pixmap);
> +
> + if (!bo)
> + return FALSE;
> +
> + return amdgpu_bo_get_handle(bo, handle);
> +}
> +
> int amdgpu_bo_map(ScrnInfoPtr pScrn, struct amdgpu_buffer *bo)
> {
> int ret = 0;
> diff --git a/src/amdgpu_bo_helper.h b/src/amdgpu_bo_helper.h
> index 4dae200..10e2db7 100644
> --- a/src/amdgpu_bo_helper.h
> +++ b/src/amdgpu_bo_helper.h
> @@ -31,6 +31,8 @@ extern struct amdgpu_buffer *amdgpu_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width
>
> extern Bool amdgpu_bo_get_handle(struct amdgpu_buffer *bo, uint32_t *handle);
>
> +extern Bool amdgpu_pixmap_get_handle(PixmapPtr pixmap, uint32_t *handle);
> +
> extern int amdgpu_bo_map(ScrnInfoPtr pScrn, struct amdgpu_buffer *bo);
>
> extern void amdgpu_bo_unmap(struct amdgpu_buffer *bo);
> --
> 2.7.0
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> https://lists.x.org/mailman/listinfo/xorg-driver-ati
More information about the xorg-driver-ati
mailing list