Re: [PATCH 12/25] vmwgfx: Add screen object support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Sep 28, 2011 at 04:10:08PM +0200, Thomas Hellstrom wrote:
> From: Jakob Bornecrantz <jakob@xxxxxxxxxx>
> 
> Signed-off-by: Jakob Bornecrantz <jakob@xxxxxxxxxx>
> Signed-off-by: Thomas Hellstrom <thellstrom@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/vmwgfx/Makefile      |    2 +-
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c  |   34 ++-
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.h  |    1 +
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.c  |  165 +++++++++-
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.h  |   10 +
>  drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c  |    5 +-
>  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c |  566 ++++++++++++++++++++++++++++++++++
>  7 files changed, 752 insertions(+), 31 deletions(-)
>  create mode 100644 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> 
> diff --git a/drivers/gpu/drm/vmwgfx/Makefile b/drivers/gpu/drm/vmwgfx/Makefile
> index e13a118..586869c 100644
> --- a/drivers/gpu/drm/vmwgfx/Makefile
> +++ b/drivers/gpu/drm/vmwgfx/Makefile
> @@ -5,6 +5,6 @@ vmwgfx-y := vmwgfx_execbuf.o vmwgfx_gmr.o vmwgfx_kms.o vmwgfx_drv.o \
>  	    vmwgfx_fb.o vmwgfx_ioctl.o vmwgfx_resource.o vmwgfx_buffer.o \
>  	    vmwgfx_fifo.o vmwgfx_irq.o vmwgfx_ldu.o vmwgfx_ttm_glue.o \
>  	    vmwgfx_overlay.o vmwgfx_marker.o vmwgfx_gmrid_manager.o \
> -	    vmwgfx_fence.o vmwgfx_dmabuf.o
> +	    vmwgfx_fence.o vmwgfx_dmabuf.o vmwgfx_scrn.o
>  
>  obj-$(CONFIG_DRM_VMWGFX) := vmwgfx.o
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> index d4829cb..d1e1325 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
> @@ -451,22 +451,28 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset)
>  	dev_priv->fman = vmw_fence_manager_init(dev_priv);
>  	if (unlikely(dev_priv->fman == NULL))
>  		goto out_no_fman;
> +
> +	/* Need to start the fifo to check if we can do screen objects */
> +	ret = vmw_3d_resource_inc(dev_priv, true);
> +	if (unlikely(ret != 0))
> +		goto out_no_fifo;
> +	vmw_kms_save_vga(dev_priv);
> +	DRM_INFO("%s", vmw_fifo_have_3d(dev_priv) ?
> +		 "Detected device 3D availability.\n" :
> +		 "Detected no device 3D availability.\n");

You could just do:
	DRM_INFO("Detected %s 3D availability\n", vmw_fifo_have_3d(dev_priv) ?
		 "device" : "no device");

but I see you are moving code, so that perhaps belongs to another patch.

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux