Re: [PATCH] drm/radeon: add ring working query

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

 



Am 09.04.2013 16:26, schrieb Alex Deucher:
On Tue, Apr 9, 2013 at 10:13 AM, Jerome Glisse <j.glisse@xxxxxxxxx> wrote:
On Tue, Apr 9, 2013 at 8:44 AM, Christian König <deathsimple@xxxxxxxxxxx> wrote:
From: Christian König <christian.koenig@xxxxxxx>

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.
I'll take care of it.

IIRC we also have another internal patch that wants to bumb the version number.

Alex could you start with a drm-next-3.10 branch and try to merge all that stuff?

Thanks,
Christian.

Alex

Reviewed-by: Jerome Glisse <jglisse@xxxxxxxxxx>


Signed-off-by: Christian König <christian.koenig@xxxxxxx>
---
  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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


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

On Tue, Apr 9, 2013 at 10:13 AM, Jerome Glisse <j.glisse@xxxxxxxxx> wrote:
On Tue, Apr 9, 2013 at 8:44 AM, Christian König <deathsimple@xxxxxxxxxxx>
wrote:
From: Christian König <christian.koenig@xxxxxxx>

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@xxxxxxxxxx>


Signed-off-by: Christian König <christian.koenig@xxxxxxx>
---
  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@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


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


_______________________________________________
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