[PATCH] drm/radeon: add ring working query

Jerome Glisse j.glisse at gmail.com
Tue Apr 9 07:13:17 PDT 2013


On Tue, Apr 9, 2013 at 8:44 AM, Christian König <deathsimple at vodafone.de>wrote:

> From: Christian König <christian.koenig at amd.com>
>
> Add new ioctl option and bumb minor version number.
>

I already have the tiling patch that bump the version, but i think it's
just a matter for Alex.

Reviewed-by: Jerome Glisse <jglisse at redhat.com>


>
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/radeon/radeon_drv.c |    2 +-
>  drivers/gpu/drm/radeon/radeon_kms.c |   17 +++++++++++++++++
>  include/uapi/drm/radeon_drm.h       |    2 ++
>  3 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c
> b/drivers/gpu/drm/radeon/radeon_drv.c
> index 66a7f0f..31b193b 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -73,7 +73,7 @@
>   *   2.30.0 - fix for FMASK texturing
>   */
>  #define KMS_DRIVER_MAJOR       2
> -#define KMS_DRIVER_MINOR       30
> +#define KMS_DRIVER_MINOR       31
>  #define KMS_DRIVER_PATCHLEVEL  0
>  int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
>  int radeon_driver_unload_kms(struct drm_device *dev);
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c
> b/drivers/gpu/drm/radeon/radeon_kms.c
> index 3019759..8cb9d12 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -376,6 +376,23 @@ int radeon_info_ioctl(struct drm_device *dev, void
> *data, struct drm_file *filp)
>                 else
>                         return -EINVAL;
>                 break;
> +       case RADEON_INFO_RING_WORKING:
> +               switch (value) {
> +               case RADEON_CS_RING_GFX:
> +               case RADEON_CS_RING_COMPUTE:
> +                       value =
> rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready;
> +                       break;
> +               case RADEON_CS_RING_DMA:
> +                       value = rdev->ring[R600_RING_TYPE_DMA_INDEX].ready;
> +                       value |=
> rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX].ready;
> +                       break;
> +               case RADEON_CS_RING_UVD:
> +                       value = rdev->ring[R600_RING_TYPE_UVD_INDEX].ready;
> +                       break;
> +               default:
> +                       return -EINVAL;
> +               }
> +               break;
>         default:
>                 DRM_DEBUG_KMS("Invalid request %d\n", info->request);
>                 return -EINVAL;
> diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
> index cd085d1..8459415 100644
> --- a/include/uapi/drm/radeon_drm.h
> +++ b/include/uapi/drm/radeon_drm.h
> @@ -973,6 +973,8 @@ struct drm_radeon_cs {
>  #define RADEON_INFO_MAX_SE             0x12
>  /* max SH per SE */
>  #define RADEON_INFO_MAX_SH_PER_SE      0x13
> +/* query if a RADEON_CS_RING_* submission is supported */
> +#define RADEON_INFO_RING_WORKING       0x14
>
>  struct drm_radeon_info {
>         uint32_t                request;
> --
> 1.7.9.5
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20130409/99739f55/attachment.html>


More information about the dri-devel mailing list