[PATCH weston 12/68] compositor-drm: Use fb->fd consistently

Armin Krezović krezovic.armin at gmail.com
Fri Dec 9 21:01:22 UTC 2016


On 09.12.2016 20:57, Daniel Stone wrote:
> Everyone else uses fb->fd rather than pulling the FD back out of GBM.
> Use that in the destroy callback too.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> 

Makes sense.

Reviewed-by: Armin Krezović <krezovic.armin at gmail.com>

> Differential Revision: https://phabricator.freedesktop.org/D1406
> ---
>  libweston/compositor-drm.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libweston/compositor-drm.c b/libweston/compositor-drm.c
> index 3276ed0..a9bde0c 100644
> --- a/libweston/compositor-drm.c
> +++ b/libweston/compositor-drm.c
> @@ -243,10 +243,9 @@ static void
>  drm_fb_destroy_callback(struct gbm_bo *bo, void *data)
>  {
>  	struct drm_fb *fb = data;
> -	struct gbm_device *gbm = gbm_bo_get_device(bo);
>  
>  	if (fb->fb_id)
> -		drmModeRmFB(gbm_device_get_fd(gbm), fb->fb_id);
> +		drmModeRmFB(fb->fd, fb->fb_id);
>  
>  	weston_buffer_reference(&fb->buffer_ref, NULL);
>  
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 870 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20161209/bf28f4f9/attachment.sig>


More information about the wayland-devel mailing list